I seem to recall dingo being built around versioning etc https://github.com/dingo/api/wiki
Edit: https://github.com/dingo/api/wiki/Creating-API-Endpoints#version-groups
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
Hey Guys,
I appreciate this question is a little broad, but hoping to get some insight from those who may be more experiences than I.
I am currently trying to build an API for an application I work on. We will be using the JSON:API spec to build this. I am using the Spatie Fractal package to transform the models into the correct format for this API. However, I have lots of Transformers for all of my models. Whilst this is fine in the initial iteration of this API. I would like to know how I might handle changes as I am concerned I will end up with hundreds of transformers which are all very similar, or potentially just an extension of the previous.
As I understand, an API should not introduce breaking changes, if there was to be one, that would need to be a different version of the API I have seen with Stripes API, you choose the version of the API you wish to interact with. But, how is this done? if I changed a model and added a new attribute, would I then have to create a whole new set of transformers for a new version?
If anyone knows of any blogs or guidance around this and best practices, I would be ever so grateful.
Thanks Guys!
Please or to participate in this conversation.