Skip to content

Commit

Permalink
Merge branch 'hotfix/3.1.2'
Browse files Browse the repository at this point in the history
  • Loading branch information
TravisCarden committed Dec 14, 2020
2 parents 50af84f + f995e0b commit 52adb62
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 1 deletion.
2 changes: 1 addition & 1 deletion config/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v3.1.1
v3.1.2
8 changes: 8 additions & 0 deletions docs/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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)
Expand Down
19 changes: 19 additions & 0 deletions src/Domain/Fixture/FixtureCreator.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down Expand Up @@ -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.
*
Expand Down

0 comments on commit 52adb62

Please sign in to comment.