Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[6.x] Laravel 12 #11391

Draft
wants to merge 9 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ jobs:

strategy:
matrix:
php: [8.1, 8.2, 8.3, 8.4]
laravel: [10.*, 11.*]
php: [8.2, 8.3, 8.4]
laravel: [11.*, 12.*]
stability: [prefer-lowest, prefer-stable]
os: [ubuntu-latest]
include:
Expand Down
17 changes: 12 additions & 5 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,21 +14,21 @@
"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 || ^12.0",
"laravel/prompts": "^0.1.16 || ^0.2.0 || ^0.3.0",
"league/commonmark": "^2.2",
"league/csv": "^9.0",
"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",
"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",
Expand All @@ -42,10 +42,16 @@
"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"
},
"repositories": [
{
"type": "vcs",
"url": "https://github.com/duncanmcclean/blade-parser.git"
}
],
"config": {
"optimize-autoloader": true,
"preferred-install": "dist",
Expand Down Expand Up @@ -90,5 +96,6 @@
"Tests\\": "tests",
"Foo\\Bar\\": "tests/Fixtures/Addon"
}
}
},
"minimum-stability": "dev"
}
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');
}
}
Loading