Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 929ffc2

Browse filesBrowse files
[Security] Chain Providers: Fixing PHP code sample
Page: https://symfony.com/doc/6.4/security/user_providers.html#security-chain-user-provider When passing in the variables, I got: > Cannot use values of type "Symfony\Config\Security\ProviderConfig\EntityConfig" in service configuration files in .../config/packages/security.php (which is being imported from ".../src/Kernel.php").
1 parent 981b4e6 commit 929ffc2
Copy full SHA for 929ffc2

File tree

Expand file treeCollapse file tree

1 file changed

+5
-5
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+5
-5
lines changed

‎security/user_providers.rst

Copy file name to clipboardExpand all lines: security/user_providers.rst
+5-5Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -347,23 +347,23 @@ providers until the user is found:
347347
return static function (SecurityConfig $security): void {
348348
// ...
349349
350-
$backendProvider = $security->provider('backend_users')
350+
$security->provider('backend_users')
351351
->ldap()
352352
// ...
353353
;
354354
355-
$legacyProvider = $security->provider('legacy_users')
355+
$security->provider('legacy_users')
356356
->entity()
357357
// ...
358358
;
359359
360-
$userProvider = $security->provider('users')
360+
$security->provider('users')
361361
->entity()
362362
// ...
363363
;
364364
365-
$allProviders = $security->provider('all_users')->chain()
366-
->providers([$backendProvider, $legacyProvider, $userProvider])
365+
$security->provider('all_users')->chain()
366+
->providers(['backend_users', 'legacy_users', 'users'])
367367
;
368368
};
369369

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.