jgrygierek / batch-entity-import-bundle
Importing entities with preview and edit features for Symfony.
Package info
github.com/jgrygierek/BatchEntityImportBundle
Type:symfony-bundle
pkg:composer/jgrygierek/batch-entity-import-bundle
Requires
- php: >=8.3.0
- doctrine/collections: ^1.5|^2.0
- doctrine/dbal: ^2.13|^3.2|^4.0
- doctrine/orm: ^2.9|^3.2
- doctrine/persistence: ^2.2|^3.0|^4.0
- phpoffice/phpspreadsheet: ^5.2.0
- symfony/config: ^6.4|^7.0|^8.0
- symfony/dependency-injection: ^6.4|^7.0|^8.0
- symfony/doctrine-bridge: ^6.4|^7.0|^8.0
- symfony/event-dispatcher-contracts: ^2.5|^3.0
- symfony/form: ^6.4|^7.0|^8.0
- symfony/framework-bundle: ^6.4|^7.0|^8.0
- symfony/http-foundation: ^6.4|^7.0|^8.0
- symfony/http-kernel: ^6.4|^7.0|^8.0
- symfony/options-resolver: ^6.4|^7.0|^8.0
- symfony/property-access: ^6.4|^7.0|^8.0
- symfony/service-contracts: ^2.5|^3.0
- symfony/translation: ^6.4.3|^7.0.3|^8.0
- symfony/translation-contracts: ^2.5|^3.0
- symfony/twig-bundle: ^6.4|^7.0|^8.0
- symfony/validator: ^6.4|^7.0|^8.0
- twig/twig: ^3.26
Requires (Dev)
- dg/bypass-finals: ^v1.8
- doctrine/data-fixtures: ^1.7.0|^2.0
- doctrine/doctrine-bundle: ^2.12.0|^3.1.0
- doctrine/doctrine-fixtures-bundle: ^3.7.0|^4.3.1
- friendsofphp/php-cs-fixer: ^v3.91.3
- matthiasnoback/symfony-dependency-injection-test: ^6.1.0
- phpstan/phpstan: ^2.1.32
- phpstan/phpstan-doctrine: ^2.0.11
- phpstan/phpstan-phpunit: ^2.0.8
- phpstan/phpstan-symfony: ^2.0.8
- phpunit/phpunit: 11.5.56
- rector/rector: 2.7.0
- roave/security-advisories: dev-latest
- symfony/browser-kit: ^6.4|^7.0|^8.0
- symfony/dom-crawler: ^6.4|^7.0|^8.0
- symfony/security-bundle: ^6.4|^7.0|^8.0
Suggests
- knplabs/doctrine-behaviors: Use it for translatable records stored in database
Provides
None
Conflicts
- knplabs/doctrine-behaviors: <2.0.8
Replaces
None
- dev-master
- v3.14.0
- v3.13.0
- v3.12.0
- v3.11.0
- v3.10.0
- v3.9.1
- v3.9.0
- v3.8.0
- v3.7.0
- v3.6.2
- v3.6.1
- v3.6.0
- v3.5.0
- v3.4.0
- v3.3.0
- v3.2.2
- v3.2.1
- v3.2.0
- v3.1.1
- v3.1.0
- v3.0.1
- v3.0.0
- v2.6.0
- v2.5.0
- v2.4.0
- v2.3.0
- v2.2.1
- v2.2.0
- v2.1.3
- v2.1.2
- v2.1.1
- v2.1.0
- v2.0.3
- v2.0.2
- v2.0.1
- v2.0.0
- v1.1.5
- v1.1.4
- v1.1.3
- v1.1.2
- v1.1.1
- v1.1.0
- v1.0.0
This package is auto-updated.
Last update: 2026-11-23 02:05:56 UTC
README
Importing entities with preview and edit features for Symfony.
- Data can be viewed and edited before saving to database.
- Supports inserting new records and updating existing ones.
- Supported extensions: CSV, XLS, XLSX, ODS.
- Supports translations from KnpLabs Translatable extension.
- Import can be adjusted in configuration class (fields, validation, allowed columns, creating entities), in controller (templates, views) and by events (e.g. converting values to dates).
- Columns names are required and should be added as header (first row).
- If column does not have name provided, will be removed from loaded data.
Versions
| Version | Status | Last release | PHP | Symfony | Documentation |
|---|---|---|---|---|---|
| 4.x | Actively developed | - | >= 8.4 | 7.4, 8.* | master |
| 3.x | Not maintained | 3.14.0 | >= 8.3 | 6.4, 7.*, 8.* | v3.14.0 |
| 2.x | Not maintained | 2.6.0 | >= 7.4 | 4.4, 5.*, 6.* | v2.6.0 |
| 1.x | Not maintained | 1.1.5 | >= 7.4 | 4.4, 5.* | v1.1.5 |
Requirements of PHP and Symfony are given for the last release of each version.
Changes between versions and steps needed to upgrade are described in UPGRADE.md.
Installation
Install package via composer:
composer require jgrygierek/batch-entity-import-bundle
If your project can't be upgraded to requirements of version 4 yet, install version 3:
composer require jgrygierek/batch-entity-import-bundle:^3.14
If your application uses Symfony Flex, bundle is registered automatically. Otherwise add entry to config/bundles.php file:
JG\BatchEntityImportBundle\BatchEntityImportBundle::class => ['all' => true],
Documentation
- Configuration class - entity to import, types of fields, validation, allowed columns, creating entities and file extensions.
- Controller - controller with import actions.
- Import files - rules for header and rows, CSV delimiter and encoding, size limit, translatable columns, changing the way of reading files, full example of file.
- Overriding templates - global and controller-specific templates, main layout, additional data.
- Updating entities - updating existing records instead of inserting new ones, field used to select them.
- Events - events dispatched during import, converting values (e.g. dates) and changing entities before saving.
- Importing data to array field - values with separator imported as array.
- Importing relations -
ManyToOneandOneToOnerelations imported by value of any field. - Upgrade notes - changes between versions.

