Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.7k
Commiteb9db6c
committed
bug#49441 [Contracts] Fix setting $container before calling parent::setContainer in ServiceSubscriberTrait (edsrzf)
This PR was squashed before being merged into the 5.4 branch.Discussion----------[Contracts] Fix setting $container before calling parent::setContainer in ServiceSubscriberTrait| Q | A| ------------- | ---| Branch? | 5.4| Bug fix? | yes| New feature? | no| Deprecations? | no| Tickets |Fix#49382| License | MITThis changes the `setContainer` method of `ServiceSubscriberTrait` so that it calls `parent::setContainer` first, before updating `$this->container`. This is so that the parent method can work correctly if it relies on the old container value.This is particularly relevant for `AbstractController`, since it returns the old container value. When used with `ServiceSubscriberTrait`, it returned the _new_ container rather than the old one. This, in turn, caused incorrect behavior in framework bundle's `ControllerResolver`, as described in#49382.Commits-------bccb074 [Contracts] Fix setting $container before calling parent::setContainer in ServiceSubscriberTraitFile tree
2 files changed
+36
-4
lines changed- src/Symfony/Contracts
- Service
- Tests/Service
2 files changed
+36
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
98 | 98 | | |
99 | 99 | | |
100 | 100 | | |
101 | | - | |
102 | | - | |
| 101 | + | |
103 | 102 | | |
104 | | - | |
| 103 | + | |
105 | 104 | | |
106 | 105 | | |
107 | | - | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
108 | 109 | | |
109 | 110 | | |
Lines changed: 31 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
81 | 81 | | |
82 | 82 | | |
83 | 83 | | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
84 | 96 | | |
85 | 97 | | |
86 | 98 | | |
| |||
161 | 173 | | |
162 | 174 | | |
163 | 175 | | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
0 commit comments
Comments
(0)