dusterio / lumen-passport

Making Laravel Passport work with Lumen
MIT License
654 stars 139 forks source link

Laravel 10.x Compatibility #177

Closed laravel-shift closed 1 year ago

laravel-shift commented 1 year ago

This is an automated pull request from Shift to update your package code and dependencies to be compatible with Laravel 9.x.

Before merging, you need to:

If you do find an issue, please report it by commenting on this PR to help improve future automation.

laravel-shift commented 1 year ago

:alembic: Using this package? If you would like to help test these changes or believe them to be compatible, you may update your project to reference this branch.

To do so, temporarily add Shift's fork to the repositories property of your composer.json:

{
    "repositories": [
        {
            "type": "vcs",
            "url": "https://github.com/laravel-shift/lumen-passport.git"
        }
    ]
}

Then update your dependency constraint to reference this branch:

{
    "require": {
        "dusterio/lumen-passport": "dev-l10-compatibility",
    }
}

Finally, run: composer update

witoldwegner commented 1 year ago

I tried out dev-l10-compatibility with Lumen 10 Unfortunately the following happens when calling any route

`[2023-03-06 15:54:55] local.ERROR: Call to undefined method Laravel\Lumen\Application::group() {"exception":"[object] (Error(code: 0): Call to undefined method Laravel\Lumen\Application::group() at vendor/dusterio/lumen-passport/src/LumenPassport.php:80) [stacktrace]

0 app/Providers/AuthServiceProvider.php(40): Dusterio\LumenPassport\LumenPassport::routes(Object(Laravel\Lumen\Application))

1 vendor/illuminate/container/BoundMethod.php(36): App\Providers\AuthServiceProvider->boot()

2 vendor/illuminate/container/Util.php(41): Illuminate\Container\BoundMethod::Illuminate\Container\{closure}()

3 vendor/illuminate/container/BoundMethod.php(93): Illuminate\Container\Util::unwrapIfClosure(Object(Closure))

4 vendor/illuminate/container/BoundMethod.php(37): Illuminate\Container\BoundMethod::callBoundMethod(Object(Laravel\Lumen\Application), Array, Object(Closure))

5 vendor/illuminate/container/Container.php(661): Illuminate\Container\BoundMethod::call(Object(Laravel\Lumen\Application), Array, Array, NULL)

6 vendor/laravel/lumen-framework/src/Application.php(304): Illuminate\Container\Container->call(Array)

7 vendor/laravel/lumen-framework/src/Application.php(289): Laravel\Lumen\Application->bootProvider(Object(App\Providers\AuthServiceProvider))

8 vendor/laravel/lumen-framework/src/Concerns/RoutesRequests.php(165): Laravel\Lumen\Application->boot()

9 vendor/laravel/lumen-framework/src/Concerns/RoutesRequests.php(112): Laravel\Lumen\Application->dispatch(NULL)

10 public/index.php(28): Laravel\Lumen\Application->run()

11 {main}

"} `

iblank commented 1 year ago

I tried using this forked branch and was able to run the composer update, but ran into the issue where it does not work with "laravel/passport": "^11.0" (which is a minimum requirement for Lumen 10)... https://github.com/dusterio/lumen-passport/issues/175

How did you get around this issue?