title: PHP 7.1 on Ubuntu with Attempted to load class "DOMDocument" from the global namespace
body: <p>I am stuck with:</p>
  
  <p>ClassNotFoundException in XmlUtils.php line 52:
  Attempted to load class "DOMDocument" from the global namespace.
  Did you forget a "use" statement?
  in XmlUtils.php (line 52)</p>
  
  <p>I am running a Symfony LTS application 2.8 in a docker container with Apache/2.4.18 (Ubuntu) and PHP 7.1.9-1+ubuntu16.04.1+deb.sury.org+1 (cli) (built: Sep  2 2017 05:56:43) ( NTS )</p>
  
  <p>and tried:</p>
  
  <ul>
  <li>clearing cache  </li>
  <li>installing php7.1-xml and restarting </li>
  <li>installing php-xml and restarting</li>
  <li>installing php7.1-dom and restarting</li>
  <li>installing php7.1-intl and restarting</li>
  <li>removing xdebug and restarting</li>
  </ul>
  
  <p>Modules installed:
  php -m</p>
  
  <pre><code>PHP Modules
      calendar
      Core
      ctype
      curl
      date
      dom
      exif
      fileinfo
      filter
      ftp
      gd
      gettext
      hash
      iconv
      imap
      intl
      json
      libxml
      mbstring
      mysqli
      mysqlnd
      openssl
      pcntl
      pcre
      PDO
      pdo_myser
      wddx
      xml
      xmlreader
      xmlrpc
      xmlwriter
      xsl
      Zend OPcache
      zip
      zlib
  
      [Zend Modules]
      Zend OPcache
  </code></pre>