Using and mainaining a fork of phpunit48
Dear phpbrew developers,
for a project of mine I forked phpunit 4.8: https://github.com/xinc-develop/phpunit48
Using the following patch phpunit runs.
diff --git a/composer.json b/composer.json
index 39848f39..c9b96ed2 100644
--- a/composer.json
+++ b/composer.json
@@ -21,6 +21,12 @@
"bin": [
"bin/phpbrew"
],
+ "repositories": [
+ {
+ "type": "vcs",
+ "url": "https://github.com/xinc-develop/phpunit48"
+ }
+ ],
"require": {
"php": "^5.3.9||^7.0||^8.0",
"corneltek/cliframework": "3.0.x-dev#2650a53433854d43b91955e8f967c62ce07869d7",
@@ -34,7 +40,7 @@
},
"require-dev": {
"php-vcr/php-vcr": "^1.4.5",
- "phpunit/phpunit": "^4.8||^5.7||^6.5||^7.5"
+ "xinc-develop/phpunit48": "dev-master"
},
"extra": {
"branch-alias": {
Maybe there are othe workarounds available to run the test suite?
The phpunit project does not like maintaining a phpunit 4.8 package. https://github.com/sebastianbergmann/phpunit/issues/4841
Is the phpbrew crew interessted in developing phpunit48 further? I would be happy to help with this afford.
Running phpunit in fresh checkout of phpbrew with php8.
Output
./vendor/bin/phpunit PHP Fatal error: Uncaught Error: Call to undefined function each() in /home/ftr/github/phpbrew/vendor/phpunit/phpunit/src/Util/Getopt.php:38 Stack trace: #0 /home/ftr/github/phpbrew/vendor/phpunit/phpunit/src/TextUI/Command.php(240): PHPUnit_Util_Getopt::getopt() #1 /home/ftr/github/phpbrew/vendor/phpunit/phpunit/src/TextUI/Command.php(111): PHPUnit_TextUI_Command->handleArguments() #2 /home/ftr/github/phpbrew/vendor/phpunit/phpunit/src/TextUI/Command.php(100): PHPUnit_TextUI_Command->run() #3 /home/ftr/github/phpbrew/vendor/phpunit/phpunit/phpunit(52): PHPUnit_TextUI_Command::main() #4 {main} thrown in /home/ftr/github/phpbrew/vendor/phpunit/phpunit/src/Util/Getopt.php on line 38
Expected Result
PHPunit test results
Command
./vendor/bin/phpunit
Running PHP:
PHP 8.0.13 (cli) (built: Nov 21 2021 22:49:59) ( NTS ) Copyright (c) The PHP Group Zend Engine v4.0.13, Copyright (c) Zend Technologies with Zend OPcache v8.0.13, Copyright (c), by Zend Technologies
Thanks
Meanwhile I do the master->main switch for the repo.
- https://github.com/StevenMMortimer/master-to-main
Since this will happen, I think it's not necessary to maintain the PHPUnit48.
Once the PHPBrew 2.x version is released, it can also upgrade the PHPUnit version. And the above issue will be resolved.