Skip to content

Conversation

@W0rma
Copy link
Contributor

@W0rma W0rma commented Feb 11, 2025

The only breaking change which needs to be considered seems to be sebastianbergmann/php-code-coverage@eca5d61

Some other codeception packages need to support PHPUnit 12 before this PR can be merged.
I have already prepared PRs for all of them:

@W0rma W0rma force-pushed the phpunit12 branch 4 times, most recently from 5a8cb67 to 0f5c4a4 Compare February 14, 2025 07:13
@W0rma W0rma marked this pull request as ready for review February 14, 2025 07:40
@W0rma
Copy link
Contributor Author

W0rma commented Feb 14, 2025

@Naktibalda Thank you for merging the PRs related to the codeception dependencies.

This PR is now ready for review.

I tested it in one of our projects and it worked fine.

@TavoNiievez TavoNiievez merged commit 69b7545 into Codeception:main Feb 16, 2025
10 checks passed
@W0rma W0rma deleted the phpunit12 branch February 17, 2025 04:03
@llaville
Copy link
Contributor

Codeception 5.3.2 that install PHPUnit 12.x are not fully compatible.

Reason: Typed class constants are only allowed since PHP 8.3

See https://github.com/sebastianbergmann/phpunit/blob/12.3/src/TextUI/Configuration/Cli/Builder.php#L37

For example, on my project https://github.com/llaville/sarif-php-sdk/tree/2.3 that recently support both PHPUnit natively and Codeception v5, with packages installed

codeception/codeception            5.3.2   BDD-style testing framework
phpunit/phpunit                    12.3.10 The PHP Unit Testing framework.

I got

Codeception PHP Testing Framework v5.3.2 https://stand-with-ukraine.pp.ua

Parse error: syntax error, unexpected identifier "LONG_OPTIONS", expecting "=" in /shared/backups/bartlett/sarif-php-sdk/vendor-bin/codeception/vendor/phpunit/phpunit/src/TextUI/Configuration/Cli/Builder.php on line 37

Remember that PHPUnit 12 is for PHP >= 8.3 (see https://phpunit.de/supported-versions.html)

And Codeception v5.3 is for PHP >= 8.2

@llaville
Copy link
Contributor

NB: this context raised error because I've installed Codeception v5 on a PHP 8.3 platform that switch back to a PHP 8.2 platform (to test BC compatibility)

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.

4 participants