Remove some outdated contents related to annotations

This commit is contained in:
Javier Eguiluz
2026-01-07 15:53:26 +01:00
parent b9957cab07
commit c1b6f0cafa
3 changed files with 12 additions and 5 deletions

View File

@@ -206,3 +206,9 @@ the full classmap executing the ``dump-autoload`` command of Composer.
This technique can't be used when the classes to compile use the ``__DIR__``
or ``__FILE__`` constants, because their values will change when loading
these classes from the ``classes.php`` file.
.. deprecated:: 7.1
The ``addAnnotatedClassesToCompile()`` method was deprecated in Symfony 7.1
and will be removed in Symfony 8.0. No alternative is provided because the
technique explained in this section is no longer necessary with modern PHP.

View File

@@ -47,7 +47,7 @@ When configuring the cache component there are a few concepts you should know:
.. _cache-app-system:
There are two pools that are always enabled by default. They are ``cache.app`` and
``cache.system``. The system cache is used for things like annotations, serializer,
``cache.system``. The system cache is used for things like the serializer,
and validation. The ``cache.app`` can be used in your code. You can configure which
adapter (template) they use by using the ``app`` and ``system`` key like:

View File

@@ -211,8 +211,10 @@ events directly from the kernel, again it will be registered automatically::
}
}
Advanced Example: Twig, Annotations and the Web Debug Toolbar
-------------------------------------------------------------
.. _advanced-example-twig-annotations-and-the-web-debug-toolbar:
Advanced Example: Twig, Attributes and the Web Debug Toolbar
------------------------------------------------------------
The purpose of the ``MicroKernelTrait`` is *not* to have a single-file application.
Instead, its goal is to give you the power to choose your bundles and structure.
@@ -236,7 +238,7 @@ your ``composer.json`` file to load from there:
Then, run ``composer dump-autoload`` to dump your new autoload config.
Now, suppose you want to define a custom configuration for your app,
use Twig and load routes via annotations. Instead of putting *everything*
use Twig and load routes via attributes. Instead of putting *everything*
in ``index.php``, create a new ``src/Kernel.php`` to hold the kernel.
Now it looks like this::
@@ -301,7 +303,6 @@ Now it looks like this::
}
// load the routes defined as PHP attributes
// (use 'annotation' as the second argument if you define routes as annotations)
$routes->import(__DIR__.'/Controller/', 'attribute');
}