Skip to content
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

[Security] Chain Providers: Fixing PHP code sample #20795

Merged
merged 1 commit into from
Mar 24, 2025
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: 5 additions & 5 deletions security/user_providers.rst
Original file line number Diff line number Diff line change
Expand Up @@ -347,25 +347,25 @@
return static function (SecurityConfig $security): void {
// ...

$backendProvider = $security->provider('backend_users')
$security->provider('backend_users')
->ldap()
// ...
;

$legacyProvider = $security->provider('legacy_users')
$security->provider('legacy_users')
->entity()
// ...
;

$userProvider = $security->provider('users')
$security->provider('users')
->entity()
// ...
;

$allProviders = $security->provider('all_users')->chain()
->providers([$backendProvider, $legacyProvider, $userProvider])
$security->provider('all_users')->chain()
->providers(['backend_users', 'legacy_users', 'users'])
;
};

Check failure on line 368 in security/user_providers.rst

View workflow job for this annotation

GitHub Actions / Code Blocks

[Cache Warmup] In ArrayNode.php line 233: The child config "service" under "security.providers.backend_users.ldap" mu st be configured. 2025-03-21T19:36:30+00:00 [info] User Deprecated: Method "Symfony\Component\HttpKernel\Bundle\Bundle::build()" might add "void" as a native return type declaration in the future. Do the same in child class "Sensio\Bundle\FrameworkExtraBundle\SensioFrameworkExtraBundle" now to avoid errors or add an explicit @return annotation to suppress this message.

.. _security-custom-user-provider:

Expand Down
Loading