v2.0.0: New specification-based interface (next to the human-friendly interface)
v2's main feature is having a strict specification-based interface for building documents. This is added next to keeping the human-friendly interface for people who don't know the spec, and don't want to get to know it.
Other features include:
- Explicitly empty relationships
- Jsonapi object in output to help discovery
- Unit and output tests
- php7 ready (php5.6 is still supported, php5.4 and 5.5 are dropped)
This release is breaking backwards compatibility with v1. However, most of the interface and output stayed the same. See the UPGRADE doc on how to upgrade.
The main reasons for the BC break are:
- the jsonapi specification started to recommend CamelCase in their v1.1
- php7 marks
resource
a reserved keyword, thus the main class name changed - the current implementation offers too little flexibility for future changes in the specification
See the examples for more information.
Note: v2.0 of the library doesn't yet support v1.1 of the specification. A v2.1 is coming up and will support v1.1 of the specification.