diff --git a/CHANGELOG.md b/CHANGELOG.md index fec7a9f..a1f3b27 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,7 +2,7 @@ All notable changes to this project will be documented in this file, in reverse chronological order by release. -## 3.2.1 - TBD +## 3.2.1 - 2018-10-25 ### Added @@ -22,7 +22,7 @@ All notable changes to this project will be documented in this file, in reverse ### Fixed -- Nothing. +- [#264](https://github.com/zendframework/zend-expressive-skeleton/pull/264) removes phpstan leftovers. ## 3.2.0 - 2018-09-27 diff --git a/src/ExpressiveInstaller/OptionalPackages.php b/src/ExpressiveInstaller/OptionalPackages.php index 0bf830a..d70c009 100644 --- a/src/ExpressiveInstaller/OptionalPackages.php +++ b/src/ExpressiveInstaller/OptionalPackages.php @@ -397,6 +397,13 @@ public function removeInstallerFromDefinition() : void // Remove installer scripts unset($this->composerDefinition['scripts']['pre-update-cmd']); unset($this->composerDefinition['scripts']['pre-install-cmd']); + + // Remove phpstan completely + $this->composerDefinition['scripts']['check'] = array_diff( + $this->composerDefinition['scripts']['check'], + ['@analyze'] + ); + unset($this->composerDefinition['scripts']['analyze']); } /** diff --git a/test/ExpressiveInstallerTest/RemoveInstallerTest.php b/test/ExpressiveInstallerTest/RemoveInstallerTest.php index ab2fc71..fde7647 100644 --- a/test/ExpressiveInstallerTest/RemoveInstallerTest.php +++ b/test/ExpressiveInstallerTest/RemoveInstallerTest.php @@ -49,5 +49,7 @@ public function testInstallerIsRemoved() $this->assertFalse(isset($composer['extra']['optional-packages'])); $this->assertFalse(isset($composer['scripts']['pre-install-cmd'])); $this->assertFalse(isset($composer['scripts']['pre-update-cmd'])); + $this->assertFalse(isset($composer['scripts']['check']['@analyze'])); + $this->assertFalse(isset($composer['scripts']['analyze'])); } }