diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 5425ad184a..9ea7dc6ab8 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -28,7 +28,7 @@ jobs: run: sudo locale-gen fr_FR.UTF-8 - name: Checkout. - uses: actions/checkout@v4 + uses: actions/checkout@v5 - name: Install PHP. uses: shivammathur/setup-php@v2 @@ -52,7 +52,7 @@ jobs: run: vendor/bin/phpunit ${{ env.PHPUNIT_COMMAND }} - name: Upload coverage to Codecov. - uses: codecov/codecov-action@v4 + uses: codecov/codecov-action@v5 with: token: ${{ secrets.CODECOV_TOKEN }} file: ./coverage.xml diff --git a/.github/workflows/ci-mariadb.yml b/.github/workflows/ci-mariadb.yml index 1e2b45c1ca..2d3f56e3f8 100644 --- a/.github/workflows/ci-mariadb.yml +++ b/.github/workflows/ci-mariadb.yml @@ -39,7 +39,7 @@ jobs: steps: - name: Checkout. - uses: actions/checkout@v4 + uses: actions/checkout@v5 - name: Install PHP with extensions. uses: shivammathur/setup-php@v2 @@ -61,7 +61,7 @@ jobs: - name: Upload coverage to Codecov. if: matrix.php == '7.4' - uses: codecov/codecov-action@v4 + uses: codecov/codecov-action@v5 with: token: ${{ secrets.CODECOV_TOKEN }} file: ./coverage.xml diff --git a/.github/workflows/ci-mssql.yml b/.github/workflows/ci-mssql.yml index 4f0b4c5b3a..be06bdcb43 100644 --- a/.github/workflows/ci-mssql.yml +++ b/.github/workflows/ci-mssql.yml @@ -50,7 +50,7 @@ jobs: run: sudo ACCEPT_EULA=Y apt-get install -y msodbcsql18 - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v5 - name: Create MS SQL Database run: docker exec -i mssql ${{ matrix.mssql.mssql-tool }} -S localhost -U SA -P 'YourStrong!Passw0rd' -Q 'CREATE DATABASE yiitest' @@ -75,7 +75,7 @@ jobs: - name: Upload coverage to Codecov. if: matrix.php == '7.4' - uses: codecov/codecov-action@v4 + uses: codecov/codecov-action@v5 with: token: ${{ secrets.CODECOV_TOKEN }} file: ./coverage.xml diff --git a/.github/workflows/ci-mysql.yml b/.github/workflows/ci-mysql.yml index ce7d486f9b..973e016cfa 100644 --- a/.github/workflows/ci-mysql.yml +++ b/.github/workflows/ci-mysql.yml @@ -37,7 +37,7 @@ jobs: steps: - name: Checkout. - uses: actions/checkout@v4 + uses: actions/checkout@v5 - name: Install PHP with extensions. uses: shivammathur/setup-php@v2 @@ -59,7 +59,7 @@ jobs: - name: Upload coverage to Codecov. if: matrix.php == '7.4' - uses: codecov/codecov-action@v4 + uses: codecov/codecov-action@v5 with: token: ${{ secrets.CODECOV_TOKEN }} file: ./coverage.xml diff --git a/.github/workflows/ci-node.yml b/.github/workflows/ci-node.yml index 345ef1b6e7..df79aacbda 100644 --- a/.github/workflows/ci-node.yml +++ b/.github/workflows/ci-node.yml @@ -17,7 +17,7 @@ jobs: steps: - name: Checkout. - uses: actions/checkout@v4 + uses: actions/checkout@v5 - name: Install dependencies. run: composer update $DEFAULT_COMPOSER_FLAGS diff --git a/.github/workflows/ci-oracle.yml b/.github/workflows/ci-oracle.yml index cdf15a9569..5b7b05b094 100644 --- a/.github/workflows/ci-oracle.yml +++ b/.github/workflows/ci-oracle.yml @@ -31,7 +31,7 @@ jobs: steps: - name: Checkout. - uses: actions/checkout@v4 + uses: actions/checkout@v5 - name: Install PHP with extensions. uses: shivammathur/setup-php@v2 @@ -52,7 +52,7 @@ jobs: run: vendor/bin/phpunit --group oci --coverage-clover=coverage.xml --colors=always - name: Upload coverage to Codecov. - uses: codecov/codecov-action@v4 + uses: codecov/codecov-action@v5 with: token: ${{ secrets.CODECOV_TOKEN }} file: ./coverage.xml diff --git a/.github/workflows/ci-pgsql.yml b/.github/workflows/ci-pgsql.yml index a38546c68a..17bc7ace24 100644 --- a/.github/workflows/ci-pgsql.yml +++ b/.github/workflows/ci-pgsql.yml @@ -38,7 +38,7 @@ jobs: steps: - name: Checkout. - uses: actions/checkout@v4 + uses: actions/checkout@v5 - name: Install PHP with extensions uses: shivammathur/setup-php@v2 @@ -60,7 +60,7 @@ jobs: - name: Upload coverage to Codecov. if: matrix.php == '7.4' - uses: codecov/codecov-action@v4 + uses: codecov/codecov-action@v5 with: token: ${{ secrets.CODECOV_TOKEN }} file: ./coverage.xml diff --git a/.github/workflows/ci-sqlite.yml b/.github/workflows/ci-sqlite.yml index 3b5dad0229..19eadf3efe 100644 --- a/.github/workflows/ci-sqlite.yml +++ b/.github/workflows/ci-sqlite.yml @@ -26,7 +26,7 @@ jobs: steps: - name: Checkout. - uses: actions/checkout@v4 + uses: actions/checkout@v5 - name: Install PHP with extensions. uses: shivammathur/setup-php@v2 @@ -48,7 +48,7 @@ jobs: - name: Upload coverage to Codecov. if: matrix.php == '7.4' - uses: codecov/codecov-action@v4 + uses: codecov/codecov-action@v5 with: token: ${{ secrets.CODECOV_TOKEN }} file: ./coverage.xml diff --git a/.github/workflows/static.yml b/.github/workflows/static.yml new file mode 100644 index 0000000000..c51c5c58d1 --- /dev/null +++ b/.github/workflows/static.yml @@ -0,0 +1,51 @@ +on: + - pull_request + - push + +name: static analysis + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + phpstan: + name: PHP ${{ matrix.php }} + + env: + DEFAULT_COMPOSER_FLAGS: "--prefer-dist --no-interaction --no-progress --optimize-autoloader --ansi" + EXTENSIONS: ${{ matrix.php < 8.0 && 'apc' || 'apcu' }}, curl, dom, imagick, intl, mbstring, mcrypt, memcached + + runs-on: ubuntu-latest + + strategy: + fail-fast: false + matrix: + php: [7.3, 7.4, 8.0, 8.1, 8.2, 8.3, 8.4, 8.5] + + steps: + - name: Checkout. + uses: actions/checkout@v5 + + - name: Install PHP. + uses: shivammathur/setup-php@v2 + with: + coverage: none + extensions: ${{ env.EXTENSIONS }} + ini-values: apc.enabled=1,apc.shm_size=32M,apc.enable_cli=1, date.timezone='UTC', session.save_path="${{ runner.temp }}" + php-version: ${{ matrix.php }} + tools: cs2pr, pie + + - name: Update composer. + run: composer self-update + + - name: Install dependencies with composer. + run: composer update $DEFAULT_COMPOSER_FLAGS ${{ matrix.php == 8.5 && '--ignore-platform-reqs' || '' }} + + - name: Static analysis PHP 7.x + if: matrix.php == '7.3' || matrix.php == '7.4' + run: vendor/bin/phpstan analyse --configuration=phpstan-7x.dist.neon --error-format=checkstyle | cs2pr + + - name: Static analysis PHP 8.x + if: matrix.php != '7.3' && matrix.php != '7.4' + run: vendor/bin/phpstan analyse --error-format=checkstyle | cs2pr diff --git a/composer.lock b/composer.lock index 9d4db70526..a94907f405 100644 --- a/composer.lock +++ b/composer.lock @@ -8,16 +8,16 @@ "packages": [ { "name": "bower-asset/inputmask", - "version": "5.0.8", + "version": "5.0.9", "source": { "type": "git", - "url": "git@github.com:RobinHerbots/Inputmask.git", - "reference": "e0f39e0c93569c6b494c3a57edef2c59313a6b64" + "url": "https://github.com/RobinHerbots/Inputmask.git", + "reference": "310a33557e2944daf86d5946a5e8c82b9118f8f7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/RobinHerbots/Inputmask/zipball/e0f39e0c93569c6b494c3a57edef2c59313a6b64", - "reference": "e0f39e0c93569c6b494c3a57edef2c59313a6b64" + "url": "https://api.github.com/repos/RobinHerbots/Inputmask/zipball/310a33557e2944daf86d5946a5e8c82b9118f8f7", + "reference": "310a33557e2944daf86d5946a5e8c82b9118f8f7" }, "require": { "bower-asset/jquery": ">=1.7" @@ -65,7 +65,7 @@ "version": "2.0.8", "source": { "type": "git", - "url": "git@github.com:yiisoft/jquery-pjax.git", + "url": "https://github.com/yiisoft/jquery-pjax.git", "reference": "a9298d57da63d14a950f1b94366a864bc62264fb" }, "dist": { @@ -147,20 +147,20 @@ }, { "name": "ezyang/htmlpurifier", - "version": "v4.17.0", + "version": "v4.18.0", "source": { "type": "git", "url": "https://github.com/ezyang/htmlpurifier.git", - "reference": "bbc513d79acf6691fa9cf10f192c90dd2957f18c" + "reference": "cb56001e54359df7ae76dc522d08845dc741621b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/ezyang/htmlpurifier/zipball/bbc513d79acf6691fa9cf10f192c90dd2957f18c", - "reference": "bbc513d79acf6691fa9cf10f192c90dd2957f18c", + "url": "https://api.github.com/repos/ezyang/htmlpurifier/zipball/cb56001e54359df7ae76dc522d08845dc741621b", + "reference": "cb56001e54359df7ae76dc522d08845dc741621b", "shasum": "" }, "require": { - "php": "~5.6.0 || ~7.0.0 || ~7.1.0 || ~7.2.0 || ~7.3.0 || ~7.4.0 || ~8.0.0 || ~8.1.0 || ~8.2.0 || ~8.3.0" + "php": "~5.6.0 || ~7.0.0 || ~7.1.0 || ~7.2.0 || ~7.3.0 || ~7.4.0 || ~8.0.0 || ~8.1.0 || ~8.2.0 || ~8.3.0 || ~8.4.0" }, "require-dev": { "cerdic/css-tidy": "^1.7 || ^2.0", @@ -202,22 +202,22 @@ ], "support": { "issues": "https://github.com/ezyang/htmlpurifier/issues", - "source": "https://github.com/ezyang/htmlpurifier/tree/v4.17.0" + "source": "https://github.com/ezyang/htmlpurifier/tree/v4.18.0" }, - "time": "2023-11-17T15:01:25+00:00" + "time": "2024-11-01T03:51:45+00:00" }, { "name": "yiisoft/yii2-composer", - "version": "2.0.10", + "version": "2.0.11", "source": { "type": "git", "url": "https://github.com/yiisoft/yii2-composer.git", - "reference": "94bb3f66e779e2774f8776d6e1bdeab402940510" + "reference": "b684b01ecb119c8287721def726a0e24fec2fef2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/yiisoft/yii2-composer/zipball/94bb3f66e779e2774f8776d6e1bdeab402940510", - "reference": "94bb3f66e779e2774f8776d6e1bdeab402940510", + "url": "https://api.github.com/repos/yiisoft/yii2-composer/zipball/b684b01ecb119c8287721def726a0e24fec2fef2", + "reference": "b684b01ecb119c8287721def726a0e24fec2fef2", "shasum": "" }, "require": { @@ -260,11 +260,11 @@ "yii2" ], "support": { - "forum": "http://www.yiiframework.com/forum/", - "irc": "irc://irc.freenode.net/yii", + "forum": "https://www.yiiframework.com/forum/", + "irc": "ircs://irc.libera.chat:6697/yii", "issues": "https://github.com/yiisoft/yii2-composer/issues", "source": "https://github.com/yiisoft/yii2-composer", - "wiki": "http://www.yiiframework.com/wiki/" + "wiki": "https://www.yiiframework.com/wiki/" }, "funding": [ { @@ -280,7 +280,7 @@ "type": "tidelift" } ], - "time": "2020-06-24T00:04:01+00:00" + "time": "2025-02-13T20:59:36+00:00" } ], "packages-dev": [ @@ -323,28 +323,28 @@ }, { "name": "dealerdirect/phpcodesniffer-composer-installer", - "version": "v1.0.0", + "version": "v1.1.2", "source": { "type": "git", "url": "https://github.com/PHPCSStandards/composer-installer.git", - "reference": "4be43904336affa5c2f70744a348312336afd0da" + "reference": "e9cf5e4bbf7eeaf9ef5db34938942602838fc2b1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/PHPCSStandards/composer-installer/zipball/4be43904336affa5c2f70744a348312336afd0da", - "reference": "4be43904336affa5c2f70744a348312336afd0da", + "url": "https://api.github.com/repos/PHPCSStandards/composer-installer/zipball/e9cf5e4bbf7eeaf9ef5db34938942602838fc2b1", + "reference": "e9cf5e4bbf7eeaf9ef5db34938942602838fc2b1", "shasum": "" }, "require": { - "composer-plugin-api": "^1.0 || ^2.0", + "composer-plugin-api": "^2.2", "php": ">=5.4", "squizlabs/php_codesniffer": "^2.0 || ^3.1.0 || ^4.0" }, "require-dev": { - "composer/composer": "*", + "composer/composer": "^2.2", "ext-json": "*", "ext-zip": "*", - "php-parallel-lint/php-parallel-lint": "^1.3.1", + "php-parallel-lint/php-parallel-lint": "^1.4.0", "phpcompatibility/php-compatibility": "^9.0", "yoast/phpunit-polyfills": "^1.0" }, @@ -364,9 +364,9 @@ "authors": [ { "name": "Franck Nijhof", - "email": "franck.nijhof@dealerdirect.com", - "homepage": "http://www.frenck.nl", - "role": "Developer / IT Manager" + "email": "opensource@frenck.dev", + "homepage": "https://frenck.dev", + "role": "Open source developer" }, { "name": "Contributors", @@ -374,7 +374,6 @@ } ], "description": "PHP_CodeSniffer Standards Composer Installer Plugin", - "homepage": "http://www.dealerdirect.com", "keywords": [ "PHPCodeSniffer", "PHP_CodeSniffer", @@ -395,9 +394,28 @@ ], "support": { "issues": "https://github.com/PHPCSStandards/composer-installer/issues", + "security": "https://github.com/PHPCSStandards/composer-installer/security/policy", "source": "https://github.com/PHPCSStandards/composer-installer" }, - "time": "2023-01-05T11:28:13+00:00" + "funding": [ + { + "url": "https://github.com/PHPCSStandards", + "type": "github" + }, + { + "url": "https://github.com/jrfnl", + "type": "github" + }, + { + "url": "https://opencollective.com/php_codesniffer", + "type": "open_collective" + }, + { + "url": "https://thanks.dev/u/gh/phpcsstandards", + "type": "thanks_dev" + } + ], + "time": "2025-07-17T20:45:56+00:00" }, { "name": "dms/phpunit-arraysubset-asserts", @@ -445,30 +463,30 @@ }, { "name": "doctrine/instantiator", - "version": "1.5.0", + "version": "2.0.0", "source": { "type": "git", "url": "https://github.com/doctrine/instantiator.git", - "reference": "0a0fa9780f5d4e507415a065172d26a98d02047b" + "reference": "c6222283fa3f4ac679f8b9ced9a4e23f163e80d0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/instantiator/zipball/0a0fa9780f5d4e507415a065172d26a98d02047b", - "reference": "0a0fa9780f5d4e507415a065172d26a98d02047b", + "url": "https://api.github.com/repos/doctrine/instantiator/zipball/c6222283fa3f4ac679f8b9ced9a4e23f163e80d0", + "reference": "c6222283fa3f4ac679f8b9ced9a4e23f163e80d0", "shasum": "" }, "require": { - "php": "^7.1 || ^8.0" + "php": "^8.1" }, "require-dev": { - "doctrine/coding-standard": "^9 || ^11", + "doctrine/coding-standard": "^11", "ext-pdo": "*", "ext-phar": "*", - "phpbench/phpbench": "^0.16 || ^1", - "phpstan/phpstan": "^1.4", - "phpstan/phpstan-phpunit": "^1", - "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5", - "vimeo/psalm": "^4.30 || ^5.4" + "phpbench/phpbench": "^1.2", + "phpstan/phpstan": "^1.9.4", + "phpstan/phpstan-phpunit": "^1.3", + "phpunit/phpunit": "^9.5.27", + "vimeo/psalm": "^5.4" }, "type": "library", "autoload": { @@ -495,7 +513,7 @@ ], "support": { "issues": "https://github.com/doctrine/instantiator/issues", - "source": "https://github.com/doctrine/instantiator/tree/1.5.0" + "source": "https://github.com/doctrine/instantiator/tree/2.0.0" }, "funding": [ { @@ -511,7 +529,7 @@ "type": "tidelift" } ], - "time": "2022-12-30T00:15:36+00:00" + "time": "2022-12-30T00:23:10+00:00" }, { "name": "myclabs/deep-copy", @@ -575,25 +593,27 @@ }, { "name": "nikic/php-parser", - "version": "v4.19.4", + "version": "v5.6.1", "source": { "type": "git", "url": "https://github.com/nikic/PHP-Parser.git", - "reference": "715f4d25e225bc47b293a8b997fe6ce99bf987d2" + "reference": "f103601b29efebd7ff4a1ca7b3eeea9e3336a2a2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/715f4d25e225bc47b293a8b997fe6ce99bf987d2", - "reference": "715f4d25e225bc47b293a8b997fe6ce99bf987d2", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/f103601b29efebd7ff4a1ca7b3eeea9e3336a2a2", + "reference": "f103601b29efebd7ff4a1ca7b3eeea9e3336a2a2", "shasum": "" }, "require": { + "ext-ctype": "*", + "ext-json": "*", "ext-tokenizer": "*", - "php": ">=7.1" + "php": ">=7.4" }, "require-dev": { "ircmaxell/php-yacc": "^0.0.7", - "phpunit/phpunit": "^7.0 || ^8.0 || ^9.0" + "phpunit/phpunit": "^9.0" }, "bin": [ "bin/php-parse" @@ -601,7 +621,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "4.9-dev" + "dev-master": "5.x-dev" } }, "autoload": { @@ -625,9 +645,9 @@ ], "support": { "issues": "https://github.com/nikic/PHP-Parser/issues", - "source": "https://github.com/nikic/PHP-Parser/tree/v4.19.4" + "source": "https://github.com/nikic/PHP-Parser/tree/v5.6.1" }, - "time": "2024-09-29T15:01:53+00:00" + "time": "2025-08-13T20:13:15+00:00" }, { "name": "phar-io/manifest", @@ -1126,16 +1146,16 @@ }, { "name": "phpunit/phpunit", - "version": "9.6.24", + "version": "9.6.25", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "ea49afa29aeea25ea7bf9de9fdd7cab163cc0701" + "reference": "049c011e01be805202d8eebedef49f769a8ec7b7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/ea49afa29aeea25ea7bf9de9fdd7cab163cc0701", - "reference": "ea49afa29aeea25ea7bf9de9fdd7cab163cc0701", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/049c011e01be805202d8eebedef49f769a8ec7b7", + "reference": "049c011e01be805202d8eebedef49f769a8ec7b7", "shasum": "" }, "require": { @@ -1209,7 +1229,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/phpunit/issues", "security": "https://github.com/sebastianbergmann/phpunit/security/policy", - "source": "https://github.com/sebastianbergmann/phpunit/tree/9.6.24" + "source": "https://github.com/sebastianbergmann/phpunit/tree/9.6.25" }, "funding": [ { @@ -1233,7 +1253,7 @@ "type": "tidelift" } ], - "time": "2025-08-10T08:32:42+00:00" + "time": "2025-08-20T14:38:31+00:00" }, { "name": "sebastian/cli-parser", @@ -2236,16 +2256,16 @@ }, { "name": "squizlabs/php_codesniffer", - "version": "3.10.1", + "version": "3.13.2", "source": { "type": "git", "url": "https://github.com/PHPCSStandards/PHP_CodeSniffer.git", - "reference": "8f90f7a53ce271935282967f53d0894f8f1ff877" + "reference": "5b5e3821314f947dd040c70f7992a64eac89025c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/PHPCSStandards/PHP_CodeSniffer/zipball/8f90f7a53ce271935282967f53d0894f8f1ff877", - "reference": "8f90f7a53ce271935282967f53d0894f8f1ff877", + "url": "https://api.github.com/repos/PHPCSStandards/PHP_CodeSniffer/zipball/5b5e3821314f947dd040c70f7992a64eac89025c", + "reference": "5b5e3821314f947dd040c70f7992a64eac89025c", "shasum": "" }, "require": { @@ -2310,9 +2330,13 @@ { "url": "https://opencollective.com/php_codesniffer", "type": "open_collective" + }, + { + "url": "https://thanks.dev/u/gh/phpcsstandards", + "type": "thanks_dev" } ], - "time": "2024-05-22T21:24:41+00:00" + "time": "2025-06-17T22:17:01+00:00" }, { "name": "theseer/tokenizer", diff --git a/phpstan-7x.dist.neon b/phpstan-7x.dist.neon new file mode 100644 index 0000000000..5463d9b84c --- /dev/null +++ b/phpstan-7x.dist.neon @@ -0,0 +1,22 @@ +includes: + - phpstan-baseline-7x.neon + +parameters: + level: 1 + + paths: + - build + - framework + + bootstrapFiles: + - framework/BaseYii.php + + dynamicConstantNames: + - YII_DEBUG + - YII_ENV + - YII_ENV_DEV + - YII_ENV_PROD + - YII_ENV_TEST + + ignoreErrors: + - '#Unsafe usage of new static\(\).#' diff --git a/phpstan-baseline-7x.neon b/phpstan-baseline-7x.neon new file mode 100644 index 0000000000..4983392731 --- /dev/null +++ b/phpstan-baseline-7x.neon @@ -0,0 +1,96 @@ +parameters: + ignoreErrors: + - + message: "#^Method yii\\\\build\\\\controllers\\\\DevController\\:\\:linkFrameworkAndExtensions\\(\\) should return int but return statement is missing\\.$#" + count: 1 + path: build/controllers/DevController.php + + - + message: "#^Class BackedEnum not found\\.$#" + count: 1 + path: framework/behaviors/AttributeTypecastBehavior.php + + - + message: "#^Constant XC_TYPE_VAR not found\\.$#" + count: 2 + path: framework/caching/XCache.php + + - + message: "#^Method yii\\\\console\\\\controllers\\\\CacheController\\:\\:actionFlushSchema\\(\\) should return int but return statement is missing\\.$#" + count: 1 + path: framework/console/controllers/CacheController.php + + - + message: "#^Method yii\\\\console\\\\controllers\\\\FixtureController\\:\\:actionUnload\\(\\) should return int but return statement is missing\\.$#" + count: 1 + path: framework/console/controllers/FixtureController.php + + - + message: "#^Method yii\\\\console\\\\controllers\\\\HelpController\\:\\:actionIndex\\(\\) should return int but return statement is missing\\.$#" + count: 1 + path: framework/console/controllers/HelpController.php + + - + message: "#^Method yii\\\\console\\\\controllers\\\\ServeController\\:\\:actionIndex\\(\\) should return int but return statement is missing\\.$#" + count: 1 + path: framework/console/controllers/ServeController.php + + - + message: "#^Variable \\$viaClass might not be defined\\.$#" + count: 5 + path: framework/db/BaseActiveRecord.php + + - + message: "#^Variable \\$viaTable might not be defined\\.$#" + count: 5 + path: framework/db/BaseActiveRecord.php + + - + message: "#^Class BackedEnum not found\\.$#" + count: 2 + path: framework/db/ColumnSchema.php + + - + message: "#^Class BackedEnum not found\\.$#" + count: 1 + path: framework/db/Command.php + + - + message: "#^Class UnitEnum not found\\.$#" + count: 1 + path: framework/db/Command.php + + - + message: "#^Variable \\$command might not be defined\\.$#" + count: 1 + path: framework/db/Query.php + + - + message: "#^Variable \\$rawValues in isset\\(\\) always exists and is not nullable\\.$#" + count: 1 + path: framework/db/conditions/InConditionBuilder.php + + - + message: "#^Access to undefined constant PDO\\:\\:CUBRID_SCH_CONSTRAINT\\.$#" + count: 1 + path: framework/db/cubrid/Schema.php + + - + message: "#^Access to undefined constant PDO\\:\\:CUBRID_SCH_IMPORTED_KEYS\\.$#" + count: 2 + path: framework/db/cubrid/Schema.php + + - + message: "#^Access to undefined constant PDO\\:\\:CUBRID_SCH_PRIMARY_KEY\\.$#" + count: 2 + path: framework/db/cubrid/Schema.php + + - + message: "#^Access to undefined constant PDO\\:\\:CUBRID_SCH_TABLE\\.$#" + count: 2 + path: framework/db/cubrid/Schema.php + + - + message: "#^Variable \\$error in isset\\(\\) always exists and is always null\\.$#" + count: 1 + path: framework/helpers/BaseConsole.php diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon index a8ba01414c..7eb31e9683 100644 --- a/phpstan-baseline.neon +++ b/phpstan-baseline.neon @@ -1,36 +1,76 @@ parameters: - ignoreErrors: - - message: '#Variable \$error in isset\(\) always exists and is always null.#' - identifier: isset.variable - count: 1 - path: framework/helpers/BaseConsole.php + ignoreErrors: + - + message: "#^Method yii\\\\build\\\\controllers\\\\DevController\\:\\:linkFrameworkAndExtensions\\(\\) should return int but return statement is missing\\.$#" + count: 1 + path: build/controllers/DevController.php - - message: '#Variable \$rawValues in isset\(\) always exists and is not nullable.#' - identifier: isset.variable - count: 1 - path: framework/db/conditions/InConditionBuilder.php + - + message: "#^Constant XC_TYPE_VAR not found\\.$#" + count: 2 + path: framework/caching/XCache.php - - message: '#Variable \$command might not be defined.#' - identifier: variable.undefined - count: 1 - path: framework/db/Query.php + - + message: "#^Method yii\\\\console\\\\controllers\\\\CacheController\\:\\:actionFlushSchema\\(\\) should return int but return statement is missing\\.$#" + count: 1 + path: framework/console/controllers/CacheController.php - - message: '#Variable \$viaClass might not be defined.#' - identifier: variable.undefined - count: 5 - path: framework/db/BaseActiveRecord.php + - + message: "#^Method yii\\\\console\\\\controllers\\\\FixtureController\\:\\:actionUnload\\(\\) should return int but return statement is missing\\.$#" + count: 1 + path: framework/console/controllers/FixtureController.php - - message: '#Variable \$viaTable might not be defined.#' - identifier: variable.undefined - count: 5 - path: framework/db/BaseActiveRecord.php + - + message: "#^Method yii\\\\console\\\\controllers\\\\HelpController\\:\\:actionIndex\\(\\) should return int but return statement is missing\\.$#" + count: 1 + path: framework/console/controllers/HelpController.php - - message: '#^Method yii\\console\\controllers\\.*Controller::action.*\(\) should return int but return statement is missing.$#' - identifier: return.missing - count: 4 - path: framework/console/controllers/* + - + message: "#^Method yii\\\\console\\\\controllers\\\\ServeController\\:\\:actionIndex\\(\\) should return int but return statement is missing\\.$#" + count: 1 + path: framework/console/controllers/ServeController.php - - message: '#Method yii\\build\\controllers\\DevController::linkFrameworkAndExtensions\(\) should return int but return statement is missing.#' - identifier: return.missing - count: 1 - path: build/controllers/DevController.php + - + message: "#^Variable \\$viaClass might not be defined\\.$#" + count: 5 + path: framework/db/BaseActiveRecord.php + + - + message: "#^Variable \\$viaTable might not be defined\\.$#" + count: 5 + path: framework/db/BaseActiveRecord.php + + - + message: "#^Variable \\$command might not be defined\\.$#" + count: 1 + path: framework/db/Query.php + + - + message: "#^Variable \\$rawValues in isset\\(\\) always exists and is not nullable\\.$#" + count: 1 + path: framework/db/conditions/InConditionBuilder.php + + - + message: "#^Access to undefined constant PDO\\:\\:CUBRID_SCH_CONSTRAINT\\.$#" + count: 1 + path: framework/db/cubrid/Schema.php + + - + message: "#^Access to undefined constant PDO\\:\\:CUBRID_SCH_IMPORTED_KEYS\\.$#" + count: 2 + path: framework/db/cubrid/Schema.php + + - + message: "#^Access to undefined constant PDO\\:\\:CUBRID_SCH_PRIMARY_KEY\\.$#" + count: 2 + path: framework/db/cubrid/Schema.php + + - + message: "#^Access to undefined constant PDO\\:\\:CUBRID_SCH_TABLE\\.$#" + count: 2 + path: framework/db/cubrid/Schema.php + + - + message: "#^Variable \\$error in isset\\(\\) always exists and is always null\\.$#" + count: 1 + path: framework/helpers/BaseConsole.php