Skip to content

Document change of UriSigner namespace #18975

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 1 commit into from
Oct 4, 2023
Merged
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
10 changes: 8 additions & 2 deletions routing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2693,13 +2693,13 @@ A signed URI is an URI that includes a hash value that depends on the contents o
the URI. This way, you can later check the integrity of the signed URI by
recomputing its hash value and comparing it with the hash included in the URI.

Symfony provides a utility to sign URIs via the :class:`Symfony\\Component\\HttpKernel\\UriSigner`
Symfony provides a utility to sign URIs via the :class:`Symfony\\Component\\HttpFoundation\\UriSigner`
service, which you can inject in your services or controllers::

// src/Service/SomeService.php
namespace App\Service;

use Symfony\Component\HttpKernel\UriSigner;
use Symfony\Component\HttpFoundation\UriSigner;

class SomeService
{
Expand Down Expand Up @@ -2729,6 +2729,12 @@ service, which you can inject in your services or controllers::
}
}

.. versionadded:: 6.4

The namespace of the ``UriSigner`` class changed in Symfony 6.4 from
``Symfony\Component\HttpKernel\UriSigner`` to
``Symfony\Component\HttpFoundation\UriSigner``.

Troubleshooting
---------------

Expand Down