From b819e54628d835ec865daf2dd49b6a05beb62e14 Mon Sep 17 00:00:00 2001 From: Mior Muhammad Zaki Date: Tue, 18 Feb 2025 10:38:16 +0800 Subject: [PATCH] Use `orchestra/sidekick` Signed-off-by: Mior Muhammad Zaki --- composer.json | 5 +++-- src/CanvasServiceProvider.php | 2 +- src/Console/FactoryMakeCommand.php | 2 +- src/Console/GeneratorMakeCommand.php | 2 +- src/Console/PresetMakeCommand.php | 2 +- src/Console/TestMakeCommand.php | 2 +- src/Console/UserFactoryMakeCommand.php | 2 +- src/Console/UserModelMakeCommand.php | 2 +- src/Console/ViewMakeCommand.php | 2 +- src/GeneratorPreset.php | 2 +- src/Presets/Laravel.php | 2 +- src/Presets/Package.php | 2 +- src/Presets/Preset.php | 2 +- tests/Feature/GeneratorPresetTest.php | 2 +- tests/Unit/Presets/LaravelTest.php | 2 +- tests/Unit/Presets/PackageTest.php | 2 +- 16 files changed, 18 insertions(+), 17 deletions(-) diff --git a/composer.json b/composer.json index 1291b36..00c1838 100644 --- a/composer.json +++ b/composer.json @@ -35,8 +35,9 @@ "illuminate/database": "^11.42.1", "illuminate/filesystem": "^11.42.1", "illuminate/support": "^11.42.1", - "orchestra/canvas-core": "^9.1", - "orchestra/testbench-core": "^9.7", + "orchestra/canvas-core": "^9.2", + "orchestra/sidekick": "^1.0", + "orchestra/testbench-core": "^9.11", "symfony/polyfill-php83": "^1.31", "symfony/yaml": "^7.0.3" }, diff --git a/src/CanvasServiceProvider.php b/src/CanvasServiceProvider.php index d96e531..cd55517 100644 --- a/src/CanvasServiceProvider.php +++ b/src/CanvasServiceProvider.php @@ -9,7 +9,7 @@ use Orchestra\Canvas\Core\PresetManager; use Symfony\Component\Yaml\Yaml; -use function Illuminate\Filesystem\join_paths; +use function Orchestra\Sidekick\join_paths; class CanvasServiceProvider extends ServiceProvider implements DeferrableProvider { diff --git a/src/Console/FactoryMakeCommand.php b/src/Console/FactoryMakeCommand.php index 128fcad..8a7d543 100644 --- a/src/Console/FactoryMakeCommand.php +++ b/src/Console/FactoryMakeCommand.php @@ -7,7 +7,7 @@ use Orchestra\Canvas\Core\Concerns\UsesGeneratorOverrides; use Symfony\Component\Console\Attribute\AsCommand; -use function Illuminate\Filesystem\join_paths; +use function Orchestra\Sidekick\join_paths; /** * @see https://github.com/laravel/framework/blob/11.x/src/Illuminate/Database/Console/Factories/FactoryMakeCommand.php diff --git a/src/Console/GeneratorMakeCommand.php b/src/Console/GeneratorMakeCommand.php index b771d20..4f2e99f 100644 --- a/src/Console/GeneratorMakeCommand.php +++ b/src/Console/GeneratorMakeCommand.php @@ -8,7 +8,7 @@ use Symfony\Component\Console\Attribute\AsCommand; use Symfony\Component\Console\Input\InputOption; -use function Illuminate\Filesystem\join_paths; +use function Orchestra\Sidekick\join_paths; #[AsCommand(name: 'make:generator', description: 'Create a new generator command')] class GeneratorMakeCommand extends GeneratorCommand diff --git a/src/Console/PresetMakeCommand.php b/src/Console/PresetMakeCommand.php index aec1a8e..bcb0621 100644 --- a/src/Console/PresetMakeCommand.php +++ b/src/Console/PresetMakeCommand.php @@ -13,8 +13,8 @@ use Symfony\Component\Console\Input\InputOption; use Symfony\Component\Console\Output\OutputInterface; -use function Illuminate\Filesystem\join_paths; use function Laravel\Prompts\select; +use function Orchestra\Sidekick\join_paths; use function Orchestra\Testbench\package_path; /** diff --git a/src/Console/TestMakeCommand.php b/src/Console/TestMakeCommand.php index 8248156..4a51f9d 100644 --- a/src/Console/TestMakeCommand.php +++ b/src/Console/TestMakeCommand.php @@ -7,7 +7,7 @@ use Orchestra\Canvas\GeneratorPreset; use Symfony\Component\Console\Attribute\AsCommand; -use function Illuminate\Filesystem\join_paths; +use function Orchestra\Sidekick\join_paths; /** * @see https://github.com/laravel/framework/blob/11.x/src/Illuminate/Foundation/Console/TestMakeCommand.php diff --git a/src/Console/UserFactoryMakeCommand.php b/src/Console/UserFactoryMakeCommand.php index 48aa79d..8d2483c 100644 --- a/src/Console/UserFactoryMakeCommand.php +++ b/src/Console/UserFactoryMakeCommand.php @@ -7,7 +7,7 @@ use Symfony\Component\Console\Attribute\AsCommand; use Symfony\Component\Console\Input\InputOption; -use function Illuminate\Filesystem\join_paths; +use function Orchestra\Sidekick\join_paths; #[AsCommand(name: 'make:user-factory', description: 'Create the User factory class')] class UserFactoryMakeCommand extends GeneratorCommand diff --git a/src/Console/UserModelMakeCommand.php b/src/Console/UserModelMakeCommand.php index 7a8f87d..9ce9208 100644 --- a/src/Console/UserModelMakeCommand.php +++ b/src/Console/UserModelMakeCommand.php @@ -8,7 +8,7 @@ use Symfony\Component\Console\Attribute\AsCommand; use Symfony\Component\Console\Input\InputOption; -use function Illuminate\Filesystem\join_paths; +use function Orchestra\Sidekick\join_paths; #[AsCommand(name: 'make:user-model', description: 'Create the User model class')] class UserModelMakeCommand extends GeneratorCommand diff --git a/src/Console/ViewMakeCommand.php b/src/Console/ViewMakeCommand.php index dd1c616..59ec6da 100644 --- a/src/Console/ViewMakeCommand.php +++ b/src/Console/ViewMakeCommand.php @@ -9,7 +9,7 @@ use Orchestra\Canvas\GeneratorPreset; use Symfony\Component\Console\Attribute\AsCommand; -use function Illuminate\Filesystem\join_paths; +use function Orchestra\Sidekick\join_paths; #[AsCommand(name: 'make:view', description: 'Create a new view')] class ViewMakeCommand extends \Illuminate\Foundation\Console\ViewMakeCommand diff --git a/src/GeneratorPreset.php b/src/GeneratorPreset.php index 6d8d960..345b8f2 100644 --- a/src/GeneratorPreset.php +++ b/src/GeneratorPreset.php @@ -4,7 +4,7 @@ use Orchestra\Canvas\Core\Presets\Preset; -use function Illuminate\Filesystem\join_paths; +use function Orchestra\Sidekick\join_paths; class GeneratorPreset extends Preset { diff --git a/src/Presets/Laravel.php b/src/Presets/Laravel.php index e0595ea..d909cb2 100644 --- a/src/Presets/Laravel.php +++ b/src/Presets/Laravel.php @@ -2,7 +2,7 @@ namespace Orchestra\Canvas\Presets; -use function Illuminate\Filesystem\join_paths; +use function Orchestra\Sidekick\join_paths; class Laravel extends Preset { diff --git a/src/Presets/Package.php b/src/Presets/Package.php index 8e538a2..f15c3c8 100644 --- a/src/Presets/Package.php +++ b/src/Presets/Package.php @@ -4,7 +4,7 @@ use InvalidArgumentException; -use function Illuminate\Filesystem\join_paths; +use function Orchestra\Sidekick\join_paths; class Package extends Preset { diff --git a/src/Presets/Preset.php b/src/Presets/Preset.php index aa63d63..b7e35d4 100644 --- a/src/Presets/Preset.php +++ b/src/Presets/Preset.php @@ -4,7 +4,7 @@ use Illuminate\Support\Arr; -use function Illuminate\Filesystem\join_paths; +use function Orchestra\Sidekick\join_paths; abstract class Preset { diff --git a/tests/Feature/GeneratorPresetTest.php b/tests/Feature/GeneratorPresetTest.php index f282c28..0086158 100644 --- a/tests/Feature/GeneratorPresetTest.php +++ b/tests/Feature/GeneratorPresetTest.php @@ -9,7 +9,7 @@ use Orchestra\Testbench\TestCase; use PHPUnit\Framework\Attributes\Test; -use function Illuminate\Filesystem\join_paths; +use function Orchestra\Sidekick\join_paths; class GeneratorPresetTest extends TestCase { diff --git a/tests/Unit/Presets/LaravelTest.php b/tests/Unit/Presets/LaravelTest.php index 63b9ddb..d62527c 100644 --- a/tests/Unit/Presets/LaravelTest.php +++ b/tests/Unit/Presets/LaravelTest.php @@ -7,7 +7,7 @@ use PHPUnit\Framework\Attributes\Test; use PHPUnit\Framework\TestCase; -use function Illuminate\Filesystem\join_paths; +use function Orchestra\Sidekick\join_paths; class LaravelTest extends TestCase { diff --git a/tests/Unit/Presets/PackageTest.php b/tests/Unit/Presets/PackageTest.php index c7caeed..1b11252 100644 --- a/tests/Unit/Presets/PackageTest.php +++ b/tests/Unit/Presets/PackageTest.php @@ -7,7 +7,7 @@ use PHPUnit\Framework\Attributes\Test; use PHPUnit\Framework\TestCase; -use function Illuminate\Filesystem\join_paths; +use function Orchestra\Sidekick\join_paths; class PackageTest extends TestCase {