Skip to content

v1.0.0-RC3

Pre-release
Pre-release

Choose a tag to compare

@SoloPHP SoloPHP released this 25 Oct 11:23
· 15 commits to main since this release
3383800

Third release candidate of Solo Repository (solophp/repository). It closes two gaps that moving the first real application to RC2 revealed: long IN lists bind as one DBAL list parameter, and a mapping read only as rows needs no hydrator.

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-RC2

  • IN and NOT IN criteria and the key lists of relation loads and lockForUpdate() are bound as one DBAL list parameter (ArrayParameterType) of values converted through the field type, instead of one named parameter per value. DBAL expands the list into the same SQL when it runs the statement. A type without a DBAL list binding, such as boolean, still binds each value, and the parameter budget still counts every value of a list.
  • Behavior change: a queryBuilder() with IN criteria holds a list parameter. Run the builder itself, or pass getParameterTypes() along with getParameters() when its SQL becomes part of another statement.
  • The hydrate callback of a Mapping is optional, and Mapping::$hydrate is nullable. A mapping without one is read through rows(), aggregates, queryBuilder() and related filters, and written as usual; find(), findOneBy(), findBy(), iterateById() and loading it as a relation target throw LogicException before SQL.

Install

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

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