Skip to content

Releases: thephpleague/fractal

0.13.0

16 Oct 19:40
Compare
Choose a tag to compare

Added

  • ->setData(...) and ->setTransformer(...) methods to resources
  • able to set url include parameters with no set variables, ie. include=comments:limit(5|1):new

Changed

  • Finally, much improved JSON-API support thanks to @felixkiss

Enhancements

  • Short array syntax throughout
  • Test improvements

0.12.0

19 Mar 15:17
Compare
Choose a tag to compare

Added

  • Added PHP 7.0-dev support.
  • Add the support for Laravel 5 paginator. Issue #153

Changed

  • Now accessing the default and available includes in Transformers via getters Issue #158

Removed

  • Dropped PHP 5.3 support. Use v0.11 if you're still stuck on PHP 5.3.
  • Removed getData() and getTransformer() from League\Fractal\Resource\Collection as they were already
    defined in ResourceAbstract.

0.11.0

10 Dec 16:59
Compare
Choose a tag to compare

Added

  • Added League\Fractal\Pagination\PagerfantaPaginatorAdapter to support Pagerfanta
  • Added League\Fractal\Pagination\ZendFrameworkPaginatorAdapter to support Zend Framework Paginator

Fixed

  • Now JSON-API linked items will be unique based on their ID Issue #126

0.10.0

17 Oct 17:14
Compare
Choose a tag to compare

Features:

  • Added ParamBag to replace the array passed to includes. It implements array access so keep using it as you were, or play with the new methods.

Bugs:

  • Removed PaginatorInterface::getPaginator() as it was used anymore. Issue #101
  • Manager::createData() argument 1 now hints against ResourceInterface not ResourceAbstract.

0.9.0

06 Jul 16:20
Compare
Choose a tag to compare

Only one change this time around: Splitting Serializer methods for item and collection to be their own thing.

This was done to fix #71 as well as make life easier for people who want to make items and collections use some different logic. For example, JsonApiSerializer wants even a single item to appear inside an array, meaning we can wrap the data in the item() serializer method to do that, but keep it as an item in case anyone wants to switch to a different serializer.

See Serializers documentation for more information.

0.8.3

14 Jun 11:12
Compare
Choose a tag to compare

Features:

  • Default Includes no longer need to be in Available Includes. Issue #58

0.8.2

09 Jun 11:46
Compare
Choose a tag to compare
  • Fixed Invalid argument supplied for foreach()

0.8.1

05 Jun 14:02
Compare
Choose a tag to compare

Features:

  • Make ResourceAbstract implement ResourceInterface

Bug:

  • Fixed tests for Laravel 4.2 usage

v0.8.0

29 May 14:25
Compare
Choose a tag to compare

Features

  • Added Serializers with ArraySerializer, DataArraySerializer (default) and a provisional JsonApiSerializer. (#47).
  • Added ResourceAbstract::setMeta('foo', mixed) to allow custom meta data
  • Replaced Manager::setRequestedScopes() with Manager::parseIncludes('foo,bar') which can be an array or CSV string. It can
    also take "Smart Syntax" such as Manager::parseIncludes('bars:limit(5|1):order(-something)'), which can come from a URL query
    param: /foo?include=bars:limit(5|1):order(-something).
  • Made all pagination (paginators and cursors) use meta output logic, so it sits with your custom meta data
  • Moved League\Fractal\Cursor\Cursor and League\Fractal\Cursor\CursorInterface into League\Fractal\Pagination.

0.6.1

24 Jan 02:20
Compare
Choose a tag to compare
  • Added Cursor support, for large data sets.