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

[BUG] EnableEncryptionConfigCommand not supporting php7 #1173

Closed
janek-papryka opened this issue Dec 1, 2023 · 1 comment · Fixed by #1174
Closed

[BUG] EnableEncryptionConfigCommand not supporting php7 #1173

janek-papryka opened this issue Dec 1, 2023 · 1 comment · Fixed by #1174

Comments

@janek-papryka
Copy link

janek-papryka commented Dec 1, 2023

I'm getting an error while executing symfony command php bin/console cache:warmup --env=test

LexikJWTAuthenticationBundle: v2.20.0

Works in: v2.19.1

>php -v
PHP 7.4.33 (cli) (built: Feb 14 2023 18:31:54) ( NTS )
Copyright (c) The PHP Group
Zend Engine v3.4.0, Copyright (c) Zend Technologies
    with Zend OPcache v7.4.33, Copyright (c), by Zend Technologies

ERROR:

>php bin/console cache:warmup --env=test
ParseError {#19881
  #message: "syntax error, unexpected 'private' (T_PRIVATE), expecting variable (T_VARIABLE)"
  #code: 0
  #file: "./vendor/lexik/jwt-authentication-bundle/Command/EnableEncryptionConfigCommand.php"
  #line: 45
  trace: {
    ./vendor/lexik/jwt-authentication-bundle/Command/EnableEncryptionConfigCommand.php:45 { …}
    Symfony\Component\ErrorHandler\DebugClassLoader->loadClass() {}
    spl_autoload_call() {}
    ./vendor/symfony/config/Resource/ClassExistenceResource.php:78 { …}
    ./vendor/symfony/dependency-injection/ContainerBuilder.php:370 { …}
    ./vendor/symfony/console/DependencyInjection/AddConsoleCommandPass.php:121 { …}
    ./vendor/symfony/dependency-injection/Compiler/Compiler.php:82 { …}
    ./vendor/symfony/dependency-injection/ContainerBuilder.php:757 { …}
    ./vendor/symfony/http-kernel/Kernel.php:546 { …}
    ./vendor/symfony/http-kernel/Kernel.php:789 { …}
    ./vendor/symfony/http-kernel/Kernel.php:128 { …}
    ./src/Kernel.php:27 {
      App\Kernel->boot()
      › {
      ›     parent::boot();
    }
    ./vendor/symfony/framework-bundle/Console/Application.php:168 { …}
    ./vendor/symfony/framework-bundle/Console/Application.php:74 { …}
    ./vendor/symfony/console/Application.php:171 { …}
    ./vendor/symfony/runtime/Runner/Symfony/ConsoleApplicationRunner.php:54 { …}
    ./vendor/autoload_runtime.php:35 { …}
    ./bin/console:11 { …}
  }
}
2023-12-01T10:42:02+01:00 [critical] Uncaught Error: syntax error, unexpected 'private' (T_PRIVATE), expecting variable (T_VARIABLE)
@janek-papryka janek-papryka changed the title [BUG] ParseError while bin/console cache:warmup [BUG] EnableEncryptionConfigCommand not supporting php7 Dec 1, 2023
@webhdx
Copy link
Contributor

webhdx commented Dec 1, 2023

I've opened a PR to fix this issue: #1172

We had the same surprise today in the morning when we noticed our CI builds are failing. Hopefully it can get merged and released soon.

@chalasr chalasr closed this as completed Dec 1, 2023
chalasr added a commit that referenced this issue Dec 2, 2023
This PR was merged into the 2.x branch.

Discussion
----------

Fix for PHP <7.4 compatibility

Typed properties are only allowed since PHP 7.4.
Fixes #1173 for PHP <7.4
Follow up for #1172

Commits
-------

287a079 PHP <7.4 compatibility
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

Successfully merging a pull request may close this issue.

3 participants