Skip to content
This repository was archived by the owner on Nov 25, 2020. It is now read-only.

Commit c86f299

Browse files
committed
Manually fix symfony components to stick to php5.4 compliance. We may have to bump php to 5.5 requirement in next version.
1 parent 71870b4 commit c86f299

File tree

4 files changed

+15
-4
lines changed

4 files changed

+15
-4
lines changed

core/src/core/classes/guzzle/vendor/symfony/config/Definition/ArrayNode.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -332,7 +332,8 @@ protected function normalizeValue($value)
332332
*/
333333
protected function remapXml($value)
334334
{
335-
foreach ($this->xmlRemappings as list($singular, $plural)) {
335+
foreach ($this->xmlRemappings as $transition) {
336+
list($singular, $plural) = $transition;
336337
if (!isset($value[$singular])) {
337338
continue;
338339
}

core/src/core/classes/guzzle/vendor/symfony/config/Loader/FileLoader.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,10 +101,13 @@ public function import($resource, $type = null, $ignoreErrors = false, $sourceRe
101101

102102
try {
103103
$ret = $loader->load($resource, $type);
104-
} finally {
104+
} catch (\Exception $e) {
105105
unset(self::$loading[$resource]);
106+
throw $e;
106107
}
107108

109+
unset(self::$loading[$resource]);
110+
108111
return $ret;
109112
} catch (FileLoaderImportCircularReferenceException $e) {
110113
throw $e;

core/src/core/classes/guzzle/vendor/symfony/config/Tests/Util/XmlUtilsTest.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,11 +172,16 @@ public function testLoadWrongEmptyXMLWithErrorHandler()
172172
} catch (\InvalidArgumentException $e) {
173173
$this->assertEquals(sprintf('File %s does not contain valid XML, it is empty.', $file), $e->getMessage());
174174
}
175-
} finally {
175+
} catch (\Exception $e) {
176176
restore_error_handler();
177177
error_reporting($errorReporting);
178+
179+
throw $e;
178180
}
179181

182+
restore_error_handler();
183+
error_reporting($errorReporting);
184+
180185
$disableEntities = libxml_disable_entity_loader(true);
181186
libxml_disable_entity_loader($disableEntities);
182187

core/src/core/classes/guzzle/vendor/symfony/yaml/Tests/InlineTest.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,10 @@ public function testDumpNumericValueWithLocale()
7171

7272
$this->assertEquals('1.2', Inline::dump(1.2));
7373
$this->assertContains('fr', strtolower(setlocale(LC_NUMERIC, 0)));
74-
} finally {
7574
setlocale(LC_NUMERIC, $locale);
75+
} catch (\Exception $e) {
76+
setlocale(LC_NUMERIC, $locale);
77+
throw $e;
7678
}
7779
}
7880

0 commit comments

Comments
 (0)