Skip to content

Commit abf77dc

Browse files
#233: Added Rector to build plan
1 parent 5fa78c8 commit abf77dc

File tree

3 files changed

+25
-1
lines changed

3 files changed

+25
-1
lines changed

.travis.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ before_script:
2626

2727
script:
2828
- XDEBUG_MODE=coverage vendor/bin/phpunit --coverage-text --coverage-clover build/logs/clover.xml
29+
- vendor/bin/rector process --dry-run --no-progress-bar
2930

3031
after_success:
3132
- bash <(curl -s https://codecov.io/bash) -f build/logs/clover.xml

composer.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@
1515
"require-dev": {
1616
"darkwebdesign/symfony-addon-transformers": "6.0.*",
1717
"doctrine/orm": "^2.7",
18-
"phpunit/phpunit": "^8.5"
18+
"phpunit/phpunit": "^8.5",
19+
"rector/rector": "^0.18.6"
1920
},
2021
"suggest": {
2122
"darkwebdesign/symfony-addon-pack": "All Symfony add-ons bundled together",

rector.php

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
<?php
2+
3+
declare(strict_types=1);
4+
5+
use Rector\Config\RectorConfig;
6+
use Rector\Set\ValueObject\LevelSetList;
7+
use Rector\Symfony\Set\SymfonyLevelSetList;
8+
9+
return static function (RectorConfig $rectorConfig): void {
10+
$rectorConfig->paths([
11+
__DIR__ . '/src',
12+
__DIR__ . '/tests',
13+
]);
14+
15+
$rectorConfig->sets([
16+
LevelSetList::UP_TO_PHP_80,
17+
SymfonyLevelSetList::UP_TO_SYMFONY_60,
18+
]);
19+
20+
$rectorConfig->importNames(true, false);
21+
$rectorConfig->importShortClasses(false);
22+
};

0 commit comments

Comments
 (0)