Revert "[BUGFIX] Load XML files of Extension Manager properly" 84/48184/2
authorOliver Hader <oliver@typo3.org>
Tue, 17 May 2016 09:54:13 +0000 (11:54 +0200)
committerOliver Hader <oliver.hader@typo3.org>
Tue, 17 May 2016 10:21:39 +0000 (12:21 +0200)
This reverts commit ab32091db207d781056cab8d16979d09321b8f7c.

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/48184
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 17eb16c..40bef36 100644 (file)
@@ -56,8 +56,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.', htmlspecialchars($file)));
+               if ($this->objXml->open($file, 'utf-8') === FALSE) {
+                       throw new \TYPO3\CMS\Extensionmanager\Exception\ExtensionManagerException(sprintf('Unable to open file resource %s.', htmlspecialchars($file)));
                }
                while ($this->objXml->read()) {
                        if ($this->objXml->nodeType == \XMLReader::ELEMENT) {
index 2ff5aeb..3584ab5 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.', htmlspecialchars($file)), 1342640893);
+               if ($this->objXml->open($file, 'utf-8') === FALSE) {
+                       throw new \TYPO3\CMS\Extensionmanager\Exception\ExtensionManagerException(sprintf('Unable to open file resource %s.', htmlspecialchars($file)), 1342640893);
                }
                while ($this->objXml->read()) {
                        if ($this->objXml->nodeType == \XMLReader::ELEMENT) {