I am trying to configure a set of users and roles in my php program. I've followed the tutorial on the synfony website but I recieve the following error:
(1/1) InvalidTypeException Invalid type for path "security.access_control.0.path". Expected scalar, but got array. Hint: use the urldecoded format
Security.yml:
# To get started with security, check out the documentation:
# https://symfony.com/doc/current/security.html
security:
providers:
in_memory:
memory:
users:
inkoper:
password: inkoper
roles: 'ROLE_INKOPER'
access_control:
- { path '^/*', roles: [ROLE_INKOPER] }
encoders:
Symfony\Component\Security\Core\User\User: plaintext
firewalls:
# disables authentication for assets and the profiler, adapt it according to your needs
dev:
pattern: ^/(_(profiler|wdt)|css|images|js)/
security: false
main:
anonymous: ~
# activate different ways to authenticate
# https://symfony.com/doc/current/security.html#a-configuring-how-your-users-will-authenticate
http_basic: ~
# https://symfony.com/doc/current/security/form_login_setup.html
#form_login: ~
Update
I found the problem thanks to Andrew Vakhniuk. I forgot to put a ':' after path under access control.