atlas/mapper
Atlas.Mapper is a lightweight data mapper for Atlas, used as the core of Atlas.Orm or standalone. Create a MapperLocator with PDO params, fetch mappers by class, and work with Records via select, fetch, insert, update, delete, and persist.
atlas/mapper enables a build vs. buy decision in favor of building a custom data access layer (DAL) on top of Atlas.Orm, rather than integrating third-party ORMs (e.g., Eloquent, Doctrine). This aligns with teams prioritizing domain-driven design (DDD) and type safety over convention-over-configuration.hasMany in favor of declarative relationships)."Atlas.Mapper lets us own our data layer without sacrificing performance or flexibility. Think of it as a Swiss Army knife for PHP databases—ideal for scaling our [Product X] platform where complex relationships (e.g., user roles, nested transactions) are critical. By adopting this, we avoid vendor lock-in with ORMs like Eloquent, reduce technical debt from raw SQL, and future-proof our stack for high-traffic growth. The package’s focus on performance optimizations (e.g., handling large datasets efficiently) aligns with our goal to support [Y] concurrent users without costly infrastructure upgrades."
Key Outcomes:
*"Atlas.Mapper is a lightweight, high-performance data mapper that gives us:
Trade-offs:
Proposed Adoption Path:
Ask: Approval to allocate [X] dev weeks for proof-of-concept and training on Atlas.Cli."*
*"Atlas.Mapper is like Eloquent’s strict, performant cousin—but without the magic. Here’s why it’s worth trying:
joinWith('LEFT foo AS foo_alias')) with no hidden SQL.fetchRecordsBy()) and large many-to-many datasets.How to Get Started:
composer require atlas/mapper.vendor/bin/atlas generate:mappers.$threadMapper = $mapperLocator->get(ThreadMapper::CLASS).$threads = $threadMapper->fetchRecordsBy(['author_id' => 1])->joinWith('comments').Try It: Spin up a test project and compare performance with your current ORM for a complex query (e.g., nested joins)."*
How can I help you explore Laravel packages today?