ridha
ridha

Reputation: 33

Is Symfony looks for a service?

I am trying to do LDAP authentication, I currently have this type of error :

ServiceNotFoundException: The service
"security.firewall.map.context.main" has a dependency on a
non-existent service "form.csrf_provider".

Any help please ?

Upvotes: 3

Views: 962

Answers (2)

chalasr
chalasr

Reputation: 13167

The form.csrf_provider is deprecated and removed in Symfony 3.

Use security.csrf.token_manager instead.

My guess is that you are using a bundle that is not ready for symfony3.
Look at the README of your required bundles and to be sure they are compatibile.

See the 3.0 CHANGELOG for all deprecated features.

Update

It's the inverse. You are on a too old symfony version, which doesn't support the form.csrf_provider, and you are surely using a bundle that require it.

Look for adapt your requirements or your symfony version.

NOTE: You should really change your symfony version for a stable release.

Upvotes: 3

Federkun
Federkun

Reputation: 36934

You need to enable csrf_protection in your configuration. Open config.yml and be sure that

framework:
    csrf_protection: true

is present in your configuration.

Upvotes: 4

Related Questions