title: Cannot Composer Install with Symfony - PhpStorm
body: <p>I had a problem with my Ubuntu so I needed to install back everything.
  Nearly all is done but when I start a new project with Symfony on PhpStorm, and when I do a <code>composer install</code> or <code>composer update</code> in the terminal I have an error that I don't know how to treat.</p>
  
  <pre><code>Script Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::clearCache handling the symfony-scripts event terminated with an exception
  
  
  
  [RuntimeException]                                              
    An error occurred when executing the "'cache:clear --no-warmup'" command:
  
  
  
      PHP Fatal error:  Uncaught Symfony\Component\Debug\Exception\ClassNotFoundException: Attempted to load class "DOMDocument" from the global namespace.                                                      
    Did you forget a "use" statement? in /var/www/html/Eval2/vendor/symfony/symfony/src/Symfony/Component/Config/Util/XmlUtils.php:52                                                                          
    Stack trace:                                                                                                                                                                                               
    #0 /var/www/html/Eval2/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Loader/XmlFileLoader.php(284): Symfony\Component\Config\Util\XmlUtils::loadFile('/var/www/html/E...', Array)       
    #1 /var/www/html/Eval2/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Loader/XmlFileLoader.php(41): Symfony\Component\DependencyInjection\Loader\XmlFileLoader-&gt;parseFileToDOM('/var/ww  
    w/html/E...')                                                                                                                                                                                              
    #2 /var/www/html/Eval2/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php(57): Symfony\Component\DependencyInjection\Loader\XmlFileLoader-&gt;load('web.xm  
    l')                                                                                                                                                                                                        
    #3 /var/www/html/Eval2/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/MergeExtensionConfigurationPass.php in /var/www/html/Eval2/vendor/symfony/symfony/src/Symfony/Component/  
    Config/Util/XmlUtils.php on line 52  
  </code></pre>
  
  <p>I tried installing composer following this <a href="https://getcomposer.org/doc/00-intro.md#installation-linux-unix-osx" rel="nofollow noreferrer">link</a>
  but I don't recall using such practice.</p>
  
  <p>So I cannot move forward with my project because I can't get past composer... if anyone knows why and could give me a step-by-step approach that would be truly appreciated.</p>
  
  <p>Thank you</p>