Skip to content

v1.0.0-RC1

Pre-release
Pre-release

Choose a tag to compare

@SoloPHP SoloPHP released this 21 Oct 09:12
· 28 commits to main since this release
47fd1eb

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

  • Mapping and Repository by composition; constructing them never opens a database connection.
  • ReadQuery with projections, count()/exists(), sum()/min()/max()/avg() and bounded iterateById() exports.
  • Four relation types with nested batch loading, locale inheritance and per-relation visibility.
  • Filter::all/any/not/related criteria. 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, transactional insertMany(), many-to-many LinkSet, translation save()/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.