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

Fatal error Trait ForwardCompatAuthenticatorTrait not found on console cache:warmup command #1213

Open
viktorkuk opened this issue Mar 7, 2024 · 0 comments

Comments

@viktorkuk
Copy link

viktorkuk commented Mar 7, 2024

Hello.

I have encountered a problem
After update from php:8.1.16-fpm-alpine3.17 to php:8.2.16-fpm-alpine3.18 docker image
symfony version 6.3
lexik/jwt-authentication-bundle: v2.20.3

Here is Dockerfile part:

FROM php:8.2.16-fpm-alpine3.18
...
RUN --mount=type=cache,target=/root/.composer/cache composer install --no-dev --classmap-authoritative --no-scripts --no-progress
...
RUN /var/www/html/bin/console cache:warmup --no-optional-warmers

I get an error:

 > [php 4/7] RUN /var/www/html/bin/console cache:warmup --no-optional-warmers:
#36 2.880
#36 2.880         namespace Lexik\Bundle\JWTAuthenticationBundle\Security\Authenticator;
#36 2.880
#36 2.880         use Symfony\Component\HttpFoundation\Request;
#36 2.880         use Symfony\Component\Security\Http\Authenticator\Passport\Passport;
#36 2.880
#36 2.880         /**
#36 2.880          * @internal
#36 2.880          */
#36 2.880         trait ForwardCompatAuthenticatorTrait
#36 2.880         {
#36 2.880             public function authenticate(Request $request): Passport
#36 2.880             {
#36 2.880                 return $this->doAuthenticate($request);
#36 2.880             }
#36 2.880         }
#36 2.880     PHP Fatal error:  Trait "Lexik\Bundle\JWTAuthenticationBundle\Security\Authenticator\ForwardCompatAuthenticatorTrait" not found in /var/www/html/vendor/lexik/jwt-authentication-bundle/Security/Authenticator/JWTAuthenticator.php on line 40

After some research I found that the problem only appears on x86 (tested on ubuntu 22.04) on ARM Mac or Linux the issue is not reproduced

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

No branches or pull requests

1 participant