8000 [DI] Prepare dropping "strict" handling in loaders · symfony/symfony@c28441f · GitHub
[go: up one dir, main page]

Skip to content

Commit c28441f

Browse files
[DI] Prepare dropping "strict" handling in loaders
1 parent 9f95654 commit c28441f

File tree

2 files changed

+3
-11
lines changed

2 files changed

+3
-11
lines changed

src/Symfony/Component/DependencyInjection/Loader/XmlFileLoader.php

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -387,13 +387,7 @@ private function getArgumentsAsPhp(\DOMElement $node, $name, $lowercase = true)
387387
$invalidBehavior = ContainerInterface::NULL_ON_INVALID_REFERENCE;
388388
}
389389

390-
if ($strict = $arg->getAttribute('strict')) {
391-
$strict = XmlUtils::phpize($strict);
392-
} else {
393-
$strict = true;
394-
}
395-
396-
$arguments[$key] = new Reference($arg->getAttribute('id'), $invalidBehavior, $strict);
390+
$arguments[$key] = new Reference($arg->getAttribute('id'), $invalidBehavior);
397391
break;
398392
case 'expression':
399393
$arguments[$key] = new Expression($arg->nodeValue);

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

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -471,14 +471,12 @@ private function resolveServices($value)
471471
}
472472

473473
if ('=' === substr($value, -1)) {
474+
@trigger_error(sprintf('The "=" suffix that used to disable strict mode in Symfony 2.x is deprecated since 3.3 and will be unsupported in 4.0. Remove it in "%s".', $value), E_USER_DEPRECATED);
474475
$value = substr($value, 0, -1);
475-
$strict = false;
476-
} else {
477-
$strict = true;
478476
}
479477

480478
if (null !== $invalidBehavior) {
481-
$value = new Reference($value, $invalidBehavior, $strict);
479+
$value = new Reference($value, $invalidBehavior);
482480
}
483481
}
484482

0 commit comments

Comments
 (0)
0