You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
bug #23049 [FrameworkBundle] mitigate BC break with empty trusted_proxies (xabbuh)
This PR was merged into the 3.3 branch.
Discussion
----------
[FrameworkBundle] mitigate BC break with empty trusted_proxies
| Q | A
| ------------- | ---
| Branch? | 3.3
| Bug fix? | kind of
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #22238 (comment)
| License | MIT
| Doc PR |
Commits
-------
ff055ef mitigate BC break with empty trusted_proxies
Copy file name to clipboardExpand all lines: src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Configuration.php
+5-1Lines changed: 5 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -67,7 +67,11 @@ public function getConfigTreeBuilder()
67
67
->end()
68
68
->arrayNode('trusted_proxies') // @deprecated in version 3.3, to be removed in 4.0
69
69
->beforeNormalization()
70
-
->always()
70
+
->ifTrue(function ($v) { returnempty($v); })
71
+
->then(function () { @trigger_error('The "framework.trusted_proxies" configuration key has been removed in Symfony 3.3. Use the Request::setTrustedProxies() method in your front controller instead.', E_USER_DEPRECATED); })
72
+
->end()
73
+
->beforeNormalization()
74
+
->ifTrue(function ($v) { return !empty($v); })
71
75
->thenInvalid('The "framework.trusted_proxies" configuration key has been removed in Symfony 3.3. Use the Request::setTrustedProxies() method in your front controller instead.')
* @expectedDeprecation The "framework.trusted_proxies" configuration key has been removed in Symfony 3.3. Use the Request::setTrustedProxies() method in your front controller instead.
* @expectedDeprecation The "framework.trusted_proxies" configuration key has been removed in Symfony 3.3. Use the Request::setTrustedProxies() method in your front controller instead.
0 commit comments