Symfony 2.4您已请求不存在的服务“payment.encryption_service”

I'm migrating a symfony project from 2.0 to 2.4 version. I've correctly configured all the parameters and services.

But the problem occured with JMS vendor, this is the error shown:

Fatal error: Uncaught exception 'Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException' with message 'You have requested a non-existent service "payment.encryption_service".' in C:\wamp\www\symfony\app\bootstrap.php.cache on line 2027

This message is blocking me, do you have any issue, any idea?

I had the same problem. I don't know exactly what happened, but my problems went away after I manually cleared the cache using

rm -rf app/cache/prod/*

Considering your settings are on Windows, try manually deleting entries at app\cache\prod using Windows Explorer. I couldn't use app/console cache:clear --env=prod since the console would crash after showing that error message.

This means your the mentioned parameter is missing from your app/config/parameters.yml or other alike file that you are using to store your parameters. Set this parameter to a value and it should work.

E.G. I had the same error being "You have requested a non-existent parameter "domain".

I then added following line to the parameters.yml file:

domain: example.com

That did the trick.

Another correct answer could be checking every service.yml in yml parser, for example http://yaml-online-parser.appspot.com

You have requested a non-existent service

could mean, that symfony can't parse correctly .yml files.