Skip to content

v1.0.0-RC6

Pre-release
Pre-release

Choose a tag to compare

@SoloPHP SoloPHP released this 27 Oct 15:13
· 7 commits to main since this release
ff122e9

Sixth release candidate of Solo Repository (solophp/repository). LinkSet writes no longer fail when another writer stores the same pair first, locking reads on MySQL no longer depend on a deprecated DBAL platform class, and the compatibility rules for typed repositories are documented.

This is a prerelease: the 1.0 API is being validated in real applications before the stable 1.0.0 tag.

Migrating from Base Repository v3: read the migration guide.

Changes since 1.0.0-RC5

  • Behavior change: LinkSet::attach() and sync() skip a pair that another writer stored after the operation read the set, instead of failing on the pivot's unique key. Their INSERT carries ON CONFLICT (pair) DO NOTHING on PostgreSQL and SQLite and ON DUPLICATE KEY UPDATE on MySQL and MariaDB; foreign-key violations still propagate. Concurrent attaches of one pair now both succeed on MySQL and on PostgreSQL in READ COMMITTED, while MariaDB with snapshot isolation (error 1020) and PostgreSQL in REPEATABLE READ or SERIALIZABLE (a serialization failure) still refuse a transaction whose snapshot is older than the other writer's commit. On PostgreSQL and SQLite these writes now need the UNIQUE pair that the guide already required. See LinkSet.
  • A locking read on MySQL tells FOR UPDATE OF support by the server version, 8.0.1 or later, instead of by DBAL's deprecated MySQL80Platform, so it keeps locking only the read's table once DBAL drops its MySQL 8 platform classes. MySQL 5.7 and MariaDB keep the plain FOR UPDATE.
  • The compatibility rules for subclasses of Repository are documented: throughout 1.x it stays a non-final readonly class with final public methods and private state, a minor release may add public methods, and constructor parameters keep their names and order. See typed repositories.

Install

composer require 'solophp/repository:^1.0@RC'

See the changelog for the full list of features and requirements, and the full diff since RC5.