Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Symfony, Doctrine and "Proxy Classes are always regenerating"

I just learnt about the

php app/console doctrine:ensure-production-settings

command and when I execute it, the console answers back with: "Proxy Classes are always regenerating".

I can't find too much information about this warning online, and I can't for the life of me figure out what does this message mean.

Does anyone know a solution for this warning?

like image 873
zootropo Avatar asked Aug 30 '12 08:08

zootropo


2 Answers

It caused by option in app/config/config.yml

which looks like:

doctrine:    
    orm:
        auto_generate_proxy_classes: %kernel.debug%

All commands by default have debug mode enabled so auto_generate_proxy_classes is set to true. to disable kernel.debug in commands you should use --no-debug option.

so at the end command should looks like that:

php app/console doctrine:ensure-production-settings --no-debug --env=prod
like image 67
l3l0 Avatar answered Nov 13 '22 19:11

l3l0


Are you sure you are using Google properly? :)

Get a look here. It seems it is due to a debug mode. Try with:

app/console doctrine:ensure-production-settings --no-debug
like image 4
JeanValjean Avatar answered Nov 13 '22 19:11

JeanValjean