Skip to content

Commit

Permalink
Solutions refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
rubenvanassche committed Jun 12, 2024
1 parent 9c60d92 commit 11e4d77
Show file tree
Hide file tree
Showing 80 changed files with 26 additions and 2,915 deletions.
5 changes: 3 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,9 @@
"ext-json": "*",
"ext-mbstring": "*",
"illuminate/support": "^10.0|^11.0",
"spatie/flare-client-php": "^1.5",
"spatie/ignition": "^1.14",
"spatie/error-solutions": "dev-main",
"spatie/flare-client-php" : "dev-solutions-refactor",
"spatie/ignition": "dev-solutions-refactor",
"symfony/console": "^6.2.3|^7.0",
"symfony/var-dumper": "^6.2.3|^7.0"
},
Expand Down
5 changes: 0 additions & 5 deletions phpstan-baseline.neon
Original file line number Diff line number Diff line change
Expand Up @@ -85,11 +85,6 @@ parameters:
count: 1
path: src/Solutions/SolutionProviders/UnknownValidationSolutionProvider.php

-
message: "#^Parameter \\#1 \\$missingView of method Spatie\\\\LaravelIgnition\\\\Solutions\\\\SolutionProviders\\\\ViewNotFoundSolutionProvider\\:\\:findRelatedView\\(\\) expects string, string\\|null given\\.$#"
count: 1
path: src/Solutions/SolutionProviders/ViewNotFoundSolutionProvider.php

-
message: "#^Argument of an invalid type array\\|DateTimeImmutable\\|int\\|string\\|null supplied for foreach, only iterables are supported\\.$#"
count: 1
Expand Down
2 changes: 1 addition & 1 deletion src/Commands/stubs/runnable-solution.stub
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace DummyNamespace;

use Spatie\Ignition\Contracts\RunnableSolution;
use Spatie\ErrorSolutions\Contracts\RunnableSolution;

class DummyClass implements RunnableSolution
{
Expand Down
2 changes: 1 addition & 1 deletion src/Commands/stubs/solution-provider.stub
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace DummyNamespace;

use Spatie\Ignition\Contracts\HasSolutionsForThrowable;
use Spatie\ErrorSolutions\Contracts\HasSolutionsForThrowable;
use Throwable;

class DummyClass implements HasSolutionsForThrowable
Expand Down
2 changes: 1 addition & 1 deletion src/Commands/stubs/solution.stub
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace DummyNamespace;

use Spatie\Ignition\Contracts\Solution;
use Spatie\ErrorSolutions\Contracts\Solution;

class DummyClass implements Solution
{
Expand Down
6 changes: 3 additions & 3 deletions src/Exceptions/CannotExecuteSolutionForNonLocalIp.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

namespace Spatie\LaravelIgnition\Exceptions;

use Spatie\Ignition\Contracts\BaseSolution;
use Spatie\Ignition\Contracts\ProvidesSolution;
use Spatie\Ignition\Contracts\Solution;
use Spatie\ErrorSolutions\Contracts\BaseSolution;
use Spatie\ErrorSolutions\Contracts\ProvidesSolution;
use Spatie\ErrorSolutions\Contracts\Solution;
use Symfony\Component\HttpKernel\Exception\HttpException;

class CannotExecuteSolutionForNonLocalIp extends HttpException implements ProvidesSolution
Expand Down
6 changes: 3 additions & 3 deletions src/Exceptions/InvalidConfig.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@

use Exception;
use Monolog\Level;
use Spatie\Ignition\Contracts\BaseSolution;
use Spatie\Ignition\Contracts\ProvidesSolution;
use Spatie\Ignition\Contracts\Solution;
use Spatie\ErrorSolutions\Contracts\BaseSolution;
use Spatie\ErrorSolutions\Contracts\ProvidesSolution;
use Spatie\ErrorSolutions\Contracts\Solution;

class InvalidConfig extends Exception implements ProvidesSolution
{
Expand Down
4 changes: 2 additions & 2 deletions src/Exceptions/ViewExceptionWithSolution.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

namespace Spatie\LaravelIgnition\Exceptions;

use Spatie\Ignition\Contracts\ProvidesSolution;
use Spatie\Ignition\Contracts\Solution;
use Spatie\ErrorSolutions\Contracts\ProvidesSolution;
use Spatie\ErrorSolutions\Contracts\Solution;

class ViewExceptionWithSolution extends ViewException implements ProvidesSolution
{
Expand Down
2 changes: 1 addition & 1 deletion src/Http/Controllers/ExecuteSolutionController.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
namespace Spatie\LaravelIgnition\Http\Controllers;

use Illuminate\Foundation\Validation\ValidatesRequests;
use Spatie\Ignition\Contracts\SolutionProviderRepository;
use Spatie\ErrorSolutions\Contracts\SolutionProviderRepository;
use Spatie\LaravelIgnition\Exceptions\CannotExecuteSolutionForNonLocalIp;
use Spatie\LaravelIgnition\Http\Requests\ExecuteSolutionRequest;
use Spatie\LaravelIgnition\Support\RunnableSolutionsGuard;
Expand Down
6 changes: 3 additions & 3 deletions src/Http/Requests/ExecuteSolutionRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
namespace Spatie\LaravelIgnition\Http\Requests;

use Illuminate\Foundation\Http\FormRequest;
use Spatie\Ignition\Contracts\RunnableSolution;
use Spatie\Ignition\Contracts\Solution;
use Spatie\Ignition\Contracts\SolutionProviderRepository;
use Spatie\ErrorSolutions\Contracts\RunnableSolution;
use Spatie\ErrorSolutions\Contracts\Solution;
use Spatie\ErrorSolutions\Contracts\SolutionProviderRepository;

class ExecuteSolutionRequest extends FormRequest
{
Expand Down
4 changes: 2 additions & 2 deletions src/IgnitionServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
use Spatie\Ignition\Config\FileConfigManager;
use Spatie\Ignition\Config\IgnitionConfig;
use Spatie\Ignition\Contracts\ConfigManager;
use Spatie\Ignition\Contracts\SolutionProviderRepository as SolutionProviderRepositoryContract;
use Spatie\ErrorSolutions\Contracts\SolutionProviderRepository as SolutionProviderRepositoryContract;
use Spatie\Ignition\Ignition;
use Spatie\LaravelIgnition\Commands\SolutionMakeCommand;
use Spatie\LaravelIgnition\Commands\SolutionProviderMakeCommand;
Expand All @@ -34,7 +34,7 @@
use Spatie\LaravelIgnition\Recorders\LogRecorder\LogRecorder;
use Spatie\LaravelIgnition\Recorders\QueryRecorder\QueryRecorder;
use Spatie\LaravelIgnition\Renderers\IgnitionExceptionRenderer;
use Spatie\LaravelIgnition\Solutions\SolutionProviders\SolutionProviderRepository;
use Spatie\ErrorSolutions\SolutionProviderRepository;
use Spatie\LaravelIgnition\Support\FlareLogHandler;
use Spatie\LaravelIgnition\Support\SentReports;
use Spatie\LaravelIgnition\Views\ViewExceptionMapper;
Expand Down
2 changes: 1 addition & 1 deletion src/Renderers/ErrorPageRenderer.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

use Spatie\FlareClient\Flare;
use Spatie\Ignition\Config\IgnitionConfig;
use Spatie\Ignition\Contracts\SolutionProviderRepository;
use Spatie\ErrorSolutions\Contracts\SolutionProviderRepository;
use Spatie\Ignition\Ignition;
use Spatie\LaravelIgnition\ContextProviders\LaravelContextProviderDetector;
use Spatie\LaravelIgnition\Solutions\SolutionTransformers\LaravelSolutionTransformer;
Expand Down
46 changes: 0 additions & 46 deletions src/Solutions/GenerateAppKeySolution.php

This file was deleted.

53 changes: 0 additions & 53 deletions src/Solutions/LivewireDiscoverSolution.php

This file was deleted.

142 changes: 0 additions & 142 deletions src/Solutions/MakeViewVariableOptionalSolution.php

This file was deleted.

Loading

0 comments on commit 11e4d77

Please sign in to comment.