Revert "[BUGFIX] Load XML files of Extension Manager properly" 82/48182/2
authorOliver Hader <oliver@typo3.org>
Tue, 17 May 2016 09:49:24 +0000 (11:49 +0200)
committerOliver Hader <oliver.hader@typo3.org>
Tue, 17 May 2016 10:21:19 +0000 (12:21 +0200)
This reverts commit 3d449f91fc7402f5db0637c89908383c42989774.

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/48182
Reviewed-by: Nicole Cordes <typo3@cordes.co>
Reviewed-by: Andreas Fernandez <typo3@scripting-base.de>
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 5672180..a28fa37 100644 (file)
@@ -53,8 +53,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 5f5b5aa..e49f9d7 100644 (file)
@@ -55,8 +55,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) {