-
-
Notifications
You must be signed in to change notification settings - Fork 587
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Upcoming 2.0 #743
Upcoming 2.0 #743
Conversation
What is the ETA of version 2.0? |
there is not really. |
a41c4a6
to
2729037
Compare
Wohooo! Rebased |
48e41d4
to
e6f5709
Compare
thanks for working on this. On my wishlist performance improvements would come first. We use jms serializer heavily for an api. and the jms serializer is taking a huge chunk of the response time for big object graphs due to its graph navigator pattern. so if there was a way to make the serializer faster for 2.0, even if it means removing some uncommon features, that would be cool. we mostly use versioning, groups and virtual properties. i don't know if there is potential for improvement when you don't need event listeners for example. do you have any plans in this regard? |
Regarding your setup, to get the best performance make sure to have a look to #760 and #684. They default values gives you the worst performance, this because the aim is guarantee 100% of backward compatibility, but setting: $skipVirtualTypeInit = true;
$initializeExcluded = false; In some cases i got even 300% of performance improvements without doing anything else... If you are using the symfony-bundle v2.x, then you are already benefiting the optimized values. |
5416310
to
87874d6
Compare
399cc6f
to
1c2494a
Compare
… compiled graph navigators
The intent is to cleanup the core, keeping it compatible with the public api for the majority of cases.
There will be no killing feature, but mainly closing a big list of annoying bugs and unexpected behaviors that are present in the 1.x versions.
After many year, some bugs become features and many developers found workarounds that were relying on those bugs... the 2.0 release will be mainly a cleaning release.
The goal is to allow upgrading transparently from 1.x to 2.x serializer in "standard" use-cases, including customizations as custom subscribing handlers, event listeners, exclusion strategies.
Features and bugfixes
Here a list of features, enhancements and bugfixes that will be introduced with the 2.0 release (not all are yet confirmed)
Breaking changes
GenericSerializationVisitor
andGenericDeserializationVisitor
, extend the specific visitor instead.GraphNavigatorInterface
interface, changed method signatures to useGraphNavigatorInterface
instead ofGraphNavigator
classGraphNavigator
is an abstract class now and is ony for internal proposesVisitorInterface::getNavigator()
from all the visitors, useContext::getNavigator()
insteadJsonSerializationVisitor::addData
, useJsonSerializationVisitor::setData
insteadISO8601
toRFC3339
NULL
tofalse
Context::accept()
method, useContext::getNavigator()->accept()
AbstractVisitor::getNamingStrategy()
method from all the visitorsVisitorInterface
, useSerializationVisitorInterface
andDeserializationVisitorInterface
insteadSerializerInterface::serialize
signature toserialize($data, $format, SerializationContext $context = null, $type = null)
ArrayTransformerInterface::toArray
signature totoArray($data, SerializationContext $context = null, $type = null);
Context::initialize
, useDeserializationContext::initialize
andSerializationContext::initialize
Serializer::setSerializationContextFactory
andSerializer::setDeserializationContextFactory
, context factories are now constructor parametersfinal
many classes, use composition over inheritanceIn which situations transparent upgrade will not work?
Transparent upgrades probably are not possible if:
Serializer
re-implementing theserialize
ortoArray
methodSerializerInterface
orArrayTransformerInterface
ObjectConstructorInterface
Github issues
Doing a quick analysis of the currently listed github "issues" for the jms serializer and jms serializer bundle i found out that:
The 2.0 release should close at least 40 tickets
Todo
Issues: