Skip to content

Releases: FriendsOfCake/crud-json-api

1.0.0-beta3

22 Apr 09:50
Compare
Choose a tag to compare
1.0.0-beta3 Pre-release
Pre-release
  • Fixes an issue with single entities
  • Fixes issue with certain routes
  • Ensures that PHPUnit tests pass

1.0.0-beta2

16 Mar 11:02
c6c44d2
Compare
Choose a tag to compare
1.0.0-beta2 Pre-release
Pre-release

Small fixes around type hinting and related routes

1.0.0-beta

12 Feb 13:05
Compare
Choose a tag to compare
1.0.0-beta Pre-release
Pre-release

CakePHP 4 compatible release.

An important change in this release is that the BodyParserMiddleware must be added to your application middleware queue and the following parser code must be added

        $bodies = new BodyParserMiddleware();
        $bodies->addParser(['application/vnd.api+json'], function ($body) {
            return json_decode($body, true);
        });
 
        $middlewareQueue->add($bodies);   

0.5.4

10 Jul 13:17
382907f
Compare
Choose a tag to compare
  • CakePHP 3.8 compatibility
  • Remove _joinData from response
  • Normalise validation messages fields to be dasherized as well (To match fields)

0.5.3

09 May 12:34
508a855
Compare
Choose a tag to compare

Fix broken 0.5.2 release

0.5.2

09 May 11:28
07500cb
Compare
Choose a tag to compare

Fix a bug where ResultSets were cloned, and not just Query objects.

0.5.1

09 May 09:36
bc51ecc
Compare
Choose a tag to compare

Fixes a small bug where certain queries are accidently modified while checking associations/includes.

0.5.0

06 May 09:23
540292b
Compare
Choose a tag to compare

This release upgrades Crud JsonApi to use neomerx/jsonapi version 3.x, and JSON API 1.1. A number of backwards incompatible changes where made.

Backwards incompatible changes

  • Minimum PHP version bumped to PHP 7.1
  • Minimum cakePHP version bumped to CakePHP 3.7
  • If you use custom schema objects please see the neomerx/jsonapi upgrade notes for a list of changes in neomerx/jsonapi.
  • The DynamicEntitySchema object now only works with Cake\ORM\Table objects instead of RepositoryInterface objects. In the past, it would accept non-table objects, but things would break as it makes use of methods that are part of the concrete Table class, and not specified in the interface.
  • Entity types are now inferred from the class name instead of the registry alias. This makes responses more predictable for cases where an association is aliased (example CreatedBy -> UsersTable)
  • Entity attributes are now shallowly created. This means that associated entities aren't converted into an array until the include object is built (Instead of deeply into each object). It also helps prevent circular associations from breaking everything.

New features and fixes

  • Supports PHP 7.3
  • BelongsTo relations will always be included in the relationships object, even if their data isn't included.
  • Schema objects for associations that are loaded/included in an entity (via lazy loading for example) will be loaded
  • Ability to add a top-level links object by setting the links config on the listener
  • Fixed an issue with queries that use formatResults and other result decorators (#87).
  • Pagination links will include the sort query param if set.
  • Added a custom SearchListener to make it easier to share search configuration between Json Api and conventional endpoints
  • Better support for compound keys

0.4.0

01 Jul 18:10
1e5fda8
Compare
Choose a tag to compare
  • now supports setting hasMany relationships with PATCH request
  • improves performance of GET requests for resources with belongsTo relationships

💡 Did you know crud-json-api allows you to build complex JSON API Servers with almost no code? 💡

  • deeply nested compound documents
  • multi-field filtering
  • multi-field sorting
  • sparse fieldsets

0.3.2

21 May 10:42
Compare
Choose a tag to compare

This release contains:

  • a full rewrite of the integration tests and the documentation so that it matches the JSON API (website) structure which should help making code maintainability and support a lot easier
  • a fix for not being able to update/PATCH multi-word resources