Repository navigation
v1.0.0-RC1
Pre-release
Pre-release
First release candidate of Solo Repository (solophp/repository), the successor of solophp/base-repository v3. It replaces inheritance with explicit, typed mappings and composition, moves reads to reusable queries, and loads relations in batches with one translation fallback rule.
This is a prerelease: the 1.0 API is complete and is being validated in a real application before the stable 1.0.0 tag.
Migrating from Base Repository v3: read the migration guide.
Highlights
MappingandRepositoryby composition; constructing them never opens a database connection.ReadQuerywith projections,count()/exists(),sum()/min()/max()/avg()and boundediterateById()exports.- Four relation types with nested batch loading, locale inheritance and per-relation visibility.
Filter::all/any/not/relatedcriteria. Criteria values and written values must have the form of their field type, so drivers cannot silently turn'12x'into 12.- Soft delete,
lockForUpdate()row locks, transactionalinsertMany(), many-to-manyLinkSet, translationsave()/seed(). - Tested on SQLite, MySQL 8.4, MariaDB 12.3 and PostgreSQL 17 with PHP 8.3 and 8.5 and Doctrine DBAL 4.3 or later.
Install
Until the package is on Packagist, add the GitHub repository:
composer config repositories.solophp-repository vcs https://github.com/SoloPHP/Repository.git
composer require 'solophp/repository:^1.0@RC'See the changelog for the full list of features and requirements.