Open Vincz opened 7 months ago
We should also update the folder and the namespace and deprecate the old one. @mcg-web I have never done something like that. Is there a way to deprecate the old namespace and folder (but let it work) while having the new one without duplicating the files in it?
One way to to it would be to subclass new namespace with the old one. For example:
<?php
namespace Overblog\GraphQLBundle\Annotation;
use Overblog\GraphQLBundle\Annotation\Type as BaseType;
class Type extends BaseType
{
}
Not sure if it would work.
Another way would be with composer autoload.
Would something like this could work in the composer.json
?
"autoload": {
"psr-4": {
"Overblog\\GraphQLBundle\\Annotation\\": "Attribute"
}
}
Attributes have been around for a while now. We should deprecate annotations as the minimum requirement is now PHP >= 8.