-
Notifications
You must be signed in to change notification settings - Fork 37
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
syntax error, unexpected token "list", expecting "(" #83
Comments
Thank you for reporting this issue! As Laravel is an open source project, we rely on the community to help us diagnose and fix issues as it is not possible to research and fix every issue reported to us via GitHub. If possible, please make a pull request fixing the issue you have described, along with corresponding tests. All pull requests are promptly reviewed by the Laravel team. Thank you! |
A different environment is now experiencing the same issue. The staging environment shows the same issue as well: https://staging.keystone.guru/explore.
|
This is actively blocking me still. Is there anyone out there who can help me out here? I'm not looking forward to diving into a serialization library to figure out why this happens, costing me hours :(. I'm kind of surprised I'm the only one running into such a major blocker? If it was really this broken this repo would be flooded but obviously it ain't so what am I doing wrong here? Again any help would be much appreciated. |
An update to this: running |
I'm sorry I keep writing here but it's still an issue. I don't expect this to be fixed at the drop of a hat but what's the status of getting this issue fixed? Not having a timeline is bad 😢. Right now I've deployed all my changes but I've had to disable route caching to make it work. It's not the end of the world but I'd still like to get it resolved. I'm still fairly confident it's an issue on my side somewhere but without any pointers it's neigh impossible for me to figure out. |
list is reserved keyword see https://www.php.net/manual/en/reserved.keywords.php |
Ahh I knew it was something on my side! Thank you so much, that was the issue indeed. I never thought of this but it makes total sense. Thank you so much!! |
Serializable Closure Version
1.3.3
PHP Version
8.2.15
Description
Recently I upgraded my Laravel app from 8.x to 10.x. Along with PHP from 7.4 to 8.2. Since doing this, I'm running into the following exception(s):
syntax error, unexpected token "list", expecting "("
But also this one, which is much shorter:
syntax error, unexpected token "new", expecting "("
I feel like something's not right in these files which causes the serializer to break. I've read a bunch in this Github issue tracker and the 2 issues I could find were both related to that. It's just that I have no idea where to possibly start looking.
I tried commenting all other code in the controller except those routes but to no avail, the issue persists. The strange thing is is that on my local environment using Docker this error doesn't come and everything works fine. No amount of clearing caches has resolved this either.
I'm hoping anyone here knows how to proceed since I'm effectively stuck with this one.
Steps To Reproduce
Two offending controllers:
https://github.com/Wotuu/keystone.guru/blob/development/app/Http/Controllers/Ajax/AjaxDungeonRouteController.php#L80
https://github.com/Wotuu/keystone.guru/blob/development/app/Http/Controllers/DungeonRouteController.php#L39
Accessing the routes associated with this function produces the linked error.
It seems that for both these files the first function is affected, but not the others. In other controllers all functions work fine.
See also https://staging.keystone.guru/new.
Sorry I do not have better reproduction steps. Again it works perfectly fine on localhost but not on my staging environment.
The text was updated successfully, but these errors were encountered: