nicolas-souffleur/mapping-connector-bundle
A Symfony bundle for wiring configurable mapping definitions between source and target data structures, so you can transform arrays, objects, and DTOs through reusable connector mappings instead of hand-written conversion code.
First, a reality check: this is not a Laravel package. It's a Symfony bundle built for Akeneo PIM (2.x/3.x era), so "leverage day-to-day" means running it inside an Akeneo instance, not composer require-ing it into a Laravel app. If your stack is Laravel-only, the correct integration is a sidecar: run Akeneo + this bundle as a service, and talk to it over HTTP or bin/console.
Minimal steps (Akeneo host required):
composer config repositories.mapping-connector vcs https://github.com/nicolasfl/MappingConnector
composer require nicolas-souffleur/mapping-connector-bundle:dev-master
app/AppKernel.php (Akeneo 2.x) or config/bundles.php (Akeneo 3.x).bin/console cache:clear), then open Products → Import/Export profiles in the Akeneo UI. The connector appears as a new job type with a mapping configuration UI.Connector/ directory (Reader/Processor/Writer steps) and its Resources/config/ — that's where the mapping schema lives.description-en_US → Description EN) for a feed you hand to marketing/ERP. Or the reverse: ingest a supplier CSV with arbitrary headers into Akeneo attributes.Export pattern (the common one). Create an export profile in the UI, attach a mapping (source attribute code → target column header, plus locale/channel scope per attribute), then schedule the job:
bin/console akeneo:batch:job <job_code> --env=prod
Wrap that in a Laravel scheduled command (Process::run(...) or exec) if your orchestrator is a Laravel app — that's the pragmatic bridge. Poll job status via the Akeneo REST API /api/rest/v1/jobs/execution/{code} if you need the result back in Laravel.
Import pattern. Supplier feed → mapping file → connector reads the CSV, translates columns to attribute codes, applies type coercion (metric with unit, simpleselect with option code). Use the connector's processor step to reject unknown columns rather than silently drop them.
Per-attribute scoping. Each mapping row carries attribute_code, optional locale, optional channel, and a type. Multi-locale attributes need one mapping row per locale — this is the pattern that trips most people up.
Extending it. Follow Akeneo connector conventions: implement a Step and register it with the appropriate tag (akeneo.step.reader, akeneo.step.processor, akeneo.step.writer). If you need custom transformation (e.g. splitting a name field into firstname/lastname), a custom Processor is the cleanest extension point — don't fork the writer.
Laravel-side orchestration. Treat it as an external process: queue an Artisan job, shell out to the Akeneo console command, store job codes in a table, poll, then consume the produced CSV with League\Csv (Laravel ecosystem) to do anything further.
dev-master will drift.locale/channel on a mapping row, not a bad attribute code.; delimiters, and Windows line endings all bite import readers. Normalize upstream.bin/console akeneo:batch:job <code> -vvv and check var/logs/. The connector's step messages are terse; add logging in the processor if a row silently disappears.config/ publish, no queue integration. Do not try to treat it as a Laravel package — the abstraction mismatch will cost more than the sidecar approach.How can I help you explore Laravel packages today?