Revert "[BUGFIX] Load XML files of Extension Manager properly" 83/48183/2
authorOliver Hader <oliver@typo3.org>
Tue, 17 May 2016 09:53:15 +0000 (11:53 +0200)
committerOliver Hader <oliver.hader@typo3.org>
Tue, 17 May 2016 10:21:28 +0000 (12:21 +0200)
This reverts commit 558f618f576a6fc9b87b592698856c80701aeb94.

This change did not completely solve the libxml issue and introduced
additional trouble on memory consumption with the current pull parsers.

Related: #75022
Releases: master, 7.6, 6.2
Change-Id: I42454d61ab444860fc53b29715df69e65a2f0475
Reviewed-on: https://review.typo3.org/48183
Reviewed-by: Oliver Hader <oliver.hader@typo3.org>
Tested-by: Oliver Hader <oliver.hader@typo3.org>
typo3/sysext/extensionmanager/Classes/Utility/Parser/ExtensionXmlPullParser.php
typo3/sysext/extensionmanager/Classes/Utility/Parser/MirrorXmlPullParser.php

index d3df943..860335b 100644 (file)
@@ -57,8 +57,8 @@ class ExtensionXmlPullParser extends AbstractExtensionXmlParser
         if (!(is_object($this->objXml) && get_class($this->objXml) == 'XMLReader')) {
             throw new \TYPO3\CMS\Extensionmanager\Exception\ExtensionManagerException('Unable to create XML parser.', 1342640540);
         }
-        if ($this->objXml->xml(file_get_contents($file), 'utf-8') === false) {
-            throw new \TYPO3\CMS\Extensionmanager\Exception\ExtensionManagerException(sprintf('Unable to parse file resource %s.', $file));
+        if ($this->objXml->open($file, 'utf-8') === false) {
+            throw new \TYPO3\CMS\Extensionmanager\Exception\ExtensionManagerException(sprintf('Unable to open file resource %s.', $file));
         }
         while ($this->objXml->read()) {
             if ($this->objXml->nodeType == \XMLReader::ELEMENT) {
index 2e5abea..fed1a3c 100644 (file)
@@ -56,8 +56,8 @@ class MirrorXmlPullParser extends AbstractMirrorXmlParser
         if (!(is_object($this->objXml) && get_class($this->objXml) == 'XMLReader')) {
             throw new \TYPO3\CMS\Extensionmanager\Exception\ExtensionManagerException('Unable to create XML parser.', 1342640820);
         }
-        if ($this->objXml->xml(file_get_contents($file), 'utf-8') === false) {
-            throw new \TYPO3\CMS\Extensionmanager\Exception\ExtensionManagerException(sprintf('Unable to parse file resource %s.', $file), 1342640893);
+        if ($this->objXml->open($file, 'utf-8') === false) {
+            throw new \TYPO3\CMS\Extensionmanager\Exception\ExtensionManagerException(sprintf('Unable to open file resource %s.', $file), 1342640893);
         }
         while ($this->objXml->read()) {
             if ($this->objXml->nodeType == \XMLReader::ELEMENT) {