PHP Unit testing is not compatible with PHP8, does it support backward compatibility?

Viewed 4772

I have several test units in PHPUnit and the PHPUnit is not compatible with php8. I`m looking for a way to run old tests on PHP8. Is there any wrapper for PHPUnit to work with PHP8?

By the way, this my error on composer install:

    - phpunit/phpunit 9.1.1 requires php ^7.3 -> your PHP version (8.0.1) does not satisfy that requirement.

It may work by removing the requirement from the PHPUnit composer file.

1 Answers

PHPUnit supports PHP 8.0 starting from version 9.3.0. Just upgrade PHPUnit to last version to run your tests.

Related