diff --git a/composer.json b/composer.json index 295e84e642..f66609cbd7 100644 --- a/composer.json +++ b/composer.json @@ -12,7 +12,7 @@ "composer/composer": "^1.7", "facade/ignition-contracts": "^1.0", "guzzlehttp/guzzle": "^6.3", - "laravel/framework": "5.6.* || 5.7.* || 5.8.* || ^6.0", + "laravel/framework": "5.6.* || 5.7.* || 5.8.* || ^6.0 || ^7.0", "laravel/helpers": "^1.1", "league/commonmark": "^1.3", "league/csv": "^9.0", @@ -32,7 +32,7 @@ "fzaninotto/faker": "~1.4", "google/cloud-translate": "^1.6", "mockery/mockery": "~1.0", - "nunomaduro/collision": "^3.0", + "nunomaduro/collision": "3.0 || ^4.1", "orchestra/testbench": "3.8 || 4.0" }, "config": { @@ -68,4 +68,4 @@ "Foo\\Bar\\": "tests/fixtures/Addon" } } -} +} \ No newline at end of file diff --git a/src/Exceptions/Handler.php b/src/Exceptions/Handler.php index a49b434db4..13d4cf0159 100755 --- a/src/Exceptions/Handler.php +++ b/src/Exceptions/Handler.php @@ -2,16 +2,16 @@ namespace Statamic\Exceptions; -use Exception; +use Throwable; use Statamic\Statamic; use Illuminate\Support\Facades\View; use App\Exceptions\Handler as ExceptionHandler; -use Symfony\Component\Debug\Exception\FlattenException; +use Symfony\Component\ErrorHandler\Exception\FlattenException; use Illuminate\Auth\Access\AuthorizationException as IlluminateAuthException; class Handler extends ExceptionHandler { - public function render($request, Exception $e) + public function render($request, Throwable $e) { if ($e instanceof NotFoundHttpException && Statamic::isApiRoute()) { return response()->json(['message' => $e->getMessage() ?: 'Not found.'], 404); @@ -27,11 +27,11 @@ public function render($request, Exception $e) /** * Render an exception to a string using Symfony. * - * @param \Exception $e + * @param Throwable $e * @param bool $debug * @return string */ - protected function renderExceptionWithSymfony(Exception $e, $debug) + protected function renderExceptionWithSymfony(Throwable $e, $debug) { return (new SymfonyExceptionHandler($debug))->getHtml( FlattenException::create($e) diff --git a/src/Http/Resources/API/AssetResource.php b/src/Http/Resources/API/AssetResource.php index 412bf76b22..d6ae1433d3 100644 --- a/src/Http/Resources/API/AssetResource.php +++ b/src/Http/Resources/API/AssetResource.php @@ -2,9 +2,9 @@ namespace Statamic\Http\Resources\API; -use Illuminate\Http\Resources\Json\Resource; +use Illuminate\Http\Resources\Json\JsonResource; -class AssetResource extends Resource +class AssetResource extends JsonResource { /** * Transform the resource into an array. diff --git a/src/Http/Resources/API/EntryResource.php b/src/Http/Resources/API/EntryResource.php index 45efc53013..a50fd5cc4f 100644 --- a/src/Http/Resources/API/EntryResource.php +++ b/src/Http/Resources/API/EntryResource.php @@ -2,9 +2,9 @@ namespace Statamic\Http\Resources\API; -use Illuminate\Http\Resources\Json\Resource; +use Illuminate\Http\Resources\Json\JsonResource; -class EntryResource extends Resource +class EntryResource extends JsonResource { /** * Transform the resource into an array. diff --git a/src/Http/Resources/API/GlobalSetResource.php b/src/Http/Resources/API/GlobalSetResource.php index 313726cee3..9ad8eb54b0 100644 --- a/src/Http/Resources/API/GlobalSetResource.php +++ b/src/Http/Resources/API/GlobalSetResource.php @@ -2,10 +2,10 @@ namespace Statamic\Http\Resources\API; -use Illuminate\Http\Resources\Json\Resource; use Statamic\Statamic; +use Illuminate\Http\Resources\Json\JsonResource; -class GlobalSetResource extends Resource +class GlobalSetResource extends JsonResource { /** * Transform the resource into an array. diff --git a/src/Http/Resources/API/TermResource.php b/src/Http/Resources/API/TermResource.php index adbdcc0bf8..85600c1ea4 100644 --- a/src/Http/Resources/API/TermResource.php +++ b/src/Http/Resources/API/TermResource.php @@ -2,9 +2,9 @@ namespace Statamic\Http\Resources\API; -use Illuminate\Http\Resources\Json\Resource; +use Illuminate\Http\Resources\Json\JsonResource; -class TermResource extends Resource +class TermResource extends JsonResource { /** * Transform the resource into an array. diff --git a/src/Http/Resources/API/UserResource.php b/src/Http/Resources/API/UserResource.php index 217bb3813d..c36e3f133a 100644 --- a/src/Http/Resources/API/UserResource.php +++ b/src/Http/Resources/API/UserResource.php @@ -2,10 +2,10 @@ namespace Statamic\Http\Resources\API; -use Illuminate\Http\Resources\Json\Resource; use Statamic\Statamic; +use Illuminate\Http\Resources\Json\JsonResource; -class UserResource extends Resource +class UserResource extends JsonResource { /** * Transform the resource into an array. diff --git a/src/Providers/ExtensionServiceProvider.php b/src/Providers/ExtensionServiceProvider.php index 1fb4f10c0a..154a950564 100644 --- a/src/Providers/ExtensionServiceProvider.php +++ b/src/Providers/ExtensionServiceProvider.php @@ -6,19 +6,14 @@ use Statamic\Actions; use Statamic\Fieldtypes; use Statamic\Query\Scopes; +use Statamic\Extend\Manifest; use Statamic\Modifiers\Modifier; -use Statamic\Extensions\FileStore; -use Statamic\Modifiers\CoreModifiers; use Illuminate\Filesystem\Filesystem; -use Illuminate\Support\Facades\Cache; +use Statamic\Modifiers\CoreModifiers; use Illuminate\Support\ServiceProvider; -use Statamic\Extend\Manifest; -use Illuminate\Console\DetectsApplicationNamespace; class ExtensionServiceProvider extends ServiceProvider { - use DetectsApplicationNamespace; - /** * Aliases for modifiers bundled with Statamic. *