PHPackages                             madd/silex-fractal-service-provider - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. madd/silex-fractal-service-provider

AbandonedArchivedLibrary

madd/silex-fractal-service-provider
===================================

A Silex Service Provider for Fractal

120PHP

Since Dec 20Pushed 12y ago1 watchersCompare

[ Source](https://github.com/marcaddeo/silex-fractal-service-provider)[ Packagist](https://packagist.org/packages/madd/silex-fractal-service-provider)[ RSS](/packages/madd-silex-fractal-service-provider/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

FractalServiceProvider
======================

[](#fractalserviceprovider)

[![Build Status](https://camo.githubusercontent.com/6657c1b0f799c6aba2a66489405e78f4df574d9b99c61779420be77cc0b0d347/68747470733a2f2f7472617669732d63692e6f72672f6d617263616464656f2f73696c65782d6672616374616c2d736572766963652d70726f76696465722e706e673f6272616e63683d6d6173746572)](https://travis-ci.org/marcaddeo/silex-fractal-service-provider)[![Coverage Status](https://camo.githubusercontent.com/bf29034ad853b6101d5fda4d57b2b999807d529cfa25597b91f0be2214ed6a76/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6d617263616464656f2f73696c65782d6672616374616c2d736572766963652d70726f76696465722f62616467652e706e67)](https://coveralls.io/r/marcaddeo/silex-fractal-service-provider)[![Latest Stable Version](https://camo.githubusercontent.com/f502447abd1416f911023507dcda347c8b6c18fa6987c6b519a33c941e1287e9/68747470733a2f2f706f7365722e707567782e6f72672f6d6164642f73696c65782d6672616374616c2d736572766963652d70726f76696465722f762f737461626c652e706e67)](https://packagist.org/packages/madd/silex-fractal-service-provider)[![Total Downloads](https://camo.githubusercontent.com/2279d8c2583f11e62cd0cd5970878eaae11a160ef23d9c9b9d68d5c7931e9507/68747470733a2f2f706f7365722e707567782e6f72672f6d6164642f73696c65782d6672616374616c2d736572766963652d70726f76696465722f646f776e6c6f6164732e706e67)](https://packagist.org/packages/madd/silex-fractal-service-provider)

[Fractal](https://github.com/php-loep/fractal) Service Provider for Silex

Install
-------

[](#install)

Via Composer

```
{
    "require": {
        "madd/silex-fractal-service-provider": "dev-master"
    }
}
```

Usage
-----

[](#usage)

```
use League\Fractal\Collection;

/**
 * You can set the scope identifier that Fractal uses to get its embeds here.
 * If not set here, it will default to 'embed'
 */
$app->register(new Madd\Silex\Provider\Fractal\FractalServiceProvider, array(
    'fractal.scope_identifier' => 'embed'
));

$resource = new Collection($model, new ModelTransformer);
$data     = $app['fractal']->createData($resource);

print_r($data->toArray());
```

TODO
----

[](#todo)

Note: The build is only passing because I have a test that only tests if true is true.. I still have to implement tests.

- Unit test to fuck

Testing
-------

[](#testing)

```
$ phpunit
```

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](https://github.com/marcaddeo/fractal-service-provider/blob/master/CONTRIBUTING.md) for details.

Credits
-------

[](#credits)

- [Marc Addeo](https://github.com/marcaddeo)
- [All Contributors](https://github.com/marcaddeo/fractal-service-provider/contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](https://github.com/marcaddeo/fractal-service-provider/blob/master/LICENSE) for more information.

###  Health Score

21

—

LowBetter than 19% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/8ceab89005fc15c9469b8e2164301dc4dfbda8e773f28270550cd8aa10007aa3?d=identicon)[marcaddeo](/maintainers/marcaddeo)

---

Top Contributors

[![marcaddeo](https://avatars.githubusercontent.com/u/199649?v=4)](https://github.com/marcaddeo "marcaddeo (16 commits)")

### Embed Badge

![Health badge](/badges/madd-silex-fractal-service-provider/health.svg)

```
[![Health](https://phpackages.com/badges/madd-silex-fractal-service-provider/health.svg)](https://phpackages.com/packages/madd-silex-fractal-service-provider)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
