-
Notifications
You must be signed in to change notification settings - Fork 670
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
Could not get class storage for forwardcompatauthenticatortrait #7863
Labels
Comments
I found these snippets: https://psalm.dev/r/10017f26ce<?php
namespace Lexik\Bundle\JWTAuthenticationBundle\Security\Authenticator;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\Security\Http\Authenticator\AuthenticatorInterface;
use Symfony\Component\Security\Http\Authenticator\Passport\Passport;
use Symfony\Component\Security\Http\Authenticator\Passport\PassportInterface;
$r = new \ReflectionMethod(AuthenticatorInterface::class, 'authenticate');
if ($r->hasReturnType() && Passport::class === $r->getReturnType()->getName()) {
eval('
namespace Lexik\Bundle\JWTAuthenticationBundle\Security\Authenticator;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\Security\Http\Authenticator\Passport\Passport;
/**
* @internal
*/
trait ForwardCompatAuthenticatorTrait
{
public function authenticate(Request $request): Passport
{
return $this->doAuthenticate($request);
}
}
');
} else {
/**
* @internal
*/
trait ForwardCompatAuthenticatorTrait
{
public function authenticate(Request $request): PassportInterface
{
return $this->doAuthenticate($request);
}
}
}
|
Same for me. I ran with Full trace:
|
Simplified: https://psalm.dev/r/d0f331ef60 |
I found these snippets: https://psalm.dev/r/d0f331ef60<?php
namespace NS;
if (rand(0,1)) {
trait ForwardCompatAuthenticatorTrait {}
}
|
weirdan
added a commit
to weirdan/psalm
that referenced
this issue
Dec 3, 2022
weirdan
added a commit
that referenced
this issue
Dec 3, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Getting an error when trying to analize
It does not matter if i ran with flag --no-cache or without
Could be reproduced here
https://psalm.dev/r/10017f26ce
The text was updated successfully, but these errors were encountered: