Closed mzk closed 1 year ago
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.
It looks like the error in the tests comes from there: https://github.com/liip/LiipFunctionalTestBundle/blob/07f5dcb429214da8cb57ec15cbb52054c308c774/src/DependencyInjection/Compiler/OptionalValidatorPass.php#L23-L25
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).
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.
@alexislefebvre done in MR https://github.com/liip/LiipFunctionalTestBundle/pull/619 .
Thanks! Please rebase this PR, the issue with PHP-CS-Fixer is fixed on the main branch.
rebased @alexislefebvre
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
Thanks for the PR, please note that PHPUnit 10 isn't fully supported by Symfony yet: https://github.com/symfony/symfony/issues/49069