I notice that doing an Environment::is('development') in the filter of cache.php returns false even if I'm in a development context (this was checked with a call of Environment::is('development') in a controller).
The reason is that the file cache.php in included before action.php.
Right, that's why you shouldn't write code that's dependent on the environment in the bootstrap.
Ok, so why there is some code that depends on the environment in the framework/app/config/bootstrap/cache.php ?
Anyway I think this code is necessary to disable cache on production environment. And the code is in a filter so it can work just by switching the action.php include and cache.php include
This should be reopened.
The filter in the default bootstrap/cache.php rely on Environment detection, which is set after.
I see a lot of guys starting with Lithium in IRC, being confused about why their test class or custom Form helper that doesn't show up.
That was caused by the .core.libraries cache file.
To avoid writing heavy code depending on the environment everywhere in the bootstrap, why not clarifying things by adding a environment.php file in the bootstrap, where hooks are set depending on environments.
Fixed in UnionOfRAD/framework@9b3a312.