Package doctrine/reflection is abandoned

Viewed 8498

I get this warning when I run composer update :

Package doctrine/reflection is abandoned, you should avoid using it. Use roave/better-reflection instead.

I tried to add roave/better-reflection instead and remove doctrine/reflection without success. I'm on Symfony 5.2 but I already had the warning with Symfony 5.1.

Thank you in advance.

2 Answers

As you can see on packagist, there are some packages that depend on doctrine/reflection - the missing information here are the specific versions that require this package. Abandoning doctrine/reflection has (technically) happened on Oct 29 2020, so it's not surprising that not all depending packages were updated.

After all, this is not a red flag for you. If you were depending directly on this package, you should act and replace it. Others have already done so, like doctrine/common or symfony/symfony, or might do so in future versions.

For average symfony users, this is an internal warning coming directly from doctrine's own dependencies, see:

vendor/doctrine/common/composer.json
vendor/doctrine/persistence/composer.json

Where they have "doctrine/reflection": "^1.0" in their composer.json files.

They'll likely do something about this in a future release, so for now we must live with the warning.

I will update my answer when there is more information

Related