deviantintegral/jms-serializer-uri-handler

A handler for serializing and deserializing PSR-7 URI objects

1.2.0 2022-08-10 11:50 UTC

README

CircleCI

This library supports serializing and deserializing URI instances, as defined by PSR-7.

Add this handler to your serializer with the following:

AnnotationRegistry::registerLoader('class_exists');
$this->serializer = SerializerBuilder::create()
  ->configureHandlers(
    function (HandlerRegistry $registry) {
        $registry->registerSubscribingHandler(new UriHandler());
    }
  )->build();