fsi/data
FSi Data is a lightweight Laravel package for building a clean data layer: typed data objects, mapping, and transformation utilities help move validated data between requests, models, and views without repetitive boilerplate, keeping application code predictable and easy to maintain.
composer require fsi-open/data (check the repo's composer.json for the exact package name and Laravel version constraints before assuming).README.md, then src/ for the service provider and the main contract/interface (often DataInterface, MapperInterface, or similar). The tests/ directory is the fastest way to see intended usage.php artisan vendor:publish --provider="Fsi\Data\..." if the package ships one; if not, expect zero-config usage.$data = MyData::fromArray(['id' => 1, 'name' => 'Acme']);
echo $data->getName();
doctrine/dbal to ^4.0). There are no API changes, so nothing extra to learn before your first use case — but if you already have doctrine/dbal installed, resolve both packages together in one step:composer require fsi-open/data doctrine/dbal --with-all-dependencies
with* methods.array_get/data_get calls.doctrine/dbal 4.x. If you hydrate from a Doctrine entity/result set, add one round-trip test (entity → data object) so a future DBAL bump shows up as a test failure rather than a runtime TypeError.filter → map → validate) rather than chaining ad-hoc loops. This keeps transform logic testable in isolation.app() calls inside domain code.doctrine/dbal 3.x on purpose (e.g. a custom DBAL type registered the old way), stay on 1.2.1 until that code is ported, since allowing DBAL 4 in the constraint doesn't force it, but a future composer update will drift you there.composer.json and review changelogs before upgrading.^4.0 is now permitted alongside your existing constraint. DBAL 4 removed a number of 3.x APIs (deprecated type/getName() conventions, changed result and statement APIs). Anything in your app that touches DBAL directly — custom types, SchemaManager calls, executeUpdate/statement handling — must be verified on 4.x before you let Composer resolve to it. Lock the resolved version in composer.lock and diff it in code review.php artisan config:clear after changes; stale cached config is a common source of "my mapper isn't used" bugs.$data->field = 'x' silently fails or throws. Use the documented with*/setter API and reassign the result.dd($dataObject) can hide private/protected fields. Use the package's toArray()/jsonSerialize() if available, or reflection-based dumping.fsi/data). If the package stalls, you can swap the implementation without touching domain code.require block after each upgrade (1.3.0 loosened DBAL, not Laravel/Symfony). On older Laravel versions you may still need --with-all-dependencies or a version pin; if a DBAL 3.x-only dependency exists elsewhere in the tree, the resolver will simply keep you on 3.x and 1.3.0 is a no-op.How can I help you explore Laravel packages today?