diff --git a/composer.json b/composer.json index bb70029021765..b0312feeea2ed 100644 --- a/composer.json +++ b/composer.json @@ -93,7 +93,7 @@ "pdepend/pdepend": "~2.7.1", "phpcompatibility/php-compatibility": "^9.3", "phpmd/phpmd": "^2.8.0", - "phpstan/phpstan": "^0.12.3", + "phpstan/phpstan": ">=0.12.3 <=0.12.23", "phpunit/phpunit": "^9", "sebastian/phpcpd": "~5.0.0", "squizlabs/php_codesniffer": "~3.5.4" diff --git a/composer.lock b/composer.lock index 1e642911f979f..c898b11630d0f 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": "087f8432a6f317056b40a0b8a160a2cf", + "content-hash": "ecf7fcac6c2cf92a2c1fa5fea6732b41", "packages": [ { "name": "braintree/braintree_php", @@ -5536,16 +5536,16 @@ }, { "name": "aws/aws-sdk-php", - "version": "3.138.4", + "version": "3.138.5", "source": { "type": "git", "url": "https://github.com/aws/aws-sdk-php.git", - "reference": "2294604d4edb967249c4e41ab775a72d6baa247a" + "reference": "2c9ce7a12991e983e009ac9db453036000188ddd" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/2294604d4edb967249c4e41ab775a72d6baa247a", - "reference": "2294604d4edb967249c4e41ab775a72d6baa247a", + "url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/2c9ce7a12991e983e009ac9db453036000188ddd", + "reference": "2c9ce7a12991e983e009ac9db453036000188ddd", "shasum": "" }, "require": { @@ -5616,7 +5616,7 @@ "s3", "sdk" ], - "time": "2020-05-19T18:15:45+00:00" + "time": "2020-05-20T18:12:57+00:00" }, { "name": "behat/gherkin", @@ -8060,16 +8060,16 @@ }, { "name": "phpstan/phpstan", - "version": "0.12.25", + "version": "0.12.23", "source": { "type": "git", "url": "https://github.com/phpstan/phpstan.git", - "reference": "9619551d68b2d4c0d681a8df73f3c847c798ee64" + "reference": "71e529efced79e055fa8318b692e7f7d03ea4e75" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan/zipball/9619551d68b2d4c0d681a8df73f3c847c798ee64", - "reference": "9619551d68b2d4c0d681a8df73f3c847c798ee64", + "url": "https://api.github.com/repos/phpstan/phpstan/zipball/71e529efced79e055fa8318b692e7f7d03ea4e75", + "reference": "71e529efced79e055fa8318b692e7f7d03ea4e75", "shasum": "" }, "require": { @@ -8098,7 +8098,7 @@ "MIT" ], "description": "PHPStan - PHP Static Analysis Tool", - "time": "2020-05-10T20:36:16+00:00" + "time": "2020-05-05T12:55:44+00:00" }, { "name": "phpunit/php-code-coverage", diff --git a/dev/tests/static/testsuite/Magento/Test/Php/_files/phpstan/phpstan.neon b/dev/tests/static/testsuite/Magento/Test/Php/_files/phpstan/phpstan.neon index a4e09ab060627..722c048581089 100644 --- a/dev/tests/static/testsuite/Magento/Test/Php/_files/phpstan/phpstan.neon +++ b/dev/tests/static/testsuite/Magento/Test/Php/_files/phpstan/phpstan.neon @@ -33,3 +33,6 @@ services: class: Magento\PhpStan\Formatters\FilteredErrorFormatter arguments: showTipsOfTheDay: false + checkThisOnly: false + inferPrivatePropertyTypeFromConstructor: true + checkMissingTypehints: %checkMissingTypehints% diff --git a/lib/internal/Magento/Framework/Setup/Declaration/Schema/Db/MySQL/Definition/Columns/Integer.php b/lib/internal/Magento/Framework/Setup/Declaration/Schema/Db/MySQL/Definition/Columns/Integer.php index 035af45c52b64..fcebb549a2e56 100644 --- a/lib/internal/Magento/Framework/Setup/Declaration/Schema/Db/MySQL/Definition/Columns/Integer.php +++ b/lib/internal/Magento/Framework/Setup/Declaration/Schema/Db/MySQL/Definition/Columns/Integer.php @@ -110,7 +110,6 @@ public function fromDefinition(array $data) $data['definition'], $matches )) { - $data['padding'] = null; // we have an agreement that tinyint(1) is Boolean if (isset($matches['padding']) && $matches['type'] === 'tinyint' diff --git a/lib/internal/Magento/Framework/Setup/Test/Unit/Declaration/Schema/Db/MySQL/Definition/Columns/IntegerTest.php b/lib/internal/Magento/Framework/Setup/Test/Unit/Declaration/Schema/Db/MySQL/Definition/Columns/IntegerTest.php index d9a3ce02b1177..d60f4cba56629 100644 --- a/lib/internal/Magento/Framework/Setup/Test/Unit/Declaration/Schema/Db/MySQL/Definition/Columns/IntegerTest.php +++ b/lib/internal/Magento/Framework/Setup/Test/Unit/Declaration/Schema/Db/MySQL/Definition/Columns/IntegerTest.php @@ -145,7 +145,7 @@ public function testToDefinition() ->with($column) ->willReturn('COMMENT "Comment"'); $this->assertEquals( - '`int_column` int(10) UNSIGNED NOT NULL DEFAULT 0 AUTO_INCREMENT COMMENT "Comment"', + '`int_column` int UNSIGNED NOT NULL DEFAULT 0 AUTO_INCREMENT COMMENT "Comment"', $this->integer->toDefinition($column) ); } @@ -180,13 +180,15 @@ public function definitionDataProvider() { return [ ['int'], - ['int(10)', 10], + ['int(10)'], ['tinyint'], - ['mediumint(5)', 5], + ['tinyint(1)', 1], + ['tinyint(2)'], + ['mediumint(5)'], ['mediumint'], - ['smallint(3)', 3], + ['smallint(3)'], ['smallint'], - ['bigint(10)', 10], + ['bigint(10)'], ['bigint'], ]; }