8000 Fail on PHPUnit deprecations by morozov · Pull Request #6959 · doctrine/dbal · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Fail on PHPUnit deprecations #6959

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 17, 2025

Conversation

morozov
Copy link
Member
@morozov morozov commented May 16, 2025

A recent PR (#6936) introduced the usage of @dataProvider in a test, which now triggers a PHPUnit deprecation on 4.3.x where we use PHPUnit 11.5:

➜ phpunit tests/Functional/BooleanBindingTest.php
PHPUnit 11.5.15 by Sebastian Bergmann and contributors.

Runtime:       PHP 8.4.7
Configuration: /Users/morozov/Projects/dbal/phpunit.xml

..                                                                                              2 / 2 (100%)

Time: 00:00.032, Memory: 16.00 MB

OK, but there were issues!
Tests: 2, Assertions: 2, PHPUnit Deprecations: 1.

Prior to that, our test suite had been deprecation-free if not forever, then at least for most of the time.

I don't think it would hurt if we disallowed the usage of deprecated PHPUnit APIs. If it becomes a problem, we can revert this.

Implementation Details

  1. The configuration parameters being added are available since around PHPUnit 10.5, while the 3.x branches require PHPUnit 9, so I'm updating the PHPUnit configuration only in 4.x.
  2. Even though the test in question was added to 3.9.x and exists in 4.2.x, I'm not changing the test in question in this PR. The reason is that 3.9.x and 4.2.x contain more than one occurrence of @dataProvider, which all have been reworked in 4.3.x. I will rework the test during the merge up.

@morozov morozov added this to the 4.2.4 milestone May 16, 2025
@morozov morozov marked this pull request as ready for review May 16, 2025 23:03
@morozov morozov requested a review from greg0ire May 16, 2025 23:03
@morozov morozov merged commit d6cfa1f into doctrine:4.2.x May 17, 2025
52 checks passed
@morozov morozov deleted the fail-on-phpunit-deprecations branch May 17, 2025 15:01
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.

2 participants
0