terminus
terminus copied to clipboard
php-xml is required but not listed in the composer file
Platform
All
Installed Via
Composer
PHP Version
Any
Command Executed
Trying to install the package without the php-xml
extension installed: composer install pantheon-systems/terminus
Expected behavior
The composer install was supposed to fail telling that the extension is missing.
Actual behavior
The package installs, and if you try terminus --version
after:
PHP Fatal error: Uncaught ReflectionException: Class "DOMDocument" does not exist in /home/zoio/vendor/consolidation/output-formatters/src/Transformations/DomToArraySimplifier.php:24
Stack trace:
#0 /home/zoio/vendor/consolidation/output-formatters/src/Transformations/DomToArraySimplifier.php(24): ReflectionClass->isSubclassOf()
#1 /home/zoio/vendor/consolidation/output-formatters/src/FormatterManager.php(372): Consolidation\OutputFormatters\Transformations\DomToArraySimplifier->canSimplify()
#2 /home/zoio/vendor/consolidation/output-formatters/src/FormatterManager.php(194): Consolidation\OutputFormatters\FormatterManager->canSimplifyToArray()
#3 /home/zoio/vendor/consolidation/output-formatters/src/FormatterManager.php(189): Consolidation\OutputFormatters\FormatterManager->isValidDataType()
#4 /home/zoio/vendor/consolidation/output-formatters/src/FormatterManager.php(170): Consolidation\OutputFormatters\FormatterManager->isValidFormat()
(...)
Proposed solution
The ext-xml:"*"
should be listed in the composer file as a requirement as well.
Related to #2010
@zoiosilva Note that installing terminus using composer is not supported. It's strongly recommended to download the .phar from the github releases page and place it in your $PATH
, or for users not comfortable doing that, using the brew or ubuntu package.
I think we'll merge the PR for this because php-xml is indeed needed, but this shouldn't be misconstrued as supporting installing terminus using composer.