NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
Packagist
Packagist, #675 most downloaded on Packagist
Handle the output of complex data structures ready for API output.
Latest stable
0.20.2
Last release 11 months ago
08 Dec 2025
Release timing varies
gaps range from 5 weeks to 2.8 years
Most releases are documented
notes for 28 of 39 stable releases
Nothing withdrawn
no release was ever pulled
13 years old
39 releases · first in 2013
Drag across the ruler to compare, or tap a release to open it.
Fix deprecated errors in tests by @KorvinSzanto in https://github.com/thephpleague/fractal/pull/575
Full Changelog: https://github.com/thephpleague/fractal/compare/0.20.1...0.20.2
Update supported versions in the readme by @jdreesen in https://github.com/thephpleague/fractal/pull/546
Full Changelog: https://github.com/thephpleague/fractal/compare/0.20...0.20.1
Your coding agent can read these notes before it upgrades. Set up the MCP server →
Support PHP 5.4 and 5.5 and 5.6 - https://github.com/thephpleague/fractal/pull/502 - thanks @KorvinSzanto
Allow sub relations with modifier #490 - thanks @onursimsek - docs
Allow PHPUnit 7+ where available - Thanks @ramsey
$paginator->getPaginate() in PhalconFrameworkPaginatorAdapter constructor - Thanks @nidenattributes when none are provided instead of an array in JsonApiSerializer - Thanks @BastianHofmannmeta key for relationships in JsonApiSerializer - Thanks @rawaludinself link to override defaults in JsonApiSerializer - Thanks @biggatorScopes to arrays by using array union instead of array_merge - Thanks @andrewtweberlinks when none are provided instead of an array in ArraySerializer pagination - Thanks @basavind$fractal->parseFieldsets() - Thanks @fluggerAdd ScopeFactoryInterface and ScopeFactory
Primitive resource type, allows to use primitivesEnhancements: - #358 Allow the ability to define meta on each object in collection - #362 Add DoctrinePaginatorAdapter to interface with Doctrine pagi
Enhancements:
- [x] Custom links in serializer - [x] PhalconPHP Paginator - [x] tested on 7.1
null() method for serializing null resource.
null() method for serializing null resource.TransformerAbstract now returns a ResourceInterfacegetIncludeParams now always return ParamBag->setData(...) and ->setTransformer(...) methods to resources
->setData(...) and ->setTransformer(...) methods to resourcesinclude=comments:limit(5|1):newAdd the support for Laravel 5 paginator. Issue #153
getData() and getTransformer() from League\Fractal\Resource\Collection as they were already
defined in ResourceAbstract.Added League\Fractal\Pagination\PagerfantaPaginatorAdapter to support Pagerfanta
League\Fractal\Pagination\PagerfantaPaginatorAdapter to support PagerfantaLeague\Fractal\Pagination\ZendFrameworkPaginatorAdapter to support Zend Framework PaginatorLeague\Fractal\Pagination\PagerfantaPaginatorAdapter to support PagerfantaLeague\Fractal\Pagination\ZendFrameworkPaginatorAdapter to support Zend Framework PaginatorAdded 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.
Features:
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:
PaginatorInterface::getPaginator() as it was used anymore. Issue #101Manager::createData() argument 1 now hints against ResourceInterface not ResourceAbstract.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.PaginatorInterface::getPaginator() as it was used anymore. Issue #101Manager::createData() argument 1 now hints against ResourceInterface not ResourceAbstract.Using ArraySerializer without a resource key would lead to an empty string as a key in JSON. [Issue #78]
Only one change this time around: Splitting Serializer methods for item and collection to be their own thing.
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.
Default Includes no longer need to be in Available Includes. Issue #58
Features:
Fixed Invalid argument supplied for foreach()
null value for Manager::parseIncludes() could have weird resultsMake ResourceAbstract implement ResourceInterface
Features:
ResourceAbstract implement ResourceInterfaceBug:
ResourceAbstract implement ResourceInterfaceAdded Serializers with ArraySerializer, DataArraySerializer (default) and a provisional JsonApiSerializer. (#47).
Features
ResourceAbstract::setMeta('foo', mixed) to allow custom meta dataManager::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).League\Fractal\Cursor\Cursor and League\Fractal\Cursor\CursorInterface into League\Fractal\Pagination.Added Cursor, as a different approach to paginating large data sets
Added Cursor support, for large data sets.
Adds a PaginatorInterface, with a IlluminatePaginatorAdapter to let Fractal be framework agnostic
PaginatorInterface, with a IlluminatePaginatorAdapter to let Fractal be framework agnosticFixed PHP 5.3 support. Short array syntax will be the death of me
Added Collection::setPaginator().
Collection::setPaginator().PaginatedCollection, use Collection::setPaginator() instead.Allow $defaultEmbed to be enabled in a transformer, to always embed without requesting
$defaultEmbed to be enabled in a transformer, to always embed without requestingNothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Don't allow JsonApiSerilizer to include empty attributes on serialization by @racastellanosm in https://github.com/thephpleague/fractal/pull/578
->getCurrentScope() after transformation completes, you'll need to update your transformer to capture the value during transformation. See #582Full Changelog: https://github.com/thephpleague/fractal/compare/0.20.2...0.21
Should you need to keep using Fractal with PHP 5.x, please use 0.19.2 or lower. We will continue to patch security fixes for 0.19 but all new features…
This release moves Fractal up to modern PHP.
We have dropped support for 5.x with this release. Fractal now supports PHP 7.4 as the lowest PHP version. Should you need to keep using Fractal with PHP 5.x, please use 0.19.2 or lower. We will continue to patch security fixes for 0.19 but all new features and changes will be in the 0.20 release and more going forward. We will aim for a 1.0 release this summer targeting 8.x
Full Changelog: https://github.com/thephpleague/fractal/compare/0.19.2...0.20
Allow sub relations with modifier #490 - thanks @onursimsek - docs
One column per quarter.