From e9034c5ce60e35e1d093ee4d1f6ac1b09e518e8f Mon Sep 17 00:00:00 2001 From: Simon Podlipsky Date: Fri, 6 Nov 2020 20:39:43 +0100 Subject: [PATCH] Upgrade phpstan and psalm --- composer.json | 6 +- composer.lock | 164 +++++++++++++++++++++++++++++++++++++++------- phpstan.neon.dist | 7 ++ 3 files changed, 151 insertions(+), 26 deletions(-) diff --git a/composer.json b/composer.json index 2571ac4193a..972671dd540 100644 --- a/composer.json +++ b/composer.json @@ -40,9 +40,11 @@ "require-dev": { "doctrine/coding-standard": "^8.1", "jetbrains/phpstorm-stubs": "^2019.1", - "phpstan/phpstan": "^0.12.40", + "phpstan/phpstan": "^0.12.54", + "phpstan/phpstan-phpunit": "^0.12.16", + "phpstan/phpstan-strict-rules": "^0.12.5", "phpunit/phpunit": "^9.4", - "psalm/plugin-phpunit": "^0.10.0", + "psalm/plugin-phpunit": "^0.12.0", "symfony/console": "^2.0.5|^3.0|^4.0|^5.0", "vimeo/psalm": "^3.17.2" }, diff --git a/composer.lock b/composer.lock index 66ab60cc8b7..1fa8294e407 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "0e4428b976a1e1835abdff64014ad723", + "content-hash": "f741c6be78fcf766dbe9d2ce8b7d3c4a", "packages": [ { "name": "doctrine/cache", @@ -1533,16 +1533,16 @@ }, { "name": "phpstan/phpstan", - "version": "0.12.40", + "version": "0.12.54", "source": { "type": "git", "url": "https://github.com/phpstan/phpstan.git", - "reference": "dce7293ad7b59fc09a9ab9b0b5b44902c092ca17" + "reference": "45c7b999a4b7dd9ac5558bdaaf23dcebbef88223" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan/zipball/dce7293ad7b59fc09a9ab9b0b5b44902c092ca17", - "reference": "dce7293ad7b59fc09a9ab9b0b5b44902c092ca17", + "url": "https://api.github.com/repos/phpstan/phpstan/zipball/45c7b999a4b7dd9ac5558bdaaf23dcebbef88223", + "reference": "45c7b999a4b7dd9ac5558bdaaf23dcebbef88223", "shasum": "" }, "require": { @@ -1573,7 +1573,7 @@ "description": "PHPStan - PHP Static Analysis Tool", "support": { "issues": "https://github.com/phpstan/phpstan/issues", - "source": "https://github.com/phpstan/phpstan/tree/0.12.40" + "source": "https://github.com/phpstan/phpstan/tree/0.12.54" }, "funding": [ { @@ -1589,7 +1589,122 @@ "type": "tidelift" } ], - "time": "2020-08-26T19:06:20+00:00" + "time": "2020-11-05T13:36:26+00:00" + }, + { + "name": "phpstan/phpstan-phpunit", + "version": "0.12.16", + "source": { + "type": "git", + "url": "https://github.com/phpstan/phpstan-phpunit.git", + "reference": "1dd916d181b0539dea5cd37e91546afb8b107e17" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpstan/phpstan-phpunit/zipball/1dd916d181b0539dea5cd37e91546afb8b107e17", + "reference": "1dd916d181b0539dea5cd37e91546afb8b107e17", + "shasum": "" + }, + "require": { + "php": "^7.1 || ^8.0", + "phpstan/phpstan": "^0.12.33" + }, + "conflict": { + "phpunit/phpunit": "<7.0" + }, + "require-dev": { + "consistence/coding-standard": "^3.5", + "dealerdirect/phpcodesniffer-composer-installer": "^0.7.0", + "ergebnis/composer-normalize": "^2.0.2", + "jakub-onderka/php-parallel-lint": "^1.0", + "phing/phing": "^2.16.0", + "phpstan/phpstan-strict-rules": "^0.12", + "phpunit/phpunit": "^7.0 || ^8.0 || ^9.0", + "satooshi/php-coveralls": "^1.0", + "slevomat/coding-standard": "^4.7.2" + }, + "type": "phpstan-extension", + "extra": { + "branch-alias": { + "dev-master": "0.12-dev" + }, + "phpstan": { + "includes": [ + "extension.neon", + "rules.neon" + ] + } + }, + "autoload": { + "psr-4": { + "PHPStan\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "PHPUnit extensions and rules for PHPStan", + "support": { + "issues": "https://github.com/phpstan/phpstan-phpunit/issues", + "source": "https://github.com/phpstan/phpstan-phpunit/tree/0.12.16" + }, + "time": "2020-08-05T13:28:50+00:00" + }, + { + "name": "phpstan/phpstan-strict-rules", + "version": "0.12.5", + "source": { + "type": "git", + "url": "https://github.com/phpstan/phpstan-strict-rules.git", + "reference": "334898a32217e4605e0f9cfa3d3fc3101bda26be" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpstan/phpstan-strict-rules/zipball/334898a32217e4605e0f9cfa3d3fc3101bda26be", + "reference": "334898a32217e4605e0f9cfa3d3fc3101bda26be", + "shasum": "" + }, + "require": { + "php": "^7.1 || ^8.0", + "phpstan/phpstan": "^0.12.33" + }, + "require-dev": { + "consistence/coding-standard": "^3.0.1", + "dealerdirect/phpcodesniffer-composer-installer": "^0.7.0", + "ergebnis/composer-normalize": "^2.0.2", + "jakub-onderka/php-parallel-lint": "^1.0", + "phing/phing": "^2.16.0", + "phpstan/phpstan-phpunit": "^0.12", + "phpunit/phpunit": "^7.0", + "slevomat/coding-standard": "^4.5.2" + }, + "type": "phpstan-extension", + "extra": { + "branch-alias": { + "dev-master": "0.12-dev" + }, + "phpstan": { + "includes": [ + "rules.neon" + ] + } + }, + "autoload": { + "psr-4": { + "PHPStan\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "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/master" + }, + "time": "2020-08-30T15:42:06+00:00" }, { "name": "phpunit/php-code-coverage", @@ -2014,30 +2129,31 @@ }, { "name": "psalm/plugin-phpunit", - "version": "0.10.1", + "version": "0.12.2", "source": { "type": "git", "url": "https://github.com/psalm/psalm-plugin-phpunit.git", - "reference": "138998ffd32b76a2e69eb1ff94ef2bf110967273" + "reference": "85ee5a080a5281e63085d933b30a06b1b1680758" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/psalm/psalm-plugin-phpunit/zipball/138998ffd32b76a2e69eb1ff94ef2bf110967273", - "reference": "138998ffd32b76a2e69eb1ff94ef2bf110967273", + "url": "https://api.github.com/repos/psalm/psalm-plugin-phpunit/zipball/85ee5a080a5281e63085d933b30a06b1b1680758", + "reference": "85ee5a080a5281e63085d933b30a06b1b1680758", "shasum": "" }, "require": { - "composer/semver": "^1.4", + "composer/package-versions-deprecated": "^1.10", + "composer/semver": "^1.4 || ^2.0 || ^3.0", "ext-simplexml": "*", - "ocramius/package-versions": "^1.3", - "php": "^7.1.3", + "php": "^7.1.3 || ^8.0", "phpunit/phpunit": "^7.5 || ^8.0 || ^9.0", - "vimeo/psalm": "^3.6.2 || dev-master" + "vimeo/psalm": "^3.6.2 || dev-master || dev-4.x" }, "require-dev": { "codeception/codeception": "^4.0.3", "squizlabs/php_codesniffer": "^3.3.1", - "weirdan/codeception-psalm-module": "^0.7.1" + "weirdan/codeception-psalm-module": "^0.7.1", + "weirdan/prophecy-shim": "^1.0 || ^2.0" }, "type": "psalm-plugin", "extra": { @@ -2063,9 +2179,9 @@ "description": "Psalm plugin for PHPUnit", "support": { "issues": "https://github.com/psalm/psalm-plugin-phpunit/issues", - "source": "https://github.com/psalm/psalm-plugin-phpunit/tree/0.10.1" + "source": "https://github.com/psalm/psalm-plugin-phpunit/tree/0.12.2" }, - "time": "2020-05-24T20:30:10+00:00" + "time": "2020-09-28T17:25:39+00:00" }, { "name": "psr/container", @@ -3659,16 +3775,16 @@ }, { "name": "vimeo/psalm", - "version": "3.17.2", + "version": "3.18.2", "source": { "type": "git", "url": "https://github.com/vimeo/psalm.git", - "reference": "9e526d9cb569fe4631e6a737bbb7948d05596e3f" + "reference": "19aa905f7c3c7350569999a93c40ae91ae4e1626" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/vimeo/psalm/zipball/9e526d9cb569fe4631e6a737bbb7948d05596e3f", - "reference": "9e526d9cb569fe4631e6a737bbb7948d05596e3f", + "url": "https://api.github.com/repos/vimeo/psalm/zipball/19aa905f7c3c7350569999a93c40ae91ae4e1626", + "reference": "19aa905f7c3c7350569999a93c40ae91ae4e1626", "shasum": "" }, "require": { @@ -3757,9 +3873,9 @@ ], "support": { "issues": "https://github.com/vimeo/psalm/issues", - "source": "https://github.com/vimeo/psalm/tree/3.17.2" + "source": "https://github.com/vimeo/psalm/tree/3.18.2" }, - "time": "2020-10-15T00:23:17+00:00" + "time": "2020-10-20T13:48:22+00:00" }, { "name": "webmozart/assert", diff --git a/phpstan.neon.dist b/phpstan.neon.dist index 93597bd6f52..c3ae4af4bca 100644 --- a/phpstan.neon.dist +++ b/phpstan.neon.dist @@ -77,6 +77,13 @@ parameters: paths: - %currentWorkingDirectory%/lib/Doctrine/DBAL/Driver/Mysqli/MysqliConnection.php + # Fixing the issue may cause a BC break. + # TODO: fix in 3.0.0 + - + message: '~^Method Doctrine\\DBAL\\Driver\\Mysqli\\MysqliConnection::lastInsertId\(\) should return string but returns int\|string\.$~' + paths: + - %currentWorkingDirectory%/lib/Doctrine/DBAL/Driver/Mysqli/MysqliConnection.php + # Fixing the issue may cause a BC break. # TODO: fix in 3.0.0 -