Skip to content

Commit

Permalink
[6.x] Drop Laravel 10 Support (#11440)
Browse files Browse the repository at this point in the history
  • Loading branch information
duncanmcclean authored Feb 12, 2025
1 parent 30ed099 commit 091d935
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 101 deletions.
10 changes: 2 additions & 8 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,24 +16,18 @@ jobs:

strategy:
matrix:
php: [8.1, 8.2, 8.3, 8.4]
laravel: [10.*, 11.*]
php: [8.2, 8.3, 8.4]
laravel: [11.*]
stability: [prefer-lowest, prefer-stable]
os: [ubuntu-latest]
include:
- os: windows-latest
php: 8.3
laravel: 10.*
stability: prefer-stable
- os: windows-latest
php: 8.3
laravel: 11.*
stability: prefer-stable
exclude:
- php: 8.1
laravel: 11.*
- php: 8.4
laravel: 10.*

name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.stability }} - ${{ matrix.os }}

Expand Down
12 changes: 6 additions & 6 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
"composer/semver": "^3.4",
"guzzlehttp/guzzle": "^6.3 || ^7.0",
"james-heinrich/getid3": "^1.9.21",
"laravel/framework": "^10.40 || ^11.34",
"laravel/prompts": "^0.1.16 || ^0.2.0 || ^0.3.0",
"laravel/framework": "^11.34",
"laravel/prompts": "^0.3.0",
"league/commonmark": "^2.2",
"league/csv": "^9.0",
"league/glide": "^2.3",
Expand All @@ -29,9 +29,9 @@
"spatie/ignition": "^1.15",
"statamic/stringy": "^3.1.2",
"stillat/blade-parser": "^1.10.1",
"symfony/lock": "^6.4",
"symfony/var-exporter": "^6.0",
"symfony/yaml": "^6.0 || ^7.0",
"symfony/lock": "^7.0.3",
"symfony/var-exporter": "^7.0.3",
"symfony/yaml": "^7.0.3",
"ueberdosis/tiptap-php": "^1.4",
"voku/portable-ascii": "^2.0.2",
"wilderborn/partyline": "^1.0"
Expand All @@ -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",
"phpunit/phpunit": "^10.5.35",
"spatie/laravel-ray": "^1.37"
},
Expand Down
31 changes: 0 additions & 31 deletions src/Console/Commands/InstallCollaboration.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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.');

Expand All @@ -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.');
}
Expand Down Expand Up @@ -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())) {
Expand Down
53 changes: 0 additions & 53 deletions src/Console/Please/please-l10.stub

This file was deleted.

4 changes: 1 addition & 3 deletions src/Providers/ConsoleServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -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');
}
}

0 comments on commit 091d935

Please sign in to comment.