Skip to content
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

Add support for PHPUnit 11 #4317

Closed
wants to merge 2 commits into from

Conversation

MauricioFauth
Copy link
Contributor

@MauricioFauth MauricioFauth commented Sep 13, 2024

The test cases Twig\Test\NodeTestCase and Twig\Test\IntegrationTestCase are currently incompatible with PHPUnit 11.

This pull request adds an option to the user to add support to run the tests with PHPUnit 11, if they implement the Twig\Test\IntegrationTestCase::getFixturesDirectory() method. Currently the only solution to the user is to fork IntegrationTestCase and NodeTestCase test cases, and run them only for PHPUnit 11.

The difference from the previous pull request is that this time, if getFixturesDirectory() is not implemented, it does not run the tests and trigger a deprecation, instead of causing an error.

- Adds static data providers for Twig\Test\IntegrationTestCase. Running
  PHPUnit 10+ will require
  Twig\Test\IntegrationTestCase::getFixturesDirectory() to be
  implemented.
- Removes the Twig\Test\NodeTestCase::getTests() data provider from the
  DataProvider attribute. This way it doesn't get called with
  PHPUnit 10+ causing the tests to fail.

Signed-off-by: Maurício Meneghini Fauth <[email protected]>
@fabpot
Copy link
Contributor

fabpot commented Oct 7, 2024

I'm closing here as the work to support PHPUnit 11 has been done in Twig 4.0.

@fabpot fabpot closed this Oct 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants