- Add links for all available includes to
JsonApiSerializer
#331 - Thanks @matt-allan - Implement interface
\JsonSerializable
in Scopes to allow for direct usage withjson_encode()
- Allow PHPUnit 7+ where available - Thanks @ramsey
- Changed the paginator to not call
$paginator->getPaginate()
inPhalconFrameworkPaginatorAdapter
constructor - Thanks @niden - Output an object for
attributes
when none are provided instead of an array inJsonApiSerializer
- Thanks @BastianHofmann - Include
meta
key for relationships inJsonApiSerializer
- Thanks @rawaludin - Allow
self
link to override defaults inJsonApiSerializer
- Thanks @biggator - Preserve numeric keys when converting
Scope
s to arrays by using array union instead of array_merge - Thanks @andrewtweber - Output an object for
links
when none are provided instead of an array inArraySerializer
pagination - Thanks @basavind - Allow arrays for field lists in
$fractal->parseFieldsets()
- Thanks @flugger
- Add ScopeFactoryInterface and ScopeFactory
- Add $options parameter to toJson
- Added Serializer interface to SerializerAbstract
- Add Primitive resource type, allows to use primitives
- optimized primitive transformation when transformer is not given
- #358 Allow the ability to define meta on each object in collection
- #362 Add DoctrinePaginatorAdapter to interface with Doctrine pagination
- Implement sparse fieldset
- Custom links in serializer
- PhalconPHP Paginator
- tested on 7.1
null()
method for serializing null resource.- Adds pagination to
JsonApiSerializer
- Added JSON-API serializer collection links
- Fix issue including relationships on collections
TransformerAbstract
now returns aResourceInterface
getIncludeParams
now always returnParamBag
- cody styling, method naming and docs
->setData(...)
and->setTransformer(...)
methods to resources- able to set url include parameters with no set variables, ie.
include=comments:limit(5|1):new
- Finally, much improved JSON-API support thanks to @felixkiss
- Short array syntax throughout
- Test improvements
- Added PHP 7.0-dev support.
- Add the support for Laravel 5 paginator. Issue #153
- Now accessing the default and available includes in Transformers via getters Issue #158
- Dropped PHP 5.3 support. Use v0.11 if you're still stuck on PHP 5.3.
- Removed
getData()
andgetTransformer()
fromLeague\Fractal\Resource\Collection
as they were already defined inResourceAbstract
.
- Added
League\Fractal\Pagination\PagerfantaPaginatorAdapter
to support Pagerfanta - Added
League\Fractal\Pagination\ZendFrameworkPaginatorAdapter
to support Zend Framework Paginator
- Now JSON-API linked items will be unique based on their ID Issue #126
- 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.
- Removed
PaginatorInterface::getPaginator()
as it was used anymore. Issue #101 Manager::createData()
argument 1 now hints againstResourceInterface
notResourceAbstract
.
- Using ArraySerializer without a resource key would lead to an empty string as a key in JSON. Issue #78
- Implemented serializer methods for item and collection separately Issue #71
- Default Includes no longer need to be in Available Includes. Issue #58
- A
null
value forManager::parseIncludes()
could have weird results
- Make
ResourceAbstract
implementResourceInterface
- Fixed tests for Laravel 4.2 usage
- Added Serializers with ArraySerializer, DataArraySerializer (default) and a provisional JsonApiSerializer. See Issue #47
- Added
ResourceAbstract::setMeta('foo', mixed)
to allow custom meta data - Replaced
Manager::setRequestedScopes()
withManager::parseIncludes('foo,bar')
which can be an array or CSV string. It can also take "Smart Syntax" such asManager::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
andLeague\Fractal\Cursor\CursorInterface
intoLeague\Fractal\Pagination
- Added Cursor, as a different approach to paginating large data sets
- Switched from PSR-0 to PSR-4
- Adds a
PaginatorInterface
, with aIlluminatePaginatorAdapter
to let Fractal be framework agnostic
- Fixed PHP 5.3 support. Short array syntax will be the death of me
- Added
Collection::setPaginator()
.
- Removed
PaginatedCollection
, useCollection::setPaginator()
instead.
- Allow
$defaultEmbed
to be enabled in a transformer, to always embed without requesting