splash/flat
A lightweight flat-file data store for Laravel and PHP: persist arrays and records as plain files with a simple query-style API, no database required. Ideal for small apps, prototypes, settings, and caches.
composer require splash/flat. If Flex doesn't auto-register, add Splash\Bundle\FlatBundle\FlatBundle (or the vendor's actual namespace under src/) to config/bundles.php.splash/connector core is installed and configured (API keys, server URL, object definitions). Get a bare Splash connection working before touching this bundle; otherwise you'll be debugging two layers at once.DependencyInjection/ and Resources/config/services*.yaml in the package. That tells you the real service IDs and the parameters (file path, delimiter, enclosure, encoding) you can override in your app config. Then skim src/ for the reader/writer services themselves — the codebase is small enough to read in full, which you should do given how little documentation/community exists.config/services.yaml, register the object, run Splash's commit/import from a console command or the Splash console, and confirm rows land. Only then wire the write path (orders out to a legacy ERP, for example).$row[3] accesses. Flat-file schemas drift; you want the mapping editable without touching logic.splash.flat.* parameter block in your app config and pass paths in from there — never hardcode into the bundle.bin/console during debugging. Wrap each run in a lock (e.g. Symfony Lock component) — flat files are a single shared resource and concurrent writers will corrupt each other.KernelTestCase, assert on the resulting Splash payload/array. Because the package is unmaintained-in-practice, your tests are your upgrade safety net.composer.json, commit your composer.lock, and plan for the possibility of forking or vendoring the handful of classes you actually use."a""b", embedded newlines inside quoted fields) all differ per source system. Don't rely on auto-detection; configure it per source and add a fixture test.rename() on success. A crashed process mid-write otherwise leaves a truncated file that the next reader treats as valid.fgetcsv / generator-based readers) instead of file() + explode. Large exports will otherwise hit memory_limit intermittently and be impossible to reproduce locally.services.yaml (aliasing the bundle's service ID to your subclass) over editing vendor code. Check DependencyInjection/Configuration.php for what's actually configurable before subclassing.How can I help you explore Laravel packages today?