mmoreram/extractor
mmoreram/extractor is a lightweight PHP library for pulling data out of files in multiple formats—CSV, JSON, XML, and more—into clean arrays via a simple, extensible extractor API. A handy, dependency-light tool for Symfony or any PHP project that needs reliable file parsing without the overhead.
fgetcsv/json_decode/SimpleXML blocks scattered across the codebase.extractor abstraction (source in, array out, local file or URL) is a ready-made seam for features like partner feed sync, bulk catalog import, report generation, or seeding demo data. You can spec the feature around "extract → validate → persist" rather than debating parser internals.Adopt when all of the following hold:
Look elsewhere when:
league/csv or a dedicated streaming parser.symfony/serializer, spatie/laravel-data, or league/csv + a validator is a better fit.PhpSpreadsheet or a maintained CSV library.Practical mitigation in every case: depend on your own thin interface, not on this package directly. Define Extractor/SourceReader ports in your domain, implement one adapter over mmoreram/extractor, and swapping libraries later becomes a one-file change. That converts an abandonment risk into a maintenance chore.
For executives: This is a small, free, MIT-licensed library that removes repetitive file-and-feed parsing code from our ingestion features. It doesn't add a vendor, a contract, or a platform commitment — it's a utility. The honest caveat is that it's a low-activity open-source project last released in 2018, so we'll wrap it behind our own interface and verify it on our PHP version before relying on it. Worst case, we replace one small adapter class.
For engineering: One uniform API over local files and remote URLs, pluggable CSV/JSON/XML extractors, plain arrays out, framework-agnostic, trivial to unit test in isolation. It saves the boilerplate fopen/fgetcsv/json_decode/error-handling dance that gets copy-pasted into every import feature. Small surface area means it's cheap to fork or vendor if upstream stays quiet. Caveats to accept knowingly: no streaming, no schema/type layer, no maintained security guarantee, and the remote-URL path needs our own SSRF and timeout controls. Use it behind a domain-owned port so the exit cost is one adapter.
Recommendation: Approved for edge-of-product and internal use with an adapter boundary and a short compatibility spike; not approved as a core dependency for high-volume or customer-facing ingestion without that wrapper in place.
How can I help you explore Laravel packages today?