Skip to content

Commit 37dfddb

Browse files
committed
Merge branch '2.3' into 2.7
* 2.3: Typo fix [2.3] Static Code Analysis for Components Added support \IteratorAggregate for UniqueEntityValidator Fix #17306 Paths with % in it are note allowed (like urlencoded) Added sort order SORT_STRING for params in UriSigner Remove normalizer cache in Serializer class
2 parents 8c785ff + d14b313 commit 37dfddb

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

Container.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -534,6 +534,6 @@ public static function camelize($id)
534534
*/
535535
public static function underscore($id)
536536
{
537-
return strtolower(preg_replace(array('/([A-Z]+)([A-Z][a-z])/', '/([a-z\d])([A-Z])/'), array('\\1_\\2', '\\1_\\2'), strtr($id, '_', '.')));
537+
return strtolower(preg_replace(array('/([A-Z]+)([A-Z][a-z])/', '/([a-z\d])([A-Z])/'), array('\\1_\\2', '\\1_\\2'), str_replace('_', '.', $id)));
538538
}
539539
}

Extension/Extension.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -91,9 +91,7 @@ public function getConfiguration(array $config, ContainerBuilder $container)
9191
$container->addResource(new FileResource($r->getFileName()));
9292

9393
if (!method_exists($class, '__construct')) {
94-
$configuration = new $class();
95-
96-
return $configuration;
94+
return new $class();
9795
}
9896
}
9997
}

Loader/XmlFileLoader.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,8 +93,9 @@ private function parseImports(\DOMDocument $xml, $file)
9393
return;
9494
}
9595

96+
$defaultDirectory = dirname($file);
9697
foreach ($imports as $import) {
97-
$this->setCurrentDir(dirname($file));
98+
$this->setCurrentDir($defaultDirectory);
9899
$this->import($import->getAttribute('resource'), null, (bool) XmlUtils::phpize($import->getAttribute('ignore-errors')), $file);
99100
}
100101
}

Loader/YamlFileLoader.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,12 +95,13 @@ private function parseImports($content, $file)
9595
throw new InvalidArgumentException(sprintf('The "imports" key should contain an array in %s. Check your YAML syntax.', $file));
9696
}
9797

98+
$defaultDirectory = dirname($file);
9899
foreach ($content['imports'] as $import) {
99100
if (!is_array($import)) {
100101
throw new InvalidArgumentException(sprintf('The values in the "imports" key should be arrays in %s. Check your YAML syntax.', $file));
101102
}
102103

103-
$this->setCurrentDir(dirname($file));
104+
$this->setCurrentDir($defaultDirectory);
104105
$this->import($import['resource'], null, isset($import['ignore_errors']) ? (bool) $import['ignore_errors'] : false, $file);
105106
}
106107
}

0 commit comments

Comments
 (0)