Awesome Set of Packages for Laravel

Overview

Awesome Set of Packages for Laravel

The set provides best practices to make development more fun and classes/services that I found very useful while working on big extensible applications.

Requirements

Package Version
PHP ^8.0.0
Laravel ^8.22.1, ^9.0.0

Installation

# Everything
composer require lastdragon-ru/lara-asp

# Specific package (where "core" the package name)
composer require lastdragon-ru/lara-asp-core

Packages

The Core

This package contains useful utilities and classes.

Read more.

GraphQL

This package provides highly powerful @searchBy and @sortBy directives for lighthouse-php. The @searchBy directive provides basic conditions like =, >, <, etc, relations, not (<condition>), enums, and custom operators support. All are strictly typed so you no need to use Mixed type anymore. The @sortBy is not only about standard sorting by columns but also allows use relations. 😎

Read more.

The Migrator

This package improves standard laravel migrations to add support for raw SQL files during migration and seeding. So you can easily use your favorite visual tool for database development like MySQL Workbench with Laravel 🥳

Read more.

Queue Helpers

This package provides additional capabilities for queued jobs and queued listeners like multilevel configuration support, job overriding (very useful for package development to provide base implementation and allow the application to extend it), easy define for cron jobs, and DI in constructor support.

Read more.

Eloquent Helpers

This package contains useful extensions and mixins for Eloquent.

Read more.

The Formatter

This package provides a customizable wrapper around Intl formatters.

Read more.

Testing Helpers

This package provides various useful asserts for PHPUnit and alternative solution for HTTP tests - testing HTTP response has never been so easy! And this not only about TestResponse but any PSR response 😎

Read more.

Comments
  • Run filters programmaticaly

    Run filters programmaticaly

    In version before 1.0.0 I had trait:

    <?php
    
    declare(strict_types=1);
    
    namespace Core\Abilities;
    
    use Illuminate\Contracts\Container\Container;
    use Illuminate\Database\Eloquent\Builder as EloquentBuilder;
    use Illuminate\Database\Eloquent\Model;
    use Illuminate\Database\Query\Builder as QueryBuilder;
    use Illuminate\Support\Collection;
    use LastDragon_ru\LaraASP\GraphQL\SearchBy\SearchBuilder;
    
    trait Filterable
    {
        private Container $operatorsContainer;
    
        /**
         * @param EloquentBuilder<Model>|QueryBuilder $query
         * @param array<mixed> $filters
         * @return EloquentBuilder<Model>|QueryBuilder
         */
        public function scopeFilter(EloquentBuilder|QueryBuilder $query, array $filters): EloquentBuilder|QueryBuilder
        {
            $this->operatorsContainer = app(Container::class);
            $operators = (new Collection([
                0 => \LastDragon_ru\LaraASP\GraphQL\SearchBy\Operators\Logical\AllOf::class,
                1 => \LastDragon_ru\LaraASP\GraphQL\SearchBy\Operators\Logical\AnyOf::class,
                2 => \LastDragon_ru\LaraASP\GraphQL\SearchBy\Operators\Logical\Not::class,
                3 => \LastDragon_ru\LaraASP\GraphQL\SearchBy\Operators\Complex\Relation::class,
                4 => \LastDragon_ru\LaraASP\GraphQL\SearchBy\Operators\Comparison\Equal::class,
                5 => \LastDragon_ru\LaraASP\GraphQL\SearchBy\Operators\Comparison\NotEqual::class,
                6 => \LastDragon_ru\LaraASP\GraphQL\SearchBy\Operators\Comparison\In::class,
                7 => \LastDragon_ru\LaraASP\GraphQL\SearchBy\Operators\Comparison\NotIn::class,
                8 => \LastDragon_ru\LaraASP\GraphQL\SearchBy\Operators\Comparison\IsNull::class,
                9 => \LastDragon_ru\LaraASP\GraphQL\SearchBy\Operators\Comparison\IsNotNull::class,
                10 => \LastDragon_ru\LaraASP\GraphQL\SearchBy\Operators\Comparison\Like::class,
                11 => \LastDragon_ru\LaraASP\GraphQL\SearchBy\Operators\Comparison\NotLike::class,
                12 => \LastDragon_ru\LaraASP\GraphQL\SearchBy\Operators\Comparison\Contains::class,
                13 => \LastDragon_ru\LaraASP\GraphQL\SearchBy\Operators\Comparison\StartsWith::class,
                14 => \LastDragon_ru\LaraASP\GraphQL\SearchBy\Operators\Comparison\EndsWith::class,
                15 => \LastDragon_ru\LaraASP\GraphQL\SearchBy\Operators\Comparison\LessThan::class,
                16 => \LastDragon_ru\LaraASP\GraphQL\SearchBy\Operators\Comparison\LessThanOrEqual::class,
                17 => \LastDragon_ru\LaraASP\GraphQL\SearchBy\Operators\Comparison\GreaterThan::class,
                18 => \LastDragon_ru\LaraASP\GraphQL\SearchBy\Operators\Comparison\GreaterThanOrEqual::class,
                19 => \LastDragon_ru\LaraASP\GraphQL\SearchBy\Operators\Comparison\Between::class,
                20 => \LastDragon_ru\LaraASP\GraphQL\SearchBy\Operators\Comparison\NotBetween::class,
            ]))
                ->map(
                    function (
                        string $operator
                    ): \LastDragon_ru\LaraASP\GraphQL\SearchBy\Contracts\ComparisonOperator|\LastDragon_ru\LaraASP\GraphQL\SearchBy\Contracts\ComplexOperator|\LastDragon_ru\LaraASP\GraphQL\SearchBy\Contracts\LogicalOperator {
                        return $this->operatorsContainer->make($operator);
                    }
                )
                ->all();
    
            return (new SearchBuilder($operators))->build($query, $filters);
        }
    }
    

    which allows me to run filters on models like this:

    User::filter([
        'anyOf' => [
            [
                'allOf' => [
                    [
                        'anyOf' => [
                            [
                                'email' => [
                                    'like' => "%gmail%"
                                ]
                            ],
                            [
                                'email' => [
                                    'like' => "%live%"
                                ]
                            ]
                        ]
                    ],
                ]
            ]
        ]
    ]);
    

    On version 1.0.0, filter mechanism was rewritten, and code stops work. Is there a possibility to run filters programmaticaly? I know it is "side functionality", but it is very helpful to store filters in database as JSON.

    opened by webard 5
  • `@searchBy` stop working on Octane and `LIGHTHOUSE_CACHE=false`

    `@searchBy` stop working on Octane and `LIGHTHOUSE_CACHE=false`

    Hi,

    on Laravel Octane with Swoole, and when LIGHTHOUSE_CACHE is set to false, after second request there is a bug:

    
      "errors": [
        {
          "debugMessage": "LastDragon_ru\\LaraASP\\GraphQL\\Builder\\Directives\\HandlerDirective::handle(): Argument #3 ($conditions) must be of type Nuwave\\Lighthouse\\Execution\\Arguments\\ArgumentSet, array given, called in /var/www/html/vendor/lastdragon-ru/lara-asp-graphql/src/Builder/Directives/HandlerDirective.php on line 61",
          "message": "Internal server error",
          "extensions": {
            "category": "internal"
          },
          "locations": [
            {
              "line": 2,
              "column": 3
            }
          ],
          "path": [
            "users"
          ],
          "trace": [
            {
              "file": "/var/www/html/vendor/lastdragon-ru/lara-asp-graphql/src/Builder/Directives/HandlerDirective.php",
              "line": 61,
              "call": "LastDragon_ru\\LaraASP\\GraphQL\\Builder\\Directives\\HandlerDirective::handle()"
            },
            {
              "file": "/var/www/html/vendor/lastdragon-ru/lara-asp-graphql/src/SearchBy/Directives/Directive.php",
              "line": 54,
              "call": "LastDragon_ru\\LaraASP\\GraphQL\\Builder\\Directives\\HandlerDirective::handleAnyBuilder()"
            },
            {
              "file": "/var/www/html/vendor/nuwave/lighthouse/src/Execution/Arguments/ArgumentSet.php",
              "line": 129,
              "call": "LastDragon_ru\\LaraASP\\GraphQL\\SearchBy\\Directives\\Directive::handleBuilder()"
            },
            {
              "file": "/var/www/html/vendor/laravel/framework/src/Illuminate/Collections/Traits/EnumeratesValues.php",
              "line": 262,
              "call": "Nuwave\\Lighthouse\\Execution\\Arguments\\ArgumentSet::Nuwave\\Lighthouse\\Execution\\Arguments\\{closure}()"
            },
            {
              "file": "/var/www/html/vendor/nuwave/lighthouse/src/Execution/Arguments/ArgumentSet.php",
              "line": 130,
              "call": "Illuminate\\Support\\Collection::each()"
            },
            {
              "file": "/var/www/html/vendor/nuwave/lighthouse/src/Execution/Arguments/ArgumentSet.php",
              "line": 88,
              "call": "Nuwave\\Lighthouse\\Execution\\Arguments\\ArgumentSet::applyArgBuilderDirectives()"
            },
            {
              "file": "/var/www/html/vendor/nuwave/lighthouse/src/Pagination/PaginateDirective.php",
              "line": 129,
              "call": "Nuwave\\Lighthouse\\Execution\\Arguments\\ArgumentSet::enhanceBuilder()"
            },
            {
              "file": "/var/www/html/vendor/nuwave/lighthouse/src/Auth/CanDirective.php",
              "line": 151,
              "call": "Nuwave\\Lighthouse\\Pagination\\PaginateDirective::Nuwave\\Lighthouse\\Pagination\\{closure}()"
            },
            {
              "file": "/var/www/html/vendor/nuwave/lighthouse/src/Auth/GuardDirective.php",
              "line": 68,
              "call": "Nuwave\\Lighthouse\\Auth\\CanDirective::Nuwave\\Lighthouse\\Auth\\{closure}()"
            },
            {
              "file": "/var/www/html/vendor/nuwave/lighthouse/src/Schema/Directives/ConvertEmptyStringsToNullDirective.php",
              "line": 48,
              "call": "Nuwave\\Lighthouse\\Auth\\GuardDirective::Nuwave\\Lighthouse\\Auth\\{closure}()"
            },
            {
              "file": "/var/www/html/vendor/nuwave/lighthouse/src/Schema/Directives/DropArgsDirective.php",
              "line": 35,
              "call": "Nuwave\\Lighthouse\\Schema\\Directives\\ConvertEmptyStringsToNullDirective::Nuwave\\Lighthouse\\Schema\\Directives\\{closure}()"
            },
            {
              "file": "/var/www/html/vendor/nuwave/lighthouse/src/Schema/Directives/RenameArgsDirective.php",
              "line": 35,
              "call": "Nuwave\\Lighthouse\\Schema\\Directives\\DropArgsDirective::Nuwave\\Lighthouse\\Schema\\Directives\\{closure}()"
            },
            {
              "file": "/var/www/html/vendor/nuwave/lighthouse/src/Schema/Directives/SpreadDirective.php",
              "line": 34,
              "call": "Nuwave\\Lighthouse\\Schema\\Directives\\RenameArgsDirective::Nuwave\\Lighthouse\\Schema\\Directives\\{closure}()"
            },
            {
              "file": "/var/www/html/vendor/nuwave/lighthouse/src/Schema/Directives/ArgTraversalDirective.php",
              "line": 27,
              "call": "Nuwave\\Lighthouse\\Schema\\Directives\\SpreadDirective::Nuwave\\Lighthouse\\Schema\\Directives\\{closure}()"
            },
            {
              "file": "/var/www/html/vendor/nuwave/lighthouse/src/Validation/ValidateDirective.php",
              "line": 50,
              "call": "Nuwave\\Lighthouse\\Schema\\Directives\\ArgTraversalDirective::Nuwave\\Lighthouse\\Schema\\Directives\\{closure}()"
            },
            {
              "file": "/var/www/html/vendor/nuwave/lighthouse/src/Schema/Directives/ArgTraversalDirective.php",
              "line": 27,
              "call": "Nuwave\\Lighthouse\\Validation\\ValidateDirective::Nuwave\\Lighthouse\\Validation\\{closure}()"
            },
            {
              "file": "/var/www/html/vendor/nuwave/lighthouse/src/Schema/Directives/TrimDirective.php",
              "line": 54,
              "call": "Nuwave\\Lighthouse\\Schema\\Directives\\ArgTraversalDirective::Nuwave\\Lighthouse\\Schema\\Directives\\{closure}()"
            },
            {
              "file": "/var/www/html/vendor/nuwave/lighthouse/src/Schema/Factories/FieldFactory.php",
              "line": 97,
              "call": "Nuwave\\Lighthouse\\Schema\\Directives\\TrimDirective::Nuwave\\Lighthouse\\Schema\\Directives\\{closure}()"
            },
            {
              "file": "/var/www/html/vendor/webonyx/graphql-php/src/Executor/ReferenceExecutor.php",
              "line": 623,
              "call": "Nuwave\\Lighthouse\\Schema\\Factories\\FieldFactory::Nuwave\\Lighthouse\\Schema\\Factories\\{closure}()"
            },
            {
              "file": "/var/www/html/vendor/webonyx/graphql-php/src/Executor/ReferenceExecutor.php",
              "line": 550,
              "call": "GraphQL\\Executor\\ReferenceExecutor::resolveFieldValueOrError()"
            },
            {
              "file": "/var/www/html/vendor/webonyx/graphql-php/src/Executor/ReferenceExecutor.php",
              "line": 1195,
              "call": "GraphQL\\Executor\\ReferenceExecutor::resolveField()"
            },
            {
              "file": "/var/www/html/vendor/webonyx/graphql-php/src/Executor/ReferenceExecutor.php",
              "line": 264,
              "call": "GraphQL\\Executor\\ReferenceExecutor::executeFields()"
            },
            {
              "file": "/var/www/html/vendor/webonyx/graphql-php/src/Executor/ReferenceExecutor.php",
              "line": 215,
              "call": "GraphQL\\Executor\\ReferenceExecutor::executeOperation()"
            },
            {
              "file": "/var/www/html/vendor/webonyx/graphql-php/src/Executor/Executor.php",
              "line": 156,
              "call": "GraphQL\\Executor\\ReferenceExecutor::doExecute()"
            },
            {
              "file": "/var/www/html/vendor/webonyx/graphql-php/src/GraphQL.php",
              "line": 162,
              "call": "GraphQL\\Executor\\Executor::promiseToExecute()"
            },
            {
              "file": "/var/www/html/vendor/webonyx/graphql-php/src/GraphQL.php",
              "line": 94,
              "call": "GraphQL\\GraphQL::promiseToExecute()"
            },
            {
              "file": "/var/www/html/vendor/nuwave/lighthouse/src/GraphQL.php",
              "line": 268,
              "call": "GraphQL\\GraphQL::executeQuery()"
            },
            {
              "file": "/var/www/html/vendor/nuwave/lighthouse/src/GraphQL.php",
              "line": 203,
              "call": "Nuwave\\Lighthouse\\GraphQL::executeParsedQuery()"
            },
            {
              "file": "/var/www/html/vendor/nuwave/lighthouse/src/GraphQL.php",
              "line": 162,
              "call": "Nuwave\\Lighthouse\\GraphQL::parseAndExecuteQuery()"
            },
            {
              "file": "/var/www/html/vendor/nuwave/lighthouse/src/GraphQL.php",
              "line": 121,
              "call": "Nuwave\\Lighthouse\\GraphQL::executeOperation()"
            },
            {
              "file": "/var/www/html/vendor/nuwave/lighthouse/src/Support/Utils.php",
              "line": 99,
              "call": "Nuwave\\Lighthouse\\GraphQL::Nuwave\\Lighthouse\\{closure}()"
            },
            {
              "file": "/var/www/html/vendor/nuwave/lighthouse/src/GraphQL.php",
              "line": 120,
              "call": "Nuwave\\Lighthouse\\Support\\Utils::mapEach()"
            },
            {
              "file": "/var/www/html/vendor/nuwave/lighthouse/src/Support/Http/Controllers/GraphQLController.php",
              "line": 32,
              "call": "Nuwave\\Lighthouse\\GraphQL::executeOperationOrOperations()"
            },
            {
              "file": "/var/www/html/vendor/laravel/framework/src/Illuminate/Routing/ControllerDispatcher.php",
              "line": 48,
              "call": "Nuwave\\Lighthouse\\Support\\Http\\Controllers\\GraphQLController::__invoke()"
            },
            {
              "file": "/var/www/html/vendor/laravel/framework/src/Illuminate/Routing/Route.php",
              "line": 261,
              "call": "Illuminate\\Routing\\ControllerDispatcher::dispatch()"
            },
            {
              "file": "/var/www/html/vendor/laravel/framework/src/Illuminate/Routing/Route.php",
              "line": 204,
              "call": "Illuminate\\Routing\\Route::runController()"
            },
            {
              "file": "/var/www/html/vendor/laravel/framework/src/Illuminate/Routing/Router.php",
              "line": 725,
              "call": "Illuminate\\Routing\\Route::run()"
            },
            {
              "file": "/var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
              "line": 141,
              "call": "Illuminate\\Routing\\Router::Illuminate\\Routing\\{closure}()"
            },
            {
              "file": "/var/www/html/src/Core/GraphQL/Middleware/LogQueryComplexity.php",
              "line": 30,
              "call": "Illuminate\\Pipeline\\Pipeline::Illuminate\\Pipeline\\{closure}()"
            },
            {
              "file": "/var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
              "line": 180,
              "call": "Core\\GraphQL\\Middleware\\LogQueryComplexity::handle()"
            },
            {
              "file": "/var/www/html/vendor/inspector-apm/inspector-laravel/src/Middleware/WebRequestMonitoring.php",
              "line": 35,
              "call": "Illuminate\\Pipeline\\Pipeline::Illuminate\\Pipeline\\{closure}()"
            },
            {
              "file": "/var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
              "line": 180,
              "call": "Inspector\\Laravel\\Middleware\\WebRequestMonitoring::handle()"
            },
            {
              "file": "/var/www/html/vendor/nuwave/lighthouse/src/Support/Http/Middleware/EnsureXHR.php",
              "line": 55,
              "call": "Illuminate\\Pipeline\\Pipeline::Illuminate\\Pipeline\\{closure}()"
            },
            {
              "file": "/var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
              "line": 180,
              "call": "Nuwave\\Lighthouse\\Support\\Http\\Middleware\\EnsureXHR::handle()"
            },
            {
              "file": "/var/www/html/vendor/nuwave/lighthouse/src/Support/Http/Middleware/AttemptAuthentication.php",
              "line": 34,
              "call": "Illuminate\\Pipeline\\Pipeline::Illuminate\\Pipeline\\{closure}()"
            },
            {
              "file": "/var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
              "line": 180,
              "call": "Nuwave\\Lighthouse\\Support\\Http\\Middleware\\AttemptAuthentication::handle()"
            },
            {
              "file": "/var/www/html/vendor/nuwave/lighthouse/src/Support/Http/Middleware/AcceptJson.php",
              "line": 27,
              "call": "Illuminate\\Pipeline\\Pipeline::Illuminate\\Pipeline\\{closure}()"
            },
            {
              "file": "/var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
              "line": 180,
              "call": "Nuwave\\Lighthouse\\Support\\Http\\Middleware\\AcceptJson::handle()"
            },
            {
              "file": "/var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
              "line": 116,
              "call": "Illuminate\\Pipeline\\Pipeline::Illuminate\\Pipeline\\{closure}()"
            },
            {
              "file": "/var/www/html/vendor/laravel/framework/src/Illuminate/Routing/Router.php",
              "line": 726,
              "call": "Illuminate\\Pipeline\\Pipeline::then()"
            },
            {
              "file": "/var/www/html/vendor/laravel/framework/src/Illuminate/Routing/Router.php",
              "line": 703,
              "call": "Illuminate\\Routing\\Router::runRouteWithinStack()"
            },
            {
              "file": "/var/www/html/vendor/laravel/framework/src/Illuminate/Routing/Router.php",
              "line": 667,
              "call": "Illuminate\\Routing\\Router::runRoute()"
            },
            {
              "file": "/var/www/html/vendor/laravel/framework/src/Illuminate/Routing/Router.php",
              "line": 656,
              "call": "Illuminate\\Routing\\Router::dispatchToRoute()"
            },
            {
              "file": "/var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php",
              "line": 167,
              "call": "Illuminate\\Routing\\Router::dispatch()"
            },
            {
              "file": "/var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
              "line": 141,
              "call": "Illuminate\\Foundation\\Http\\Kernel::Illuminate\\Foundation\\Http\\{closure}()"
            },
            {
              "file": "/var/www/html/vendor/sentry/sentry-laravel/src/Sentry/Laravel/Http/SetRequestIpMiddleware.php",
              "line": 45,
              "call": "Illuminate\\Pipeline\\Pipeline::Illuminate\\Pipeline\\{closure}()"
            },
            {
              "file": "/var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
              "line": 180,
              "call": "Sentry\\Laravel\\Http\\SetRequestIpMiddleware::handle()"
            },
            {
              "file": "/var/www/html/vendor/sentry/sentry-laravel/src/Sentry/Laravel/Http/SetRequestMiddleware.php",
              "line": 42,
              "call": "Illuminate\\Pipeline\\Pipeline::Illuminate\\Pipeline\\{closure}()"
            },
            {
              "file": "/var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
              "line": 180,
              "call": "Sentry\\Laravel\\Http\\SetRequestMiddleware::handle()"
            },
            {
              "file": "/var/www/html/src/Core/Http/Middleware/ServerTimingMiddleware.php",
              "line": 44,
              "call": "Illuminate\\Pipeline\\Pipeline::Illuminate\\Pipeline\\{closure}()"
            },
            {
              "file": "/var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
              "line": 180,
              "call": "Core\\Http\\Middleware\\ServerTimingMiddleware::handle()"
            },
            {
              "file": "/var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php",
              "line": 21,
              "call": "Illuminate\\Pipeline\\Pipeline::Illuminate\\Pipeline\\{closure}()"
            },
            {
              "file": "/var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/ConvertEmptyStringsToNull.php",
              "line": 31,
              "call": "Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest::handle()"
            },
            {
              "file": "/var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
              "line": 180,
              "call": "Illuminate\\Foundation\\Http\\Middleware\\ConvertEmptyStringsToNull::handle()"
            },
            {
              "file": "/var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php",
              "line": 21,
              "call": "Illuminate\\Pipeline\\Pipeline::Illuminate\\Pipeline\\{closure}()"
            },
            {
              "file": "/var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TrimStrings.php",
              "line": 40,
              "call": "Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest::handle()"
            },
            {
              "file": "/var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
              "line": 180,
              "call": "Illuminate\\Foundation\\Http\\Middleware\\TrimStrings::handle()"
            },
            {
              "file": "/var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/ValidatePostSize.php",
              "line": 27,
              "call": "Illuminate\\Pipeline\\Pipeline::Illuminate\\Pipeline\\{closure}()"
            },
            {
              "file": "/var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
              "line": 180,
              "call": "Illuminate\\Foundation\\Http\\Middleware\\ValidatePostSize::handle()"
            },
            {
              "file": "/var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/PreventRequestsDuringMaintenance.php",
              "line": 86,
              "call": "Illuminate\\Pipeline\\Pipeline::Illuminate\\Pipeline\\{closure}()"
            },
            {
              "file": "/var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
              "line": 180,
              "call": "Illuminate\\Foundation\\Http\\Middleware\\PreventRequestsDuringMaintenance::handle()"
            },
            {
              "file": "/var/www/html/vendor/laravel/framework/src/Illuminate/Http/Middleware/HandleCors.php",
              "line": 62,
              "call": "Illuminate\\Pipeline\\Pipeline::Illuminate\\Pipeline\\{closure}()"
            },
            {
              "file": "/var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
              "line": 180,
              "call": "Illuminate\\Http\\Middleware\\HandleCors::handle()"
            },
            {
              "file": "/var/www/html/vendor/laravel/framework/src/Illuminate/Http/Middleware/TrustProxies.php",
              "line": 39,
              "call": "Illuminate\\Pipeline\\Pipeline::Illuminate\\Pipeline\\{closure}()"
            },
            {
              "file": "/var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
              "line": 180,
              "call": "Illuminate\\Http\\Middleware\\TrustProxies::handle()"
            },
            {
              "file": "/var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
              "line": 116,
              "call": "Illuminate\\Pipeline\\Pipeline::Illuminate\\Pipeline\\{closure}()"
            },
            {
              "file": "/var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php",
              "line": 142,
              "call": "Illuminate\\Pipeline\\Pipeline::then()"
            },
            {
              "file": "/var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php",
              "line": 111,
              "call": "Illuminate\\Foundation\\Http\\Kernel::sendRequestThroughRouter()"
            },
            {
              "file": "/var/www/html/vendor/laravel/octane/src/ApplicationGateway.php",
              "line": 36,
              "call": "Illuminate\\Foundation\\Http\\Kernel::handle()"
            },
            {
              "file": "/var/www/html/vendor/laravel/octane/src/Worker.php",
              "line": 92,
              "call": "Laravel\\Octane\\ApplicationGateway::handle()"
            },
            {
              "file": "/var/www/html/vendor/laravel/octane/bin/swoole-server",
              "line": 118,
              "call": "Laravel\\Octane\\Worker::handle()"
            },
            {
              "function": "{closure}()"
            },
            {
              "file": "/var/www/html/vendor/laravel/octane/bin/swoole-server",
              "line": 164,
              "call": "Swoole\\Server::start()"
            }
          ]
        }
      ]
    }
    

    First request is always successful. When cache is enable, everything is OK. My schema is super simple:

    type Query {
    users(
        filter: UserFilter @searchBy
      ): [User]
        @paginate(type: PAGINATOR)
        @softDeletes
        @guard
    }
    
    input UserFilter {
      id: ID
      firstname: String
      email: String
    }
    
    type User @model(class: "Modules\\User\\Entities\\User") {
      id: ID!
      firstname: String
      email: String
    }
    

    and the query is:

    query {
      users(
        first: 51
        page: 1
        filter: {
          email: {
            like: "%gmail%"
          }
        }
      ) {
        paginatorInfo {
          count
          lastPage
          total
          hasMorePages
        }
        data {
          firstname
          email
        }
      }
    }
    

    All versions of framework, lighthouse and lara-asp are latest: 9.28, 5.58.2, 1.0.4.

    bug pkg: graphql 
    opened by webard 5
  • Workflow update

    Workflow update

    • [x] New branch for releases
    • [x] Releases should be created automatically
    • [x] CHANGELOG file not needed (the main reason: impossible to edit while release), github releases probably will be enough
    • [x] Some changelog generation fixes required (https://github.com/conventional-changelog/conventional-changelog/issues/601 at least)
    • [x] Will be better run tests for packages in main repo (very annoying to check all other repos)
    ci 
    opened by LastDragon-ru 2
  • "_" type with @sortBy directive does not work with @paginate lighthouse directive

    Hi,

    when I use @sortBy (or @searchBy) with auto generated type "_", I get error:

    Impossible to create Sort Clause for `type CategoryPaginator`
    

    with @all directive, everything works fine. Seems like @sortBy and @searchBy does not support paginators.

    bug pkg: graphql 
    opened by webard 1
  • Test assertion doesn't work when `LIGHTHOUSE_CACHE_ENABLE=true`

    Test assertion doesn't work when `LIGHTHOUSE_CACHE_ENABLE=true`

    ASTBuilder is singleton and will return cached instance, so useGraphQLSchema will not have any effect

    https://github.com/LastDragon-ru/lara-asp/blob/bbc8df8c16317dbef135b8e9c347eea340d8ccab/packages/graphql/src/Testing/GraphQLAssertions.php#L217-L224

    bug pkg: graphql 
    opened by LastDragon-ru 0
  • Incorrect indent for directives in description

    Incorrect indent for directives in description

    https://github.com/LastDragon-ru/lara-asp/blob/b898d05e7062c9b3ad3a9c3b68af3cb2cf5f0efb/packages/graphql/src/SchemaPrinter/PrinterTest~test-settings-directives-in-description.graphql#L106-L112

    type Query {
        """
        @deprecated(
            reason: "deprecated reason"
        )
        @codeDirective
        @mock
        """
        a: SchemaType
    }
    
    bug pkg: graphql 
    opened by LastDragon-ru 0
  • `release` action generates inconsistent commit hashes?

    `release` action generates inconsistent commit hashes?

    Need to investigate

    - Upgrading lastdragon-ru/lara-asp-formatter (1.1.0 => 1.1.2): Checking out ede04c095d
        ede04c095d771cae6fa48a13121bb689dcb6ca5e is gone (history was rewritten?)
        Update of lastdragon-ru/lara-asp-formatter failed
    
    Failed to execute git checkout 'ede04c095d771cae6fa48a13121bb689dcb6ca5e' -  
      - && git reset --hard 'ede04c095d771cae6fa48a13121bb689dcb6ca5e' --          
                                                                                   
      fatal: reference is not a tree: ede04c095d771cae6fa48a13121bb689dcb6ca5e     
                                                                                   
      It looks like the commit hash is not available in the repository, maybe the  
       tag was recreated? Run "composer update lastdragon-ru/lara-asp-formatter"   
      to resolve this.            
    
    bug ci 
    opened by LastDragon-ru 0
  • Calculate complexity of `@searchBy`/`@sortBy` directive

    Calculate complexity of `@searchBy`/`@sortBy` directive

    Hello, I think that searchBy/sortBy directives should calculate their complexity and add them to overall query complexity. This should prevent making exhausting queries to API, or allow to save more complex queries to debug purposes. Would be perfect, If we could read the complexity for sortby / searchby separately.

    feat pkg: graphql 
    opened by webard 0
  • `SchemaPrinter` as default printer

    `SchemaPrinter` as default printer

    • [ ] Should provide a new Provider (or maybe a new package with autodiscovery), that can be used if needed;
    • [ ] Remove bindings for Settings (to force app to customize settings)
    • [ ] Remove DefaultSettings (seems not needed)
    feat pkg: graphql 
    opened by LastDragon-ru 0
Releases(1.1.2)
  • 1.1.2(Dec 1, 2022)

  • 1.1.1(Dec 1, 2022)

    Bug Fixes

    • formatter: filesize(0) will return O B instead of just 0 (f9a3f1cec0faa3c82af16259b6c9105196a445aa)
    • graphql/@searchBy: Added table name prefix for Eloquent builder to avoid "SQLSTATE[23000]: Integrity constraint violation: 1052 Column 'xxx' in where clause is ambiguous" error (213ae9c33c46df21265a33b62fe0d102f7b6e86a)
    • graphql: Enum serialization (85624f0de90499a6f2d2c82e0032de674fa8e947)
    Source code(tar.gz)
    Source code(zip)
  • 1.1.0(Oct 6, 2022)

  • 1.0.4(Aug 23, 2022)

    Bug Fixes

    • graphql/@searchBy: Transformed types will not be transformed again (b35af60fb71f36918b4f1514f8993012612033ec)

    Miscellaneous Chores

    • Enum marked as deprecated (please use native PHP enums instead) (f71dd590e306396ebe255880efa757796c2e640d)
    • graphql/SchemaPrinter: Setting::isPrintDirectivesInDescription() marked as deprecated (52169485e51ba709f51065ae7fb621e3012c4c59)
    Source code(tar.gz)
    Source code(zip)
  • 1.0.3(Aug 20, 2022)

  • 1.0.2(Aug 19, 2022)

    Bug Fixes

    • graphql: @searchByOperatorRelation will correctly determine name of nested Relation ("Call to undefined method Model::relation().") (3b1c246f99652791c596ccca3867fd14893de319)
    Source code(tar.gz)
    Source code(zip)
  • 1.0.1(Aug 18, 2022)

    Bug Fixes

    • eloquent: ModelHelper::isRelation() will support unions (all type should be instance of Relation) and interceptions (any of) of types (665c73f6926d2bfc6eb13695f67ba5904004a061)
    • graphql/SchemaPrinter: Directives in description will be wrapped by code block (b7378b1083c7dfff2873fabe29f56483dde479b3)
    • graphql: @graphql Logical operators will group conditions correctly (d79da46c912d15add33099a2d377ab1e8d3992b7)
    • graphql: @searchByOperatorRelation will correctly determine name of Relation ("Property Model::() is not a relation.") (b28362e931937812ac3792c0af48589435cbceea)
    Source code(tar.gz)
    Source code(zip)
  • 1.0.0(Aug 6, 2022)

    | ☣ | Breaking changes | |:-----:|:-----------------|

    Features

    • grahpql: @searchBy updated to use operator-directives (#18, 5b153b36720a575555474ce997a40121c4adcb21) ☣
    • grahpql: @sortBy updated to use operator-directives (#18, 744b313552c07329ab2a4c144c81c1dac8af0c60) ☣
    • graphql: @searchBy bitwise operators support: &, |, ^, >>, << (#25, fe6503725960e80cdcd94b7df6ddaf2e7c87ff5d)
    • graphql: @searchBy will extends list of operators for Int and Float types by operators for Number type (87037e018ac8d96b415111deb34f1450da16d6d2) ☣
    • queue: delay option support (32b716085f5b18028e75943a1a04ab754a1c747f)
    • testing: Removed deprecated SetUpTraits trait (2d2e71f5ba0fcb1260eadbb1e7b459dfee79fe75) ☣
    • testing: Removed deprecated WithQueryLog trait (fdf4152847ae80ef5039b1f900fd342dd955ac81) ☣
    • testing: Response constrains will show/return the diff (#33, fa2c63778b266ccba24c1574e54629b9ef945453) ☣

    Bug Fixes

    • formatter: Methods of Formatter class will throw FailedToFormatValue if error. The exception will also be used instead of FailedToFormatDate (d96a68ae6d6b71dd0d12f311ff24c4cdc2d77305) ☣
    • testing: Return type of Override::override() (47ee2da5eb92f15e58f773d78614522b722bb0cc)

    Miscellaneous Chores

    • core: ProviderWithCommands marked as deprecated (f2e0357bdf8f12f612d45362b745dff2629bf270) ☣

    Code Refactoring

    • graphql: All SchemaPrinter contract merged into one (#17, 7a641ff977461a60f0922c1e6889cad50b161243) ☣
    Source code(tar.gz)
    Source code(zip)
  • 0.15.0(May 24, 2022)

    | ☣ | Breaking changes | |:-----:|:-----------------|

    Features

    • graphql/SchemaPrinter: SchemaPrinter contract extended with two new methods SchemaPrinter::getLevel() and SchemaPrinter::setLevel(). (98953bf) ☣
    • graphql/SchemaPrinter: Implemented SchemaTypePrinter (to print Type and all its used types/directives) and assertGraphQLSchemaTypeEquals() assertion. (cc581cf)
    • graphql/SchemaPrinter: Implemented TypePrinter (to print one single Type) and assertGraphQLTypeEquals() assertion. (1828e8c)

    Bug Fixes

    • graphql/SchemaPrinter: Directives indent in description. (33c4505), closes #16
    • testing: CronableAssertions::assertCronableRegistered(): "TypeError: str_contains(Argument #1 ($haystack) must be of type string, null given". (cc878d2)

    Code Refactoring

    • graphql/SchemaPrinter: Printer contract renamed to SchemaPrinter. (2ddad1b) ☣

    Security

    • Minimal version of guzzlehttp/psr7 v1.x set to 1.8.5 (CVE-2022-24775) (f6b5ef3) ☣
    • Minimal version of guzzlehttp/psr7 v2.x set to 2.1.1 (CVE-2022-24775) (82995e7) ☣
    Source code(tar.gz)
    Source code(zip)
  • 0.14.0(Apr 2, 2022)

    | ☣ | Breaking changes | |:-----:|:-----------------|

    Features

    • core: ProviderWithTranslations will use Application::langPath() instead of hard-coded resources/ and also expects that package's translations will be places in lang directory instead of resources/lang (the same as in Laravel v9). (bc5891d) ☣
    • eloquent: Iterator will support only Eloquent Builder (because is impossible to satisfy phpstan...) (a871876) ☣
    • graphql/@sortBy: BelongsToMany and MorphToMany support. (650daf7)
    • graphql/@sortBy: HasMany support. (30694ee)
    • graphql/@sortBy: HasManyThrough support. (745a76c)
    • graphql/@sortBy: MorphMany support. (5a10f3f)
    • graphql/@sortBy: Eloquent Builder will sort sub queries to be more consistent. (915335a) ☣
    • graphql/SchemaPrinter: Added Settings::isAlwaysMultilineArguments() that allow print arguments multi-line always. (30ffc5f) ☣
    • graphql: Removed code related to Resolver concept because it was never (and will not be) used in real life. (3564e4c) ☣

    Bug Fixes

    • migrator: Commands will be compatible with Laravel ^9.6 (bf759bd)
    • queue: Return type of WithInitialization::initialized() will be static instead of self. (f0a952f) ☣
    Source code(tar.gz)
    Source code(zip)
  • 0.13.0(Mar 13, 2022)

    | ☣ | Breaking changes | |:-----:|:-----------------|

    Features

    • graphql/SchemaPrinter: DirectiveResolver::getDefinitions() will also return standard directives (to be consistent with types). (633571b) ☣
    • graphql/SchemaPrinter: GraphQLExpectedSchema can define own Settings. (d6bae80)
    • graphql/SchemaPrinter: IntrospectionPrinter will return only introspection types as unused. (0601bb8)
    • graphql/SchemaPrinter: PrintedSchema::getUnusedTypes() will also return standard types. (3402e22)
    • graphql/SchemaPrinter: SchemaPrinter will use DirectiveFilter for standard directives too. (e33f957) ☣
    • graphql/SchemaPrinter: Added PrintedSchema contract. (2604f35)
    • graphql/SchemaPrinter: Added PrintedSchema::getUnusedDirectives() that will return all unused directives. (d1a8130)
    • graphql/SchemaPrinter: Added Settings::getDirectiveDefinitionFilter() that allow exclude Directive Definitions. (6583742) ☣
    • graphql/SchemaPrinter: Added Settings::getTypeDefinitionFilter() that allows filter out type definitions. (504a252) ☣
    • graphql: GraphQLAssertions::assertGraphQLSchemaEquals() update to allow PrintedSchema and Schema as $expected. (bbff36b) ☣

    Bug Fixes

    • graphql/@sortBy: _ will work with @paginate. (ca43d21), closes #12
    • graphql/SchemaPrinter: GraphQLAssertions::assertGraphQLSchemaEquals() will not interpret empty used/unused types/directives lists as "skip assert" (assertion will be skipped only if null). (b722c1c) ☣
    • graphql/SchemaPrinter: GraphQLAssertions::assertGraphQLSchemaEquals() will not print expected schema when not necessary. (1cffe6a)
    • testing: registration of StrictAssertEquals. (d6e7b50)

    Performance Improvements

    • graphql/SchemaPrinter: DirectiveResolver will not load all lighthouse's directives (because they are not needed + it is very slow) and will cache definitions/instances. (b61a248) ☣

    Code Refactoring

    • graphql: Minimal version of "nuwave/lighthouse" set to ^5.8.0. (25816cc) ☣
    Source code(tar.gz)
    Source code(zip)
  • 0.12.0(Feb 27, 2022)

    | ☣ | Breaking changes | |:-----:|:-----------------|

    Features

    • Laravel 9 support. (#10; c12b021)
    • migrator: Removed DirectorySeeder and RootSeeder. (1be3a4e) ☣
    • queue, testing: CronableRegistrator will add disabled Cronable into Schedule it is needed to be able to test registration. (cf050e2) ☣
    • spa: Request::validated() updated to be compatible with Laravel 9 and support $key and $default. (3eb876f)

    Bug Fixes

    • graphql: "LogicException : Override for Nuwave\Lighthouse\Schema\Source\SchemaSourceProvider already defined." while testing schemas. (0623c36)
    • graphql/SchemaPrinter: Fixed missing LF in directive locations when the definition is multiline. (e4d69bf)
    • graphql/SchemaPrinter: Printer will parse all definitions from Directive:definition() to avoid "DefinitionException : Lighthouse failed while trying to load a type XXX" error. (5c20332)
    • queue: ConsoleKernelWithSchedule will not use booted() because there are no reasons to use it here (also, in some cases the previous approach may lead to Cronable was registered twice). (64482a6)
    • queue: ProviderWithSchedule will use afterResolving() callback to register Cronable. (bf84e0d) ☣
    Source code(tar.gz)
    Source code(zip)
  • 0.11.0(Feb 5, 2022)

    | ☣ | Breaking changes | |:-----:|:-----------------| | 🔥 | Something cool |

    Features

    • core: Added Subject::getObservers(). (eb59a63)
    • eloquent: Added ModelHelper::isSoftDeletable() helper. (b254288)
    • eloquent: Result of ModelHelper::isRelation() will be cached (cache can be reset by ModelHelper::resetCache()) (a63f272)
    • graphql: Added GraphQLExpectedSchema that can be used with assertGraphQLSchemaEquals() to check used/unused types and directives. (72fd9a9)
    • graphql: 🔥 Awesome SchemaPrinter with directives, filtering, advanced formatting, and more. The assertGraphQLSchemaEquals() also updated to use it. (f9e0b35) ☣
    • graphql: Minimal version of "nuwave/lighthouse" set to "^5.6.1" (required to print repeatable directives). (e694b7d) ☣

    Bug Fixes

    • formatter: Formatter::forLocale()/Formatter::forTimezone() will not lose timezone/locale. (940ed7b)
    • testing: Override will check usages in assertPostConditions() instead of beforeApplicationDestroyed() ("Lock wait timeout exceeded" fix). (95649d9)

    Code Refactoring

    • core: Subject methods will return self instead of void. (7d80539) ☣
    • core: Class Subject converted into interface, all methods moved into new class Dispatcher. (e7bef00) ☣
    Source code(tar.gz)
    Source code(zip)
  • 0.10.0(Dec 25, 2021)

    | ☣ | Breaking changes | |:-----:|:-----------------|

    Features

    • core: Observer implementation. (9bf13f9)
    • eloquent: Added Iterator::$index that required to count items to continue iteration. (cd3be87)
    • eloquent: Added ModelHelper::isRelation(). (b621e97)
    • eloquent: Iterators will use Subject (so onBeforeChunk() and onAfterChunk() will not redefine existing callback). (60858d3) ☣
    • eloquent: Removed ChunkedIterator::safe(). (846de72) ☣
    • formatter: Formatter::app() renamed to Formatter::getApplication(). (6f50747) ☣
    • formatter: Added Formatter::forTimezone() to create formatter for specific timezone, also, default timezone set to null instead of UTC. (41bc6af) ☣
    • formatter: Better logic for settings locale: by default locale will be null and getDefaultLocale() will be used. (dd94a28)
    • graphql: New testing helper GraphQLAssertions::useGraphQLSchema(). (376425c)
    • testing: SetUpTraits deprecated, @before/afterApplicationCreated()/beforeApplicationDestroyed() can be used instead. (fee2f29) ☣
    • testing: New constraint MimeType that checks that response has a Content-Type header by given file extension. (9462814)

    Bug Fixes

    • graphql: @sortBy will check FieldResolver only for _ (type). (3b4acc2)
    • graphql: Enums serialization. (2dd62a7) ☣
    • queue: "Cron\CronExpression::__construct(): Argument #1 ($expression) must be of type string, null given". (d936445)
    • testing: CronableAssertions::assertCronableRegistered() will work even if no cron defined for the job. (08a47dc)
    Source code(tar.gz)
    Source code(zip)
  • 0.9.0(Oct 24, 2021)

    ☣ | Breaking changes :---: | :---

    Features

    • guzzlehttp/psr7:^2.0 support. (c33899d)
    • eloquent,graphql: ModelHelper moved into eloquent package. (34d99ed) ☣
    • eloquent: EloquentBuilder::orderByKey() mixin will use qualified key name. (155dacb)
    • eloquent: ModelHelper::getRelation() will throw PropertyIsNotRelation instead of LogicException. (7f350a9)
    • graphql: @searchBy will support types from TypeRegistry. (1a92006) ☣
    • graphql: @searchBy: new operators for String: contains, startsWith, endsWith. (f2f44b7)
    • graphql: @sortBy support input type auto-generation by existing type. (06da4a7)
    • graphql: @sortBy will use dependent subqueries instead of joins. (a1e4608) ☣
    • graphql: New directive sortByUnsortable that allow exclude fields from sort. (10a39ab)
    • queue: CronableRegistrator will use PendingDispatch (so ShouldBeUnique should work now). (6c4cbd0)
    • queue: Dispatchable::run() will use dispatchSync() instead of dispatchNow(). (50ecb56) ☣
    • queue: Injection of QueueableConfigurator into __construct() not needed anymore, Container::afterResolving() will be used instead. (aebffad)
    • testing: New assertion: assertDatabaseQueryEquals(). (64fa090)

    Bug Fixes

    • eloquent: Fixed "Integrity constraint violation: 1052 Column 'id' in order clause is ambiguous" for ChunkedChangeSafeIterator (it will use qualified column name for default). (5695af5)

    Code Refactoring

    • graphql: LastDragon_ru\LaraASP\GraphQL\SortBy\Contracts\ScoutColumnResolver renamed to \LastDragon_ru\LaraASP\GraphQL\SortBy\Builders\Scout\ColumnResolver (339cf58) ☣
    Source code(tar.gz)
    Source code(zip)
  • 0.8.1(Sep 11, 2021)

  • 0.8.0(Sep 5, 2021)

    ☣ | Breaking changes :---: | :---

    Features

    • core: Package Translator allows to specify default translation (will be used if the translation string doesn't exist). (c9e1e5d)
    • eloquent: New trait WithDateSerialization that will serialize dates that implements JsonSerializable by JsonSerializable::jsonSerialize() instead of hardcoded Carbon::toJSON(). (085fc47) ☣
    • graphql: Enum properties will be converted into studly case (to be compatible with PHP Enums). (3a9e15a) ☣
    • graphql: ModelHelper::__construct() accept class-string<\Illuminate\Database\Eloquent\Model>. (e3d92be)
    • queue: CronableRegistrator will use job name as description (= description will not contain settings anymore) and will not add context to log messages. (04fc1ea) ☣
    • queue: Added timezone setting for Cronable. (8810c7f)
    • queue: Removed QueueableConfig::Debug. (ae9653a) ☣
    • testing: Added WithTranslations helper that allows replacing translation while tests. (5e0d4e4)

    Bug Fixes

    • formatter: Filesize units (MB => MiB, etc). (5fc4ba7)
    • queue: TypeError : LastDragon_ru\LaraASP\Queue\Queueables\Job::LastDragon_ru\LaraASP\Queue\Concerns\{closure}: Return value must be of type Illuminate\Foundation\Bus\PendingDispatch, null returned. (58e2f20)
    • queue: CronableRegistrator removed incorrect realization to check the locked status of the job. (033de61)
    • testing: JsonSchemaValue will not evaluate schema in constructor (regression). (3c51269)
    Source code(tar.gz)
    Source code(zip)
  • 0.7.0(Aug 15, 2021)

    ☣ | Breaking changes :---: | :---

    Features

    • eloquent: iterator() and changeSafeIterator() builder's macros renamed to getChunkedIterator() and getChangeSafeIterator() accordingly. (c1140a4) ☣
    • eloquent: Iterators will support offset, each() replaced by onAfterChunk(), also added onBeforeChunk(). (4276a2c) ☣
    • graphql: @searchBy: short-named operators (lt, lte, etc) renamed into full form (lessThan, etc). (be2d5f8) ☣
    • graphql: @searchBy: Relation will use notExists instead of not + added exists. (63072fa) ☣
    • grapqhl: @sortBy exceptions rework: each error will have its own exception. Unfortunately, the commit also remove translations support. (4f99e92) ☣
    • graphql: @sortBy will support types from TypeRegistry. (20f3be5)
    • graphql: @sortBy: Laravel Scout support. (4c1bb9c)
    • queue: CronableRegistrator will not dispatch jobs marked as ShouldBeUnique if they already dispatched. (40624e4)
    • queue: Removed DI support for getQueueConfig(). (da57176) ☣
    • testing: CronableAssertions::setQueueableConfig() will accept instance of ConfigurableQueueable. (cd6430e)
    • testing: WithQueryLog::getQueryLog() will accept \Illuminate\Database\ConnectionResolverInterface. (9243d47)
    • testing: Added Override::override() helper. (7598390)
    • testing: Added a new WithQueryLog trait that can work with any connection (the old one marked as deprecated). (1f7a8c3)
    • testing: Removed TestResponse::getContentType() macro (not needed for testing). (ebf2f6d) ☣
    • testing: Removed TestResponse::toPsrResponse() macro, LastDragon_ru\\LaraASP\\Testing\\Constraints\\Response\\Factory::make() should be used instead. (7e000da) ☣

    Bug Fixes

    • eloquent: Iterator::onBeforeChunk()/Iterator::onAfterChunk() will be called only for non-empty chunks. (140825c)
    • graphql: Enums registration moved to afterResolving callback. (2a6288b)
    • migrator: Added missed semicolon to migration-anonymous.stub. (64118fa)
    Source code(tar.gz)
    Source code(zip)
  • 0.6.1(Jun 26, 2021)

    Bug Fixes

    • testing: JsonSchemaWrapper::__construct() will correctly handle JsonSchemaWrapper $schema. (85ea05f)
    • testing: TypeError : Symfony\Component\HttpFoundation\HeaderUtils::parseQuery(): Argument #1 ($query) must be of type string, null given (9646143)
    Source code(tar.gz)
    Source code(zip)
  • 0.6.0(Jun 12, 2021)

    Features

    • graphql: @sortBy: HasOneThrough support 😜 (558198b)
    • testing: Added WithTempFile helper. (93a24be)
    • testing: Signature of DataProvider::getData() changed to DataProvider::getData(bool $raw = false) to allow nesting DataProviders. (34f1ff7)

    Bug Fixes

    • dev: Added removing special characters from hostname in Vagrantfile. (1eed300)
    • graphql: @searchBy will not advise "contact to developer" for unknown types. (d9ff32b)
    • graphql: @sortBy will not skip "unknown" types and will not convert them into Scalars. (b5aaccb)
    • testing: arguments types for TestResponseMixin::assertJsonMatchesSchema(). (46674f0)
    Source code(tar.gz)
    Source code(zip)
  • 0.5.0(May 16, 2021)

    Features

    • graphql: Added two highly powerful @searchBy and @sortBy directives for lighthouse-php. The @searchBy directive provides basic conditions like =, >, <, etc, relations, not (<condition>), enums, and custom operators support. All are strictly typed so you no need to use Mixed type anymore. The @sortBy is not only about standard sorting by columns but also allows use relations. 😎

    • migrator: added support for anonymous migrations

    Fixes

    • migrator: will work in Laravel >= 8.36.0
    Source code(tar.gz)
    Source code(zip)
  • 0.2.0(Jan 20, 2021)

  • 0.1.0(Jan 19, 2021)

Owner
Aleksei Lebedev
Aleksei Lebedev
Code shared by the schema packages

Code shared by the schema packages

PoP CMS Schema 2 Nov 4, 2022
Laravel api tool kit is a set of tools that will help you to build a fast and well-organized API using laravel best practices.

Laravel API tool kit and best API practices Laravel api tool kit is a set of tools that will help you to build a fast and well-organized API using lar

Ahmed Esa 106 Nov 22, 2022
Jane is a set of libraries to generate Models & API Clients based on JsonSchema / OpenAPI specs

Jane is a set of libraries to generate Models & API Clients based on JsonSchema / OpenAPI specs Documentation Documentation is available at http://jan

Jane 438 Dec 18, 2022
A Laravel Fractal package for building API responses, giving you the power of Fractal with Laravel's elegancy.

Laravel Responder is a package for building API responses, integrating Fractal into Laravel and Lumen. It can transform your data using transformers,

Alexander Tømmerås 776 Dec 25, 2022
Laravel API 文档生成器,可以将基于 Laravel 项目的项目代码,自动生成 json 或 md 格式的描述文件。

Thresh Laravel API 文档生成器,可以将基于 Laravel 项目的项目代码,自动生成 json 或 md 格式的描述文件。 安装 $ composer require telstatic/thresh -vvv 功能 生成 Markdown 文档 生成 Postman 配置文件 生

静止 5 Jul 12, 2021
A simple way of authenticating your RESTful APIs with API keys using Laravel

ApiGuard This package is no longer maintained This package is no longer maintained as Laravel already has a similar feature built-in since Laravel 5.8

Chris Bautista 691 Nov 29, 2022
A RESTful API package for the Laravel and Lumen frameworks.

The Dingo API package is meant to provide you, the developer, with a set of tools to help you easily and quickly build your own API. While the goal of

null 9.3k Jan 7, 2023
Adds CORS (Cross-Origin Resource Sharing) headers support in your Laravel application

CORS Middleware for Laravel Implements https://github.com/asm89/stack-cors for Laravel About The laravel-cors package allows you to send Cross-Origin

Fruitcake 6.2k Jan 8, 2023
An easy to use Fractal wrapper built for Laravel and Lumen applications

An easy to use Fractal wrapper built for Laravel and Lumen applications The package provides a nice and easy wrapper around Fractal for use in your La

Spatie 1.8k Dec 30, 2022
Laravel wrapper for Facebook's GraphQL

Laravel GraphQL Use Facebook's GraphQL with Laravel 6.0+. It is based on the PHP port of GraphQL reference implementation. You can find more informati

Mikk Mihkel Nurges 1.9k Dec 31, 2022
A framework for serving GraphQL from Laravel

Lighthouse A framework for serving GraphQL from Laravel Lighthouse is a GraphQL framework that integrates with your Laravel application. It takes the

NuWave Commerce 3.1k Jan 6, 2023
Laravel cryptocurrency trading APIs.

Lypto API Laravel cryptocurrency trading APIs. Installation Requirements Minimum Laravel version 7.0 Use the following command to install: composer re

Md Obydullah 4 Jan 27, 2022
A simple example of how to create a RESTful API in Laravel Framework 8.36.1.

FirstLaravel A simple example of how to create a RESTful API in Laravel Framework 8.36.1. I used Database sqlite because I wanted to deploy this proje

Max Base 4 Apr 16, 2021
Official Laravel package for thepeer

Thepeer Laravel SDK Installation composer install thepeer/sdk Usage Initiate <?php $thepeer = new \Thepeer\Sdk\Thepeer("your-secret-key"); Available

The Peer 26 Oct 7, 2022
OpenClassify - Laravel 8 Classified Script Platform

OpenClassify is modular and most advanced open source classified platform build with Laravel 8 & PHP 7.3+ Supported

openclassify 184 Dec 28, 2022
💛 Modern API development in Laravel. ✍️ Developed by Gentrit Abazi.

Introduction Larapi is a package thats offers you to do modern API development in Laravel with support for new versions of Laravel. Larapi comes inclu

one2tek 93 Oct 28, 2022
🍞🧑‍🍳 An on-the-fly GraphQL Schema generator from Eloquent models for Laravel.

An on-the-fly GraphQL Schema generator from Eloquent models for Laravel. Installation Quickstart Model schemas Installation This package requires PHP

Scrn 100 Oct 16, 2022
Fully unit tested Facebook SDK v5 integration for Laravel & Lumen

Laravel Facebook SDK A fully unit-tested package for easily integrating the Facebook SDK v5 into Laravel and Lumen 5.0, 5.1, 5.2, & 5.3. This is packa

Sammy Kaye Powers 697 Nov 6, 2022
Laravel A2Reviews Client API lets you build apps, extensions, or plugins to get reviews from the A2reviews APP.

Overview Laravel A2Reviews Client API lets you build apps, extensions or plugins to get reviews from the A2reviews APP. Including adding reviews to a

Be Duc Tai 2 Sep 26, 2021