Skip to content

Replace Symfony with a custom serde solution

Compare
Choose a tag to compare
@rowanhill rowanhill released this 03 Jul 14:27
· 8 commits to master since this release

Historically, wiremock-php has serialized PHP objects to JSON by a) translating to an intermediate form of associative arrays, then b) using json_encode. Similarly, deserialization was performed by a) using json_decode to produce an intermediate form of associative arrays, then b) translating to PHP objects. The translation between PHP objects and intermediate form associative arrays was performed by hand-written code that was both laborious and potentially error prone.

Release 2.33.0 replaced this translation code with the Symfony serializer library (heavily modified through subclassing and other hooks). This introduced a dependency on Symfony, however, which wasn't ideal.

This release replaces the Symfony serializer with a custom build serializer. This avoids the boilerplate code in the wiremock-php classes without introducing any production dependencies - albeit at the cost of introducing the complexity of a custom JSON serializer/deserializer!

Due to the wide-ranging nature of this change, this release is only at Release Candidate stability. The intent is to release this at production stability soon, if the RC doesn't cause problems - please report any issues encountered using this version.

This release includes no functional changes.