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

Csv Laravel Package

goodby/csv

Goodby CSV is a memory-efficient, flexible PHP library for importing and exporting CSV files. It processes rows line by line via callbacks without loading everything into memory, supports multibyte encodings like SJIS-win, EUC-JP, and UTF-8, and is fully unit-tested for enterprise use.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Bulk import / data onboarding features. The observer-callback model ($lexer->parse($file, $interpreter) with addObserver(fn(array $row) => ...)) is a natural fit for "upload a customer/prospect/product/inventory list" flows, where each row is validated and persisted individually rather than buffered. This directly supports decisions like "do we build bulk CSV ingestion in-house or ship a narrower one-row-at-a-time admin form?"
  • Memory-footprint and scale decisions. Because it streams line-by-line and never holds the full rows array, it lets you commit to supporting large uploads (hundreds of thousands of rows) on modest PHP-FPM workers — or explicitly cap upload size and offload to queues, knowing the parser itself isn't the bottleneck.
  • Internationalization / encoding roadmap. Native SJIS-win, EUC-JP, and UTF-8 conversion is the differentiator. If your roadmap includes Japanese-market customers, legacy ERP exports, or Excel-on-Windows-generated files, this is a concrete input to "do we budget encoding-normalization work this quarter?"
  • Build vs. buy for a low-level utility. ~150 lines of fgetcsv glue plus a mb_convert_encoding call is the realistic build alternative. Choosing this package is a decision to buy a thin, tested primitive rather than own edge cases (quoted delimiters, embedded newlines, BOM, encoding detection).
  • Legacy migration workstreams. Nightly cron syncs and one-off data migrations from older systems are exactly the use case; this informs whether migration tooling gets its own backlog epic.
  • Export/reporting parity. The library also does export, so a single dependency can cover both directions of the same "give the customer their data" feature.

When to Consider This Package

Consider it when:

  • You are on, or must support, PHP 5.3–7.x and cannot yet adopt a modern CSV library. The 2016 last release is not a defect in that context — it's stability against a frozen runtime.
  • Memory is the binding constraint. You need true streaming with a per-row callback and cannot afford to materialize an array of rows (e.g., shared hosting, low memory_limit, large nightly files).
  • Multibyte conversion is a first-class requirement — SJIS-win/EUC-JP in, UTF-8 out — and you'd otherwise hand-roll encoding logic per import source.
  • You want a dependency-light, MIT-licensed, unit-tested primitive with no framework coupling, to be wrapped behind your own CsvImporter interface.
  • The integration is a bounded, low-blast-radius part of the product (an admin upload, a scheduled sync), not a customer-facing real-time path.

Look elsewhere when:

  • You are on PHP 8.1+ / Laravel 9+. The package predates typed properties, enums, and modern static analysis; expect deprecation noise and no upstream fixes. Prefer league/csv (actively maintained, streaming reader, PHP 8 support) or maatwebsite/excel if you already live in the Laravel Excel ecosystem.
  • You need security responsiveness — CSV formula injection (=, +, -, @ prefixes), zip-bomb/row-count guards, or CVE turnaround. There is no evidence of maintenance since 2016; treat it as vendored, frozen code you own.
  • You require Laravel-native ergonomics — filesystem/Storage disks, UploadedFile validation rules, queue batching, chunked job dispatch, progress events. You will write all of that glue yourself; that glue is the real cost, not the parser.
  • Composer hygiene matters — zero dependents on Packagist is a weak ecosystem signal, and it means few people will hit your bugs before you do.
  • You need features beyond parse/emit: streamed HTTP downloads, XLSX, delimiter sniffing, header-row mapping, or schema validation.

How to Pitch It (Stakeholders)

To executives (30 seconds): We need reliable CSV in/out for bulk data — customer imports, legacy system feeds, and reporting exports — including Japanese-encoded files from partner systems. This is a small, MIT-licensed, fully unit-tested library that does exactly that with very low memory use, so we can accept large files without scaling up servers. It is free, adds no licensing or vendor-negotiation risk, and is deliberately narrow, so it stays out of the critical path. The trade-off is that it is no longer actively developed; we mitigate that by isolating it behind our own interface so it can be swapped in days, not months, and by owning the security-relevant input validation ourselves. Recommendation: adopt as a contained implementation detail, not as a platform commitment.

To engineering: This is a thin streaming lexer/interpreter with a callback observer API and built-in multibyte conversion. It is not Laravel-aware — no facades, no service provider, no queue integration. The pitch is low surface area: wire it into one CsvImportService behind an interface, do validation, encoding allow-listing, row caps, and formula-injection sanitization in your layer, and version-pin it. Budget explicitly for the wrapper (validation, chunked job dispatch, progress, error-report rows) — that's where the real work and the real product value live, and it's also the seam that makes the dependency replaceable. If we're greenfield on PHP 8, benchmark league/csv first and only take this one where PHP-version constraints or SJIS-win handling justify it.

To the product/roadmap conversation: Fund the capability, not the library. The decision worth recording is "we will support large, encoding-diverse CSV ingestion/export with bounded memory," and this package is the cheapest credible way to prove that capability now, with a known and inexpensive exit path later.

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.
encore2/laravel-admin2
cboxdk/laravel-console-kit
shapecode/doctrine-dbal-datetimeutc
gilads-otiannoh254/inertia-protocol
dakiquang/laravel-oauth-refresh-lock
woda/laravel-worktrees
dalefranks/ramasite
faghy/laracashbook
roundly-consulting/google-places-for-laravel
roundly-consulting/kubernetes-api-for-laravel
roundly-consulting/plausible-for-laravel
gvp/gvp-laravel-template
metasyncsite/laravel-metasync-client
roundly-consulting/onboarding-for-laravel
adachsoft/cli-process-tester
adachsoft/changelog-linter
adachsoft/collection
adachsoft/php-code-style
adachsoft/api-version-bundle
cgv/localized-resource