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 c28441f

Browse filesBrowse files
[DI] Prepare dropping "strict" handling in loaders
1 parent 9f95654 commit c28441f
Copy full SHA for c28441f

File tree

2 files changed

+3
-11
lines changed
Filter options

2 files changed

+3
-11
lines changed

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

Copy file name to clipboardExpand all lines: src/Symfony/Component/DependencyInjection/Loader/XmlFileLoader.php
+1-7Lines 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

Copy file name to clipboardExpand all lines: src/Symfony/Component/DependencyInjection/Loader/YamlFileLoader.php
+2-4Lines 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)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.