-1

I have a problem with PhpStorm. I had trouble adding the Composer and Symfony commands to PhpStorm.

I receive a message of this style:

Problem Failed to parse output as xml: Error on line 2: Content is not allowed in prolog.. Command php /root/Downloads/composer.phar list --format=xml Output Fatal error: Uncaught Error: Class 'DOMDocument' not found in phar:///root/Downloads/composer.phar/vendor/symfony/console/Descriptor/XmlDescriptor.php:90 Stack trace:

0 phar:///root/Downloads/composer.phar/vendor/symfony/console/Descriptor/XmlDescriptor.php(166):

Symfony\Component\Console\Descriptor\XmlDescriptor->getApplicationDocument(Object(Composer\Console\Application), NULL)

1 phar:///root/Downloads/composer.phar/vendor/symfony/console/Descriptor/Descriptor.php(55):

Symfony\Component\Console\Descriptor\XmlDescriptor->describeApplication(Object(Composer\Console\Application), Array)

2 phar:///root/Downloads/composer.phar/vendor/symfony/console/Helper/DescriptorHelper.php(69):

Symfony\Component\Console\Descriptor\Descriptor->describe(Object(Symfony\Component\Console\Output\ConsoleOutput), Object(Composer\Console\Application), Array)

3 phar:///root/Downloads/composer.phar/vendor/symfony/console/Command/ListCommand.php(81):

Symfony\Component\Console\Helper\DescriptorHelper->describe(Object(Symfony\Component\Console\Ou in phar:///root/Downloads/composer.phar/vendor/symfony/console/Descriptor/XmlDescriptor.php on line 90

Can you help me find the solution please ?

6
  • 2
    oh.. my. you have to use english Jun 27, 2018 at 15:14
  • I have a problem with phpstorm. I had trouble adding the composer and symfony commands to PhpStorm. I receive this message : Problem Failed to parse output as xml: Error on line 2: Content is not allowed in prolog.. Command php /root/Downloads/composer.phar list --format=xml Output Fatal error: Uncaught Error: Class 'DOMDocument' not found in phar can you help me ?
    – Nour
    Jun 27, 2018 at 15:17
  • edit your question Jun 27, 2018 at 15:18
  • how you tried ? Jun 27, 2018 at 15:51
  • PHP and IDE versions? Maybe your PHP is too old ( I see php-5.3 tag)?
    – LazyOne
    Jun 27, 2018 at 19:15

1 Answer 1

0

The version of PHP needs to be recent. On macOS by default you may end up with PHP 5.6, and PHPStorm actually choose /usr/bin/php as it's preferred option for commands.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.