Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save michaelesmith/ffd978f2f13d191418107a6a97918cfb to your computer and use it in GitHub Desktop.
Save michaelesmith/ffd978f2f13d191418107a6a97918cfb to your computer and use it in GitHub Desktop.
How to add a deprecation note about Symfony features

In order to generate and log a warning message about a deprecated Symfony feature, use the trigger_error() function as follows:

trigger_error('The enctype method of the form helper was removed. You should use the new method start instead.', E_USER_DEPRECATED);

Please, be as explicit as possible in the deprecation message and always explain the alternative way to use that feature, property, method or class.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment