Skip to content

v1.0.0

Choose a tag to compare

@SoloPHP SoloPHP released this 27 Oct 21:45
· 5 commits to main since this release
feee57b

First stable release of Solo Repository (solophp/repository): typed PHP repositories on Doctrine DBAL. Map a table to your own objects, read through reusable queries, write explicitly, and get translations with one fallback rule and relations loaded in batches.

The code is that of v1.0.0-RC6; two applications run it in production.

What 1.0 covers

  • Explicit, typed Mapping and Repository, which an application can extend into a typed repository per table.
  • Reusable ReadQuery with projections, aggregates, bounded iteration by ID, queryBuilder() and ordering by fields of BelongsTo targets.
  • Filter::all, any, not and related EXISTS predicates, with values checked against their field type before SQL.
  • Translations with one fallback rule for reading, filtering and sorting, and PATCH upserts through TranslationStore.
  • Four relation types with nested batch loading, locale inheritance and per-relation visibility.
  • Soft delete, native upserts, atomic insertMany, LinkSet pivot writes, lockForUpdate() and locking reads with forUpdate().
  • Tested on MySQL 8.4, MariaDB 12.3, PostgreSQL 17 and SQLite, with PHP 8.3–8.5 and DBAL 4.3+.

From now on the public API follows semantic versioning; see the API reference for what it covers and the rules for typed repositories.

Install

composer require solophp/repository

See the documentation, the changelog and the full diff since RC6.