伙计们当我尝试“php app / console doctrine:schema:update --force”时我有这个问题我不知道如何解决它(“security.providers.chain_provider”下的无法识别的选项“提供者”)< / p>
这是我的security.yml
security:
role_hierarchy:
ROLE_ADMIN: ROLE_USER
ROLE_SUPER_ADMIN: [ROLE_USER, ROLE_ADMIN, ROLE_ALLOWED_TO_SWITCH]
encoders:
Setsuna\PrivateBundle\Entity\User: sha512
providers:
in_memory:
memory: ~
fr3d_ldapbundle:
id: fr3d_ldap.security.user.provider
fos_userbundle:
id: fos_user.user_manager
chain_provider:
providers: [fos_userbundle, fr3d_ldapbundle]
firewalls:
dev:
pattern: ^/(_(profiler|wdt)|css|images|js)/
security: false
main:
pattern: ^/
fr3d_ldap: ~
form_login:
provider: fos_userbundle
csrf_provider: form.csrf_provider
always_use_default_target_path: true
default_target_path: /profile
logout: true
anonymous: true
access_control:
- { path: ^/login$, role: IS_AUTHENTICATED_ANONYMOUSLY }
答案 0 :(得分:0)
我从未使用链式提供商,但documentation显示配置看起来与您的不同:
security:
providers:
chain_provider:
chain:
providers: [in_memory, user_db]
in_memory:
memory:
users:
foo: { password: test }
user_db:
entity: { class: Acme\UserBundle\Entity\User, property: username }