Skip to content

Upgrade to Core 3

Core 3.0 updates the Small runtime dependency baseline and removes the form-generation coupling from the persistence core.

Dependency baseline

Update the application dependency to Core 3:

composer require small/swoole-entity-manager-core:^3.0

Core 3 uses:

  • PHP 8.3 or newer;
  • small/collection 4.0.*;
  • small/swoole-db 2.0.*;
  • small/swoole-patterns 26.0.*;
  • symfony/yaml 7.*.

Do not pin older major versions of those Small runtime packages alongside Core 3.

Form generation was removed

small/forms is no longer required by Core and AbstractManager::getForm() no longer exists.

Move form creation and request validation to the application or framework integration layer. Persistence code should receive already validated values or DTOs and then use entity setters, persist(), or the update builder.

Scalar query builder

Core 3 adds createScallarQueryBuilder() for selected-field result sets. It supports qualified fields and output aliases and returns ScalarResult\ResultSet objects instead of entities.

See Scalar and statistics query builders.

Statistics query builder

Core 3 adds createStatsQueryBuilder() with SQL aggregate functions, automatic grouping of ordinary selected fields, composable aggregate arithmetic and parsed string aggregate expressions.

Statistics queries are supported on MySQL and PostgreSQL. Small Swoole DB rejects StatsQueryBuilder because it is not an SQL backend.

See Scalar and statistics query builders.

Runtime notes

The Core 3 development image targets Swoole 6.2.2 and OpenSwoole 26.2.0. MySQL continues to use PDO under Swoole 6 coroutine hooks.

The 3.0 release also includes internal reflection, hydration, serialization and relation-manager caching work. Those optimizations do not require application code changes.