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

[5.x] Laravel 12 #11391

Closed
wants to merge 13 commits into from
Closed
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"
}
1 change: 0 additions & 1 deletion routes/cp.php
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,6 @@
Route::get('/', [FieldsController::class, 'index'])->name('fields.index');
Route::post('edit', [FieldsController::class, 'edit'])->name('fields.edit');
Route::post('update', [FieldsController::class, 'update'])->name('fields.update');
Route::get('field-meta', [MetaController::class, 'show']);
Route::post('field-meta', [MetaController::class, 'show']);
Route::delete('fieldsets/{fieldset}/reset', [FieldsetController::class, 'reset'])->name('fieldsets.reset');
Route::resource('fieldsets', FieldsetController::class)->except(['show']);
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
2 changes: 1 addition & 1 deletion src/Console/Commands/StaticClear.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public function handle()
if (! config('statamic.static_caching.strategy')) {
$this->components->error('Static caching is not enabled.');

return 0;
return 1;
}

spin(callback: fn () => StaticCache::flush(), message: 'Clearing the static page cache...');
Expand Down
53 changes: 0 additions & 53 deletions src/Console/Please/please-l10.stub

This file was deleted.

2 changes: 1 addition & 1 deletion src/Contracts/Assets/AssetContainer.php
Original file line number Diff line number Diff line change
Expand Up @@ -108,5 +108,5 @@ public function private();
* @param null|array $rules
* @return array
*/
// public function validationRules($rules = null);
public function validationRules($rules = null);
}
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<?php

namespace Statamic\Ignition\SolutionProviders;
namespace Statamic\ErrorSolutions\SolutionProviders;

use Spatie\ErrorSolutions\Contracts\HasSolutionsForThrowable;
use Statamic\Ignition\Solutions\EnableOAuth;
use Statamic\ErrorSolutions\Solutions\EnableOAuth;
use Throwable;

class OAuthDisabled implements HasSolutionsForThrowable
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<?php

namespace Statamic\Ignition\SolutionProviders;
namespace Statamic\ErrorSolutions\SolutionProviders;

use Spatie\ErrorSolutions\Contracts\HasSolutionsForThrowable;
use Statamic\Ignition\Solutions\UpdateClassReference;
use Statamic\ErrorSolutions\Solutions\UpdateClassReference;
use Statamic\Statamic;
use Statamic\Support\Arr;
use Throwable;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace Statamic\Ignition\Solutions;
namespace Statamic\ErrorSolutions\Solutions;

use Exception;
use Facades\Statamic\UpdateScripts\Manager as UpdateScriptManager;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace Statamic\Ignition\Solutions;
namespace Statamic\ErrorSolutions\Solutions;

use Spatie\ErrorSolutions\Contracts\Solution;
use Statamic\Statamic;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace Statamic\Ignition\Solutions;
namespace Statamic\ErrorSolutions\Solutions;

use Spatie\ErrorSolutions\Contracts\RunnableSolution;
use Statamic\Statamic;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace Statamic\Ignition\Solutions;
namespace Statamic\ErrorSolutions\Solutions;

use Spatie\ErrorSolutions\Contracts\Solution;

Expand Down
2 changes: 1 addition & 1 deletion src/Ignition/Value.php → src/ErrorSolutions/Value.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace Statamic\Ignition;
namespace Statamic\ErrorSolutions;

use Statamic\Fields\Value as FieldValue;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
use Exception;
use Spatie\ErrorSolutions\Contracts\ProvidesSolution;
use Spatie\ErrorSolutions\Contracts\Solution;
use Statamic\Ignition\Solutions\EnableComposerUpdateScripts;
use Statamic\ErrorSolutions\Solutions\EnableComposerUpdateScripts;

class ComposerJsonMissingPreUpdateCmdException extends Exception implements ProvidesSolution
{
Expand Down
2 changes: 1 addition & 1 deletion src/Exceptions/StatamicProRequiredException.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
use Exception;
use Spatie\ErrorSolutions\Contracts\ProvidesSolution;
use Spatie\ErrorSolutions\Contracts\Solution;
use Statamic\Ignition\Solutions\EnableStatamicPro;
use Statamic\ErrorSolutions\Solutions\EnableStatamicPro;

class StatamicProRequiredException extends Exception implements ProvidesSolution
{
Expand Down
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');
}
}
4 changes: 2 additions & 2 deletions src/Providers/IgnitionServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
use Illuminate\Contracts\Container\BindingResolutionException;
use Illuminate\Support\ServiceProvider;
use Spatie\ErrorSolutions\Contracts\SolutionProviderRepository;
use Statamic\Ignition\SolutionProviders\OAuthDisabled;
use Statamic\Ignition\SolutionProviders\UsingOldClass;
use Statamic\ErrorSolutions\SolutionProviders\OAuthDisabled;
use Statamic\ErrorSolutions\SolutionProviders\UsingOldClass;

class IgnitionServiceProvider extends ServiceProvider
{
Expand Down
Loading