title: Notice: Undefined property: DOMDocument::$documentElement
body: <p>I recently re-opened an old (1 year) Symfony project and I am having an error on every page (I don't remember having this issue a year ago) :</p>
  
  <pre><code>[exception] 500 | Internal Server Error | Symfony\Component\Config\Exception\FileLoaderLoadException
  /var/www/[...]/wdt.xml
  
  ContextErrorException: Notice: Undefined property: DOMDocument::$documentElement
  </code></pre>
  
  <p>If I clear the cache, the error disappear but as soon as I edit and save a file, the error is showing up again.
  The project was using Symfony 2.8 and I updated to Symfony 3.2 but it didn't solve the issue.</p>
  
  <p>I don't think the problem is related to the wdt.xml file and I think it might be related to my laptop config.</p>
  
  <p>I don't really know where to start to investigate so any suggestion is welcome!</p>
  
  <p><strong>Edit 1</strong> :<br>
  I am actually having the same problem with another project I created few days ago. The project don't use any additional bundles and I just created 5 entities and generated the MySQL database.</p>
  
  <p><strong>Edit 2</strong> :<br>
  After some more researched, I decided to create a new Ubuntu VM and test a new Symfony project and it just work perfectly so it must be something to do with the configuration on my laptop.</p>
  
  <p><strong>Edit 3</strong> :<br>
  After some more tests, here is what I get when I add a print_r($dom); in the file XmlUtils.php (vendor/symfony/symfony/src/Symfony/Component/Config/Util/XmlUtils.php) line 59 :</p>
  
  <p>Ubuntu VM (no error) :</p>
  
  <pre><code>DOMDocument Object ( [doctype] =&gt; [implementation] =&gt; (object value omitted) [documentElement] =&gt; (object value omitted) [actualEncoding] =&gt; [encoding] =&gt; [xmlEncoding] =&gt; [standalone] =&gt; 1 [xmlStandalone] =&gt; 1 [version] =&gt; 1.0 [xmlVersion] =&gt; 1.0 [strictErrorChecking] =&gt; 1 [documentURI] =&gt; /var/www/my_project/web/ [config] =&gt; [formatOutput] =&gt; [validateOnParse] =&gt; 1 [resolveExternals] =&gt; [preserveWhiteSpace] =&gt; 1 [recover] =&gt; [substituteEntities] =&gt; [nodeName] =&gt; #document [nodeValue] =&gt; [nodeType] =&gt; 9 [parentNode] =&gt; [childNodes] =&gt; (object value omitted) [firstChild] =&gt; (object value omitted) [lastChild] =&gt; (object value omitted) [previousSibling] =&gt; [attributes] =&gt; [ownerDocument] =&gt; [namespaceURI] =&gt; [prefix] =&gt; [localName] =&gt; [baseURI] =&gt; /var/www/my_project/web/ [textContent] =&gt; %kernel.charset% %kernel.default_locale% )
  </code></pre>
  
  <p>Ubuntu laptop (error) :</p>
  
  <pre><code>DOMDocument Object ( [validateOnParse] =&gt; 1 [nodeName] =&gt; #document [nodeValue] =&gt; [nodeType] =&gt; 9 [parentNode] =&gt; [childNodes] =&gt; (object value omitted) [firstChild] =&gt; (object value omitted) [lastChild] =&gt; (object value omitted) [previousSibling] =&gt; [attributes] =&gt; [ownerDocument] =&gt; [namespaceURI] =&gt; [prefix] =&gt; [localName] =&gt; [baseURI] =&gt; /var/www/lab/symfony/booklib/web/ [textContent] =&gt; %kernel.charset% %kernel.default_locale% )
  </code></pre>
  
  <p>It looks like there is some missing information on my laptop...</p>
  
  <p><strong>So basically, the function $dom->loadXML doesn't return the same value on my laptop environment and inside the VM... any idea why?</strong></p>