A lightweight PHP DataMapper ORM built on Doctrine DBAL that avoids annotations and proxy classes.
Spot is a PHP DataMapper ORM built on Doctrine's Database Abstraction Layer that provides object-relational mapping without annotations or proxy classes. It solves the problem of complex ORM implementations by offering a lightweight, clear alternative that maintains separation between domain logic and database persistence.
PHP developers building applications with database persistence who prefer the DataMapper pattern over active record and want annotation-free entity definitions.
Developers choose Spot for its simplicity and clarity—it provides full ORM functionality without the complexity of annotations or proxy classes, while leveraging the robust foundation of Doctrine DBAL for database compatibility.
Spot v2.x DataMapper built on top of Doctrine's Database Abstraction Layer
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Built on Doctrine's Database Abstraction Layer, Spot inherits robust database support and comprehensive type handling across MySQL, SQLite, and others, as shown in the field types list.
Uses plain PHP methods in entity classes for field and relation definitions, avoiding annotation magic and ensuring clarity, as emphasized in the philosophy section.
Provides automatic table creation and alteration based on entity field definitions via the migrate() method, simplifying schema management without external tools.
Allows execution of raw SQL queries that still load results into entity objects, offering an escape hatch for complex queries while maintaining ORM convenience.
Includes eager loading capabilities for relations with the with() method, helping to solve the N+1 query problem efficiently, as detailed in the relations section.
The README admits joins are not enabled in Spot's query builder, forcing developers to write custom SQL for complex relational queries, which can increase code complexity.
Auto-migrations do not support column renaming, potentially leading to data loss during schema changes, as warned in the migrations caveat.
While custom mappers are allowed for entity-specific logic, they require additional boilerplate code per entity, adding setup complexity compared to more integrated ORMs.
As a niche DataMapper ORM, Spot has a smaller community and fewer third-party tools compared to giants like Eloquent or Doctrine ORM, limiting resources and integrations.