Search by

dmytrof / import-fractal-bundle

dmytrof

Symfony ImportFractalBundle to implement Fractal by League for DmytrofImportBundle

Package info

github.com/dmytrof/ImportFractalBundle

Type:symfony-bundle

pkg:composer/dmytrof/import-fractal-bundle

Statistics

Installs: 3 727

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

1.2 2026-11-02 14:25 UTC

This package is auto-updated.

Last update: 2026-11-02 14:27:26 UTC


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