JWTRefreshTokenBundle icon indicating copy to clipboard operation
JWTRefreshTokenBundle copied to clipboard

This line throws han error: Parse Error: syntax error, unexpected '[' on PHP 5.6

Open nicolasmoreira opened this issue 5 years ago • 5 comments

https://github.com/gesdinet/JWTRefreshTokenBundle/blob/7df93af1466703af7f50d6f6dcee41d3f7883a63/DependencyInjection/Compiler/DoctrineMappingsCompilerPass.php#L31

nicolasmoreira avatar Sep 25 '18 18:09 nicolasmoreira

I was trying in a new branch php 5.6 test, but everything seems to be OK.

https://travis-ci.org/gesdinet/JWTRefreshTokenBundle/jobs/433129651

Are you sure is this line? I mean this error looks like new array constructor syntax from php 7 $a = [] instead $a = array();

markitosgv avatar Sep 25 '18 20:09 markitosgv

Hi! in my case the error was raised on cache:clear symfony command.

nicolasmoreira avatar Sep 25 '18 20:09 nicolasmoreira

Got the same issue in my production server (php 5.6). It works if i remove the parenthesis : $config = $container->getExtensionConfig('gesdinet_jwt_refresh_token')[0];

Thomerdos avatar Jan 11 '19 07:01 Thomerdos

@Thomerdos I fix it in the last commit, could you please try it?

markitosgv avatar Jan 11 '19 09:01 markitosgv

@markitosgv It's indeed working

Thomerdos avatar Jan 11 '19 10:01 Thomerdos