minor #19281 [HttpKernel] Clarify deprecation of non-scalar values in surrogate fragment renderer (chalasr)

This PR was merged into the 3.1 branch.

Discussion
----------

[HttpKernel] Clarify deprecation of non-scalar values in surrogate fragment renderer

| Q             | A
| ------------- | ---
| Branch?       | 3.1
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #19262
| License       | MIT
| Doc PR        | ~

Commits
-------

b088978 [HttpKernel] Clarify deprecation of non-scalar values in surrogate renderer
This commit is contained in:
Fabien Potencier 2016-07-04 13:52:49 +02:00
commit ab8c2c7e45
3 changed files with 6 additions and 6 deletions

View File

@ -95,9 +95,9 @@ FrameworkBundle
HttpKernel HttpKernel
---------- ----------
* Passing objects as URI attributes to the ESI and SSI renderers has been * Passing non-scalar values as URI attributes to the ESI and SSI renderers has been
deprecated and will be removed in Symfony 4.0. The inline fragment deprecated and will be removed in Symfony 4.0. The inline fragment
renderer should be used with object attributes. renderer should be used with non-scalar attributes.
* The `ControllerResolver::getArguments()` method has been deprecated and will * The `ControllerResolver::getArguments()` method has been deprecated and will
be removed in 4.0. If you have your own `ControllerResolverInterface` be removed in 4.0. If you have your own `ControllerResolverInterface`

View File

@ -84,9 +84,9 @@ FrameworkBundle
HttpKernel HttpKernel
---------- ----------
* Possibility to pass objects as URI attributes to the ESI and SSI renderers * Possibility to pass non-scalar values as URI attributes to the ESI and SSI
has been removed. The inline fragment renderer should be used with object renderers has been removed. The inline fragment renderer should be used with
attributes. non-scalar attributes.
* The `ControllerResolver::getArguments()` method has been removed. If you * The `ControllerResolver::getArguments()` method has been removed. If you
have your own `ControllerResolverInterface` implementation, you should have your own `ControllerResolverInterface` implementation, you should

View File

@ -65,7 +65,7 @@ abstract class AbstractSurrogateFragmentRenderer extends RoutableFragmentRendere
{ {
if (!$this->surrogate || !$this->surrogate->hasSurrogateCapability($request)) { if (!$this->surrogate || !$this->surrogate->hasSurrogateCapability($request)) {
if ($uri instanceof ControllerReference && $this->containsNonScalars($uri->attributes)) { if ($uri instanceof ControllerReference && $this->containsNonScalars($uri->attributes)) {
@trigger_error('Passing objects as part of URI attributes to the ESI and SSI rendering strategies is deprecated since version 3.1, and will be removed in 4.0. Use a different rendering strategy or pass scalar values.', E_USER_DEPRECATED); @trigger_error('Passing non-scalar values as part of URI attributes to the ESI and SSI rendering strategies is deprecated since version 3.1, and will be removed in 4.0. Use a different rendering strategy or pass scalar values.', E_USER_DEPRECATED);
} }
return $this->inlineStrategy->render($uri, $request, $options); return $this->inlineStrategy->render($uri, $request, $options);