File tree Expand file tree Collapse file tree 1 file changed +22
-7
lines changed Expand file tree Collapse file tree 1 file changed +22
-7
lines changed Original file line number Diff line number Diff line change @@ -52,14 +52,29 @@ protected function processValue($value, bool $isRoot = false)
52
52
if ($ value instanceof ArgumentInterface) {
53
53
return $ value ;
54
54
}
55
- if ($ value instanceof Definition && $ isRoot && (isset ($ this ->resolvedIds [$ this ->currentId ]) || !$ value ->hasTag ($ this ->tagName ) || $ value ->isDeprecated ())) {
56
- return $ value ->isDeprecated () ? $ value ->clearTag ($ this ->tagName ) : $ value ;
55
+
56
+ if ($ value instanceof Definition && $ isRoot ) {
57
+ if ($ value ->isDeprecated ()) {
58
+ return $ value ->clearTag ($ this ->tagName );
59
+ }
60
+
61
+ $ this ->resolvedIds [$ this ->currentId ] = true ;
62
+
63
+ if (!$ value ->hasTag ($ this ->tagName )) {
64
+ return $ value ;
65
+ }
57
66
}
58
- if ($ value instanceof Reference && ContainerBuilder::IGNORE_ON_UNINITIALIZED_REFERENCE !== $ value ->getInvalidBehavior () && $ this ->container ->has ($ id = (string ) $ value )) {
59
- $ definition = $ this ->container ->findDefinition ($ id );
60
- if (!$ definition ->hasTag ($ this ->tagName ) && !$ definition ->isDeprecated ()) {
61
- $ this ->resolvedIds [$ id ] = true ;
62
- $ definition ->addTag ($ this ->tagName );
67
+
68
+ if ($ value instanceof Reference && ContainerBuilder::IGNORE_ON_UNINITIALIZED_REFERENCE !== $ value ->getInvalidBehavior () && $ this ->container ->hasDefinition ($ id = (string ) $ value )) {
69
+ $ definition = $ this ->container ->getDefinition ($ id );
70
+
71
+ if ($ definition ->isDeprecated () || $ definition ->hasTag ($ this ->tagName )) {
72
+ return $ value ;
73
+ }
74
+
75
+ $ definition ->addTag ($ this ->tagName );
76
+
77
+ if (isset ($ this ->resolvedIds [$ id ])) {
63
78
parent ::processValue ($ definition , false );
64
79
}
65
80
You can’t perform that action at this time.
0 commit comments