Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 3943661

Browse filesBrowse files
author
Hugo Hamon
committed
[DependencyInjection] remove deprecated code in YamlFileLoader class
1 parent 15b7cdb commit 3943661
Copy full SHA for 3943661

File tree

1 file changed

+2
-6
lines changed
Filter options

1 file changed

+2
-6
lines changed

‎src/Symfony/Component/DependencyInjection/Loader/YamlFileLoader.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/DependencyInjection/Loader/YamlFileLoader.php
+2-6Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -782,7 +782,7 @@ private function loadFromExtensions(array $content)
782782
*/
783783
private function checkDefinition($id, array $definition, $file)
784784
{
785-
if ($throw = $this->isLoadingInstanceof) {
785+
if ($this->isLoadingInstanceof) {
786786
$keywords = self::$instanceofKeywords;
787787
} elseif ($throw = isset($definition['resource'])) {
788788
$keywords = self::$prototypeKeywords;
@@ -792,11 +792,7 @@ private function checkDefinition($id, array $definition, $file)
792792

793793
foreach ($definition as $key => $value) {
794794
if (!isset($keywords[$key])) {
795-
if ($throw) {
796-
throw new InvalidArgumentException(sprintf('The configuration key "%s" is unsupported for definition "%s" in "%s". Allowed configuration keys are "%s".', $key, $id, $file, implode('", "', $keywords)));
797-
}
798-
799-
@trigger_error(sprintf('The configuration key "%s" is unsupported for service definition "%s" in "%s". Allowed configuration keys are "%s". The YamlFileLoader object will raise an exception instead in Symfony 4.0 when detecting an unsupported service configuration key.', $key, $id, $file, implode('", "', $keywords)), E_USER_DEPRECATED);
795+
throw new InvalidArgumentException(sprintf('The configuration key "%s" is unsupported for definition "%s" in "%s". Allowed configuration keys are "%s".', $key, $id, $file, implode('", "', $keywords)));
800796
}
801797
}
802798
}

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.