Closed olivier1980 closed 2 years ago
What is the JMS version compatible with PHP 8?
I don't know..all I see is that the example for php 8 doesn't work, and I traced it to the JMS library...on a related note, the '#[ORM\Column(type: 'integer')]' notation for the orm fields didn't get picked up by the Symfony migrations:diff command either
Nevermind, I found the answer, in Symfony you must declare if you're using annotation vs properties..https://stackoverflow.com/questions/66769981/how-can-i-use-php8-attributes-instead-of-annotations-in-doctrine
There are 2 examples for making a Product entity in https://github.com/dustin10/VichUploaderBundle/blob/master/docs/usage.md.
The line '#[Vich\UploadableField(mapping: 'img', fileNameProperty: 'imageName', size: 'imageSize')]' should set a UploadableField property. Problem is, the jms/metadata that is supposed to detect the metadata for the class will not recognize this php 8 syntax. So either the JMS dependency should be set to one that is PHP 8 compatible, or the docs should not give PHP 8 examples.