jms/serializer
Library for (de-)serializing data of any complexity; supports XML, and JSON.
3.32.7
146M downloads/mo
#453 most downloaded on Packagist
schmittjoh/serializer
What this package is like to depend on
Last release 5 months ago
11 Mar 2026
Release timing varies
gaps range from 2 weeks to 8 months
Some releases are documented
notes for 37 of 87 stable releases
Nothing withdrawn
no release was ever pulled
14 years old
95 releases · first in 2013
2 releases in the last 12 months
see the full history below
Release timeline
95 releases · Jan 2013 to Mar 2026Releases
latest 60 of 95-
3.32.711 Mar 2026Release notes
Open source →What's Changed
- Add support for Symfony's DatePoint in DateHandler, close #1617 by @Kocal in #1618
- Fix case-insensitive boolean deserialization by @NikoGrano in #1619
New Contributors
Full Changelog: 3.32.6...3.32.7
-
3.32.628 Nov 2025Release notes
Open source →What's Changed
- Test for null or empty strings when deserializing dates by @gnat42 in #1600
- Spelling by @jsoref in #1604
- Add check-spelling by @scyzoryck in #1605
- Do not call Reflection*::setAccessible() in PHP >= 8.1 by @W0rma in #1608
- Fix CI + update ci dependencies by @W0rma in #1612
- Fix PHP 8.5 + symfony deprecations by @W0rma in #1613
- Test against symfony 8 by @W0rma in #1615
New Contributors
Full Changelog: 3.32.5...3.32.6
-
3.32.526 May 2025Release notes
Open source →What's Changed
- Add PHPStan type for JMS serialization Type by @scyzoryck in #1597
- Parse list into
listtype instead ofarrayby @simPod in #1599 - XML Serialization: fix #1601 by @NikoGrano in #1602
New Contributors
- @NikoGrano made their first contribution in #1602
Full Changelog: 3.32.4...3.32.5
-
3.32.406 Apr 2025Release notes
Open source →What's Changed
- Fix array access in Doctrine Driver for new Doctrine ORM 3.1+ by @scyzoryck in #1592
- Do not change types during deseralization by @scyzoryck in #1578
- Update PHP test versions by @scyzoryck in #1593
- Fix rector config by @scyzoryck in #1594
- Fix warnings in a test code by @scyzoryck in #1595
Full Changelog: 3.32.3...3.32.4
-
3.32.311 Feb 2025Release notes
Open source →What's Changed
- Do not typehint DNF union types by @scyzoryck in #1585
Full Changelog: 3.32.2...3.32.3
-
3.32.203 Jan 2025Release notes
Open source →What's Changed
- Add true/false as primitive types by @bobvandevijver in #1582
- Test - add attributes to ObjectWithEnums' props by @iKsSs in #1581
Full Changelog: 3.32.1...3.32.2
-
3.32.103 Dec 2024Release notes
Open source →What's Changed
- build(github): update actions by @scyzoryck in #1564
- Fix syntax error in annotations.rst by @gregtyler in #1570
- Support value types in serialization by @gregtyler in #1569
- Allow PHPStan PHPDoc parser 2.0 by @ruudk in #1572
- Allow Rector 2.x@dev by @scyzoryck in #1574
- feat(unions): Add support for simple arrays by @scyzoryck in #1571
New Contributors
- @gregtyler made their first contribution in #1570
Full Changelog: 3.31.1...3.32.1
-
3.31.131 Oct 2024Release notes
Open source →What's Changed
- fix(unions): Filter out null type by @scyzoryck in #1563
Full Changelog: 3.31.0...3.31.1
-
3.31.016 Oct 2024Release notes
Open source →What's Changed
- docs(annotations): Link new Changelog. Add docs for 3.30.0 by @scyzoryck in #1539
- Fix incorrect namespace for ANNOTATIONS_TO_ATTRIBUTES class. by @tandrus in #1541
- deps(composer): Update to PHPUnit 11 & Rector 1.0 by @scyzoryck in #1540
- docs(annotations): Prefer Attributes over Annotations by @scyzoryck in #1534
- Fix code style by @scyzoryck in #1542
- Union types deserialisation by @idbentley in #1546
- feat: support imported array shapes (
@phpstan-import-type) by @simPod in #1551 - refactor(driver): use instanceof checks for correct phpdoc node by @simPod in #1548
- Allow union deserialization using discriminator map by @idbentley in #1553
- fix(doctrine 3): fix phpstan issues with doctrine 3.x by @scyzoryck in #1556
- Remove unused properties by @scyzoryck in #1555
- Doctrine ODM: fix tests for 2.0 by @scyzoryck in #1557
- Do not use single quotes in enum type definition by @bobvandevijver in #1561
- DateTime - Deserialize from more formats (default) by @iKsSs in #1559
New Contributors
- @tandrus made their first contribution in #1541
- @idbentley made their first contribution in #1546
Full Changelog: 3.30.0...3.31.0
-
3.30.024 Feb 2024Release notes
Open source →What's Changed
- Require PHP 7.4 and Symfony 5.4 by @mbabker in #1528
- build(ci): Add Rector into static analysis. by @scyzoryck in #1530
- Remove min-stability by @scyzoryck in #1535
- Fix serialization of BackedEnum - annotation without name/value by @iKsSs in #1536
- [B/C Break] Make the Annotations package optional in the builder API by @mbabker in #1471
Upgrading
Starting from this release doctrine/annotations is an optional package.
If you still want to use them, please make sure that you require incomposer.jsonfile.We strongly recommend to start using Attributes with PHP 8.
You can easily migrate annotations to attributes with rector andRector\Symfony\Set\SymfonySetList::ANNOTATIONS_TO_ATTRIBUTESrules.New Contributors
Full Changelog: 3.29.1...3.30.0
-
3.29.114 Dec 2023Nothing published for this version
-
3.29.009 Dec 2023Nothing published for this version
-
3.28.003 Aug 2023Nothing published for this version
-
3.27.029 Jul 2023Nothing published for this version
-
3.26.024 Jun 2023Nothing published for this version
-
3.25.009 Jun 2023Nothing published for this version
-
3.24.004 Jun 2023Nothing published for this version
-
3.23.017 Feb 2023Nothing published for this version
-
3.22.003 Feb 2023Nothing published for this version
-
3.21.010 Jan 2023Nothing published for this version
-
3.20.006 Jan 2023Nothing published for this version
-
3.19.006 Jan 2023Nothing published for this version
-
3.18.212 Sep 2022Nothing published for this version
-
3.18.124 Aug 2022Nothing published for this version
-
3.18.006 Aug 2022Nothing published for this version
-
3.17.128 Dec 2021Nothing published for this version
-
3.17.014 Dec 2021Nothing published for this version
-
3.16.022 Nov 2021Nothing published for this version
-
3.15.014 Oct 2021Release notes
Open source →Merged pull requests:
- allow the groups annotation to use "groups" as parameter name #1351 (goetas)
- Allow stable PHPStan PHPDoc Parser #1346 (mbabker)
- Symfony 6 and DBAL 3 compat #1345 (mbabker)
- Proposed fix for serializing custom DateTimeInterface implementations #1344 (andrei-dascalu)
- Allow to add prefix to twig helpers #1341 (goetas)
- Fix phpstan return type #1329 (dgafka)
-
3.14.006 Aug 2021 -
3.14.0-rc206 Aug 2021 pre-release -
3.14.0-rc101 Aug 2021 pre-release -
3.13.005 Jul 2021Release notes
Open source →Merged pull requests:
- Use FilesystemAdapter when possible to fix compatibility with doctrine/cache 2 #1328 (rasmustnilsson)
- Use PsrCachedReader and drop doctrine/cache #1327 (simPod)
- Check data can be casted before actual casting #1317 (scaytrase)
- Add methods for data_collector #1316 (gam6itko)
- fix iterable::class that does not exist #1315 (Tobion)
- useful error when data is not an object #1313 (dbu)
- Fix callback-method setup using XmlDriver #1310 (curzio-della-santa)
-
3.12.325 Apr 2021 -
3.12.223 Mar 2021 -
3.12.121 Mar 2021Release notes
Open source →Fixed bugs:
- Fix for issue #1286: loading fails when deserializing XML #1289 (jviersel-ipronto)
- Fix DocBlockTypeResolver crash on PHP 7.3 and less #1288 (simPod)
- Doctrine
jsonfield type can contain not only an array #1295 (gam6itko)
Merged pull requests:
- add missing CustomPropertyOrderingStrategyTest #1296 (gam6itko)
- fix #314 #1293 (gam6itko)
- Show all toctree on index page #1292 (gam6itko)
Changelog
-
3.12.004 Mar 2021Release notes
Open source →Fixed bugs:
Merged pull requests:
- [DOCS] Add 'Deserialization Exclusion Strategy with Groups' topic #1287 (gam6itko)
- Add ascii_string, dateinterval, and json to doctrine type mapping #1281 (dontub)
- Cleanup #1278 (simPod)
- Drop coverage badge #1277 (simPod)
- Introduce PHPStan #1276 (simPod)
- Replace Scrutinizer with GA #1275 (simPod)
- Add throws tag #1273 (VincentLanglet)
-
3.11.029 Dec 2020Release notes
Open source →Implemented enhancements:
- Allow installing and build on PHP 8 #1267 (sanmai)
- Use phpstan/phpdoc-parser to retrieve additional type information from PhpDoc #1261 (Namoshek)
- DoctrineObjectConstructor Using array_key_exists() on objects is deprecated in php7.4 #1253 (gam6itko)
- Add Composer cache for v2 on Travis CI #1266 (sanmai)
- Allow interfaces for DocBlock #1256 (marein)
- Allow interfaces for typed properties #1254 (marein)
-
3.10.029 Oct 2020 -
3.9.026 Aug 2020Release notes
Open source →Implemented enhancements:
- Add support for skippable (de)serialization handlers #1238 (bobvandevijver)
- added support for milliseconds in DateInterval deserialization #1234 (ivoba)
Fixed bugs:
- Do not load entities when deserializing if their identifier is not ex… #1247 (goetas)
- Do not use excluded fields when fetching entities #1246 (goetas)
- Ensure accessors are cached per property when using reflection #1237 (goetas)
Closed issues:
- Annotation cache does not honor naming strategy #1244
- Authorization Bypass Vulnerability - v1.14.1 #1242
- @SkipWhenEmpty and @Exclude combination leads to unexpected behavior #1240
- How to pass MetadataFactory::create() into SerializationVisitorInterface::startVisitingObject()? #1226
- Custom type in array key is not respected when serializing to JSON #1223
- xml:id or xml:lang attributes handling #1221
- Accessing static property as non static #1156
- AbstractVisitor::getElementType() must be of the type array or null, string returned #1027
Merged pull requests:
- remove missing deprecated removal on hasData #1245 (rflavien)
- Change return type of SerializerBuilder::build() to Serializer #1241 (icanhazstring)
- docs: add note about array key type being ignored when serializing #1235 (eduardoweiland)
- Sort packages in composer.json #1228 (simPod)
- fix xml embeddable data getReference for DoctrineObjectConstructor #1224 (gam6itko)
- fixed exception for strict_types #1222 (ivoba)
-
3.8.028 Jun 2020Release notes
Open source →Implemented enhancements:
Fixed bugs:
Closed issues:
- Serializer Group #1213
- Notice: Accessing static property Proxies\__CG__\examplemodel\inherit\Customers::$lazyPropertiesNames as non static #1209
- Unserialization failure after upgrading to 3.7.0 (
excludeIfrelated?) #1207 - [RFC] Removing abandoned hoa from serializer #1182
- hoa/protocol package conflicts with laravel helper #1154
Merged pull requests:
- Remove conflicts to hoa packages #1216 (alexander-schranz)
- Test also against twig 3 #1215 (alexander-schranz)
- Allow doctrine/persistence v2/v3 #1210 (goetas)
- Fix deprecated assertFileNotExist #1197 (mpoiriert)
-
3.7.023 May 2020Release notes
Open source →Implemented enhancements:
- Allow deserialization of typehinted DateTimeInterface to DateTime class #1193 (goetas)
- Infer types from PHP 7.4 type declarations #1192 (goetas)
- Support conditional exclude for classes #1099 (arneee)
Fixed bugs:
- Exclude if at class level are not merge #1203
- Class level expression exclusion strategy should work with hierarchies #1204 (goetas)
Closed issues:
- Specify Type as nullable? #1191
- Does someone know how to use phpdoc with serializer? #1185
- Serializer doesn't keep types but convert them if not it can #1181
- ConditionalExpose/Exclude annotation does not work on class level #1098
Merged pull requests:
-
3.6.021 Mar 2020Release notes
Open source →Implemented enhancements:
- DateTime parsed invalid date #1152
- do not hide Exceptions from custom handlers but correctly handle null #1169 (Hikariii)
Fixed bugs:
Closed issues:
- thrown Exceptions are hidden when serializing complex objects with a handler #1168
Merged pull requests:
-
3.5.022 Feb 2020Release notes
Open source →Implemented enhancements:
- Improved return type for fluent methods in Context #1162 (wouterj)
- Handle array format for dateHandler #1108 (VincentLanglet)
Fixed bugs:
Merged pull requests:
-
3.4.014 Dec 2019Release notes
Open source →Implemented enhancements:
- Symfony 5.0 compatibility #1145 (goetas)
- Support new doctrine ODM proxy objects #1139 (notrix)
- Visitor interfaces in handlers #1129 (derzkiy)
Closed issues:
- [Improvement] Ability to define a global exclusion_policy: ALL for all classes. #1144
- Embed JSON string without extra escape #1142
- Make possible to set ArrayCollectionHandler classes from outside #1131
Merged pull requests:
- Remove PHP 7.4 from
allow\_failuresmatrix #1138 (carusogabriel) - Remove unnecessary cast #1133 (carusogabriel)
- Fix PHPUnit deprecations #1123 (Majkl578)
-
3.3.020 Sep 2019Release notes
Open source →Implemented enhancements:
- Update major version that v2.x deprecation will be removed #1134 (carusogabriel)
- Implement short expose syntax for XML as it is available for YAML #1127 (goetas)
Fixed bugs:
Closed issues:
Merged pull requests:
-
3.2.004 Sep 2019Release notes
Open source →Fixed bugs:
- PHP7.4: Deprecated warning - serializationContext.php on line 152 #1111
Closed issues:
- StaticPropertyMetadata first constructor argument not nullable #1116
- Add support for PSR-7 URIInterface objects #1115
- Upgraded 2.4 -> 3.4 / Symfony 4.3.3 #1112
- Empty namespace #1087
- Format constants (JSON, XML) #1079
- @ExclusionPolicy(policy="ALL") causes PHP notice message #1073
Merged pull requests:
-
3.1.128 Jun 2019 -
3.1.025 Jun 2019Release notes
Open source →Implemented enhancements:
- Add support for iterable and Iterator #1096 (simPod)
- Implement "empty" XML namespace handling #1095 (discordier)
- Move type check when deserializing into the graph navigator #1080 (goetas)
- Allow loading different YAML extensions #1078 (scaytrase)
Fixed bugs:
Closed issues:
- Behavior serializeNull -> not always honored in 2.* (but was in 1.*) #1101
- Support for iterable #1094
- Prevent deserialisation with missing required field #1090
- Allow using @XmlValue together with @Accessor/@AccessType #1083
- Support *.yaml extension #1077
- Instructions for upgrading from addData in 1.x don't work #1030
Merged pull requests:
- Add psalm specific generic return type for deserialize #1091 (bdsl)
- Fix: Typo #1084 (localheinz)
-
3.0.123 Apr 2019Release notes
Open source → -
3.0.023 Apr 2019Release notes
Open source →Breaking changes:
Implemented enhancements:
Closed issues:
- [RFC] revert #946 and release new major #1058
Merged pull requests:
-
2.3.017 Apr 2019Release notes
Open source →Implemented enhancements:
- Expose and test GroupsExclusionStrategy::getGroupsFor() #1069 (goetas)
- add options property to XmlDeserializationVisitorFactory and XmlDeserializationVisitor, propagate defined value from factory to simplexml_load_string call #1068 (kopeckyales)
Closed issues:
- Override existing property with another #1067
- disabling cdata by default #1065
- unwrap child class instance #1064
- Make JsonDeserializationVisitor extendable #1055
Merged pull requests:
-
2.2.027 Feb 2019Release notes
Open source →Implemented enhancements:
Fixed bugs:
- xmlRootPrefix missing from unserialized metadata #1050
- Non-locale aware encoding of doubles, closes #1041 #1042 (Grundik)
Closed issues:
- GROUP BY #1051
- Using @Until and @Since on class level #1048
- [Semantical Error] The annotation "@generated" in class JMS\Serializer\Type\InnerParser was never imported #1046
- ReflectionException when (de)serializing unless fully qualified classname is used #1045
- Add use of annotation registry to docs #1044
- Values of type "double" should not use locale-specific encoding #1041
- SF4: JMS serializer seems to be ignoring global naming strategy #1037
- @SerializedName not being ignored since 2.x is bug or feature? #1036
- What should I use instead of the dropped GenericDeserializationVisitor class? #1035
- DateTime and DateTimeImmutable from PHP 7.1 serialization and deserialization with microseconds #1033
- Provide an option to the SerializeBuilder to set AccessType to a specified value globally #1025
- Serialize Generator #1023
Merged pull requests:
- Test on php 7.3 #1054 (goetas)
- xmlRootPrefix missing from unserialized metadata #1053 (goetas)
- Allow @Since and @Until within @VirtualProperty on class level #1049 (tjveldhuizen)
- Document use of AnnotationRegistry #1047 (andig)
- Fix result of code example #1039 (henrikthesing)
-
2.1.011 Jan 2019Release notes
Open source →Closed issues:
- Compile error Declaration of [...] must be compatible with [...] #1024
- Exclude field for depth #1022
Merged pull requests:
-
2.0.212 Dec 2018Release notes
Open source →Fixed bugs:
- jms serializer 2.0 Error in debug mode #1018
- AbstractDoctrineTypeDriver::normalizeFieldType() must be of the type string, null given #1015
- allow empty strings and numbers as metadata type parameters #1019 (goetas)
- internal classes have false in reflection::getFilename() #1013 (chregu)
Closed issues:
- DateTime converted to ArrayObject instead of string in custom visitor class #1017
Merged pull requests:
-
2.0.129 Nov 2018Nothing published for this version
-
2.0.009 Nov 2018Nothing published for this version
-
2.0.0-beta112 Sep 2018 pre-releaseNothing published for this version
-
2.0.0-RC117 Oct 2018 pre-releaseNothing published for this version
-
1.14.122 Feb 2020Release notes
Open source →Closed issues:
- Virtual Property do not get serialized if getter name conflict with a class property #1164
- SerializationGraphNavigator not receiving correct serializeNull config during initialize #1158
- SerializationGraphNavigator unaware of serializeNull change of context when altered in PreSerializeEvent #1157
- Memory leaks #1150
- Properties with @Groups annotations included in output when no SerializationContext given. #1149
Merged pull requests: