syntax error, unexpected token "readonly", expecting identifier #374
Labels
priority: p2
Moderately-important priority. Fix may not be included in next release.
type: bug
Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Thanks for stopping by to let us know something could be better!
PLEASE READ: If you have a support contract with Google, please create an issue in the support console instead of filing on GitHub. This will ensure a timely response.
Please run down the following list and make sure you've tried the usual "quick fixes":
If you are still having issues, please be sure to include as much information as possible:
Environment details
Repo that is using this package - https://github.com/colopl/laravel-spanner
Steps to reproduce
ParseError {#2663
#message: "syntax error, unexpected token "readonly", expecting identifier"
#code: 0
#file: "./vendor/google/cloud-spanner/src/V1/TransactionOptions/ReadOnly.php"
#line: 16
trace: {
./vendor/google/cloud-spanner/src/V1/TransactionOptions/ReadOnly.php:16 { …}
./vendor/composer/ClassLoader.php:428 { …}
./vendor/google/gax/src/Serializer.php:363 { …}
./vendor/google/gax/src/Serializer.php:416 { …}
./vendor/google/gax/src/Serializer.php:368 { …}
./vendor/google/gax/src/Serializer.php:416 { …}
./vendor/google/gax/src/Serializer.php:126 { …}
./vendor/google/cloud-spanner/src/Connection/Grpc.php:1192 { …}
./vendor/google/cloud-spanner/src/Connection/Grpc.php:790 { …}
./vendor/google/cloud-spanner/src/Operation.php:234 { …}
./vendor/google/cloud-spanner/src/Result.php:190 { …}
Google\Cloud\Spanner\Result->Google\Cloud\Spanner{closure}() {}
./vendor/google/cloud-core/src/ExponentialBackoff.php:80 { …}
./vendor/google/cloud-spanner/src/Result.php:192 { …}
Google\Cloud\Spanner\Result->rows() {}
./vendor/colopl/laravel-spanner/src/Colopl/Spanner/Connection.php:246 { …}
./vendor/colopl/laravel-spanner/src/Colopl/Spanner/Connection.php:428 { …}
./vendor/laravel/framework/src/Illuminate/Database/Connection.php:672 { …}
./vendor/colopl/laravel-spanner/src/Colopl/Spanner/Connection.php:247 { …}
./vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php:2484 { …}
./vendor/colopl/laravel-spanner/src/Colopl/Spanner/Query/Builder.php:177 { …}
./vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php:2472 { …}
./vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php:3006 { …}
./vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php:2473 { …}
./app/Console/Commands/Test.php:56 {
App\Console\Commands\Test->handle()
› ->orderBy('id')
› ->get();
}
./vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php:36 { …}
./vendor/laravel/framework/src/Illuminate/Container/Util.php:41 { …}
./vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php:93 { …}
./vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php:37 { …}
./vendor/laravel/framework/src/Illuminate/Container/Container.php:653 { …}
./vendor/laravel/framework/src/Illuminate/Console/Command.php:136 { …}
./vendor/symfony/console/Command/Command.php:307 { …}
./vendor/laravel/framework/src/Illuminate/Console/Command.php:121 { …}
./vendor/symfony/console/Application.php:989 { …}
./vendor/symfony/console/Application.php:299 { …}
./vendor/symfony/console/Application.php:171 { …}
./vendor/laravel/framework/src/Illuminate/Console/Application.php:102 { …}
./vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php:129 { …}
./artisan:37 { …}
}
}
Code example
# example
Regular DB query
Hello!
I am receiving the following error. Could it be because in PHP 8.1 we cannot use ReadOnly as class name? I have seen that renaming class name helped, for example - schmittjoh/serializer#1331 .
Making sure to follow these steps will guarantee the quickest resolution possible.
Thanks!
The text was updated successfully, but these errors were encountered: