endroid/import-demo-bundle
Import Demo Bundle is a Symfony bundle by endroid that demonstrates import functionality, providing a simple reference implementation for exploring and integrating import features into your own Symfony applications.
This is an archived, README-only Symfony demo bundle with zero stars and zero dependents. The README is a single title line, so there is no installation guide, config reference, or API surface to read. Plan on reading source, not docs — and plan on extracting a pattern rather than adopting a dependency.
First, reconcile the framework mismatch: despite being evaluated as a Laravel package, this is a Symfony bundle. Its value proposition is that it demonstrates how endroid/import-bundle is wired into a Symfony app (service definitions, import definitions, a controller example). Bridging a Symfony bundle into a Laravel app is custom work with no payoff here. The pragmatic path is to install it into a throwaway Symfony skeleton purely as reading material, understand the pattern, then reimplement in Laravel.
Suggested reading order in the repo:
composer.json — the only reliable signal of the endroid/import-bundle version it demonstrates and sibling demos it expects.DependencyInjection/ — the extension class; source of truth for config keys and defaults.Resources/config/ (or config/) — service wiring for the importer, tagged import definitions, and handlers.Controller/ — smallest end-to-end example of triggering an import.Entity/ or Model/ — the imported model, which reveals the shape of a "row definition."First use case: in a throwaway Symfony skeleton, composer require --dev endroid/import-demo-bundle, copy the controller + routing into the app, and run an import against a small CSV. Success means you understand how the core import-bundle services are named and how an import definition is registered — not that the demo bundle is doing work for you. Then delete it and add endroid/import-bundle if you actually need the functionality, or implement a thin owned pipeline in Laravel.
The meaningful patterns are the ones you copy out, not ones you use.
composer require --dev, read the example, remove the package, and add endroid/import-bundle (or nothing) as the real dependency. Treat the demo as a living doc snippet, not a library.config/services.yaml rather than inheriting the bundle's.App\Import\Definition\... so application code never references the demo's namespaces and eventual deletion is a no-op.Job/Command as the importer entry point, a definition class per import type, league/csv or PhpSpreadsheet for parsing, and a validation/mapping layer that produces a structured result you can report back to the UI.--dev and expect to remove it. Do not let it leak into require.composer.json and the DI extension. Explicitly verify the required endroid/import-bundle version — the demo may be pinned to an old major that has since changed its API.config/bundles.php (or Kernel::registerBundles()), then run bin/console debug:container | grep import to see which services actually exist. A silent empty import usually means missing fixtures or DB setup, not broken wiring.import-bundle interfaces. Override demo definition classes by replacing them in your own services — never patch the vendor directory.Bundle base classes may have shifted. Expect to translate, not install.App\Import\* namespace, delete the package, and write a small test that proves your pipeline works end to end. That is the only deliverable this bundle supports.How can I help you explore Laravel packages today?