Romain Bruckert
Romain Bruckert

Reputation: 2610

Symfony 2 cache stuck after config change (FileLoaderException)

Very strange behavior in Sf2 here. I've try to change my config namespaces while i was refactoring code:

adadgio_rocket:
    foo: 'bar'

to something simple

adadgio:
    rocket: 'bar'

I have change my bundle DI Configuration nodes to reflect that change :

$rootNode = $treeBuilder->root('adadgio');
$rootNode->children()
    ->scalarNode('rocket')->end()
->end();

Now i have a FileLoaderLoadException still saying able to load the configuration for adadgio but still finds the adadgio_rocket namespace (error results).

I tried to clear the cache thinking this was the issue, but of course, the symphony cache command issues the same error. And its still finds other config namespaces that were removes (and their declaration in the AppKernel as well).

enter image description here

Basically, everything is stuck now.

Upvotes: 0

Views: 230

Answers (2)

Ashish Awasthi
Ashish Awasthi

Reputation: 1502

It can be a issue of permission also. Give 777 permission to cache and use following to clear cache without warming up the cache:

app/console cache:clear --env=<your environment> --no-warmup

Upvotes: 0

lxg
lxg

Reputation: 13127

Yes, that sort of stuff can happen. Simply delete the app/cache/dev directory and run app/console cache:clear again.

If it still doesn’t work, make 100% sure that there are no remainders in the config or referenced in other bundles. If unsure, check:

grep -ir adadgio app/config/ src/ vendor/

Upvotes: 1

Related Questions