-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathrector-migrate.php
More file actions
31 lines (28 loc) · 1.26 KB
/
rector-migrate.php
File metadata and controls
31 lines (28 loc) · 1.26 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
<?php
declare(strict_types=1);
use Rector\Config\RectorConfig;
use Rector\Php80\Rector\Class_\AnnotationToAttributeRector;
use Rector\Php80\ValueObject\AnnotationToAttribute;
/**
* Rector configuration for migrating from Doctrine Annotations to PHP 8 Attributes
*
* This configuration helps users migrate their code from doctrine/annotations
* to native PHP 8 attributes for Ray.PsrCacheModule annotations.
*
* Usage:
* vendor/bin/rector process src --config=vendor/ray/psr-cache-module/rector-migrate.php --dry-run
* vendor/bin/rector process src --config=vendor/ray/psr-cache-module/rector-migrate.php
*/
return RectorConfig::configure()
->withConfiguredRule(
AnnotationToAttributeRector::class,
[
// Ray.PsrCacheModule Annotations
new AnnotationToAttribute('Ray\PsrCacheModule\Annotation\Local'),
new AnnotationToAttribute('Ray\PsrCacheModule\Annotation\Shared'),
new AnnotationToAttribute('Ray\PsrCacheModule\Annotation\CacheDir'),
new AnnotationToAttribute('Ray\PsrCacheModule\Annotation\CacheNamespace'),
new AnnotationToAttribute('Ray\PsrCacheModule\Annotation\RedisConfig'),
new AnnotationToAttribute('Ray\PsrCacheModule\Annotation\MemcacheConfig'),
]
);