Skip to content

run tests using PHPUnit 11.5 #58370

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

Open
wants to merge 8 commits into
base: 7.4
Choose a base branch
from

Conversation

xabbuh
Copy link
Member

@xabbuh xabbuh commented Sep 24, 2024

Q A
Branch? 7.4
Bug fix? no
New feature? no
Deprecations? no
Issues
License MIT

@xabbuh
Copy link
Member Author

xabbuh commented Sep 24, 2024

The PR cannot be merged at the moment as it is based on a bunch of other open pull requests that are paving the way to be able to actually run the tests with PHPUnit 11.

@xabbuh xabbuh force-pushed the phpunit11-integration-tests branch 2 times, most recently from 7178ae5 to 76245c5 Compare September 24, 2024 07:31
@alexandre-daubois
Copy link
Member

This is super nice news! Did you already take care of everything required to be "PHPUnit 11 compliant" in already opened PRs ?

@xabbuh
Copy link
Member Author

xabbuh commented Sep 24, 2024

@alexandre-daubois The "ensure session storages are opened before destroying them" commit is the only one that is not already part of an open PR. I do not really understand yet why that change is necessary (the flow in AbstractSessionHandler is different as headers_sent() returns a different result).

@xabbuh xabbuh force-pushed the phpunit11-integration-tests branch from 76245c5 to 24d86e8 Compare September 24, 2024 11:18
@xabbuh xabbuh requested a review from chalasr as a code owner September 24, 2024 11:18
nicolas-grekas added a commit that referenced this pull request Sep 25, 2024
This PR was merged into the 5.4 branch.

Discussion
----------

Tweak error/exception handler registration

| Q             | A
| ------------- | ---
| Branch?       | 5.4
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Issues        | Fix #53812
| License       | MIT

This should allow removing the custom bootstrap file from #58370 /cc `@xabbuh`

The change on FrameworkBundle leads to a tweaked behavior: we don't override the previous error handler in case it's not the Symfony one. This shouldn't change anything in practice since the error handler is already registered by the runtime component.

The rest is closer to bug fixes.

Commits
-------

af9c035 Tweak error/exception handler registration
@nicolas-grekas
Copy link
Member

We need a way to register DebugClassLoader, and maybe a few other things. Basically what we do in SymfonyTestsListenerTrait.

@xabbuh xabbuh force-pushed the phpunit11-integration-tests branch 2 times, most recently from ab2f604 to e56f932 Compare September 25, 2024 16:42
@xabbuh xabbuh changed the title run integration tests using PHPUnit 11 [WIP] run integration tests using PHPUnit 11 Sep 27, 2024
@xabbuh xabbuh force-pushed the phpunit11-integration-tests branch from e56f932 to bddc3f5 Compare September 27, 2024 11:30
@xabbuh xabbuh force-pushed the phpunit11-integration-tests branch 5 times, most recently from d72eadc to c89477a Compare October 10, 2024 06:49
@xabbuh xabbuh changed the title [WIP] run integration tests using PHPUnit 11 run integration tests using PHPUnit 11 Oct 10, 2024
@xabbuh xabbuh changed the title run integration tests using PHPUnit 11 [WIP] run integration tests using PHPUnit 11 Oct 10, 2024
@xabbuh xabbuh force-pushed the phpunit11-integration-tests branch from a440ba5 to 1063ab5 Compare May 30, 2025 22:15
@xabbuh xabbuh force-pushed the phpunit11-integration-tests branch 2 times, most recently from 5e4fdba to ae5c4c9 Compare June 3, 2025 06:22
@xabbuh xabbuh force-pushed the phpunit11-integration-tests branch 5 times, most recently from 1f1acda to fb2eb1c Compare June 14, 2025 21:10
@@ -129,7 +130,7 @@ jobs:
fi

# Legacy tests are skipped when deps=high and when the current branch version has not the same major version number as the next one
Copy link
Member

Choose a reason for hiding this comment

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

should this be removed ? You removed the legacy group so this will probably not work anymore.

Copy link
Member Author

Choose a reason for hiding this comment

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

You are right. For now this would work as the group is present in the 6.4 branch (see also #58370 (comment)). We need to decide which approach we do want to take.

@xabbuh xabbuh force-pushed the phpunit11-integration-tests branch 5 times, most recently from 7db40f2 to 6944687 Compare June 19, 2025 11:52
@welcoMattic welcoMattic removed their request for review June 19, 2025 12:00
@xabbuh xabbuh force-pushed the phpunit11-integration-tests branch from 6944687 to 1a81669 Compare June 23, 2025 06:07
@xabbuh xabbuh force-pushed the phpunit11-integration-tests branch 3 times, most recently from 5f2cce3 to 2c6e393 Compare June 23, 2025 11:46
@xabbuh xabbuh force-pushed the phpunit11-integration-tests branch from 2c6e393 to 247dbdf Compare June 23, 2025 11:53
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.

8 participants