Using Doctrine, ramsey/uuid-doctrine and willdurand/hateoas
This blog post was published more than one year ago and might be outdated!
· 2 min read
Recently I experimented a bit with Doctrine ORM and the willdurand/Hateoas library to expose my Doctrine objects via an HATEOAS api which luckily is a fairly trivial thing to do. All you need to do is set up the Hateoas serializer and call the respective serialize() method passing your Doctrine object as well the serialization type: