Upgrade to Rector v1

This commit is contained in:
Dan Harrin
2024-03-04 10:55:04 +00:00
parent 2c684b4a27
commit acfd10363c
4 changed files with 693 additions and 266 deletions
Generated
+669 -241
View File
File diff suppressed because it is too large Load Diff
+1 -1
View File
@@ -10,7 +10,7 @@
"require": {
"php": "^8.1",
"nunomaduro/termwind": "^1.0|^2.0",
"rector/rector": "^0.19"
"rector/rector": "^1.0"
},
"autoload": {
"psr-4": {
@@ -62,7 +62,6 @@ class SimplePropertyChangesRector extends AbstractRector
public function getNodeTypes(): array
{
return [Class_::class];
//return [Property::class];
}
/**
+23 -23
View File
@@ -1,25 +1,25 @@
<?php
// namespace Filament\Tests\Upgrade;
//
// use Iterator;
// use Rector\Testing\PHPUnit\AbstractRectorTestCase;
//
// class RectorTest extends AbstractRectorTestCase
// {
// /** @dataProvider provideData */
// public function test(string $filePath): void
// {
// $this->doTestFile($filePath);
// }
//
// public static function provideData(): Iterator
// {
// return self::yieldFilesFromDirectory(__DIR__ . '/Fixture');
// }
//
// public function provideConfigFilePath(): string
// {
// return __DIR__ . '/../../../packages/upgrade/src/rector.php';
// }
// }
namespace Filament\Tests\Upgrade;
use Iterator;
use Rector\Testing\PHPUnit\AbstractRectorTestCase;
class RectorTest extends AbstractRectorTestCase
{
/** @dataProvider provideData */
public function test(string $filePath): void
{
$this->doTestFile($filePath);
}
public static function provideData(): Iterator
{
return self::yieldFilesFromDirectory(__DIR__ . '/Fixture');
}
public function provideConfigFilePath(): string
{
return __DIR__ . '/../../../packages/upgrade/src/rector.php';
}
}