Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Phpunit 10#2005

Merged
greg0ire merged 6 commits into
doctrine:2.16.xfrom
greg0ire:phpunit-10
Sep 8, 2025
Merged

Phpunit 10#2005
greg0ire merged 6 commits into
doctrine:2.16.xfrom
greg0ire:phpunit-10

Conversation

@greg0ire
Copy link
Copy Markdown
Member

@greg0ire greg0ire commented Sep 7, 2025

The latest major version of PHPUnit is 12 😬
I think the issue was that we relied on symfony/phpunit-bridge. I've switched to PHPUnit's native deprecation detection system. Now it should be possible to upgrade to 11 and 12.

Not doing so is deprecated.
When testing without the ORM, the Events class does not exist and this
causes an exception when executing the data provider.
@greg0ire greg0ire added this to the 2.16.2 milestone Sep 8, 2025
@greg0ire greg0ire merged commit af6c3c2 into doctrine:2.16.x Sep 8, 2025
14 checks passed
@greg0ire greg0ire deleted the phpunit-10 branch September 8, 2025 19:23
unset($this->kernel, $this->commandTester);
}

#[WithoutErrorHandler]
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

The proper way to write tests for legacy APIs is not to disable the error handler (which will also not report notices and warnings) but to add the IgnoreDeprecations attribute, which disables only the reporting of deprecations.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

TIL πŸ’‘

That's way more satisfying :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants