Skip to content

Commit

Permalink
add rector PHP as a dependency with configuration
Browse files Browse the repository at this point in the history
Signed-off-by: Gary Lockett <[email protected]>
  • Loading branch information
Gary Lockett committed Jun 2, 2023
1 parent 0b7597b commit 0de82ed
Show file tree
Hide file tree
Showing 6 changed files with 147 additions and 1 deletion.
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
/phpunit.xml.dist export-ignore
/psalm-baseline.xml export-ignore
/psalm.xml.dist export-ignore
/rector.php export-ignore
/renovate.json export-ignore
/test/ export-ignore
/psalm/ export-ignore
1 change: 1 addition & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@
"php-http/psr7-integration-tests": "^1.3",
"phpunit/phpunit": "^9.5.28",
"psalm/plugin-phpunit": "^0.18.4",
"rector/rector": "^0.17.0",
"vimeo/psalm": "^5.9"
},
"provide": {
Expand Down
125 changes: 124 additions & 1 deletion composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions phpcs.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
<arg value="ps"/>

<!-- Paths to check -->
<file>rector.php</file>
<file>src</file>
<file>test</file>

Expand Down
1 change: 1 addition & 0 deletions psalm.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
errorBaseline="psalm-baseline.xml"
>
<projectFiles>
<file name="rector.php"/>
<directory name="src"/>
<directory name="test"/>
<ignoreFiles>
Expand Down
19 changes: 19 additions & 0 deletions rector.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<?php

declare(strict_types=1);

use Rector\Config\RectorConfig;
use Rector\Set\ValueObject\LevelSetList;

return static function (RectorConfig $rectorConfig): void {
// Set paths
$rectorConfig->paths([
__DIR__ . '/src',
__DIR__ . '/test',
]);

// Define set list to upgrade PHP
$rectorConfig->sets([
LevelSetList::UP_TO_PHP_80,
]);
};

0 comments on commit 0de82ed

Please sign in to comment.