diff --git a/config/VERSION b/config/VERSION index 903cd9f2a..d95827c3d 100644 --- a/config/VERSION +++ b/config/VERSION @@ -1 +1 @@ -v3.1.1 +v3.1.2 diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md index 803d590f2..f91cc3554 100644 --- a/docs/CHANGELOG.md +++ b/docs/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## [v3.1.2](https://github.com/acquia/orca/tree/v3.1.2) (2020-12-14) + +[Full Changelog](https://github.com/acquia/orca/compare/v3.1.1...v3.1.2) + +**Fixed bugs:** + +- Add workaround for "Call to undefined method ::getAnnotations\(\)" error [\#120](https://github.com/acquia/orca/pull/120) ([TravisCarden](https://github.com/TravisCarden)) + ## [v3.1.1](https://github.com/acquia/orca/tree/v3.1.1) (2020-12-04) [Full Changelog](https://github.com/acquia/orca/compare/v3.1.0...v3.1.1) diff --git a/src/Domain/Fixture/FixtureCreator.php b/src/Domain/Fixture/FixtureCreator.php index c26a1dd0d..eff0c69f0 100644 --- a/src/Domain/Fixture/FixtureCreator.php +++ b/src/Domain/Fixture/FixtureCreator.php @@ -264,6 +264,10 @@ private function fixDefaultDependencies(): void { $additions[] = 'phpspec/prophecy-phpunit:^2'; } + if ($this->shouldDowngradePhpunit()) { + $additions[] = 'phpunit/phpunit:9.4.3'; + } + // Require additional packages. $prefer_source = $this->options->preferSource(); $no_update = !$this->options->isBare(); @@ -316,6 +320,21 @@ private function shouldRequireProphecyPhpunit(): bool { return $required->matches($actual); } + /** + * Determines whether or not to downgrade PHPUnit. + * + * Workaround for "Call to undefined method ::getAnnotations()" error." + * + * @see https://www.drupal.org/project/drupal/issues/3186443 + * + * @return bool + * Returns TRUE if it should be downgraded, or FALSE if not. + */ + private function shouldDowngradePhpunit(): bool { + $version = $this->options->getCoreResolved(); + return Comparator::equalTo($version, '9.1.0.0'); + } + /** * Gets the list of unwanted packages. *