Skip to content

Raise mockery/mockery floor to ^1.3.1 for PHPUnit 8 compatibility#35

Merged
rick-lam merged 1 commit into
masterfrom
chore/mockery-phpunit8-floor
May 27, 2026
Merged

Raise mockery/mockery floor to ^1.3.1 for PHPUnit 8 compatibility#35
rick-lam merged 1 commit into
masterfrom
chore/mockery-phpunit8-floor

Conversation

@rick-lam
Copy link
Copy Markdown
Contributor

Summary

The --prefer-lowest CI job (added in #34) surfaced that the declared mockery/mockery: ^1.0 floor cannot actually install against the PHPUnit 8 the project now requires:

PHP Fatal error: Declaration of Mockery\Adapter\Phpunit\MockeryPHPUnitIntegration::assertPostConditions()
must be compatible with PHPUnit\Framework\TestCase::assertPostConditions(): void

Mockery added the : void return types PHPUnit 8 requires in 1.2.3 / 1.3.0, so the real floor is higher than ^1.0. This raises it to ^1.3.1 (the 1.3.x LTS line, PHP 7.2–8.0).

Only the minimum was wrong — the default (highest) resolution already picked a modern Mockery, so this doesn't change the committed lock's resolved versions, only the constraint + content-hash.

Verification (PHP 7.4)

  • --prefer-lowest: resolves mockery 1.3.1 + symfony/console 4.0 + symfony/event-dispatcher 5.0 + phpunit 8.5.52 → 131 tests pass.
  • default resolution → 131 tests pass, phpcs clean.

With this merged, #34's PHP 7.4 (lowest) job goes green and its continue-on-error can be dropped to make it a hard gate.

🤖 Generated with Claude Code

Mockery < 1.2.3 declares MockeryPHPUnitIntegration::assertPostConditions()
without the ': void' return type that PHPUnit 8's TestCase requires, which is
a fatal error. The declared '^1.0' floor therefore could not actually install
against the PHPUnit 8 now required, as the CI --prefer-lowest job exposed.

Bump the floor to ^1.3.1. Validated on PHP 7.4 with --prefer-lowest
(mockery 1.3.1 + symfony/console 4.0 + symfony/event-dispatcher 5.0 +
phpunit 8.5.52): 131 tests pass.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings May 27, 2026 14:24
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR corrects the minimum supported mockery/mockery dev dependency so lowest-dependency installs remain compatible with the project’s PHPUnit 8 baseline.

Changes:

  • Raises mockery/mockery from ^1.0 to ^1.3.1.
  • Updates composer.lock content hash without changing the resolved Mockery version.

Reviewed changes

Copilot reviewed 1 out of 2 changed files in this pull request and generated no comments.

File Description
composer.json Updates the Mockery dev dependency floor for PHPUnit 8 compatibility.
composer.lock Refreshes the lockfile content hash for the dependency constraint change.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@rick-lam rick-lam merged commit 85426cb into master May 27, 2026
1 check passed
@rick-lam rick-lam deleted the chore/mockery-phpunit8-floor branch May 28, 2026 18:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants