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
API broken in release 3.6.10 #906
Comments
This issue has been mentioned on phpList Discuss. There might be relevant details there: https://discuss.phplist.org/t/api-v2-not-working-for-3-6-10-installation/8509/2 |
I can confirm. Same issue here with 3.6.10 |
What would be the approach here? My Host updated PHP to 8.1 and now my app that is depending on the API is broken. Does jms/serializer package need to be updated in jms/serializer-bundle ? |
I recommend to downgrade to a version that works, and then we can review what needs to be done to fix this. Any suggestions are welcome. |
This issue has been mentioned on phpList Discuss. There might be relevant details there: https://discuss.phplist.org/t/newbie-trying-to-use-the-api/8787/2 |
In version 3.6.12 I can confirm this is not working and the freshly downloaded coded uses ReadOnly as an annotation. |
I think I read the first post too quickly. Never mind, I will update that portion of my install. |
I went into the bases/vendor/jms/serializer-bundle directory and followed the instructions at this link: https://jmsyst.com/bundles/JMSSerializerBundle and then changed two references in the Driver file from ReadOnly to ReadOnlyProperty and I now have my installation of phplists exposing a functional API on php 8.2. I will continue to watch my apache error logs and see if anythings needs updated. I did do a preliminary check of all deprecated calls for that upgrade and none appeared to be in use, so I believe the ReadOnlyProperty is the only relevant change. |
Raising this problem here because I am not sure whether it is with the build process or somewhere else.
Using the API I get php errors because of the use of literal
ReadOnly
in a file in the jms packagePHP Parse error: syntax error, unexpected token "readonly" in /home/duncan/www/lists_3.6.10/base/vendor/jms/serializer/src/JMS/Serializer/Metadata/Driver/AnnotationDriver.php on line 80
In php 8.1 readonly is a reserved keyword.
But looking at the jms CHANGELOG.md file, it seems to be version 1.14.1 from 2020-02-22. In GitHub the current version of the jms package at schmittjoh / serializer is now 3.15.0 and the issue appears to have been resolved because
ReadOnly
has been changed toReadOnlyProperty
.The text was updated successfully, but these errors were encountered: