Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

php-xml is required but not listed in the composer file #2377

Open
zoiosilva opened this issue Jul 16, 2022 · 2 comments
Open

php-xml is required but not listed in the composer file #2377

zoiosilva opened this issue Jul 16, 2022 · 2 comments

Comments

@zoiosilva
Copy link

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.

@zoiosilva
Copy link
Author

Related to #2010

@namespacebrian
Copy link
Contributor

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants