Problem/Motivation
system.module is included by a phpunit which means that you can have possible unexpected side effects. For example, #2349991: Provide a trait for categorizing plugin managers and use it for conditions and actions adds a unit test that creates the system_get_info() so it can unit test but then you get the following error if you run all the phpunit tests.
PHP Fatal error: Cannot redeclare system_get_info() (previously declared in /Volumes/devdisk/dev/drupal/core/tests/Drupal/Tests/Core/Plugin/CategorizingPluginManagerTraitTest.php:150) in /Volumes/devdisk/dev/drupal/core/modules/system/system.module on line 852
Fatal error: Cannot redeclare system_get_info() (previously declared in /Volumes/devdisk/dev/drupal/core/tests/Drupal/Tests/Core/Plugin/CategorizingPluginManagerTraitTest.php:150) in /Volumes/devdisk/dev/drupal/core/modules/system/system.module on line 852
Proposed resolution
Fix core/tests/Drupal/Tests/Core/Extension/ModuleHandlerTest
Remaining tasks
Review
User interface changes
None
API changes
None
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | 2392281.1.patch | 1.76 KB | alexpott |
Comments
Comment #1
alexpottComment #2
amateescu commentedYup, makes sense :)
Comment #3
dawehner... it would be so great to be disable loading of non-classes in PHP somehow.
Comment #4
catchCommitted/pushed to 8.0.x, thanks!