From 8ba4e5eb730eaadc2647d11b86a33ad8b97f1083 Mon Sep 17 00:00:00 2001 From: Duncan McClean Date: Fri, 24 Jan 2025 18:12:44 +0000 Subject: [PATCH 1/9] Drop PHP 8.1 support --- .github/workflows/tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 9642afef33..e30776a3e6 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -16,7 +16,7 @@ jobs: strategy: matrix: - php: [8.1, 8.2, 8.3, 8.4] + php: [8.2, 8.3, 8.4] laravel: [10.*, 11.*] stability: [prefer-lowest, prefer-stable] os: [ubuntu-latest] From 0b35e3d182f43e1a40b9652fd28949d09a9902c1 Mon Sep 17 00:00:00 2001 From: Duncan McClean Date: Fri, 24 Jan 2025 18:13:12 +0000 Subject: [PATCH 2/9] Drop Laravel 10 support --- .github/workflows/tests.yml | 2 +- composer.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index e30776a3e6..6a6522491e 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -17,7 +17,7 @@ jobs: strategy: matrix: php: [8.2, 8.3, 8.4] - laravel: [10.*, 11.*] + laravel: [11.*] stability: [prefer-lowest, prefer-stable] os: [ubuntu-latest] include: diff --git a/composer.json b/composer.json index fd4b62cef1..5e376ea234 100644 --- a/composer.json +++ b/composer.json @@ -14,7 +14,7 @@ "composer/semver": "^3.4", "guzzlehttp/guzzle": "^6.3 || ^7.0", "james-heinrich/getid3": "^1.9.21", - "laravel/framework": "^10.40 || ^11.34", + "laravel/framework": "^11.34", "laravel/prompts": "^0.1.16 || ^0.2.0 || ^0.3.0", "league/commonmark": "^2.2", "league/csv": "^9.0", From 7828d4885df8e825cb9014f0da41a2a496016526 Mon Sep 17 00:00:00 2001 From: Duncan McClean Date: Fri, 24 Jan 2025 18:13:40 +0000 Subject: [PATCH 3/9] Require Laravel 12 --- .github/workflows/tests.yml | 2 +- composer.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 6a6522491e..1912d6423c 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -17,7 +17,7 @@ jobs: strategy: matrix: php: [8.2, 8.3, 8.4] - laravel: [11.*] + laravel: [11.*, 12.*] stability: [prefer-lowest, prefer-stable] os: [ubuntu-latest] include: diff --git a/composer.json b/composer.json index 5e376ea234..7eb3ff5e38 100644 --- a/composer.json +++ b/composer.json @@ -14,7 +14,7 @@ "composer/semver": "^3.4", "guzzlehttp/guzzle": "^6.3 || ^7.0", "james-heinrich/getid3": "^1.9.21", - "laravel/framework": "^11.34", + "laravel/framework": "^11.34 || ^12.0", "laravel/prompts": "^0.1.16 || ^0.2.0 || ^0.3.0", "league/commonmark": "^2.2", "league/csv": "^9.0", From cf492a1a31841913a7ecd16a36a55cc00afebc6c Mon Sep 17 00:00:00 2001 From: Duncan McClean Date: Fri, 24 Jan 2025 18:15:13 +0000 Subject: [PATCH 4/9] Remove Laravel 10 support from `install:collaboration` command --- src/Console/Commands/InstallCollaboration.php | 31 ------------------- 1 file changed, 31 deletions(-) diff --git a/src/Console/Commands/InstallCollaboration.php b/src/Console/Commands/InstallCollaboration.php index bd13723447..7385653717 100644 --- a/src/Console/Commands/InstallCollaboration.php +++ b/src/Console/Commands/InstallCollaboration.php @@ -4,7 +4,6 @@ use Facades\Statamic\Console\Processes\Composer; use Illuminate\Console\Command; -use Illuminate\Filesystem\Filesystem; use Illuminate\Support\Arr; use Illuminate\Support\Facades\File; use Illuminate\Support\Facades\Process; @@ -57,13 +56,6 @@ public function handle() protected function enableBroadcasting(): void { - if (version_compare(app()->version(), '11', '<')) { - $this->enableBroadcastServiceProvider(); - $this->components->info('Broadcasting enabled successfully.'); - - return; - } - if (File::exists(config_path('broadcasting.php'))) { $this->components->warn('Broadcasting is already enabled.'); @@ -87,10 +79,6 @@ protected function enableBroadcasting(): void protected function warnAboutLegacyBroadcastDriverKey(): void { - if (version_compare(app()->version(), '11', '<')) { - return; - } - if (Str::contains(File::get(app()->environmentFile()), 'BROADCAST_DRIVER')) { $this->components->warn('The BROADCAST_DRIVER environment variable has been renamed to BROADCAST_CONNECTION in Laravel 11. You should update your .env file.'); } @@ -139,25 +127,6 @@ protected function installBroadcastingDriver(): void } } - /** - * Uncomment the "BroadcastServiceProvider" in the application configuration. - * Copied from Laravel's BroadcastingInstallCommand to support Laravel 10 applications. - * - * @return void - */ - protected function enableBroadcastServiceProvider() - { - $config = ($filesystem = new Filesystem)->get(app()->configPath('app.php')); - - if (str_contains($config, '// App\Providers\BroadcastServiceProvider::class')) { - $filesystem->replaceInFile( - '// App\Providers\BroadcastServiceProvider::class', - 'App\Providers\BroadcastServiceProvider::class', - app()->configPath('app.php'), - ); - } - } - protected function updateBroadcastingDriver(string $driver): void { if (File::missing($env = app()->environmentFile())) { From 64166c12e859f53f717a3be1e4fb65cbdf353ab6 Mon Sep 17 00:00:00 2001 From: Duncan McClean Date: Fri, 24 Jan 2025 18:18:51 +0000 Subject: [PATCH 5/9] Add `minimum-stability` key to composer.json --- composer.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 7eb3ff5e38..560a7287ac 100644 --- a/composer.json +++ b/composer.json @@ -90,5 +90,6 @@ "Tests\\": "tests", "Foo\\Bar\\": "tests/Fixtures/Addon" } - } + }, + "minimum-stability": "dev" } From 7e75563ce067a2198af9831709d66b9f37ff8e15 Mon Sep 17 00:00:00 2001 From: Duncan McClean Date: Mon, 27 Jan 2025 16:16:46 +0000 Subject: [PATCH 6/9] Update Testbench constraint --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 560a7287ac..0d395c0ca1 100644 --- a/composer.json +++ b/composer.json @@ -42,7 +42,7 @@ "google/cloud-translate": "^1.6", "laravel/pint": "1.16.0", "mockery/mockery": "^1.6.10", - "orchestra/testbench": "^8.14 || ^9.2", + "orchestra/testbench": "^9.2 || ^10.0", "phpunit/phpunit": "^10.5.35", "spatie/laravel-ray": "^1.37" }, From 770a4315c89d3feb745f79f0295d54f4b17cc44e Mon Sep 17 00:00:00 2001 From: Duncan McClean Date: Mon, 27 Jan 2025 16:34:33 +0000 Subject: [PATCH 7/9] Use my forked version of blade-parser for now --- composer.json | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 0d395c0ca1..1b9924227e 100644 --- a/composer.json +++ b/composer.json @@ -28,7 +28,7 @@ "spatie/blink": "^1.3", "spatie/ignition": "^1.15", "statamic/stringy": "^3.1.2", - "stillat/blade-parser": "^1.10.1", + "stillat/blade-parser": "dev-laravel-12", "symfony/lock": "^6.4", "symfony/var-exporter": "^6.0", "symfony/yaml": "^6.0 || ^7.0", @@ -46,6 +46,12 @@ "phpunit/phpunit": "^10.5.35", "spatie/laravel-ray": "^1.37" }, + "repositories": [ + { + "type": "vcs", + "url": "https://github.com/duncanmcclean/blade-parser.git" + } + ], "config": { "optimize-autoloader": true, "preferred-install": "dist", From 9b38ac4c7bbf3757fb1ec284eb1aef17de496e23 Mon Sep 17 00:00:00 2001 From: Duncan McClean Date: Mon, 27 Jan 2025 16:41:23 +0000 Subject: [PATCH 8/9] Remove the Laravel 10 please stub --- src/Console/Please/please-l10.stub | 53 ------------------------ src/Providers/ConsoleServiceProvider.php | 4 +- 2 files changed, 1 insertion(+), 56 deletions(-) delete mode 100644 src/Console/Please/please-l10.stub diff --git a/src/Console/Please/please-l10.stub b/src/Console/Please/please-l10.stub deleted file mode 100644 index 91a460927b..0000000000 --- a/src/Console/Please/please-l10.stub +++ /dev/null @@ -1,53 +0,0 @@ -#!/usr/bin/env php -make(Statamic\Console\Please\Kernel::class); - -$status = $kernel->handle( - $input = new Symfony\Component\Console\Input\ArgvInput, - new Symfony\Component\Console\Output\ConsoleOutput -); - -/* -|-------------------------------------------------------------------------- -| Shutdown The Application -|-------------------------------------------------------------------------- -| -| Once Artisan has finished running, we will fire off the shutdown events -| so that any final work may be done by the application before we shut -| down the process. This is the last thing to happen to the request. -| -*/ - -$kernel->terminate($input, $status); - -exit($status); diff --git a/src/Providers/ConsoleServiceProvider.php b/src/Providers/ConsoleServiceProvider.php index 4a043e0ac4..4586374480 100644 --- a/src/Providers/ConsoleServiceProvider.php +++ b/src/Providers/ConsoleServiceProvider.php @@ -61,10 +61,8 @@ public function boot() $artisan->resolveCommands($this->commands); }); - $file = version_compare($this->app->version(), '11', '<') ? 'please-l10.stub' : 'please.stub'; - $this->publishes([ - __DIR__.'/../Console/Please/'.$file => base_path('please'), + __DIR__.'/../Console/Please/please.stub' => base_path('please'), ], 'statamic'); } } From a0ebe6df4dc87e4883f0588c05b780d8307cbf7a Mon Sep 17 00:00:00 2001 From: Duncan McClean Date: Mon, 27 Jan 2025 17:37:36 +0000 Subject: [PATCH 9/9] Pretend we have Carbon 3 installed Until we merge #11348, then we don't need to pretend anymore. --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 1b9924227e..e0f7c5bfd6 100644 --- a/composer.json +++ b/composer.json @@ -21,7 +21,7 @@ "league/glide": "^2.3", "maennchen/zipstream-php": "^3.1", "michelf/php-smartypants": "^1.8.1", - "nesbot/carbon": "^2.62.1", + "nesbot/carbon": "2.62.1 as 3.4.0", "pixelfear/composer-dist-plugin": "^0.1.4", "rebing/graphql-laravel": "^9.7", "rhukster/dom-sanitizer": "^1.0.6",