diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index ce2b08e..c57a3b0 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -30,10 +30,8 @@ jobs: name: PHP:${{ matrix.php }} with PHPUnit:${{ matrix.phpunit }} on ${{ matrix.os }} (${{ matrix.dependencies }}) steps: - - name: Checkout repository and submodules + - name: Checkout repository uses: actions/checkout@v4 - with: - submodules: recursive - name: Setup PHP uses: shivammathur/setup-php@v2 diff --git a/.gitmodules b/.gitmodules deleted file mode 100644 index 665ea14..0000000 --- a/.gitmodules +++ /dev/null @@ -1,4 +0,0 @@ -[submodule "core"] - path = core - url = https://github.com/orchestral/testbench-core.git - branch = 6.x diff --git a/bin/sync b/bin/sync index bdd7f99..0dfb62b 100755 --- a/bin/sync +++ b/bin/sync @@ -10,35 +10,25 @@ $files = new Illuminate\Filesystem\Filesystem(); echo ">>>> Checkout branch {$BRANCH}".PHP_EOL; -Illuminate\Support\Collection::make([ - "git checkout $BRANCH", - "git submodule init", - "git submodule foreach git reset --hard HEAD", - "git submodule foreach git checkout $BRANCH", - "git submodule foreach git pull", -])->each(function ($command) use ($workingPath) { - Symfony\Component\Process\Process::fromShellCommandline($command, $workingPath)->mustRun(); -}); - -$files->copy("{$workingPath}/core/testbench.yaml", "{$workingPath}/testbench.yaml"); +$files->copy("{$workingPath}/vendor/orchestra/testbench-core/testbench.yaml", "{$workingPath}/testbench.yaml"); Illuminate\Support\Collection::make([ - ...$files->glob("{$workingPath}/core/workbench/app/*"), + ...$files->glob("{$workingPath}/vendor/orchestra/testbench-core/workbench/app/*"), ])->flatten() ->filter(fn ($file) => is_file($file)) ->each(function ($file) use ($files, $workingPath) { - $files->copy($file, "{$workingPath}/workbench".Illuminate\Support\Str::after($file, "{$workingPath}/core/workbench")); + $files->copy($file, "{$workingPath}/workbench".Illuminate\Support\Str::after($file, "{$workingPath}/vendor/orchestra/testbench-core/workbench")); }); Illuminate\Support\Collection::make([ - ...$files->glob("{$workingPath}/core/workbench/config/*.php"), - ...$files->glob("{$workingPath}/core/workbench/config/*/*.php"), - ...$files->glob("{$workingPath}/core/workbench/routes/*"), - ...$files->glob("{$workingPath}/core/workbench/resources/lang/en/*"), - ...$files->glob("{$workingPath}/core/workbench/resources/views/components/*"), - ...$files->glob("{$workingPath}/core/workbench/resources/views/*"), + ...$files->glob("{$workingPath}/vendor/orchestra/testbench-core/workbench/config/*.php"), + ...$files->glob("{$workingPath}/vendor/orchestra/testbench-core/workbench/config/*/*.php"), + ...$files->glob("{$workingPath}/vendor/orchestra/testbench-core/workbench/routes/*"), + ...$files->glob("{$workingPath}/vendor/orchestra/testbench-core/workbench/resources/lang/en/*"), + ...$files->glob("{$workingPath}/vendor/orchestra/testbench-core/workbench/resources/views/components/*"), + ...$files->glob("{$workingPath}/vendor/orchestra/testbench-core/workbench/resources/views/*"), ])->flatten() ->filter(fn ($file) => is_file($file)) ->each(function ($file) use ($files, $workingPath) { - $files->copy($file, "{$workingPath}/workbench".Illuminate\Support\Str::after($file, "{$workingPath}/core/workbench")); + $files->copy($file, "{$workingPath}/workbench".Illuminate\Support\Str::after($file, "{$workingPath}/vendor/orchestra/testbench-core/workbench")); }); diff --git a/composer.json b/composer.json index 1a46091..bfdfd35 100644 --- a/composer.json +++ b/composer.json @@ -27,6 +27,13 @@ "phpunit/phpunit": "^8.5.21 || ^9.5.10", "spatie/laravel-ray": "^1.29.7" }, + "config": { + "preferred-install": { + "orchestra/testbench-core": "source", + "*": "auto" + }, + "sort-packages": true + }, "scripts": { "post-autoload-dump": "@prepare", "prepare": "@php vendor/bin/testbench package:discover --ansi", @@ -36,9 +43,6 @@ "@test" ] }, - "config": { - "sort-packages": true - }, "prefer-stable": true, "minimum-stability": "dev" } diff --git a/core b/core deleted file mode 160000 index 846a9b5..0000000 --- a/core +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 846a9b59f431d1e130b7522473173d2cb45fbabb diff --git a/phpunit.xml b/phpunit.xml index 3c155f5..7ef474e 100644 --- a/phpunit.xml +++ b/phpunit.xml @@ -19,7 +19,7 @@ - ./core/tests/ + ./vendor/orchestra/testbench-core/tests/