php bin/console symfony commands give a fatal error
<p>I installed a symfony 3 project but cant run any php bin/console commands. When I try, I get the following error:</p>

<blockquote>
  <p>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 project_folder/vendor/symfony/symfony/src/Symfony/Component/Config/Util/XmlUtils.php:52</p>
</blockquote>

<p>Any idea how to fix this?</p>