Closed lolli42 closed 1 year ago
Yes, please. I had to set composer platform.php to 8.1 to be able to install phpunit v9 (which depends on prophecy).
We can't really allow it until the new features are all supported or at least error with sensible messages; this will require someone to go through the various new features and make a list
You can use --ignore-platform-req=PHP with composer to try things out for now
Maybe the "<8.2" can be removed - so at least executing with PHP8.2 is possible. We are testing codebase with different php versions. Using --ignore-platform-req=PHP
is a ugly workaround.
Can be said, that new PHP8.2 language features are not supported yet.
Agreed.
Since prophecy is a direct dependency in phpunit 9, blocking PHP 8.2 here forces quite a few repositories to go with --ignore-platform-req=PHP+
in their CI when they want to add PHP 8.2 based runs now. Even if their tests don't use prophecy at all.
It would be great if composer.json could allow PHP 8.2 already, even if prophecy did not implement all features or fixes just yet.
What do you think?
We can't do that, there's a high probability that 8.3 will break prophecy (there hasn't really been a PHP minor that didn't break something)
I think teams testing with pre-release versions of PHP should be ok with adding an extra composer flag to their edge builds
Than change to <8.3 in the constraint.
Not agreeing on that. We start to test early to get things done and look how dependencies are doing, helping or reporting it if there are problems (if reasonable doable).
So, can we hope on a change with PHP8.2.0 release than at least "please" ?
There are zero service guarantees about when prophecy is going to support new PHP versions; it depends on the community and maintainers doing the work
The things that need to happen would be:
All but 3 can be done without maintainer permissions
Alright. Thanks for feedback!
We can't really allow it until the new features are all supported or at least error with sensible messages; this will require someone to go through the various new features and make a list
You can use --ignore-platform-req=PHP with composer to try things out for now
So that means PhpUnit (which uses phpspec/prophecy
) doesn't work on PHP 8.2?
PS: --ignore-platform-req=PHP
doesn't work for PhpUnit because it will try to install older PhpUnit and fail in runtime.
What works as a workaround is adding this to composer.json
.
"replace": { "phpspec/prophecy": "*" },
@Danon that would not work if you "need/want" prophecy but also PHP8.2.
@sbuerk I need PhpUnit on PHP 8.2, and it also uses phpspec/prophecy
So that means PhpUnit (which uses
phpspec/prophecy
) doesn't work on PHP 8.2?
PHPUnit 8.5 and PHPUnit 9.5 work "just fine" on PHP 8.2. Until this issue is resolved, though, you need to work around it when installing PHPUnit using Composer. If you use PHPUnit from a PHP Archive (PHAR), which you should: it's the recommended best practice, then you are not affected by this issue.
More details can be found here: https://github.com/sebastianbergmann/phpunit/issues/5033#issuecomment-1221992857
@sebastianbergmann When do you think PhpUnit will be installable through composer on php 8.2 without any workarounds?
@sebastianbergmann When so you think php unit will be instalalble Through composer on php 8.2 without any work around?
When there is a Prophecy release that supports PHP 8.2.
When PHPUnit 8.5.29 and PHPUnit 9.5.23 have been released.
@sebastianbergmann Cool, thank you very much.
The Prophecy 1.16 version has support for PHP 8.2
PHP 8.2 is beta now. It would be great if prophecy could unblock it in composer.json.