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 10 #610

Merged
merged 3 commits into from
Apr 11, 2023
Merged

Add support for phpunit 10 #610

merged 3 commits into from
Apr 11, 2023

Conversation

mzk
Copy link
Contributor

@mzk mzk commented Feb 28, 2023

No description provided.

@alexislefebvre
Copy link
Collaborator

Thanks for the PR, please note that PHPUnit 10 isn't fully supported by Symfony yet: symfony/symfony#49069

@alexislefebvre
Copy link
Collaborator

Do you need help to fix the error? The liip_functional_test.validator service and PHPUnit\Framework\MockObject\MockBuilder::setMethods() are missing when PHPUnit 10 is used. We may need a compatibility layer with something like if (method_exists(…, 'setMethods')) {…} else {…} for the mocks.

@alexislefebvre
Copy link
Collaborator

alexislefebvre commented Mar 14, 2023

It looks like the error in the tests comes from there:

if (!$container->hasDefinition('validator')) {
$container->removeDefinition('liip_functional_test.validator');
}

With Symfony ^5.4 or ^6.0 and PHP 8.1+, a different set of dependencies is installed. For some reason the validator is not available in this context, which removes the validator.

I wonder why tests break in this PR but not on the main branch (e.g. it works in #611).

@alexislefebvre
Copy link
Collaborator

alexislefebvre commented Mar 17, 2023

Coud you please push only the commit 0b57717 on a separate PR? Once it will be merged, you'll be able to run the Actions without requiring the permission from the maintainers.

@mzk
Copy link
Contributor Author

mzk commented Apr 5, 2023

@alexislefebvre done in MR #619 .

@alexislefebvre
Copy link
Collaborator

Thanks! Please rebase this PR, the issue with PHP-CS-Fixer is fixed on the main branch.

@mzk
Copy link
Contributor Author

mzk commented Apr 6, 2023

rebased @alexislefebvre

@alexislefebvre alexislefebvre merged commit 782586a into liip:master Apr 11, 2023
@alexislefebvre
Copy link
Collaborator

We had to change a warning to a failing test and update the PHPUnit config. Thanks!

Please try the last release: https://github.com/liip/LiipFunctionalTestBundle/releases/tag/4.9.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants