Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Importer Laravel Package

kunicmarko/importer

Kunicmarko Importer is a lightweight PHP package for bringing structured data into your application. It offers a simple, extensible API for defining import sources, mapping fields, and processing rows, so you can add CSV or spreadsheet imports to Laravel projects with minimal boilerplate.

View on GitHub
Deep Wiki
Context7

Import library for multiple file types with support for Symfony/Lumen/Laravel.

Frequently asked questions about Importer
Is kunicmarko/importer still maintained, and does it support Laravel 10 or 11?
kunicmarko/importer was last released in July 2018 and the GitHub repository is archived, so no new Laravel versions are officially supported. Its Composer constraints target the PHP 7.x and Laravel 5.x era, which means installation on Laravel 10 or 11 will typically fail at dependency resolution rather than break silently at runtime. For a modern Laravel app, treat it as vendored source you fork and maintain, not as a live dependency.
Does kunicmarko/importer run on PHP 8.1 and PHP 8.2?
Not out of the box. The published package's php and illuminate/* constraints are pinned to the PHP 7.x era, so Composer will usually refuse to install it on PHP 8.1 or 8.2 before any code runs. Whether the code itself is clean under PHP 8 is something you must prove yourself: fork it, widen the constraints, and run your test suite with a strict error handler before trusting it.
How do I install kunicmarko/importer in a Laravel project?
Run composer require kunicmarko/importer, then construct the reader and importer classes directly in your own code. There is no service provider, configuration file, or bootstrap registration to publish, so nothing is auto-wired for you. In practice you wrap it behind your own FileImporter interface or an artisan command that reads a file from storage/app/imports.
What is the difference between a converter and an importer in kunicmarko/importer?
A converter is responsible for turning one raw field value from a row into a typed value, including any validation or transformation you want to apply. The importer decides what happens with the assembled result, such as persisting it or collecting it. Splitting those responsibilities keeps mapping logic explicit and unit-testable instead of burying it in a controller.
Does kunicmarko/importer write to the database or create Eloquent models for me?
No. Persistence is deliberately outside the package's scope: it parses rows and hands them back, and mapping those rows onto Eloquent models, validating them, and saving them is entirely your code. That is exactly why the library stays framework-agnostic and does not impose an ORM contract. Plan to write the model hydration and transaction handling yourself.
How does kunicmarko/importer handle invalid or malformed CSV rows?
Error handling is a caller concern rather than a documented feature: the package is a thin dispatcher over the file format, and behaviour such as skipping rows or collecting per-row errors depends on how you compose the converters and importer. There is no built-in error accumulation layer or rollback boundary, so wrap the run in a database transaction and decide explicitly whether the first bad row aborts or is logged and skipped. Test with the exact malformed shapes you expect, including BOM and delimiter variance.
Can kunicmarko/importer process large CSV files or stream them?
The package is not positioned as a streaming or chunked importer, so do not assume it will handle hundreds of megabytes. It fits bounded, developer-initiated imports such as an artisan command over a file dropped into storage, or a small admin CSV upload. If you need chunking, checkpointing, or per-row error accumulation at scale, choose a tool designed for that.
Is kunicmarko/importer Laravel-only, or can I use it with Symfony or plain PHP?
It is framework-agnostic: the core has no Laravel dependency and no service provider, so it works in Symfony or plain PHP just as well as in Laravel. That portability is the main architectural argument for using it behind your own interface rather than calling it from controllers. You only give up the Laravel conveniences you would have written yourself anyway.
What are the best alternatives to kunicmarko/importer for CSV import in Laravel?
For CSV specifically, league/csv is the actively maintained choice; maatwebsite/excel covers spreadsheet ergonomics with chunked reads; Symfony Serializer with explicit decoding is a solid DIY path if you want to own the mapping. All three deliver the same core capability as kunicmarko/importer with an active security posture and a support base. Choose based on whether your inputs are plain CSV, real spreadsheets, or highly bespoke mappings.
Should I fork kunicmarko/importer instead of installing it from Packagist?
Yes, for production use. Because the repo is archived and the Packagist artifact is pinned to PHP 7.x era constraints, the realistic path is a private fork with widened php and illuminate/* constraints, a CI matrix on the runtimes you actually deploy, and fixtures for the file shapes in scope. Assign an internal owner from day one, since adopting the fork means you are the maintainer.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
microsoft/fluentui-system-icons
mmccook/php-json-canonicalization-scheme
middlewares/firewall
qubiqx/montapacking
nyoncode/laravel-package-console
pnscripts/filament-broadquill-lite
pnscripts/laravel-sentfold-lite
vleap/mx-sdk-laravel-internal
twidpay/utils
htetmyathlaing/scout-elasticsearch-driver
artisan-toolbox/front-awesome
ls/client-assistant
users-au/laravel-client
cgv/localized-resource
noith/settings
kda/laravel-package
kda/filament-dynamic-navigation
bypersoft/signbox
pairus/product-data
fayne/laravel-filament-cms-core