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

[Laravel v8.72] Method getRecallerName does not exist #145

Open
relaypilot opened this issue Nov 18, 2021 · 3 comments
Open

[Laravel v8.72] Method getRecallerName does not exist #145

relaypilot opened this issue Nov 18, 2021 · 3 comments

Comments

@relaypilot
Copy link

relaypilot commented Nov 18, 2021

After upgrading from Laravel v8.71.x to Laravel v8.72.0, it became impossible to impersonate users.
When I try to impersonate a user, I am simply logged out.

My log files show the following:

Method Illuminate\Auth\RequestGuard::getRecallerName does not exist.

    {
        "userId":1,
        "exception":"[object] (BadMethodCallException(code: 0): Method Illuminate\\Auth\\RequestGuard::getRecallerName does not exist. at /home/app-123/vendor/laravel/framework/src/Illuminate/Macroable/Traits/Macroable.php:113
    )

It seems that the new Laravel version 8.72 contains a breaking change for the laravel-impersonate package.

@relaypilot relaypilot changed the title Method getRecallerName does not exist. [Laravel v8.72] Method getRecallerName does not exist Nov 18, 2021
@Vicftz
Copy link

Vicftz commented Nov 19, 2021

Same issue here! Did you find a quick fix ? (Downgrade Laravel version ?)

@relaypilot
Copy link
Author

relaypilot commented Nov 19, 2021

Downgrading to 8.71 worked on local but not on prod for some reason.

A quick solution I found is to comment out those lines in src/Illuminate/Routing/SortedMiddleware.php

    $parents = @class_parents($stripped);

    if ($parents !== false) {
        foreach ($parents as $parent) {
            yield $parent;
        }
    }

laravel/framework@v8.71.0...v8.72.0

@Vicftz
Copy link

Vicftz commented Nov 19, 2021

I change my composer.json to this :
"laravel/framework": "=8.71.0"

Work locally on in production in my side !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants