Skip to content

Conversation

@GromNaN
Copy link
Member

@GromNaN GromNaN commented Nov 10, 2025

Q A
Type improvement
BC Break no
Fixed issues -

Summary

In order to test deprecation messages, we must use PHPUnit 9 with Symfony bridge or PHPUnit 11+.

This PR enable PHPUnit 11 with PHP 8.2+ (and keep 10 for PHP 8.1).

We have to ignore deprecation when Symfony lazy ghost are enabled, because the trait is deprecated.

@GromNaN GromNaN added the Task label Nov 10, 2025
@GromNaN GromNaN added this to the 2.15.0 milestone Nov 10, 2025
@GromNaN GromNaN requested a review from Copilot November 10, 2025 13:51
Copy link

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 upgrades the test suite to use PHPUnit 11 for PHP 8.2+ while maintaining PHPUnit 10 for PHP 8.1, enabling better deprecation message testing support.

Key changes:

  • PHPUnit version constraint updated to allow both 10.x and 11.x
  • Migration from deprecated PHPUnit methods and annotations to modern attributes
  • Addition of deprecation handling for Symfony lazy ghost objects

Reviewed Changes

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

Show a summary per file
File Description
composer.json Updates PHPUnit dependency constraint to support both version 10.5.58+ and 11.5.43+
phpunit.xml.dist Updates schema reference from PHPUnit 10.5 to 11.5
tests/Tests/QueryTest.php Replaces deprecated will($this->returnValue()) with willReturn()
tests/Tests/Functional/TargetDocumentTest.php Migrates from docblock @doesNotPerformAssertions to attribute syntax
tests/Tests/Functional/ShardKeyTest.php Adds guard to prevent accessing uninitialized logger in tearDown
tests/Tests/ConfigurationTest.php Adds IgnoreDeprecations attribute to tests involving deprecated lazy ghost objects
tests/Tests/BaseTestCase.php Reorders configuration logic to check native lazy object first before lazy ghost
.github/workflows/continuous-integration.yml Adds conditional deprecation suppression for native proxy mode

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

@GromNaN GromNaN enabled auto-merge (squash) November 10, 2025 14:28
Copy link
Member

@alcaeus alcaeus left a comment

Choose a reason for hiding this comment

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

Minor suggestion to avoid a conditional, but LGTM otherwise.

@GromNaN GromNaN force-pushed the phpunit-11 branch 3 times, most recently from b26c6b8 to 4d5d0a9 Compare November 11, 2025 23:00
@GromNaN GromNaN merged commit 48a7de7 into doctrine:2.15.x Nov 12, 2025
28 checks passed
@GromNaN GromNaN deleted the phpunit-11 branch November 12, 2025 09:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants