diff --git a/composer.json b/composer.json index 286bfeba..400f2024 100644 --- a/composer.json +++ b/composer.json @@ -22,9 +22,8 @@ "require-dev": { "doctrine/annotations": "^1.12 || ^2.0", "jetbrains/phpstorm-attributes": "^1.0", - "symfony/var-dumper": "^5.2 || ^6.0", "phpunit/phpunit": "^9.5.20", - "vimeo/psalm": "^4.21" + "vimeo/psalm": "^5.17" }, "autoload": { "files": [ @@ -50,7 +49,7 @@ ] }, "suggest": { - "doctrine/annotations": "^1.0 for Doctrine metadata driver support" + "doctrine/annotations": "^1.0 || ^2.0 for Doctrine metadata driver support" }, "config": { "sort-packages": true diff --git a/psalm.xml b/psalm.xml index dcf66706..cd40e119 100644 --- a/psalm.xml +++ b/psalm.xml @@ -5,6 +5,8 @@ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="https://getpsalm.org/schema/config" xsi:schemaLocation="https://getpsalm.org/schema/config vendor/vimeo/psalm/config.xsd" + findUnusedBaselineEntry="true" + findUnusedCode="false" > diff --git a/src/AnnotationReader.php b/src/AnnotationReader.php index c76bb603..a3d3280c 100644 --- a/src/AnnotationReader.php +++ b/src/AnnotationReader.php @@ -8,6 +8,9 @@ use Spiral\Attributes\Internal\Decorator; use Spiral\Attributes\Internal\DoctrineAnnotationReader; +/** + * @deprecated Use {@see AttributeReader} instead. + */ final class AnnotationReader extends Decorator { public function __construct(Reader $reader = null) diff --git a/src/Bridge/DoctrineReaderBridge.php b/src/Bridge/DoctrineReaderBridge.php index a2416fbe..1d429aec 100644 --- a/src/Bridge/DoctrineReaderBridge.php +++ b/src/Bridge/DoctrineReaderBridge.php @@ -27,6 +27,7 @@ * // * $doctrine = new \Doctrine\Common\Annotations\CachedReader($bridge, $cache); * + * @deprecated */ final class DoctrineReaderBridge implements Reader { diff --git a/src/Exception/InitializationException.php b/src/Exception/InitializationException.php index f9e2c9aa..e689942d 100644 --- a/src/Exception/InitializationException.php +++ b/src/Exception/InitializationException.php @@ -4,6 +4,9 @@ namespace Spiral\Attributes\Exception; +/** + * @deprecated + */ class InitializationException extends AttributeException { } diff --git a/src/Exception/NotFoundException.php b/src/Exception/NotFoundException.php index fd94b376..ac0577fb 100644 --- a/src/Exception/NotFoundException.php +++ b/src/Exception/NotFoundException.php @@ -4,6 +4,9 @@ namespace Spiral\Attributes\Exception; +/** + * @deprecated + */ class NotFoundException extends AttributeException { } diff --git a/src/Exception/SyntaxAttributeException.php b/src/Exception/SyntaxAttributeException.php index bc8dc70e..49c9fcea 100644 --- a/src/Exception/SyntaxAttributeException.php +++ b/src/Exception/SyntaxAttributeException.php @@ -4,6 +4,9 @@ namespace Spiral\Attributes\Exception; +/** + * @deprecated + */ class SyntaxAttributeException extends AttributeException { } diff --git a/src/Internal/DoctrineAnnotationReader.php b/src/Internal/DoctrineAnnotationReader.php index a11bbe4d..fd1e6c91 100644 --- a/src/Internal/DoctrineAnnotationReader.php +++ b/src/Internal/DoctrineAnnotationReader.php @@ -13,6 +13,9 @@ use Spiral\Attributes\Exception\SyntaxAttributeException; use Spiral\Attributes\Reader as BaseReader; +/** + * @deprecated + */ final class DoctrineAnnotationReader extends BaseReader { private Reader $reader; diff --git a/src/Internal/Instantiator/DoctrineInstantiator.php b/src/Internal/Instantiator/DoctrineInstantiator.php index 2801ab96..027a63d0 100644 --- a/src/Internal/Instantiator/DoctrineInstantiator.php +++ b/src/Internal/Instantiator/DoctrineInstantiator.php @@ -12,6 +12,7 @@ /** * @internal DoctrineInstantiator is an internal library class, please do not use it in your code. * @psalm-internal Spiral\Attributes + * @deprecated Use {@see NamedArgumentsInstantiator} instead. */ final class DoctrineInstantiator extends Instantiator { diff --git a/src/NamedArgumentConstructor.php b/src/NamedArgumentConstructor.php index c587e7f5..a1fdbfde 100644 --- a/src/NamedArgumentConstructor.php +++ b/src/NamedArgumentConstructor.php @@ -25,6 +25,7 @@ * * @Annotation * @Target({ "CLASS" }) + * @deprecated */ #[\Attribute(\Attribute::TARGET_CLASS)] final class NamedArgumentConstructor extends DoctrineNamedArgumentConstructor diff --git a/src/NamedArgumentConstructorAttribute.php b/src/NamedArgumentConstructorAttribute.php index d1010258..b35c8f66 100644 --- a/src/NamedArgumentConstructorAttribute.php +++ b/src/NamedArgumentConstructorAttribute.php @@ -21,6 +21,7 @@ /** * Marker interface for PHP7/PHP8 compatible support for named arguments * (and constructor property promotion). + * @deprecated */ interface NamedArgumentConstructorAttribute extends NamedArgumentConstructorAnnotation {