Skip to content

Commit 8b219cf

Browse files
mgiraudmgiraud
andauthored
Deprecate annotation classes (#187)
* Deprecate annotation classes * More explicit deprecation message --------- Co-authored-by: mgiraud <marc@mac.home>
1 parent 9098cee commit 8b219cf

File tree

4 files changed

+4
-0
lines changed

4 files changed

+4
-0
lines changed

composer.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
"require": {
1212
"php": "^8.1",
1313
"nikic/php-parser": "^5.0",
14+
"symfony/deprecation-contracts": "^2.5 || ^3.0",
1415
"symfony/finder": "^5.4 || ^6.4 || ^7.0",
1516
"twig/twig": "^2.0 || ^3.0",
1617
"phpstan/phpdoc-parser": "^2.3"

src/Annotation/Desc.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111

1212
namespace Translation\Extractor\Annotation;
1313

14+
trigger_deprecation('php-translation/extractor', '2.3', 'The "%s" class is deprecated and will be removed soon. It is now considered as a PHPDoc tag.', Desc::class);
1415
/**
1516
* @deprecated since 2.3, this class is not used anymore. @Desc is now considered as a PHPDoc tag.
1617
*

src/Annotation/Ignore.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111

1212
namespace Translation\Extractor\Annotation;
1313

14+
trigger_deprecation('php-translation/extractor', '2.3', 'The "%s" class is deprecated and will be removed soon. It is now considered as a PHPDoc tag.', Ignore::class);
1415
/**
1516
* @deprecated since 2.3, this class is not used anymore. @Ignore is now considered as a PHPDoc tag.
1617
*

src/Annotation/Translate.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111

1212
namespace Translation\Extractor\Annotation;
1313

14+
trigger_deprecation('php-translation/extractor', '2.3', 'The "%s" class is deprecated and will be removed soon. It is now considered as a PHPDoc tag.', Translate::class);
1415
/**
1516
* @deprecated since 2.3, this class is not used anymore. @Translate is now considered as a PHPDoc tag.
1617
*

0 commit comments

Comments
 (0)