https://blogs.gentoo.org/ago/2020/07/04/gentoo-tinderbox/ Issue: dev-php/php-redmine-api-1.5.16 fails tests. Discovered on: amd64 (internal ref: ci)
Created attachment 677809 [details] build.log build log and emerge --info
Possible context of error(s): PHP Fatal error: Uncaught Error: Call to undefined function each() in /usr/share/php/PHPUnit/Util/Getopt.php:37
This is a problem with PHPUnit (I'm guessing 5.x based on the DEPEND of php-redmine-api) and not php-redmine-api: PHP Fatal error: Uncaught Error: Call to undefined function each() in /usr/share/php/PHPUnit/Util/Getopt.php:37 Stack trace: #0 /usr/share/php/PHPUnit/TextUI/Command.php(279): PHPUnit_Util_Getopt::getopt() #1 /usr/share/php/PHPUnit/TextUI/Command.php(129): PHPUnit_TextUI_Command->handleArguments() #2 /usr/share/php/PHPUnit/TextUI/Command.php(118): PHPUnit_TextUI_Command->run() #3 /usr/share/php/PHPUnit/phpunit(52): PHPUnit_TextUI_Command::main() #4 {main} thrown in /usr/share/php/PHPUnit/Util/Getopt.php on line 37
Created attachment 678022 [details, diff] phpunit-5.7-noeach.patch Proposed patch to remove each from PHPUnit 5.7.15-r3 Signed-off-by: Brian Evans <grknight@gentoo.org>
This is a hard problem to solve in general: ago is running the test suite with php-8.x even though this version of PHPUnit needs php-7.x. There's no _general_ way to solve that with our PHP eclasses if I recall correctly... but in this case, phpunit-5.x needs EXACTLY php:7.2. Could we just change the shebang in "phpunit" to point to /usr/bin/php7.2 instead of /usr/bin/php?
(In reply to Michael Orlitzky from comment #5) > This is a hard problem to solve in general: ago is running the test suite > with php-8.x even though this version of PHPUnit needs php-7.x. There's no > _general_ way to solve that with our PHP eclasses if I recall correctly... > but in this case, phpunit-5.x needs EXACTLY php:7.2. > > Could we just change the shebang in "phpunit" to point to /usr/bin/php7.2 > instead of /usr/bin/php? So this is a real problem then as 7.2 is due to retire this month as soon as the next security release is due. 7.2 is EOL upstrea as of 2020-11-30
Maybe port it to 7.3 and then proceed with shebang-changing? Or we could also try to replace phpunit-5.x with something only slightly newer. The latest version of e.g. php-redmine-api still asks for phpunit-6.x, but could probably use something newer. (If everything has a newer version that can use phpunit-8.x, no problem.)
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a015f3cf2cdf6d9cadda572bc80865558a59de9f commit a015f3cf2cdf6d9cadda572bc80865558a59de9f Author: David Seifert <soap@gentoo.org> AuthorDate: 2023-09-15 07:52:20 +0000 Commit: David Seifert <soap@gentoo.org> CommitDate: 2023-09-15 07:52:20 +0000 dev-php/phpunit: treeclean Closes: https://bugs.gentoo.org/715772 Closes: https://bugs.gentoo.org/759445 Signed-off-by: David Seifert <soap@gentoo.org> dev-php/phpunit/Manifest | 2 - dev-php/phpunit/metadata.xml | 12 ----- dev-php/phpunit/phpunit-8.5.11.ebuild | 96 ---------------------------------- dev-php/phpunit/phpunit-8.5.14.ebuild | 97 ----------------------------------- profiles/package.mask | 1 - 5 files changed, 208 deletions(-)