Skip to content

Added a note about deprecating addClassesToCompile() #7819

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 3 additions & 5 deletions bundles/extension.rst
Original file line number Diff line number Diff line change
Expand Up @@ -129,11 +129,9 @@ read more about it, see the ":doc:`/bundles/configuration`" article.
Adding Classes to Compile
-------------------------

.. note::

The ``addClassesToCompile()`` method was deprecated in Symfony 3.3, and will
be removed in Symfony 4.0. If you want to use this method and be compatible
with Symfony 4.0, check to see if the method exists before calling it.
.. versionadded:: 3.3
This technique is discouraged and the ``addClassesToCompile()`` method was
deprecated in Symfony 3.3 because modern PHP versions make it unnecessary.

Symfony creates a big ``classes.php`` file in the cache directory to aggregate
the contents of the PHP classes that are used in every request. This reduces the
Expand Down