New in Symfony 3.3: Persisted deprecation logs
April 25, 2017 • Published by Javier Eguiluz
Warning: This post is about an unsupported Symfony version. Some of this information may be out of date. Read the most recent Symfony Docs.
Backward compatibility promise is one of the best features of Symfony. This promise ensures that your applications will always work when upgrading them using the same Symfony branch (e.g. an app using Symfony 3.0 will work when upgrading Symfony to 3.1, 3.2, 3.3 and 3.4).
The key of the backward compatibility promise are the deprecation messages. Whenever you use a feature that will be changed or removed in the next versions of Symfony, you get a log message warning you about this and providing alternative solutions. For example, this image shows the Web Debug Toolbar warning you about five deprecation messages:
However, some of those deprecation messages are only generated during the compilation of the service container. That's why they disappear if you reload the page and they only appear again if you delete the cache to force a new compilation of the container.
In Symfony 3.3 we decided to fix this problem and now all deprecation messages are persisted. No matter if they were generated during the compilation phase or while serving the request. The Web Debug Toolbar and the Profiler now always display all the deprecation messages:
In addition to persisting the deprecation messages, Symfony 3.3 will also display the full logs generated during the compilation phase. You don't usually need to care about those messages, but they can help you with hard to debug issues:
Help the Symfony project!
As with any Open-Source project, contributing code or documentation is the most common way to help, but we also have a wide range of sponsoring opportunities.
Comments are closed.
To ensure that comments stay relevant, they are closed for old posts.