JMSSerializerBundle
JMSSerializerBundle copied to clipboard
Deprecation alert from jsm/serializer while using php 7.4
When using 2.4.4 (latest 2.x) version of this bundle on php 7.4 environment, you will get this message:
PHP Deprecated: Unparenthesized `a ? b : c ? d : e` is deprecated. Use either `(a ? b : c) ? d : e` or `a ? b : (c ? d : e)` in /app/vendor/jms/serializer/src/JMS/Serializer/SerializationContext.php on line 123
As that version is using "jms/serializer": "^1.10",
and it should be upgraded to be 1.14.1 which is created to resolve that issue.
I had the same problem. The version 2.4.4 of the bundle doesn't conflict with any jms/serialiser 1.* version. You can add 1.14.1 explicitly to your composer.json config by running the composer require 'jms/serializer: ^1.14.1'
command.
You can also run c up jms/serializer-bundle --with-dependencies
and it will update all packages the bundle requires, including jms/serializer.
Finally you can run just c up jms/serializer
without declaring the explicit requirement in composer.json, which will also update the library to 1.14.1