From 4b52fed4a0c22800eef47e76778cc4ef86046773 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20=C5=A0tancl?= Date: Sun, 11 Feb 2024 00:07:38 +0100 Subject: [PATCH] fix more files broken in automerge --- .github/workflows/ci.yml | 4 ++-- .gitignore | 1 - src/Vite.php | 22 ------------------ tests/UniversalRouteTest.php | 44 ------------------------------------ 4 files changed, 2 insertions(+), 69 deletions(-) delete mode 100644 src/Vite.php diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2a7da559..21ae92a0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -16,7 +16,7 @@ jobs: strategy: matrix: include: - - laravel: "10.0" + - laravel: "^10.0" php: "8.2" steps: @@ -25,7 +25,7 @@ jobs: - name: Install Composer dependencies run: | - composer require "laravel/framework:^${{ matrix.laravel }}.0" --no-interaction --no-update + composer require "laravel/framework:${{ matrix.laravel }}" --no-interaction --no-update composer update --prefer-dist --no-interaction - name: Run tests run: ./vendor/bin/pest diff --git a/.gitignore b/.gitignore index 99545a46..5a5960b0 100644 --- a/.gitignore +++ b/.gitignore @@ -13,4 +13,3 @@ tenant-schema-test.dump tests/Etc/tmp/queuetest.json docker-compose.override.yml .php-cs-fixer.cache - diff --git a/src/Vite.php b/src/Vite.php deleted file mode 100644 index ca47fcc3..00000000 --- a/src/Vite.php +++ /dev/null @@ -1,22 +0,0 @@ - [UniversalRoutes::class]]); - - Route::get('/foo', [UniversalRouteController::class, 'show']); - - $this->get('http://localhost/foo') - ->assertSuccessful() - ->assertSee('Tenancy is not initialized.'); - - $tenant = Tenant::create([ - 'id' => 'acme', - ]); - $tenant->domains()->create([ - 'domain' => 'acme.localhost', - ]); - - $this->get('http://acme.localhost/foo') - ->assertSuccessful() - ->assertSee('Tenancy is initialized.'); - } -} - -class UniversalRouteController -{ - public function getMiddleware() - { - return array_map(fn($middleware) => [ - 'middleware' => $middleware, - 'options' => [], - ], ['universal', InitializeTenancyByDomain::class]); - } - - public function show() - { - return tenancy()->initialized - ? 'Tenancy is initialized.' - : 'Tenancy is not initialized.'; - } }