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

Solutions refactor #202

Merged
merged 4 commits into from
Jun 12, 2024
Merged
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
3 changes: 1 addition & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,7 @@
"ext-json": "*",
"ext-mbstring": "*",
"illuminate/support": "^10.0|^11.0",
"spatie/flare-client-php": "^1.5",
"spatie/ignition": "^1.14",
"spatie/ignition": "^1.15",
"symfony/console": "^6.2.3|^7.0",
"symfony/var-dumper": "^6.2.3|^7.0"
},
Expand Down
45 changes: 0 additions & 45 deletions phpstan-baseline.neon
Original file line number Diff line number Diff line change
Expand Up @@ -45,51 +45,6 @@ parameters:
count: 1
path: src/Exceptions/InvalidConfig.php

-
message: "#^Class Livewire\\\\LivewireComponentsFinder not found\\.$#"
count: 1
path: src/Solutions/LivewireDiscoverSolution.php

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

-
message: "#^Unable to resolve the template type TKey in call to function collect$#"
count: 1
path: src/Solutions/SolutionProviders/InvalidRouteActionSolutionProvider.php

-
message: "#^Unable to resolve the template type TValue in call to function collect$#"
count: 1
path: src/Solutions/SolutionProviders/InvalidRouteActionSolutionProvider.php

-
message: "#^Method Spatie\\\\LaravelIgnition\\\\Solutions\\\\SolutionProviders\\\\UnknownValidationSolutionProvider\\:\\:getAvailableMethods\\(\\) return type with generic class Illuminate\\\\Support\\\\Collection does not specify its types\\: TKey, TValue$#"
count: 1
path: src/Solutions/SolutionProviders/UnknownValidationSolutionProvider.php

-
message: "#^Parameter \\#1 \\$callback of method Illuminate\\\\Support\\\\Collection\\<int,ReflectionMethod\\>\\:\\:filter\\(\\) expects \\(callable\\(ReflectionMethod, int\\)\\: bool\\)\\|null, Closure\\(ReflectionMethod\\)\\: \\(0\\|1\\|false\\) given\\.$#"
count: 1
path: src/Solutions/SolutionProviders/UnknownValidationSolutionProvider.php

-
message: "#^Unable to resolve the template type TMakeKey in call to method static method Illuminate\\\\Support\\\\Collection\\<\\(int\\|string\\),mixed\\>\\:\\:make\\(\\)$#"
count: 1
path: src/Solutions/SolutionProviders/UnknownValidationSolutionProvider.php

-
message: "#^Unable to resolve the template type TMakeValue in call to method static method Illuminate\\\\Support\\\\Collection\\<\\(int\\|string\\),mixed\\>\\:\\:make\\(\\)$#"
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 @@ -14,12 +14,13 @@
use Laravel\Octane\Events\TickReceived;
use Monolog\Level;
use Monolog\Logger;
use Spatie\ErrorSolutions\Contracts\SolutionProviderRepository as SolutionProviderRepositoryContract;
use Spatie\ErrorSolutions\SolutionProviderRepository;
use Spatie\FlareClient\Flare;
use Spatie\FlareClient\FlareMiddleware\AddSolutions;
use Spatie\Ignition\Config\FileConfigManager;
use Spatie\Ignition\Config\IgnitionConfig;
use Spatie\Ignition\Contracts\ConfigManager;
use Spatie\Ignition\Contracts\SolutionProviderRepository as SolutionProviderRepositoryContract;
use Spatie\Ignition\Ignition;
use Spatie\LaravelIgnition\Commands\SolutionMakeCommand;
use Spatie\LaravelIgnition\Commands\SolutionProviderMakeCommand;
Expand All @@ -34,7 +35,6 @@
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\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 @@ -2,9 +2,9 @@

namespace Spatie\LaravelIgnition\Renderers;

use Spatie\ErrorSolutions\Contracts\SolutionProviderRepository;
use Spatie\FlareClient\Flare;
use Spatie\Ignition\Config\IgnitionConfig;
use Spatie\Ignition\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.

Loading
Loading