New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to install cache-bundle in a symfony 4 flex-configured project #124

ehlesp opened this Issue Jan 26, 2018 · 2 comments


None yet
3 participants

ehlesp commented Jan 26, 2018

I've been trying to install the cache-bundle in my symfony 4 project with this command:

composer require cache/cache-bundle

But it always fails, giving this error at the end of the process:

Invalid type for path "cache.session.enabled". Expected boolean, but got string.

The problem seems to be in the config/packages/cache.yml file generated in the project for this dependency, in the line:

enabled: "%env(bool:SESSION_CACHE_ENABLED)%"

For some reason it doesn't translate into the boolean specified in the .env file:

###> cache/cache-bundle ###
###< cache/cache-bundle ###

I'm aware this could be just a composer or Symfony issue, but I thought proper to warn about this matter here first. I've put a bit more info in this stackoverflow link about this problem.


This comment has been minimized.

youssman commented Feb 14, 2018

Same problem and same config as @ehlesp. Any idea to fix that ?


This comment has been minimized.


aequasi commented Mar 19, 2018

Hey guys, sorry for the wait.

I'm not exactly sure why it's not casting properly. I think I'm going to add a normalizer to allow for truthy values for those enabled fields

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment