Thanks to visit codestin.com
Credit goes to github.com

Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions UPGRADE-3.1.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,9 +95,9 @@ FrameworkBundle
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
renderer should be used with object attributes.
renderer should be used with non-scalar attributes.

* The `ControllerResolver::getArguments()` method has been deprecated and will
be removed in 4.0. If you have your own `ControllerResolverInterface`
Expand Down
6 changes: 3 additions & 3 deletions UPGRADE-4.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,9 @@ FrameworkBundle
HttpKernel
----------

* Possibility to pass objects as URI attributes to the ESI and SSI renderers
has been removed. The inline fragment renderer should be used with object
attributes.
* Possibility to pass non-scalar values as URI attributes to the ESI and SSI
renderers has been removed. The inline fragment renderer should be used with
non-scalar attributes.

* The `ControllerResolver::getArguments()` method has been removed. If you
have your own `ControllerResolverInterface` implementation, you should
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ public function render($uri, Request $request, array $options = array())
{
if (!$this->surrogate || !$this->surrogate->hasSurrogateCapability($request)) {
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);
Expand Down