Bug 1594663

Summary: fatal error running php-cs-fixer
Product: [Fedora] Fedora Reporter: François Kooman <fkooman>
Component: php-phpunitgoodpractices-polyfillAssignee: Remi Collet <fedora>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 28CC: fedora
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: php-phpunitgoodpractices-polyfill-1.1.0-2.fc27 php-phpunitgoodpractices-polyfill-1.1.0-2.fc28 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-07-04 17:53:56 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description François Kooman 2018-06-25 07:10:47 UTC
Description of problem:

PHP Fatal error:  Uncaught ErrorException: Class 'PHPUnit_Framework_Error_Warning' not found in /usr/share/php/PHPUnitGoodPractices/Polyfill/aliases.php:13

Version-Release number of selected component (if applicable):

php-cs-fixer-2.12.1-1.fc28.noarch

How reproducible:

always

Steps to Reproduce:
1. php-cs-fixer fix 

Actual results:

PHP Fatal error:  Uncaught ErrorException: Class 'PHPUnit_Framework_Error_Warning' not found in /usr/share/php/PHPUnitGoodPractices/Polyfill/aliases.php:13
Stack trace:
#0 [internal function]: {closure}(2, 'Class 'PHPUnit_...', '/usr/share/php/...', 13, Array)
#1 /usr/share/php/PHPUnitGoodPractices/Polyfill/aliases.php(13): class_alias('PHPUnit_Framewo...', 'PHPUnit\\Framewo...')
#2 /usr/share/php/Fedora/Autoloader/functions.php(56): require_once('/usr/share/php/...')
#3 /usr/share/php/Fedora/Autoloader/Dependencies.php(78): Fedora\Autoloader\requireFile('/usr/share/php/...')
#4 /usr/share/php/Fedora/Autoloader/Dependencies.php(100): Fedora\Autoloader\Dependencies::process(Array, true)
#5 /usr/share/php/PHPUnitGoodPractices/Polyfill/autoload.php(6): Fedora\Autoloader\Dependencies::required(Array)
#6 /usr/share/php/Fedora/Autoloader/functions.php(56): require_once('/usr/share/php/...')
#7 /usr/share/php/Fedora/Autoloader/Dependencies.php(78): Fedora\Autoloader\requireFile('/usr/share/php/...')
#8 /usr/share/php/Fedora/Autoloade in /usr/share/php/PHPUnitGoodPractices/Polyfill/aliases.php on line 13

Fatal error: Uncaught ErrorException: Class 'PHPUnit_Framework_Error_Warning' not found in /usr/share/php/PHPUnitGoodPractices/Polyfill/aliases.php:13
Stack trace:
#0 [internal function]: {closure}(2, 'Class 'PHPUnit_...', '/usr/share/php/...', 13, Array)
#1 /usr/share/php/PHPUnitGoodPractices/Polyfill/aliases.php(13): class_alias('PHPUnit_Framewo...', 'PHPUnit\\Framewo...')
#2 /usr/share/php/Fedora/Autoloader/functions.php(56): require_once('/usr/share/php/...')
#3 /usr/share/php/Fedora/Autoloader/Dependencies.php(78): Fedora\Autoloader\requireFile('/usr/share/php/...')
#4 /usr/share/php/Fedora/Autoloader/Dependencies.php(100): Fedora\Autoloader\Dependencies::process(Array, true)
#5 /usr/share/php/PHPUnitGoodPractices/Polyfill/autoload.php(6): Fedora\Autoloader\Dependencies::required(Array)
#6 /usr/share/php/Fedora/Autoloader/functions.php(56): require_once('/usr/share/php/...')
#7 /usr/share/php/Fedora/Autoloader/Dependencies.php(78): Fedora\Autoloader\requireFile('/usr/share/php/...')
#8 /usr/share/php/Fedora/Autoloade in /usr/share/php/PHPUnitGoodPractices/Polyfill/aliases.php on line 13

Expected results:

php-cs-fixer should fix code.

Comment 1 Remi Collet 2018-06-25 08:05:39 UTC
As a temporary workaround try removing the optional dep (php-phpunitgoodpractices-polyfill)

The proper fix will require the new php-phpunitgoodpractices-traits package.

Working on it.

Comment 2 Remi Collet 2018-06-25 09:16:34 UTC
Nightmare of circular dependency... I will update php-phpunitgoodpractices-polyfill to also include php-phpunitgoodpractices-trait

Comment 4 Fedora Update System 2018-06-25 09:37:39 UTC
php-phpunitgoodpractices-polyfill-1.1.0-2.fc27 has been submitted as an update to Fedora 27. https://bodhi.fedoraproject.org/updates/FEDORA-2018-aac309428b

Comment 5 Fedora Update System 2018-06-25 09:37:43 UTC
php-phpunitgoodpractices-polyfill-1.1.0-2.fc28 has been submitted as an update to Fedora 28. https://bodhi.fedoraproject.org/updates/FEDORA-2018-1f0ae867b7

Comment 6 Fedora Update System 2018-06-26 16:20:39 UTC
php-phpunitgoodpractices-polyfill-1.1.0-2.fc27 has been pushed to the Fedora 27 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2018-aac309428b

Comment 7 Fedora Update System 2018-06-26 18:23:33 UTC
php-phpunitgoodpractices-polyfill-1.1.0-2.fc28 has been pushed to the Fedora 28 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2018-1f0ae867b7

Comment 8 Fedora Update System 2018-07-04 17:53:56 UTC
php-phpunitgoodpractices-polyfill-1.1.0-2.fc27 has been pushed to the Fedora 27 stable repository. If problems still persist, please make note of it in this bug report.

Comment 9 Fedora Update System 2018-07-04 18:43:28 UTC
php-phpunitgoodpractices-polyfill-1.1.0-2.fc28 has been pushed to the Fedora 28 stable repository. If problems still persist, please make note of it in this bug report.