asvae / laravel-api-tester

Test your routes without hassle
http://laravel-api-tester.asva.by/
MIT License
354 stars 52 forks source link

"Class web does not exist" after clean installation #18

Closed welcoMattic closed 8 years ago

welcoMattic commented 8 years ago

@asvae

I caught this error just after a clean installation of the package :

ReflectionException (-1)
Class web does not exist

Is it known?

BTW, I use dingo/api

greabock commented 8 years ago

Hi! Can you provide additional information? Package version, PHP version, Laravel version. Then i can try to reproduce this the error.

welcoMattic commented 8 years ago

Here more info :

api-tester dev-development
PHP 7.0.9
Laravel 5.1.41
greabock commented 8 years ago

Thank you! Middleware groups was added in laravel 5.2. I'll to fix it now.

welcoMattic commented 8 years ago

Great, thank you to backport compatiblity to 5.1!

greabock commented 8 years ago

https://github.com/asvae/laravel-api-tester/commit/a1a40a44bb1b7593216567acb8ce25698626a70b

welcoMattic commented 8 years ago

It works great!

welcoMattic commented 8 years ago

Excepted that I can't see my dingo/api routes :/

EDIT : no change in config file is apply

greabock commented 8 years ago

you should uncomment this line https://github.com/asvae/laravel-api-tester/blob/development/config/api-tester.php#L100

welcoMattic commented 8 years ago

I tried, but nothing happens.

greabock commented 8 years ago

I realy have no idea =( Just tried, clean install.

PHP 5.6/7.0

composer.json

    "laravel/framework": "5.1.*",
    "asvae/laravel-api-tester": "dev-development",
    "dingo/api": "1.0.x@dev"

config/app.php

  Dingo\Api\Provider\LaravelServiceProvider::class,
  Asvae\ApiTester\ServiceProvider::class,

config/api-tester.php

    'route_repositories' => [
        Asvae\ApiTester\Repositories\RouteLaravelRepository::class,
        Asvae\ApiTester\Repositories\RouteDingoRepository::class,
    ],

config/api.php

    'subtype' => env('API_SUBTYPE', 'test'),
    'prefix' => env('API_PREFIX', 'api'),

app/Http/routes.php

$api = app('Dingo\Api\Routing\Router');

$api->version('v1', function ($api) {
    $api->get('users/{id}',function(){
        return 'TEst';
    });
});

and it works fine for me... proof

route detected, headers auto-filled result is returned

have you any idea?

greabock commented 8 years ago

did you apply latest update? https://github.com/asvae/laravel-api-tester/commit/c98183f0304f6db36cb37a624576984635431ca9

welcoMattic commented 8 years ago

I just run a composer update

greabock commented 8 years ago

i don't know how to reproduce this bug =( can you provide your dingo config?