PackageTrack
Sign in Get early access

league/fractal

Handle the output of complex data structures ready for API output.

0.20.2 69M downloads/mo #672 most downloaded on Packagist thephpleague/fractal

What this package is like to depend on

Last release 8 months ago

08 Dec 2025

Release timing varies

gaps range from 5 weeks to 2.8 years

Most releases are documented

notes for 25 of 39 stable releases

Nothing withdrawn

no release was ever pulled

13 years old

39 releases · first in 2013

1 release in the last 12 months

see the full history below

Release timeline

39 releases · Nov 2013 to Dec 2025
2014 2016 2018 2020 2022 2024 2026
Release Pre-release

Releases

latest 39
  1. 0.20.2 14 Feb 2025
    Release notes

    What's Changed

    Full Changelog: 0.20.1...0.20.2

    Open source →
    Release notes

    0.20.2

    Compare

    Choose a tag to compare

    Open source →
  2. 0.20.1 11 Apr 2022
    Release notes

    What's Changed

    New Contributors

    Full Changelog: 0.20...0.20.1

    Open source →
    Release notes

    0.20.1

    Compare

    Choose a tag to compare

    Open source →
  3. 0.19.2 24 Jan 2020
    Release notes
    Open source →
    Release notes

    0.19.2

    Compare

    Choose a tag to compare

    Open source →
  4. 0.19.1 24 Jan 2020
    Release notes
    Open source →
    Release notes

    0.19.1

    Compare

    Choose a tag to compare

    Open source →
  5. 0.18.0 10 May 2019
    Release notes

    Enhancements

    • Allow PHPUnit 7+ where available - Thanks @ramsey
    • Changed the paginator to not call $paginator->getPaginate() in PhalconFrameworkPaginatorAdapter constructor - Thanks @niden
    • Output an object for attributes when none are provided instead of an array in JsonApiSerializer - Thanks @BastianHofmann
    • Include meta key for relationships in JsonApiSerializer - Thanks @rawaludin
    • Allow self link to override defaults in JsonApiSerializer - Thanks @biggator
    • Preserve numeric keys when converting Scopes 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 in ArraySerializer pagination - Thanks @basavind
    • Allow arrays for field lists in $fractal->parseFieldsets() - Thanks @Flugger
    • Add links for all available includes to JsonApiSerializer - Thanks @matt-allan
    Open source →
    Release notes

    Enhancements

    • Allow PHPUnit 7+ where available - Thanks @ramsey
    • Changed the paginator to not call $paginator->getPaginate() in PhalconFrameworkPaginatorAdapter constructor - Thanks @niden
    • Output an object for attributes when none are provided instead of an array in JsonApiSerializer - Thanks @BastianHofmann
    • Include meta key for relationships in JsonApiSerializer - Thanks @rawaludin
    • Allow self link to override defaults in JsonApiSerializer - Thanks @biggator
    • Preserve numeric keys when converting Scopes 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 in ArraySerializer pagination - Thanks @basavind
    • Allow arrays for field lists in $fractal->parseFieldsets() - Thanks @flugger
    Open source →
    Release notes

    0.18.0

    Compare

    Choose a tag to compare

    Open source →
  6. 0.17.0 12 Jun 2017
    Release notes
    • 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
    Open source →
    Release notes

    Enhancements

    • 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
    Open source →
    Release notes

    0.17.0

    Compare

    Choose a tag to compare

    Open source →
  7. 0.16.0 12 Mar 2017
    Release notes

    Enhancements:

    • #358 Allow the ability to define meta on each object in collection
    • #362 Add DoctrinePaginatorAdapter to interface with Doctrine pagination
    • Implement sparse fieldset
    Open source →
    Release notes

    Enhancements

    • #358 Allow the ability to define meta on each object in collection
    • #362 Add DoctrinePaginatorAdapter to interface with Doctrine pagination
    • Implement sparse fieldset
    Open source →
    Release notes

    0.16.0

    Compare

    Choose a tag to compare

    Open source →
  8. 0.15.0 28 Dec 2016
    Release notes

    Enhancements

    • Custom links in serializer
    • PhalconPHP Paginator
    • tested on 7.1
    Open source →
  9. 0.14.0 21 Jul 2016
    Release notes

    Added

    • null() method for serializing null resource.
    • Adds pagination to JsonApiSerializer
    • Added JSON-API serializer collection links

    Enhancements

    • Fix issue including relationships on collections
    • TransformerAbstract now returns a ResourceInterface
    • getIncludeParams now always return ParamBag
    • cody styling, method naming and docs
    Open source →
  10. 0.13.0 07 Oct 2015
    Release notes

    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
    Open source →
  11. 0.12.0 19 Mar 2015
    Release notes

    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.
    Open source →
  12. 0.11.0 10 Dec 2014
    Release notes

    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
    Open source →
  13. 0.10.0 17 Oct 2014
    Release notes

    Added

    • 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.

    Fixed

    • Removed PaginatorInterface::getPaginator() as it was used anymore. Issue #101
    • Manager::createData() argument 1 now hints against ResourceInterface not ResourceAbstract.
    Open source →
  14. 0.9.1 06 Jul 2014
    Release notes

    Fixed

    • Using ArraySerializer without a resource key would lead to an empty string as a key in JSON. Issue #78
    Open source →
  15. 0.9.0 06 Jul 2014
    Release notes

    Added

    • Implemented serializer methods for item and collection separately Issue #71
    Open source →
  16. 0.8.3 14 Jun 2014
    Release notes

    Added

    • Default Includes no longer need to be in Available Includes. Issue #58
    Open source →
  17. 0.8.2 09 Jun 2014
    Release notes

    Fixed

    • A null value for Manager::parseIncludes() could have weird results
    Open source →
  18. 0.8.1 05 Jun 2014
    Release notes

    Added

    • Make ResourceAbstract implement ResourceInterface

    Fixed

    • Fixed tests for Laravel 4.2 usage
    Open source →
  19. 0.8.0 27 May 2014
    Release notes

    Added

    • 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() 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
    Open source →
  20. 0.7.0 31 Jan 2014
    Release notes

    Added

    • Added Cursor, as a different approach to paginating large data sets
    • Switched from PSR-0 to PSR-4
    Open source →
  21. 0.6.1 24 Jan 2014

    Nothing published for this version

  22. 0.6.0 27 Dec 2013
    Release notes

    Added

    • Adds a PaginatorInterface, with a IlluminatePaginatorAdapter to let Fractal be framework agnostic
    Open source →
  23. 0.5.1 13 Dec 2013
    Release notes

    Fixed

    • Fixed PHP 5.3 support. Short array syntax will be the death of me
    Open source →
  24. 0.5.0 13 Dec 2013
    Release notes

    Added

    • Added Collection::setPaginator().

    Removed

    • Removed PaginatedCollection, use Collection::setPaginator() instead.
    Open source →
  25. 0.4.6 13 Dec 2013
    Release notes

    Added

    • Allow $defaultEmbed to be enabled in a transformer, to always embed without requesting
    Open source →
  26. 0.4.5 12 Dec 2013

    Nothing published for this version

  27. 0.4.4 11 Dec 2013

    Nothing published for this version

  28. 0.4.3 10 Dec 2013

    Nothing published for this version

  29. 0.4.2 10 Dec 2013

    Nothing published for this version

  30. 0.4.0 10 Dec 2013

    Nothing published for this version

  31. 0.3.1 09 Dec 2013

    Nothing published for this version

  32. 0.3.0 09 Dec 2013

    Nothing published for this version

  33. 0.2.1 09 Dec 2013

    Nothing published for this version

  34. 0.2.0 08 Dec 2013

    Nothing published for this version

  35. 0.1.0 08 Dec 2013

    Nothing published for this version

  36. 0.0.1 27 Nov 2013

    Nothing published for this version

  37. 0.21 08 Dec 2025

    Nothing published for this version

  38. 0.20 07 Mar 2022

    Nothing published for this version

  39. 0.19 24 Jan 2020
    Release notes
    Open source →
    Release notes

    0.19

    Compare

    Choose a tag to compare

    Open source →

Every package, every release, already written down.

The archive is open and free. Watching your own project is what we are building next.

Browse the archive