Getting rid of deprecation messages in Symfony console

You all have seen these pages full of deprecation messages when using console commands in a Shopware 6 development environment. Sometimes it’s hard to find the actual output in between all these info level message. Running the command in quiet mode with -q is not a solution, as it will suppress any output.

In general it is a good idea to show developers deprecation messages, and you as a developer should carefully inspect these. (And not, later, complain on broken backward compatibility when you could have known for years.) However, if you are not concerned with the code in question, it’s just annoying.

So this is how to turn these messages off: In your framework.yaml file (within the config/packages folder in your project), add these lines:

The main level controls the messages written to the dev.log file, while the console level and verbosity_level controll what is output to the console. The above setting will suppress all messages of level info and below.

Enyou your clean console screens!

Leave a Reply

Your email address will not be published.