-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Support PHP 8 #4325
Comments
In the meantime, here is how you can install PHPUnit 9 with Composer 2 for PHP 8:
PHPUnit 5.2.7 has "php": ">=5.6" in its That is not a version constraint.
PHPUnit 9.2.5 has "php": "^7.3" in its Until this ticket is closed, you can use the following:
|
@sebastianbergmann thanks for mentioning us; @jaapio and I will look into this! |
|
Thank you, @jaapio. |
|
While I'm not fully happy with the implementation, |
Thank you, Arne. |
I spoke too soon about Prophecy, but it is now passing its nightly build if we force phpunit and phpdocumentor to their I'll add PHP8 to the composer.json after feature freeze and when phpdocumentor is tagged (if we wait for phpunit that'll presumably cause a deadlock?) |
I just released https://github.com/phpDocumentor/ReflectionDocBlock/releases/tag/5.2.0 should be good to go as far as I was able to check. This should clear the road for others to update. |
Thanks @jaapio that fixed the prophecy issues 👍 |
We now use |
I would like to thank everyone who has contributed to the effort of making PHPUnit itself as well as its dependencies (and their dependencies ...) installable on PHP 8. |
This is awesome! When will it be available? |
August 7th, though note that you may still have to ignore platform requirements when installing PHPUnit with composer, even after that release, since not all PHPUnit's dependencies actually allow PHP 8 yet, however all of them at least work well enough so that PHPUnit and it's test suite can run. |
The only dependencies that do not have releases yet that allow PHP 8 are
Versions of these packages that allow PHP 8 will be tagged when PHPUnit 9.3 is tagged. |
Awesome preparations done so head of time! Although I'm not involved, I did enjoy the level of enthusiasm and professionalism how things are done and looking forward. Thank you all ❤️ |
Prophecy doesn't allow PHP 8 yet. It requires |
Maybe in the future prophecy could be considered to be an optional dependency? Currently there are too many hoops to jump through to test code with multiple versions of PHP if testing with PHP 8 is included. Not a biggie if testing only with PHP 8. |
@tuupola removing support for Prophecy in core is planned for the future, which is why |
Ran into the same issue today with https://travis-ci.org/github/milesj/decoda/jobs/728420774 and PHP8 being untestable. //EDIT: using --ignore-platform-reqs works as a workaround for now. |
Prophecy |
Composer update on Mac Osx Big Sur Problem 1 |
PHPUnit 9 is being tested against nightly builds of PHP 8 for quite a while and it is safe to say that -- as of right now -- PHPUnit 9 works on PHP 8. While some things might still change until PHP 8.0.0 is released, it is time to make the support for PHP 8 official.
However, this is not as simple as applying
to this repository for
phpunit/phpunit
.PHP 8.0 also needs to be allowed in the
composer.json
files of PHPUnit's dependencies:phpunit/php-code-coverage
phpunit/php-file-iterator
phpunit/php-invoker
phpunit/php-text-template
phpunit/php-timer
phpunit/php-token-stream
sebastian/code-unit
sebastian/code-unit-reverse-lookup
sebastian/comparator
sebastian/diff
sebastian/environment
sebastian/exporter
sebastian/global-state
sebastian/object-enumerator
sebastian/object-reflector
sebastian/recursion-context
sebastian/resource-operations
sebastian/type
sebastian/version
doctrine/instantiator
(has"php": "^7.1 || ^8.0"
in 1.3.1)symfony/polyfill-ctype
(has"php": ">=5.3.3"
in 1.17.1)myclabs/deep-copy
CC @mnapoli and @theofidryphar-io/manifest
CC @theseerphar-io/version
CC @theseerphpdocumentor/reflection-common
CC @jaapio and @mvrielphpdocumentor/reflection-docblock
CC @jaapio and @mvrielphpdocumentor/type-resolver
CC @jaapio and @mvrielphpspec/prophecy-phpunit
CC @ciaranmcnulty and @stofphpspec/prophecy
CC @ciaranmcnulty and @stoftheseer/tokenizer
CC @theseerwebmozart/assert
CC @webmozartOf course, I will take care of all dependencies that live in the
sebastian/
andphpunit/
namespaces myself.The text was updated successfully, but these errors were encountered: