Skip to content

Commit

Permalink
Rename schema() method to components() on Schema object
Browse files Browse the repository at this point in the history
  • Loading branch information
danharrin committed Feb 4, 2025
1 parent 8382eba commit de632bb
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion packages/upgrade/bin/filament-v4
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ $isReady = strtolower(trim(ask(<<<HTML
<span class="bg-amber-600 text-amber-50 mr-1">
Are you ready to continue? y/n
</span>
HTML))) === 'y';
HTML) ?? 'y')) === 'y';

if (! $isReady) {
render(<<<HTML
Expand Down
7 changes: 7 additions & 0 deletions packages/upgrade/src/rector.php
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
<?php

use Filament\Schemas\Schema;
use Filament\Upgrade\Rector;
use Rector\Config\RectorConfig;
use Rector\Renaming\Rector\MethodCall\RenameMethodRector;
use Rector\Renaming\Rector\Name\RenameClassRector;
use Rector\Renaming\Rector\String_\RenameStringRector;
use Rector\Renaming\ValueObject\MethodCallRename;

return static function (RectorConfig $rectorConfig): void {
$rectorConfig->ruleWithConfiguration(
Expand Down Expand Up @@ -261,4 +264,8 @@
Rector\SimplePropertyChangesRector::class,
Rector\RenameSchemaParamToMatchTypeRector::class,
]);

$rectorConfig->ruleWithConfiguration(RenameMethodRector::class, [
new MethodCallRename(Schema::class, 'schema', 'components'),
]);
};

0 comments on commit de632bb

Please sign in to comment.