我如何为旧版本的 Symfony 安装注释和分析器?

How can i install annotation and profiler for an old version of Symfony?

当我尝试为 Symfony 4 安装注释或分析器时

composer require annotations

composer require --dev profiler

他使用版本 5 安装,我遇到了这个问题

注意:我不想升级到版本 5。 我对 4.0.13

版很满意

您可以在命令末尾添加 :version,例如使用以下命令:

composer require annotations:1.7.0

composer require --dev profiler:1.0.3

并查看哪个版本适用于您的 symfony 版本:

https://github.com/doctrine/annotations/releases

https://github.com/symfony/profiler-pack/releases