From 0b1dac6eea1601e860635dff1972009396346da5 Mon Sep 17 00:00:00 2001 From: Marcin Michalski Date: Thu, 8 Jul 2021 09:27:04 +0200 Subject: [PATCH] Add compatibility with phpstan 0.12.91 --- CHANGELOG.md | 4 ++++ composer.json | 2 +- composer.lock | 37 ++++++++++++++++------------- src/Type/ActiveRecordObjectType.php | 2 +- 4 files changed, 26 insertions(+), 19 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4fc03dc..b65d2b0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. * **Fixed** for any bug fixes. * **Security** in case of vulnerabilities. +## [0.7.5] 2021-07-08 +### Added + * Compatibility with phpstan 0.12.91 (#44) + ## [0.7.4] 2021-04-26 ### Added * Enable PHP 8.0 (#35) diff --git a/composer.json b/composer.json index 224b173..590f91f 100644 --- a/composer.json +++ b/composer.json @@ -16,7 +16,7 @@ "require": { "php": "^7.2|^8.0", "nikic/php-parser": "^4.1.0", - "phpstan/phpstan": "^0.12" + "phpstan/phpstan": "^0.12.91" }, "require-dev": { "friendsofphp/php-cs-fixer": "^2.18", diff --git a/composer.lock b/composer.lock index 4e20590..dfcaeef 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": "fc6db44f33f5daf4174576db1ff1162c", + "content-hash": "82a4731cbf6dee79c30ba2950dae6482", "packages": [ { "name": "nikic/php-parser", @@ -64,16 +64,16 @@ }, { "name": "phpstan/phpstan", - "version": "0.12.84", + "version": "0.12.91", "source": { "type": "git", "url": "https://github.com/phpstan/phpstan.git", - "reference": "9c43f15da8798c8f30a4b099e6a94530a558cfd5" + "reference": "8226701cd228a0d63c2df995de7ab6070c69ac6a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan/zipball/9c43f15da8798c8f30a4b099e6a94530a558cfd5", - "reference": "9c43f15da8798c8f30a4b099e6a94530a558cfd5", + "url": "https://api.github.com/repos/phpstan/phpstan/zipball/8226701cd228a0d63c2df995de7ab6070c69ac6a", + "reference": "8226701cd228a0d63c2df995de7ab6070c69ac6a", "shasum": "" }, "require": { @@ -104,13 +104,17 @@ "description": "PHPStan - PHP Static Analysis Tool", "support": { "issues": "https://github.com/phpstan/phpstan/issues", - "source": "https://github.com/phpstan/phpstan/tree/0.12.84" + "source": "https://github.com/phpstan/phpstan/tree/0.12.91" }, "funding": [ { "url": "https://github.com/ondrejmirtes", "type": "github" }, + { + "url": "https://github.com/phpstan", + "type": "github" + }, { "url": "https://www.patreon.com/phpstan", "type": "patreon" @@ -120,7 +124,7 @@ "type": "tidelift" } ], - "time": "2021-04-19T17:10:54+00:00" + "time": "2021-07-04T15:31:48+00:00" } ], "packages-dev": [ @@ -1239,30 +1243,29 @@ }, { "name": "phpstan/phpstan-phpunit", - "version": "0.12.18", + "version": "0.12.20", "source": { "type": "git", "url": "https://github.com/phpstan/phpstan-phpunit.git", - "reference": "ab44aec7cfb5cb267b8bc30a8caea86dd50d1f72" + "reference": "efc009981af383eb3303f0ca9868c29acad7ce74" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan-phpunit/zipball/ab44aec7cfb5cb267b8bc30a8caea86dd50d1f72", - "reference": "ab44aec7cfb5cb267b8bc30a8caea86dd50d1f72", + "url": "https://api.github.com/repos/phpstan/phpstan-phpunit/zipball/efc009981af383eb3303f0ca9868c29acad7ce74", + "reference": "efc009981af383eb3303f0ca9868c29acad7ce74", "shasum": "" }, "require": { "php": "^7.1 || ^8.0", - "phpstan/phpstan": "^0.12.60" + "phpstan/phpstan": "^0.12.86" }, "conflict": { "phpunit/phpunit": "<7.0" }, "require-dev": { - "phing/phing": "^2.16.3", "php-parallel-lint/php-parallel-lint": "^1.2", "phpstan/phpstan-strict-rules": "^0.12.6", - "phpunit/phpunit": "^7.5.20" + "phpunit/phpunit": "^9.5" }, "type": "phpstan-extension", "extra": { @@ -1288,9 +1291,9 @@ "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.18" + "source": "https://github.com/phpstan/phpstan-phpunit/tree/0.12.20" }, - "time": "2021-03-06T11:51:27+00:00" + "time": "2021-06-17T08:28:30+00:00" }, { "name": "phpunit/php-code-coverage", @@ -4314,5 +4317,5 @@ "php": "^7.2|^8.0" }, "platform-dev": [], - "plugin-api-version": "2.0.0" + "plugin-api-version": "2.1.0" } diff --git a/src/Type/ActiveRecordObjectType.php b/src/Type/ActiveRecordObjectType.php index 86f6643..cac7545 100644 --- a/src/Type/ActiveRecordObjectType.php +++ b/src/Type/ActiveRecordObjectType.php @@ -25,7 +25,7 @@ public function hasOffsetValueType(Type $offsetType): TrinaryLogic return parent::hasOffsetValueType($offsetType); } - public function setOffsetValueType(?Type $offsetType, Type $valueType): Type + public function setOffsetValueType(?Type $offsetType, Type $valueType, bool $unionValues = true): Type { if ($offsetType instanceof ConstantStringType && $this->hasProperty($offsetType->getValue())->no()) { return new ErrorType();