Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions packages/upgrade/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@
```php
return RectorConfig::configure()
// …
->withSets([__DIR__ . '/vendor/tempest/framework/packages/upgrade/src/tempest2.php']);
->withSets([
TempestSetList::TEMPEST_20,
]);
```

3. Run `vendor/bin/rector`
3. Run `vendor/bin/rector`
12 changes: 12 additions & 0 deletions packages/upgrade/config/sets/level/up-to-tempest-20.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?php

declare(strict_types=1);

use Rector\Config\RectorConfig;
use Tempest\Upgrade\Set\TempestSetList;

return static function (RectorConfig $config): void {
$config->sets([
TempestSetList::TEMPEST_20,
]);
};
10 changes: 10 additions & 0 deletions packages/upgrade/src/Set/TempestLevelSetList.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?php

declare(strict_types=1);

namespace Tempest\Upgrade\Set;

final class TempestLevelSetList
{
public const UP_TO_TEMPEST_20 = __DIR__ . '/../../config/sets/level/up-to-tempest-20.php';

Check warning on line 9 in packages/upgrade/src/Set/TempestLevelSetList.php

View workflow job for this annotation

GitHub Actions / Run style check

strictness/require-constant-type

Class constant `UP_TO_TEMPEST_20` is missing a type hint. Adding a type hint to constants improves code readability and helps prevent type errors. Help: Consider specifying a type hint for `UP_TO_TEMPEST_20`.
}
10 changes: 10 additions & 0 deletions packages/upgrade/src/Set/TempestSetList.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?php

declare(strict_types=1);

namespace Tempest\Upgrade\Set;

final class TempestSetList
{
public const TEMPEST_20 = __DIR__ . '/../../config/sets/tempest20.php';

Check warning on line 9 in packages/upgrade/src/Set/TempestSetList.php

View workflow job for this annotation

GitHub Actions / Run style check

strictness/require-constant-type

Class constant `TEMPEST_20` is missing a type hint. Adding a type hint to constants improves code readability and helps prevent type errors. Help: Consider specifying a type hint for `TEMPEST_20`.
}
3 changes: 2 additions & 1 deletion packages/upgrade/tests/Tempest2/tempest2_rector.php
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
<?php

use Rector\Config\RectorConfig;
use Tempest\Upgrade\Set\TempestSetList;

return RectorConfig::configure()
->withSets([
__DIR__ . '/../../src/tempest2.php',
TempestSetList::TEMPEST_20,
]);