urameshibr / lumen-form-request

Laravel Form Request adaptation for Lumen framework
3 stars 1 forks source link

broke in version 1.5 #5

Open gitkv opened 6 years ago

gitkv commented 6 years ago
"message": "Method validateResolved does not exist.",
        "file": "/var/www/app/vendor/illuminate/support/Traits/Macroable.php",
        "line": 96,
        "trace": [
            "0 /var/www/app/vendor/urameshibr/lumen-form-request/src/Providers/FormRequestServiceProvider.php(30): Illuminate\\Http\\Request->__call('validateResolve...', Array)",
            "1 /var/www/app/vendor/illuminate/container/Container.php(1042): Urameshibr\\Providers\\FormRequestServiceProvider->Urameshibr\\Providers\\{closure}(Object(App\\Http\\Requests\\InvoiceRequest), Object(Laravel\\Lumen\\Application))",
            "2 /var/www/app/vendor/illuminate/container/Container.php(1006): Illuminate\\Container\\Container->fireCallbackArray(Object(App\\Http\\Requests\\InvoiceRequest), Array)",
            "3 /var/www/app/vendor/illuminate/container/Container.php(991): Illuminate\\Container\\Container->fireAfterResolvingCallbacks('App\\\\Http\\\\Reques...', Object(App\\Http\\Requests\\InvoiceRequest))",
            "4 /var/www/app/vendor/illuminate/container/Container.php(650): Illuminate\\Container\\Container->fireResolvingCallbacks('App\\\\Http\\\\Reques...', Object(App\\Http\\Requests\\InvoiceRequest))",
            "5 /var/www/app/vendor/illuminate/container/Container.php(586): Illuminate\\Container\\Container->resolve('App\\\\Http\\\\Reques...', Array)",
            "6 /var/www/app/vendor/laravel/lumen-framework/src/Application.php(230): Illuminate\\Container\\Container->make('App\\\\Http\\\\Reques...', Array)",
            "7 /var/www/app/vendor/illuminate/container/BoundMethod.php(156): Laravel\\Lumen\\Application->make('App\\\\Http\\\\Reques...')",
            "8 /var/www/app/vendor/illuminate/container/BoundMethod.php(116): Illuminate\\Container\\BoundMethod::addDependencyForCallParameter(Object(Laravel\\Lumen\\Application), Object(ReflectionParameter), Array, Array)",
            "9 /var/www/app/vendor/illuminate/container/BoundMethod.php(29): Illuminate\\Container\\BoundMethod::getMethodDependencies(Object(Laravel\\Lumen\\Application), Array, Array)",
            "10 /var/www/app/vendor/illuminate/container/BoundMethod.php(87): Illuminate\\Container\\BoundMethod::Illuminate\\Container\\{closure}()",
            "11 /var/www/app/vendor/illuminate/container/BoundMethod.php(31): Illuminate\\Container\\BoundMethod::callBoundMethod(Object(Laravel\\Lumen\\Application), Array, Object(Closure))",
            "12 /var/www/app/vendor/illuminate/container/Container.php(549): Illuminate\\Container\\BoundMethod::call(Object(Laravel\\Lumen\\Application), Array, Array, NULL)",
            "13 /var/www/app/vendor/laravel/lumen-framework/src/Concerns/RoutesRequests.php(373): Illuminate\\Container\\Container->call(Array, Array)",
            "14 /var/www/app/vendor/laravel/lumen-framework/src/Concerns/RoutesRequests.php(339): Laravel\\Lumen\\Application->callControllerCallable(Array, Array)",
            "15 /var/www/app/vendor/laravel/lumen-framework/src/Concerns/RoutesRequests.php(313): Laravel\\Lumen\\Application->callLumenController(Object(App\\Http\\Controllers\\InvoiceController), 'store', Array)",
            "16 /var/www/app/vendor/laravel/lumen-framework/src/Concerns/RoutesRequests.php(275): Laravel\\Lumen\\Application->callControllerAction(Array)",
            "17 /var/www/app/vendor/laravel/lumen-framework/src/Concerns/RoutesRequests.php(255): Laravel\\Lumen\\Application->callActionOnArrayBasedRoute(Array)",
            "18 [internal function]: Laravel\\Lumen\\Application->Laravel\\Lumen\\Concerns\\{closure}(Object(Illuminate\\Http\\Request))",
            "19 /var/www/app/vendor/laravel/lumen-framework/src/Routing/Pipeline.php(52): call_user_func(Object(Closure), Object(Illuminate\\Http\\Request))",
            "20 /var/www/app/app/Http/Middleware/Authenticate.php(38): Laravel\\Lumen\\Routing\\Pipeline->Laravel\\Lumen\\Routing\\{closure}(Object(Illuminate\\Http\\Request))",
            "21 /var/www/app/vendor/illuminate/pipeline/Pipeline.php(149): App\\Http\\Middleware\\Authenticate->handle(Object(Illuminate\\Http\\Request), Object(Closure))",
            "22 [internal function]: Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))",
            "23 /var/www/app/vendor/laravel/lumen-framework/src/Routing/Pipeline.php(32): call_user_func(Object(Closure), Object(Illuminate\\Http\\Request))",
            "24 /var/www/app/vendor/illuminate/pipeline/Pipeline.php(102): Laravel\\Lumen\\Routing\\Pipeline->Laravel\\Lumen\\Routing\\{closure}(Object(Illuminate\\Http\\Request))",
            "25 /var/www/app/vendor/laravel/lumen-framework/src/Concerns/RoutesRequests.php(410): Illuminate\\Pipeline\\Pipeline->then(Object(Closure))",
            "26 /var/www/app/vendor/laravel/lumen-framework/src/Concerns/RoutesRequests.php(256): Laravel\\Lumen\\Application->sendThroughPipeline(Array, Object(Closure))",
            "27 /var/www/app/vendor/laravel/lumen-framework/src/Concerns/RoutesRequests.php(160): Laravel\\Lumen\\Application->handleFoundRoute(Array)",
            "28 /var/www/app/vendor/laravel/lumen-framework/src/Concerns/RoutesRequests.php(413): Laravel\\Lumen\\Application->Laravel\\Lumen\\Concerns\\{closure}()",
            "29 /var/www/app/vendor/laravel/lumen-framework/src/Concerns/RoutesRequests.php(166): Laravel\\Lumen\\Application->sendThroughPipeline(Array, Object(Closure))",
            "30 /var/www/app/vendor/laravel/lumen-framework/src/Concerns/RoutesRequests.php(107): Laravel\\Lumen\\Application->dispatch(NULL)",
            "31 /var/www/app/public/index.php(28): Laravel\\Lumen\\Application->run()",
            "32 {main}"
        ]
urameshibr commented 6 years ago

Hi @gitkv , thanks for your contribution, i will solve this issue, please, revert the version to 1.4 until the fix.

Im testing on lumen 5.6 and it's ok, no errors, whats your lumen version?

gitkv commented 6 years ago

Thank! My version of Lumen 5.5

urameshibr commented 6 years ago

@gitkv Please, downgrade to version 1.4, for moment,

composer require urameshibr/lumen-form-request:1.4

mbengchan commented 6 years ago

i have the same problem Method App\\Http\\Requests\\CreateArticleRequest::validate does not exist.

am using the Lumen version 5.7

urameshibr commented 6 years ago

@Shadomax Please, verify your Lumen version.

https://github.com/urameshibr/lumen-form-request#how-to-install

Lumen 5.5

composer require urameshibr/lumen-form-request:1.4

Lumen 5.6 +

composer require urameshibr/lumen-form-request

You can reinstall the package following that steps:

composer remove urameshibr/lumen-form-request 

composer require urameshibr/lumen-form-request
mbengchan commented 6 years ago

am using Lumen 5.7

alegargar commented 5 years ago

Any news about this? The package does not work with lumen 5.7

urameshibr commented 5 years ago

@alegargar What the package version are you using? Could you send me the composer.json from main project?

Dach0 commented 5 years ago

Hi there, I'm having the same problem. Here is my composer.json

{ "name": "laravel/lumen", "description": "The Laravel Lumen Framework.", "keywords": ["framework", "laravel", "lumen"], "license": "MIT", "type": "project", "require": { "php": ">=7.1.3", "dingo/api": "^2", "flipbox/lumen-generator": "^5.6", "laravel/lumen-framework": "5.8.*", "nesbot/carbon": "^2.17", "tymon/jwt-auth": "1.0.0-rc4.1", "urameshibr/lumen-form-request": "^1.5", "vlucas/phpdotenv": "^3.3" }, "require-dev": { "fzaninotto/faker": "^1.4", "phpunit/phpunit": "^7.0", "mockery/mockery": "^1.0" }, "autoload": { "classmap": [ "database/seeds", "database/factories" ], "psr-4": { "App\": "app/" }, "files": [ "app/Support/helpers.php" ] }, "autoload-dev": { "classmap": [ "tests/" ] }, "scripts": { "post-root-package-install": [ "@php -r \"file_exists('.env') || copy('.env.example', '.env');\"" ] }, "config": { "preferred-install": "dist", "sort-packages": true, "optimize-autoloader": true }, "minimum-stability": "dev", "prefer-stable": true }

Dach0 commented 5 years ago

I have to add something, as I've already switched to another package, but maybe it could be the same problem. I had wrongly typed the rules... return [ "brandname_id" => 'required', . . . "on_stock" => 'required' ]); Because of copying code I didn't remove that bracket before last semicolon and I had the same error on both packages. So please, don't be me, check your typos :)