diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index bdb36953a..ffd3929fa 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -8,6 +8,7 @@ name: CI env: COMPOSER_ROOT_VERSION: 12.4.x-dev + PHP_VERSION: 8.4 jobs: coding-guidelines: @@ -17,12 +18,23 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v5 + with: + fetch-depth: 1 + ref: ${{ github.event.pull_request.head.sha || github.sha }} + + - name: Use local branch + shell: bash + run: | + BRANCH=$([ "${{ github.event_name }}" == "pull_request" ] && echo "${{ github.head_ref }}" || echo "${{ github.ref_name }}") + git branch -D $BRANCH 2>/dev/null || true + git branch $BRANCH HEAD + git checkout $BRANCH - name: Install PHP uses: shivammathur/setup-php@v2 with: - php-version: 8.3 + php-version: ${{ env.PHP_VERSION }} extensions: none, iconv, json, phar, tokenizer coverage: none tools: none @@ -37,17 +49,41 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v5 + with: + fetch-depth: 1 + ref: ${{ github.event.pull_request.head.sha || github.sha }} + + - name: Use local branch + shell: bash + run: | + BRANCH=$([ "${{ github.event_name }}" == "pull_request" ] && echo "${{ github.head_ref }}" || echo "${{ github.ref_name }}") + git branch -D $BRANCH 2>/dev/null || true + git branch $BRANCH HEAD + git checkout $BRANCH - name: Install PHP uses: shivammathur/setup-php@v2 with: - php-version: 8.4 + php-version: ${{ env.PHP_VERSION }} extensions: none, ctype, curl, dom, iconv, mbstring, opcache, simplexml, tokenizer, xml, xmlwriter coverage: none tools: none - - name: Install dependencies with Composer + - name: Get Composer cache directory + id: composer-cache + shell: bash + run: | + echo "dir=$(composer config cache-files-dir)" >> "$GITHUB_OUTPUT" + + - name: Cache Composer cache directory + uses: actions/cache@v4 + with: + path: ${{ steps.composer-cache.outputs.dir }} + key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} + restore-keys: ${{ runner.os }}-composer- + + - name: Update dependencies with composer run: ./tools/composer update --no-interaction --no-ansi --no-progress - name: Run PHPStan @@ -84,7 +120,18 @@ jobs: run: git config --global core.autocrlf false - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v5 + with: + fetch-depth: 1 + ref: ${{ github.event.pull_request.head.sha || github.sha }} + + - name: Use local branch + shell: bash + run: | + BRANCH=$([ "${{ github.event_name }}" == "pull_request" ] && echo "${{ github.head_ref }}" || echo "${{ github.ref_name }}") + git branch -D $BRANCH 2>/dev/null || true + git branch $BRANCH HEAD + git checkout $BRANCH - name: Install PHP with extensions uses: shivammathur/setup-php@v2 @@ -95,11 +142,24 @@ jobs: ini-values: ${{ env.PHP_INI_VALUES }} tools: none + - name: Get Composer cache directory + id: composer-cache + shell: bash + run: | + echo "dir=$(composer config cache-files-dir)" >> "$GITHUB_OUTPUT" + + - name: Cache Composer cache directory + uses: actions/cache@v4 + with: + path: ${{ steps.composer-cache.outputs.dir }} + key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} + restore-keys: ${{ runner.os }}-composer- + - name: Install dependencies with Composer run: php ./tools/composer update --no-ansi --no-interaction --no-progress - name: Run tests with PHPUnit - run: ./vendor/bin/phpunit --log-junit test-results.xml --coverage-openclover=code-coverage.xml + run: vendor/bin/phpunit --log-junit test-results.xml --coverage-clover=code-coverage.xml - name: Upload test results to Codecov.io if: ${{ !cancelled() }} diff --git a/.phive/phars.xml b/.phive/phars.xml index 29fc69ba6..7dbd9e312 100644 --- a/.phive/phars.xml +++ b/.phive/phars.xml @@ -1,5 +1,5 @@ - - + + diff --git a/tools/.phpstan/composer.json b/tools/.phpstan/composer.json index 29d56109c..c4107d7db 100644 --- a/tools/.phpstan/composer.json +++ b/tools/.phpstan/composer.json @@ -1,10 +1,10 @@ { "require-dev": { - "phpstan/phpstan": "^2.1.22", + "phpstan/phpstan": "^2.1.29", "phpstan/extension-installer": "^1.4.3", - "phpstan/phpstan-strict-rules": "^2.0.6", + "phpstan/phpstan-strict-rules": "^2.0.7", "tomasvotruba/type-coverage": "^2.0.2", - "ergebnis/phpstan-rules": "^2.11.0" + "ergebnis/phpstan-rules": "^2.12.0" }, "config": { "allow-plugins": { diff --git a/tools/.phpstan/composer.lock b/tools/.phpstan/composer.lock index f01a2d2b8..c4fad1470 100644 --- a/tools/.phpstan/composer.lock +++ b/tools/.phpstan/composer.lock @@ -4,21 +4,21 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "33d32155239d1370eaa496a5fd6794c9", + "content-hash": "8f0377de28eecfcab5091f1dd4d26669", "packages": [], "packages-dev": [ { "name": "ergebnis/phpstan-rules", - "version": "2.11.0", + "version": "2.12.0", "source": { "type": "git", "url": "https://github.com/ergebnis/phpstan-rules.git", - "reference": "505fead92d89daeb6aa045e92a3e77b55f4ca6a5" + "reference": "c4e0121a937b3b551f800a86e7d78794da2783ea" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/ergebnis/phpstan-rules/zipball/505fead92d89daeb6aa045e92a3e77b55f4ca6a5", - "reference": "505fead92d89daeb6aa045e92a3e77b55f4ca6a5", + "url": "https://api.github.com/repos/ergebnis/phpstan-rules/zipball/c4e0121a937b3b551f800a86e7d78794da2783ea", + "reference": "c4e0121a937b3b551f800a86e7d78794da2783ea", "shasum": "" }, "require": { @@ -31,10 +31,9 @@ "doctrine/orm": "^2.20.0 || ^3.3.0", "ergebnis/composer-normalize": "^2.47.0", "ergebnis/license": "^2.6.0", - "ergebnis/php-cs-fixer-config": "^6.52.0", - "ergebnis/phpunit-slow-test-detector": "^2.19.1", + "ergebnis/php-cs-fixer-config": "^6.54.0", + "ergebnis/phpunit-slow-test-detector": "^2.20.0", "fakerphp/faker": "^1.24.1", - "nette/di": "^3.1.10", "phpstan/extension-installer": "^1.4.3", "phpstan/phpstan-deprecation-rules": "^2.0.3", "phpstan/phpstan-phpunit": "^2.0.7", @@ -79,7 +78,7 @@ "security": "https://github.com/ergebnis/phpstan-rules/blob/main/.github/SECURITY.md", "source": "https://github.com/ergebnis/phpstan-rules" }, - "time": "2025-08-19T07:58:25+00:00" + "time": "2025-09-07T13:31:33+00:00" }, { "name": "nette/utils", @@ -220,16 +219,16 @@ }, { "name": "phpstan/phpstan", - "version": "2.1.22", + "version": "2.1.29", "source": { "type": "git", - "url": "https://github.com/phpstan/phpstan.git", - "reference": "41600c8379eb5aee63e9413fe9e97273e25d57e4" + "url": "https://github.com/phpstan/phpstan-phar-composer-source.git", + "reference": "git" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan/zipball/41600c8379eb5aee63e9413fe9e97273e25d57e4", - "reference": "41600c8379eb5aee63e9413fe9e97273e25d57e4", + "url": "https://api.github.com/repos/phpstan/phpstan/zipball/d618573eed4a1b6b75e37b2e0b65ac65c885d88e", + "reference": "d618573eed4a1b6b75e37b2e0b65ac65c885d88e", "shasum": "" }, "require": { @@ -274,25 +273,25 @@ "type": "github" } ], - "time": "2025-08-04T19:17:37+00:00" + "time": "2025-09-25T06:58:18+00:00" }, { "name": "phpstan/phpstan-strict-rules", - "version": "2.0.6", + "version": "2.0.7", "source": { "type": "git", "url": "https://github.com/phpstan/phpstan-strict-rules.git", - "reference": "f9f77efa9de31992a832ff77ea52eb42d675b094" + "reference": "d6211c46213d4181054b3d77b10a5c5cb0d59538" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan-strict-rules/zipball/f9f77efa9de31992a832ff77ea52eb42d675b094", - "reference": "f9f77efa9de31992a832ff77ea52eb42d675b094", + "url": "https://api.github.com/repos/phpstan/phpstan-strict-rules/zipball/d6211c46213d4181054b3d77b10a5c5cb0d59538", + "reference": "d6211c46213d4181054b3d77b10a5c5cb0d59538", "shasum": "" }, "require": { "php": "^7.4 || ^8.0", - "phpstan/phpstan": "^2.0.4" + "phpstan/phpstan": "^2.1.29" }, "require-dev": { "php-parallel-lint/php-parallel-lint": "^1.2", @@ -320,9 +319,9 @@ "description": "Extra strict and opinionated rules for PHPStan", "support": { "issues": "https://github.com/phpstan/phpstan-strict-rules/issues", - "source": "https://github.com/phpstan/phpstan-strict-rules/tree/2.0.6" + "source": "https://github.com/phpstan/phpstan-strict-rules/tree/2.0.7" }, - "time": "2025-07-21T12:19:29+00:00" + "time": "2025-09-26T11:19:08+00:00" }, { "name": "tomasvotruba/type-coverage", diff --git a/tools/.phpstan/vendor/composer/installed.json b/tools/.phpstan/vendor/composer/installed.json index 09fde69c1..f6ac0ba02 100644 --- a/tools/.phpstan/vendor/composer/installed.json +++ b/tools/.phpstan/vendor/composer/installed.json @@ -2,17 +2,17 @@ "packages": [ { "name": "ergebnis/phpstan-rules", - "version": "2.11.0", - "version_normalized": "2.11.0.0", + "version": "2.12.0", + "version_normalized": "2.12.0.0", "source": { "type": "git", "url": "https://github.com/ergebnis/phpstan-rules.git", - "reference": "505fead92d89daeb6aa045e92a3e77b55f4ca6a5" + "reference": "c4e0121a937b3b551f800a86e7d78794da2783ea" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/ergebnis/phpstan-rules/zipball/505fead92d89daeb6aa045e92a3e77b55f4ca6a5", - "reference": "505fead92d89daeb6aa045e92a3e77b55f4ca6a5", + "url": "https://api.github.com/repos/ergebnis/phpstan-rules/zipball/c4e0121a937b3b551f800a86e7d78794da2783ea", + "reference": "c4e0121a937b3b551f800a86e7d78794da2783ea", "shasum": "" }, "require": { @@ -25,10 +25,9 @@ "doctrine/orm": "^2.20.0 || ^3.3.0", "ergebnis/composer-normalize": "^2.47.0", "ergebnis/license": "^2.6.0", - "ergebnis/php-cs-fixer-config": "^6.52.0", - "ergebnis/phpunit-slow-test-detector": "^2.19.1", + "ergebnis/php-cs-fixer-config": "^6.54.0", + "ergebnis/phpunit-slow-test-detector": "^2.20.0", "fakerphp/faker": "^1.24.1", - "nette/di": "^3.1.10", "phpstan/extension-installer": "^1.4.3", "phpstan/phpstan-deprecation-rules": "^2.0.3", "phpstan/phpstan-phpunit": "^2.0.7", @@ -38,7 +37,7 @@ "symfony/finder": "^5.4.45", "symfony/process": "^5.4.47" }, - "time": "2025-08-19T07:58:25+00:00", + "time": "2025-09-07T13:31:33+00:00", "type": "phpstan-extension", "extra": { "phpstan": { @@ -222,17 +221,17 @@ }, { "name": "phpstan/phpstan", - "version": "2.1.22", - "version_normalized": "2.1.22.0", + "version": "2.1.29", + "version_normalized": "2.1.29.0", "source": { "type": "git", - "url": "https://github.com/phpstan/phpstan.git", - "reference": "41600c8379eb5aee63e9413fe9e97273e25d57e4" + "url": "https://github.com/phpstan/phpstan-phar-composer-source.git", + "reference": "git" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan/zipball/41600c8379eb5aee63e9413fe9e97273e25d57e4", - "reference": "41600c8379eb5aee63e9413fe9e97273e25d57e4", + "url": "https://api.github.com/repos/phpstan/phpstan/zipball/d618573eed4a1b6b75e37b2e0b65ac65c885d88e", + "reference": "d618573eed4a1b6b75e37b2e0b65ac65c885d88e", "shasum": "" }, "require": { @@ -241,7 +240,7 @@ "conflict": { "phpstan/phpstan-shim": "*" }, - "time": "2025-08-04T19:17:37+00:00", + "time": "2025-09-25T06:58:18+00:00", "bin": [ "phpstan", "phpstan.phar" @@ -283,22 +282,22 @@ }, { "name": "phpstan/phpstan-strict-rules", - "version": "2.0.6", - "version_normalized": "2.0.6.0", + "version": "2.0.7", + "version_normalized": "2.0.7.0", "source": { "type": "git", "url": "https://github.com/phpstan/phpstan-strict-rules.git", - "reference": "f9f77efa9de31992a832ff77ea52eb42d675b094" + "reference": "d6211c46213d4181054b3d77b10a5c5cb0d59538" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan-strict-rules/zipball/f9f77efa9de31992a832ff77ea52eb42d675b094", - "reference": "f9f77efa9de31992a832ff77ea52eb42d675b094", + "url": "https://api.github.com/repos/phpstan/phpstan-strict-rules/zipball/d6211c46213d4181054b3d77b10a5c5cb0d59538", + "reference": "d6211c46213d4181054b3d77b10a5c5cb0d59538", "shasum": "" }, "require": { "php": "^7.4 || ^8.0", - "phpstan/phpstan": "^2.0.4" + "phpstan/phpstan": "^2.1.29" }, "require-dev": { "php-parallel-lint/php-parallel-lint": "^1.2", @@ -306,7 +305,7 @@ "phpstan/phpstan-phpunit": "^2.0", "phpunit/phpunit": "^9.6" }, - "time": "2025-07-21T12:19:29+00:00", + "time": "2025-09-26T11:19:08+00:00", "type": "phpstan-extension", "extra": { "phpstan": { @@ -328,7 +327,7 @@ "description": "Extra strict and opinionated rules for PHPStan", "support": { "issues": "https://github.com/phpstan/phpstan-strict-rules/issues", - "source": "https://github.com/phpstan/phpstan-strict-rules/tree/2.0.6" + "source": "https://github.com/phpstan/phpstan-strict-rules/tree/2.0.7" }, "install-path": "../phpstan/phpstan-strict-rules" }, diff --git a/tools/.phpstan/vendor/composer/installed.php b/tools/.phpstan/vendor/composer/installed.php index f294cb70c..7a248a2ec 100644 --- a/tools/.phpstan/vendor/composer/installed.php +++ b/tools/.phpstan/vendor/composer/installed.php @@ -3,7 +3,7 @@ 'name' => '__root__', 'pretty_version' => 'dev-main', 'version' => 'dev-main', - 'reference' => '086553c5b2e0e1e20293d782d788ab768202b621', + 'reference' => 'b129b36a3fc9115e5552f546ef92ea15e6db0195', 'type' => 'library', 'install_path' => __DIR__ . '/../../', 'aliases' => array(), @@ -13,16 +13,16 @@ '__root__' => array( 'pretty_version' => 'dev-main', 'version' => 'dev-main', - 'reference' => '086553c5b2e0e1e20293d782d788ab768202b621', + 'reference' => 'b129b36a3fc9115e5552f546ef92ea15e6db0195', 'type' => 'library', 'install_path' => __DIR__ . '/../../', 'aliases' => array(), 'dev_requirement' => false, ), 'ergebnis/phpstan-rules' => array( - 'pretty_version' => '2.11.0', - 'version' => '2.11.0.0', - 'reference' => '505fead92d89daeb6aa045e92a3e77b55f4ca6a5', + 'pretty_version' => '2.12.0', + 'version' => '2.12.0.0', + 'reference' => 'c4e0121a937b3b551f800a86e7d78794da2783ea', 'type' => 'phpstan-extension', 'install_path' => __DIR__ . '/../ergebnis/phpstan-rules', 'aliases' => array(), @@ -47,18 +47,18 @@ 'dev_requirement' => true, ), 'phpstan/phpstan' => array( - 'pretty_version' => '2.1.22', - 'version' => '2.1.22.0', - 'reference' => '41600c8379eb5aee63e9413fe9e97273e25d57e4', + 'pretty_version' => '2.1.29', + 'version' => '2.1.29.0', + 'reference' => 'd618573eed4a1b6b75e37b2e0b65ac65c885d88e', 'type' => 'library', 'install_path' => __DIR__ . '/../phpstan/phpstan', 'aliases' => array(), 'dev_requirement' => true, ), 'phpstan/phpstan-strict-rules' => array( - 'pretty_version' => '2.0.6', - 'version' => '2.0.6.0', - 'reference' => 'f9f77efa9de31992a832ff77ea52eb42d675b094', + 'pretty_version' => '2.0.7', + 'version' => '2.0.7.0', + 'reference' => 'd6211c46213d4181054b3d77b10a5c5cb0d59538', 'type' => 'phpstan-extension', 'install_path' => __DIR__ . '/../phpstan/phpstan-strict-rules', 'aliases' => array(), diff --git a/tools/.phpstan/vendor/ergebnis/phpstan-rules/CHANGELOG.md b/tools/.phpstan/vendor/ergebnis/phpstan-rules/CHANGELOG.md index 00eab751e..7729147af 100644 --- a/tools/.phpstan/vendor/ergebnis/phpstan-rules/CHANGELOG.md +++ b/tools/.phpstan/vendor/ergebnis/phpstan-rules/CHANGELOG.md @@ -6,7 +6,15 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), ## Unreleased -For a full diff see [`2.11.0...main`][2.11.0...main]. +For a full diff see [`2.12.0...main`][2.12.0...main]. + +## [`2.12.0`][2.12.0] + +For a full diff see [`2.11.0...2.12.0`][2.11.0...2.12.0]. + +### Added + +- Added support for PHP 8.5 ([#977]), by [@localheinz] ## [`2.11.0`][2.11.0] @@ -579,6 +587,7 @@ For a full diff see [`362c7ea...0.1.0`][362c7ea...0.1.0]. [2.10.4]: https://github.com/ergebnis/phpstan-rules/releases/tag/2.10.4 [2.10.5]: https://github.com/ergebnis/phpstan-rules/releases/tag/2.10.5 [2.11.0]: https://github.com/ergebnis/phpstan-rules/releases/tag/2.11.0 +[2.12.0]: https://github.com/ergebnis/phpstan-rules/releases/tag/2.12.0 [362c7ea...0.1.0]: https://github.com/ergebnis/phpstan-rules/compare/362c7ea...0.1.0 [0.1.0...0.2.0]: https://github.com/ergebnis/phpstan-rules/compare/0.1.0...0.2.0 @@ -628,7 +637,8 @@ For a full diff see [`362c7ea...0.1.0`][362c7ea...0.1.0]. [2.10.3...2.10.4]: https://github.com/ergebnis/phpstan-rules/compare/2.10.3...2.10.4 [2.10.4...2.10.5]: https://github.com/ergebnis/phpstan-rules/compare/2.10.4...2.10.5 [2.10.5...2.11.0]: https://github.com/ergebnis/phpstan-rules/compare/2.10.5...2.11.0 -[2.11.0...main]: https://github.com/ergebnis/phpstan-rules/compare/2.11.0...main +[2.11.0...2.12.0]: https://github.com/ergebnis/phpstan-rules/compare/2.11.0...2.12.0 +[2.12.0...main]: https://github.com/ergebnis/phpstan-rules/compare/2.12.0...main [#1]: https://github.com/ergebnis/phpstan-rules/pull/1 [#4]: https://github.com/ergebnis/phpstan-rules/pull/4 @@ -725,6 +735,7 @@ For a full diff see [`362c7ea...0.1.0`][362c7ea...0.1.0]. [#957]: https://github.com/ergebnis/phpstan-rules/pull/957 [#958]: https://github.com/ergebnis/phpstan-rules/pull/958 [#972]: https://github.com/ergebnis/phpstan-rules/pull/972 +[#977]: https://github.com/ergebnis/phpstan-rules/pull/977 [@cosmastech]: https://github.com/cosmastech [@enumag]: https://github.com/enumag diff --git a/tools/.phpstan/vendor/ergebnis/phpstan-rules/composer.json b/tools/.phpstan/vendor/ergebnis/phpstan-rules/composer.json index 16e88b2fa..5060dde2d 100644 --- a/tools/.phpstan/vendor/ergebnis/phpstan-rules/composer.json +++ b/tools/.phpstan/vendor/ergebnis/phpstan-rules/composer.json @@ -30,10 +30,9 @@ "doctrine/orm": "^2.20.0 || ^3.3.0", "ergebnis/composer-normalize": "^2.47.0", "ergebnis/license": "^2.6.0", - "ergebnis/php-cs-fixer-config": "^6.52.0", - "ergebnis/phpunit-slow-test-detector": "^2.19.1", + "ergebnis/php-cs-fixer-config": "^6.54.0", + "ergebnis/phpunit-slow-test-detector": "^2.20.0", "fakerphp/faker": "^1.24.1", - "nette/di": "^3.1.10", "phpstan/extension-installer": "^1.4.3", "phpstan/phpstan-deprecation-rules": "^2.0.3", "phpstan/phpstan-phpunit": "^2.0.7", diff --git a/tools/.phpstan/vendor/phpstan/extension-installer/src/GeneratedConfig.php b/tools/.phpstan/vendor/phpstan/extension-installer/src/GeneratedConfig.php index 145d6b0bb..9f5fc96d8 100644 --- a/tools/.phpstan/vendor/phpstan/extension-installer/src/GeneratedConfig.php +++ b/tools/.phpstan/vendor/phpstan/extension-installer/src/GeneratedConfig.php @@ -21,7 +21,7 @@ final class GeneratedConfig 0 => 'rules.neon', ), ), - 'version' => '2.11.0', + 'version' => '2.12.0', 'phpstanVersionConstraint' => '>=2.1.8.0-dev, <3.0.0.0-dev', ), 'phpstan/phpstan-strict-rules' => @@ -35,8 +35,8 @@ final class GeneratedConfig 0 => 'rules.neon', ), ), - 'version' => '2.0.6', - 'phpstanVersionConstraint' => '>=2.0.4.0-dev, <3.0.0.0-dev', + 'version' => '2.0.7', + 'phpstanVersionConstraint' => '>=2.1.29.0-dev, <3.0.0.0-dev', ), 'tomasvotruba/type-coverage' => array ( @@ -58,7 +58,7 @@ final class GeneratedConfig ); /** @var string|null */ - public const PHPSTAN_VERSION_CONSTRAINT = '>=2.1.8.0-dev, <3.0.0.0-dev'; + public const PHPSTAN_VERSION_CONSTRAINT = '>=2.1.29.0-dev, <3.0.0.0-dev'; private function __construct() { diff --git a/tools/.phpstan/vendor/phpstan/phpstan-strict-rules/README.md b/tools/.phpstan/vendor/phpstan/phpstan-strict-rules/README.md index e56aa34d7..3a60ec8e1 100644 --- a/tools/.phpstan/vendor/phpstan/phpstan-strict-rules/README.md +++ b/tools/.phpstan/vendor/phpstan/phpstan-strict-rules/README.md @@ -13,14 +13,12 @@ | `numericOperandsInArithmeticOperators` | Require numeric operand in `+$var`, `-$var`, `$var++`, `$var--`, `++$var` and `--$var`. | | `numericOperandsInArithmeticOperators` | Require numeric operand in `$var++`, `$var--`, `++$var`and `--$var`. | | `strictFunctionCalls` | These functions contain a `$strict` parameter for better type safety, it must be set to `true`:
* `in_array` (3rd parameter)
* `array_search` (3rd parameter)
* `array_keys` (3rd parameter; only if the 2nd parameter `$search_value` is provided)
* `base64_decode` (2nd parameter). | -| `overwriteVariablesWithLoop` | Variables assigned in `while` loop condition and `for` loop initial assignment cannot be used after the loop. | -| `overwriteVariablesWithLoop` | Variables set in foreach that's always looped thanks to non-empty arrays cannot be used after the loop. | +| `overwriteVariablesWithLoop` | * Disallow overwriting variables with `foreach` key and value variables.
* Disallow overwriting variables with `for` loop initial assignment. | | `switchConditionsMatchingType` | Types in `switch` condition and `case` value must match. PHP compares them loosely by default and that can lead to unexpected results. | | `dynamicCallOnStaticMethod` | Check that statically declared methods are called statically. | | `disallowedEmpty` | Disallow `empty()` - it's a very loose comparison (see [manual](https://php.net/empty)), it's recommended to use more strict one. | | `disallowedShortTernary` | Disallow short ternary operator (`?:`) - implies weak comparison, it's recommended to use null coalesce operator (`??`) or ternary operator with strict condition. | | `noVariableVariables` | Disallow variable variables (`$$foo`, `$this->$method()` etc.). | -| `overwriteVariablesWithLoop` | Disallow overwriting variables with foreach key and value variables. | | `checkAlwaysTrueInstanceof`, `checkAlwaysTrueCheckTypeFunctionCall`, `checkAlwaysTrueStrictComparison` | Always true `instanceof`, type-checking `is_*` functions and strict comparisons `===`/`!==`. These checks can be turned off by setting `checkAlwaysTrueInstanceof`, `checkAlwaysTrueCheckTypeFunctionCall` and `checkAlwaysTrueStrictComparison` to false. | | | Correct case for referenced and called function names. | | `matchingInheritedMethodNames` | Correct case for inherited and implemented method names. | diff --git a/tools/.phpstan/vendor/phpstan/phpstan-strict-rules/composer.json b/tools/.phpstan/vendor/phpstan/phpstan-strict-rules/composer.json index 2bbc44d69..bc72c5811 100644 --- a/tools/.phpstan/vendor/phpstan/phpstan-strict-rules/composer.json +++ b/tools/.phpstan/vendor/phpstan/phpstan-strict-rules/composer.json @@ -7,7 +7,7 @@ ], "require": { "php": "^7.4 || ^8.0", - "phpstan/phpstan": "^2.0.4" + "phpstan/phpstan": "^2.1.29" }, "require-dev": { "php-parallel-lint/php-parallel-lint": "^1.2", diff --git a/tools/.phpstan/vendor/phpstan/phpstan-strict-rules/rules.neon b/tools/.phpstan/vendor/phpstan/phpstan-strict-rules/rules.neon index 7a63c4ec3..0def6d878 100644 --- a/tools/.phpstan/vendor/phpstan/phpstan-strict-rules/rules.neon +++ b/tools/.phpstan/vendor/phpstan/phpstan-strict-rules/rules.neon @@ -11,6 +11,7 @@ parameters: reportStaticMethodSignatures: true reportMaybesInPropertyPhpDocTypes: true reportWrongPhpDocTypeInVarTag: true + checkStrictPrintfPlaceholderTypes: true strictRules: allRules: true disallowedLooseComparison: %strictRules.allRules% diff --git a/tools/.phpstan/vendor/phpstan/phpstan-strict-rules/src/Rules/Classes/RequireParentConstructCallRule.php b/tools/.phpstan/vendor/phpstan/phpstan-strict-rules/src/Rules/Classes/RequireParentConstructCallRule.php index 77595810a..38c5e0339 100644 --- a/tools/.phpstan/vendor/phpstan/phpstan-strict-rules/src/Rules/Classes/RequireParentConstructCallRule.php +++ b/tools/.phpstan/vendor/phpstan/phpstan-strict-rules/src/Rules/Classes/RequireParentConstructCallRule.php @@ -104,26 +104,27 @@ private function callsParentConstruct(Node $parserNode): bool */ private function getParentConstructorClass($classReflection) { - while ($classReflection->getParentClass() !== false) { - $constructor = $classReflection->getParentClass()->hasMethod('__construct') ? $classReflection->getParentClass()->getMethod('__construct') : null; - $constructorWithClassName = $classReflection->getParentClass()->hasMethod($classReflection->getParentClass()->getName()) ? $classReflection->getParentClass()->getMethod($classReflection->getParentClass()->getName()) : null; + $parentClass = $classReflection->getParentClass(); + while ($parentClass !== false) { + $constructor = $parentClass->hasMethod('__construct') ? $parentClass->getMethod('__construct') : null; + $constructorWithClassName = $parentClass->hasMethod($parentClass->getName()) ? $parentClass->getMethod($parentClass->getName()) : null; if ( ( $constructor !== null - && $constructor->getDeclaringClass()->getName() === $classReflection->getParentClass()->getName() + && $constructor->getDeclaringClass()->getName() === $parentClass->getName() && !$constructor->isAbstract() && !$constructor->isPrivate() && !$constructor->isDeprecated() ) || ( $constructorWithClassName !== null - && $constructorWithClassName->getDeclaringClass()->getName() === $classReflection->getParentClass()->getName() + && $constructorWithClassName->getDeclaringClass()->getName() === $parentClass->getName() && !$constructorWithClassName->isAbstract() ) ) { - return $classReflection->getParentClass(); + return $parentClass; } - $classReflection = $classReflection->getParentClass(); + $parentClass = $parentClass->getParentClass(); } return false; diff --git a/tools/.phpstan/vendor/phpstan/phpstan/README.md b/tools/.phpstan/vendor/phpstan/phpstan/README.md index f4af4753a..49bed4fd7 100644 --- a/tools/.phpstan/vendor/phpstan/phpstan/README.md +++ b/tools/.phpstan/vendor/phpstan/phpstan/README.md @@ -60,7 +60,7 @@ Want your logo here? [Learn more »](https://phpstan.org/sponsor)
RightCapital     -ContentKing +Shoptet
ZOL     @@ -78,8 +78,6 @@ Want your logo here? [Learn more »](https://phpstan.org/sponsor)     Inviqa
-Shoptet -    diff --git a/tools/.phpstan/vendor/phpstan/phpstan/bootstrap.php b/tools/.phpstan/vendor/phpstan/phpstan/bootstrap.php index a5d341bfd..ac3e269c1 100644 --- a/tools/.phpstan/vendor/phpstan/phpstan/bootstrap.php +++ b/tools/.phpstan/vendor/phpstan/phpstan/bootstrap.php @@ -92,6 +92,16 @@ final public static function loadClass(string $class): void { require_once 'phar://' . __DIR__ . '/phpstan.phar/vendor/symfony/polyfill-php81/Php81.php'; require_once 'phar://' . __DIR__ . '/phpstan.phar/vendor/symfony/polyfill-php81/bootstrap.php'; } + + if ( + PHP_VERSION_ID < 80300 + && empty ($GLOBALS['__composer_autoload_files']['662a729f963d39afe703c9d9b7ab4a8c']) + && !class_exists(\Symfony\Polyfill\Php83\Php83::class, false) + ) { + $GLOBALS['__composer_autoload_files']['662a729f963d39afe703c9d9b7ab4a8c'] = true; + require_once 'phar://' . __DIR__ . '/phpstan.phar/vendor/symfony/polyfill-php83/Php83.php'; + require_once 'phar://' . __DIR__ . '/phpstan.phar/vendor/symfony/polyfill-php83/bootstrap.php'; + } } $filename = str_replace('\\', DIRECTORY_SEPARATOR, $class); diff --git a/tools/.phpstan/vendor/phpstan/phpstan/composer.json b/tools/.phpstan/vendor/phpstan/phpstan/composer.json index dc62c19ce..5090ccc4a 100644 --- a/tools/.phpstan/vendor/phpstan/phpstan/composer.json +++ b/tools/.phpstan/vendor/phpstan/phpstan/composer.json @@ -16,6 +16,11 @@ "autoload": { "files": ["bootstrap.php"] }, + "source": { + "type": "git", + "url": "https://github.com/phpstan/phpstan-phar-composer-source.git", + "reference": "git" + }, "support": { "issues": "https://github.com/phpstan/phpstan/issues", "forum": "https://github.com/phpstan/phpstan/discussions", diff --git a/tools/.phpstan/vendor/phpstan/phpstan/phpstan.phar b/tools/.phpstan/vendor/phpstan/phpstan/phpstan.phar index c542df205..f0a9cc3ee 100755 Binary files a/tools/.phpstan/vendor/phpstan/phpstan/phpstan.phar and b/tools/.phpstan/vendor/phpstan/phpstan/phpstan.phar differ diff --git a/tools/.phpstan/vendor/phpstan/phpstan/phpstan.phar.asc b/tools/.phpstan/vendor/phpstan/phpstan/phpstan.phar.asc index fce211b97..2fe2c6904 100644 --- a/tools/.phpstan/vendor/phpstan/phpstan/phpstan.phar.asc +++ b/tools/.phpstan/vendor/phpstan/phpstan/phpstan.phar.asc @@ -1,16 +1,16 @@ -----BEGIN PGP SIGNATURE----- -iQIzBAABCgAdFiEEynwsejDI6OEnSoR2UcZzBf/C5cAFAmiRBzAACgkQUcZzBf/C -5cBT9A//bFN1PIaNFWyowUaBTRJJ5bZ5ztqIar8C872t6S3mZmjEicE7d9X8gbWg -sAAJO0hL6rH2bMUJDx4xksCGOcctI2WHauVa02JhzRXM3MKNh1UsfapHWA379j+3 -hwly1F/+fPklDS0W3zigWNlz0W7TFc4g8AL1CtAGeBOaFxeFmVPOU54UkfOy5YBT -PuyxprZ473hZFrdbFRAanp95FLatLSZ9TL53M4SysyLewc6dOoO790l4zdMgYu74 -OxPAdgqZEzHCNOB60mKSFs6W3df9pXsoWvd0W8h9WVmre0COjzgaItDfhJRc+ODN -sR/5ibIaPfhydCSj2tEoLWzNVy2EZpKv7rEBZji81qLcGCe+rC9T+RYygzJKoZ5z -iHOXFmFK/GGevbPFVeN8Tiss3A5wkbNnJGSe3twegwa03IAiJkcqZfwCqRlrHTnH -+k0KsuEB8mpfoYNGhda8u0AFWWIH1QU1//1OhXW3/t7mu/pCcavpXRlIcm8vJGfI -++GWH160+xC4oeX35pbsoHq7c7aWtpeVDobjB1C+Kdhjh/HLkranM5jg/CeYt1ol -EVdQ9rqIVEZdDXcziA0hI+ueM9mf995aMjyAzkis7Oy13EC6PZGjabErNjPRX0oN -wU0YFwBv9hXCUDZN+3U9gzfu8WTNjYYMDE8q7EjbdnXj1+9YJGc= -=owzd +iQIzBAABCgAdFiEEynwsejDI6OEnSoR2UcZzBf/C5cAFAmjU5+gACgkQUcZzBf/C +5cAsfg/7Ba9duYiO9tl4AaiTLkSN9Obp7/gkrbQCbtRmjJ7L3RdqeGXqVzl0MGu3 +EbfVx8FrIuz6Ei6b30tYzTBPbTxdQFnsCmLTRn7u9Luqi35UXon0NKKcJBv2jFDS +xTGl3BEA/TtjCEQc8ZWEtapeDzuQqjZBuvk4rFTYKXMHdekyw7zOR/FwtaUSon3/ +ISvG/nna5jut5spw03jn6HqJ0y2c0Cr3y6UvXB/H3Qy8pkIP21DzBM3juRYD1bh0 +AHjyZ4AKS/a3LnLzSoMo1lwKWfxa3/SXX4f6NAf8D/QIrYpsJKX661+LIZ1CzK/u +Kl9R5lbwTDycpGS309IkkKnRAKeedbvVIFuxcAM1jlCmJWgLSUTOCFP8ZwMHFqf1 ++W8FcK1spKUanG7WmsJuFXxd9dDLSaQIMfkUCd0JoGgtmr1yMs8a+XZbngtLmhv2 +y57efu4ogGd6zC8xuCLRt71o1TU/hd/hizDd7Hn7M/yN8/dsNmQyzcD6+NcnRilw +c0JsvUlcqXiTvbP6VT8YrTOdwjy33sijXa8CxzpBJaWP9YXS9XNvLTDsdN/ooH8/ +JghI5QEGAyqOwPEKJnv3JRs0qErvnONx+Gi452psWzFaMWQQ1l6ACpD9sih+LCYO +936uBc+rjxcBjGFbMNx8ZyD3bmxkjHbmJGI0O+J8rBzurLSSdAw= +=LCr3 -----END PGP SIGNATURE----- diff --git a/tools/composer b/tools/composer index ee830d113..7f8a37dc2 100755 Binary files a/tools/composer and b/tools/composer differ diff --git a/tools/php-cs-fixer b/tools/php-cs-fixer index 9c31190b5..e5b2c2086 100755 Binary files a/tools/php-cs-fixer and b/tools/php-cs-fixer differ