### Install PHAR Utils via Composer Source: https://github.com/sebastianbergmann/phpunit/blob/main/build/scripts/phar-set-timestamps/vendor/seld/phar-utils/README.md Use this command to add the library to your project dependencies. ```bash composer require seld/phar-utils ``` -------------------------------- ### Verify PHPUnit Version Source: https://github.com/sebastianbergmann/phpunit/blob/main/README.md Check the installed PHPUnit version using the PHAR file. Replace X.Y with the downloaded version. ```bash $ php phpunit-X.Y.phar --version ``` -------------------------------- ### Download PHPUnit PHAR Source: https://github.com/sebastianbergmann/phpunit/blob/main/README.md Download the PHPUnit PHAR archive. Replace X.Y with the desired version. ```bash $ wget https://phar.phpunit.de/phpunit-X.Y.phar ``` -------------------------------- ### Seld\PharUtils\Linter API Source: https://github.com/sebastianbergmann/phpunit/blob/main/build/scripts/phar-set-timestamps/vendor/seld/phar-utils/README.md Provides functionality to lint PHP files within a PHAR archive. ```APIDOC ## Seld\PharUtils\Linter ### Description Provides functionality to lint PHP files within a PHAR archive. ### Methods #### `lint($pharFile)` - **pharFile** (string) - Required - The path to the PHAR file to lint. Lints all PHP files inside a given PHAR with the current PHP version. ``` -------------------------------- ### Seld\PharUtils\Timestamps API Source: https://github.com/sebastianbergmann/phpunit/blob/main/build/scripts/phar-set-timestamps/vendor/seld/phar-utils/README.md Provides utilities for loading, updating timestamps, and saving PHAR files. ```APIDOC ## Seld\PharUtils\Timestamps ### Description Provides utilities for loading, updating timestamps, and saving PHAR files. ### Methods #### `__construct($pharFile)` - **pharFile** (string) - Required - The path to the PHAR file to load. Loads a PHAR file into memory. #### `updateTimestamps($timestamp = null)` - **timestamp** (int|null) - Optional - The Unix timestamp to set for all files. If null, the current time is used. Updates each file's Unix timestamps in the PHAR so the PHAR signature can be produced in a reproducible manner. #### `save($path, $signatureAlgo = '')` - **path** (string) - Required - The path where the updated PHAR file will be saved. - **signatureAlgo** (string) - Optional - The algorithm to use for the PHAR signature. Must be one of `Phar::MD5`, `Phar::SHA1`, `Phar::SHA256`, or `Phar::SHA512`. Saves the updated PHAR file with an updated signature. ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.