-
Notifications
You must be signed in to change notification settings - Fork 16
Expand file tree
/
Copy pathrector-migrate.php
More file actions
38 lines (35 loc) · 1.68 KB
/
Copy pathrector-migrate.php
File metadata and controls
38 lines (35 loc) · 1.68 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
32
33
34
35
36
37
38
<?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.AuraSqlModule annotations.
*
* Usage:
* # Process a single directory
* vendor/bin/rector process src --config=vendor/ray/aura-sql-module/rector-migrate.php --dry-run
* vendor/bin/rector process src --config=vendor/ray/aura-sql-module/rector-migrate.php
*
* # Process multiple directories
* vendor/bin/rector process src tests --config=vendor/ray/aura-sql-module/rector-migrate.php
*/
return RectorConfig::configure()
->withConfiguredRule(
AnnotationToAttributeRector::class,
[
// Ray.AuraSqlModule Annotations
new AnnotationToAttribute('Ray\AuraSqlModule\Annotation\Transactional'),
new AnnotationToAttribute('Ray\AuraSqlModule\Annotation\WriteConnection'),
new AnnotationToAttribute('Ray\AuraSqlModule\Annotation\ReadOnlyConnection'),
new AnnotationToAttribute('Ray\AuraSqlModule\Annotation\Read'),
new AnnotationToAttribute('Ray\AuraSqlModule\Annotation\AuraSql'),
new AnnotationToAttribute('Ray\AuraSqlModule\Annotation\EnvAuth'),
new AnnotationToAttribute('Ray\AuraSqlModule\Annotation\HttpMethod'),
new AnnotationToAttribute('Ray\AuraSqlModule\Annotation\PagerViewOption'),
new AnnotationToAttribute('Ray\AuraSqlModule\Annotation\AuraSqlQueryConfig'),
]
);