Repository navigation
v1.0.0-RC6
Pre-release
Pre-release
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()andsync()skip a pair that another writer stored after the operation read the set, instead of failing on the pivot's unique key. Their INSERT carriesON CONFLICT (pair) DO NOTHINGon PostgreSQL and SQLite andON DUPLICATE KEY UPDATEon 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 OFsupport by the server version, 8.0.1 or later, instead of by DBAL's deprecatedMySQL80Platform, so it keeps locking only the read's table once DBAL drops its MySQL 8 platform classes. MySQL 5.7 and MariaDB keep the plainFOR UPDATE. - The compatibility rules for subclasses of
Repositoryare documented: throughout 1.x it stays a non-finalreadonlyclass 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.