moonshine/import-export
Import/export companion for MoonShine admin panels: add CSV and Excel import/export actions to Laravel resources, map columns, validate rows, and handle large files in background queues with minimal configuration.
Architecture fit. moonshine/import-export is not a general-purpose import/export library — it is a thin adapter that registers import/export handlers onto MoonShine admin resources. That means it is only viable inside an application already committed to MoonShine as its admin panel. It plugs into MoonShine's handler lifecycle (resource-level buttons, modals, field-to-column mapping) and delegates the actual spreadsheet/CSV work to an underlying engine (typically PhpSpreadsheet or Laravel Excel). Architecturally this is the right shape: it keeps import/export declarative and co-located with the resource definition rather than scattered across controllers. The cost is that your data-movement logic now lives inside a vendor's handler contract, which is a coupling point we would need to insulate. The 2.1.0 release does not change this architecture — it is a platform-support change only, no new capabilities, no new coupling.
Integration feasibility. Mechanically trivial: composer require moonshine/import-export, register the handler on a ModelResource, declare the field map, done. The friction is entirely in confidence, not effort. Four stars and zero dependents mean there is effectively no production evidence base — no downstream projects to inspect, no issue history to mine for edge cases, no Stack Overflow footprint. Activity in a package this small is a single-person signal, not a community one. 2.1.0 sharpens this concern rather than resolving it: the release contains no features and no bug fixes, only a runtime floor change, and it is labelled breaking. A maintainer shipping a breaking platform change in a minor version is telling us the package has no compatibility policy worth relying on.
Technical risk.
Key questions to resolve before committing.
=, +, -, @ prefixes)?Stack fit. Now assumes PHP 8.3+ (changed from 8.2+), Laravel 10–12, MoonShine 3.x, and ext-zip / ext-gd if the engine is PhpSpreadsheet. Note the practical narrowing: with PHP 8.2 excluded, the realistic combinations are Laravel 11/12 on PHP 8.3 or 8.4. Fits cleanly if the admin panel is already MoonShine and the runtime is already 8.3+. If the panel decision is still open, this package should not be a factor in it — the panel choice should be made on its own merits and this adapter evaluated afterward. The same now applies to the PHP version: do not upgrade the runtime because of this package.
Migration path. Do not import the package into domain code. Wrap it:
ImportService, ExportService) with a stable DTO contract.Compatibility. Pin an exact version in composer.json — 2.1.0, not ^2.1 — and re-pin deliberately on each review. Two CI gates are now required:
composer.lock resolves to a package version whose PHP constraint we cannot satisfy.If the application must stay on PHP 8.2 for any environment, pin 2.0.x and record the decision as a known-frozen dependency with no upstream patch path.
Sequencing.
Maintenance. Expect to own patches. Budget a standing fraction of an engineer — realistically a few hours a quarter for dependency bumps, more in any quarter where MoonShine ships a major or this package moves its platform floor. 2.1.0 is a scheduled-work trigger, not a drop-in update: it forces a coordinated runtime upgrade across every environment. Track upstream releases and the MoonShine changelog together; they are a package deal. Because breaking changes arrive in minors, read the diff on every bump — do not trust the version number.
Support. GitHub issues only, no SLA, likely a single respondent. Escalation path is "read the source" — acceptable for a utility package, unacceptable for anything in the critical path of a revenue workflow without a fork you control. 2.1.0's absence of a deprecation notice or migration note reinforces that support quality is what it is; plan accordingly.
Scaling. The two scaling cliffs are (1) large imports blowing PHP memory/time limits and (2) large exports timing out mid-stream and leaving truncated files. Both are solvable with chunked readers, streamed writers, and queue-backed jobs, but they are almost never solved by default in an adapter package. Assume you will build the queued path yourself and treat the package as the UI + mapping layer only. Unchanged by 2.1.0 — PHP 8.5 support does not imply streaming internals.
Failure modes to instrument.
composer update on a PHP 8.2 host silently holds the package at an older version while other dependencies advance, producing an untested combination. Pin exactly and assert resolved versions in CI.; delimiters, BOM-prefixed UTF-8, localized date formats) — the single most common field support ticket for any import feature.Ramp-up. Low for a developer already fluent in MoonShine handlers — the API is small and the pattern is familiar. Near-zero for anyone else: the package's documentation footprint is thin, so onboarding depends on reading source. Combined with four stars, that means the knowledge will concentrate in one or two engineers. 2.1.0 adds a second undocumented surface — the supported PHP matrix and its interaction with MoonShine and the spreadsheet engine — that will only exist in whoever ran the upgrade. Write an internal one-pager covering the handler wiring, the service contract, the queue path, and the supported PHP/MoonShine/Laravel matrix, or you are buying a second bus-factor problem on top of the vendor's.
Verdict. Adopt only as a presentation adapter behind an application-owned service, gated on (a) confirmed PHP 8.3+ across every environment and (b) a short spike that answers the nine verification questions. 2.1.0 is a net negative for the case — it raised the runtime floor, shipped a breaking change in a minor, offered no maintenance branch for the previous floor, and added no capability — but it is a small negative. The package remains too immature to be a load-bearing dependency, and MIT plus a small surface still makes it cheap to fork, which is precisely what makes a guarded adoption reasonable. If comparison step 3 shows the package saving only a few dozen lines over calling Laravel Excel directly, take the direct route and skip the dependency.
How can I help you explore Laravel packages today?