dmytrof / import-fractal-bundle
Symfony ImportFractalBundle to implement Fractal by League for DmytrofImportBundle
Package info
github.com/dmytrof/ImportFractalBundle
Type:symfony-bundle
pkg:composer/dmytrof/import-fractal-bundle
1.2
2026-11-02 14:25 UTC
Requires
- php: ^8.4
- dmytrof/fractal-bundle: ^1.4
- dmytrof/import-bundle: ^1.24
- dmytrof/models-management-fractal-bundle: ^1.4
- symfony/config: ^6.4 || ^7.0 || ^8.0
- symfony/dependency-injection: ^6.4 || ^7.0 || ^8.0
- symfony/http-kernel: ^6.4 || ^7.0 || ^8.0
Requires (Dev)
- ext-pdo_sqlite: *
- phpunit/phpunit: ^11.5
- symfony/framework-bundle: ^6.4 || ^7.0 || ^8.0
Suggests
None
Provides
None
Conflicts
None
Replaces
None
README
This bundle helps you to implement Fractal by League for DmytrofImportBundle
Requirements
- PHP 8.4 or higher
- Symfony 6.4, 7.x or 8.x
- dmytrof/import-bundle 1.24+, dmytrof/fractal-bundle 1.4+, dmytrof/models-management-fractal-bundle 1.4+
Installation
Step 1: Install the bundle
$ composer require dmytrof/import-fractal-bundle
Step 2: Enable the bundle
<?php
// config/bundles.php
return [
// ...
Dmytrof\ImportFractalBundle\DmytrofImportFractalBundle::class => ['all' => true],
];
The bundle registers Fractal transformers for ImportBundle models:
Dmytrof\ImportFractalBundle\Transformer\TaskTransformer(includes:importStatistics,link,paginationData,importer,reader)Dmytrof\ImportFractalBundle\Transformer\ItemTransformer(includes:data,formData,task,entryId)Dmytrof\ImportFractalBundle\Transformer\ImporterTransformer(includes:options)Dmytrof\ImportFractalBundle\Transformer\ReaderTransformer(includes:options)
Usage:
use Dmytrof\FractalBundle\Service\FractalManager;
use Dmytrof\ImportFractalBundle\Transformer\TaskTransformer;
$data = $fractalManager->parseIncludes('importer,reader')->getModelData($task, TaskTransformer::class);
Tests
$ composer install
$ vendor/bin/phpunit