yiisoft/data
yiisoft/data provides data providers, pagination, sorting, and filtering for Yii applications. A consistent API lets you read, paginate, sort, and filter data from arrays, databases, or custom sources, simplifying list and API development.
yiisoft/data supplies the contracts — reader, writer, processor — that most products end up hand-rolling once a second import source appears. Adopting it is a decision to buy a convention (~small surface area) instead of letting each squad invent its own importCsv() / exportCsv() helpers.ReaderInterface → ProcessorInterface → WriterInterface) that features plug into without touching storage code. Filter/sort/paginate-style processors make list/report features composable rather than bespoke.Consider it when:
Look elsewhere when:
league/csv (or PhpSpreadsheet for XLSX) cover the same ground with zero cross-framework glue. Introducing Yii interfaces here is architecture tax with no user-visible payoff.To executives (one paragraph): We keep rebuilding the same import/export plumbing per feature, and each rebuild is a new place for data-handling bugs. This package offers the standard contracts for reading, transforming, and writing data under a permissive BSD-3 license, so we standardize once and add sources without rewrites. It is deliberately small and dependency-light, so the downside is bounded: if the community stalls, we own roughly a few hundred lines we would have written anyway. Recommended as an internal standard for ingestion/export paths — not for customer-facing SLAs or anything we would not be comfortable maintaining ourselves.
To engineering (positioning): Treat it as an interface package, not a framework. It gives you Reader / Processor / Writer contracts with pluggable implementations, so pipelines become composable and unit-testable against in-memory data instead of a live database. Two honest caveats: (1) this is Yii3 lineage — in a Laravel codebase you will write the bindings yourself, which may erase the savings; (2) adoption is thin, so pin the version, vendor it internally, and keep our own implementations behind the interface so swapping out is a one-file change. Green-light it for admin exports, feed ingestion, and migration tooling; require a design review before it touches revenue-critical data paths.
How can I help you explore Laravel packages today?