Repository navigation
Releases
6.4.4
Allows doctrine/doctrine-laminas-hydrator 4, which adds support for doctrine/collections 3 and laminas-hydrator 5. The constraint is now ^3.2.0 || ^4.0.0. The module only constructs DoctrineObject with an object manager, which 4.x still accepts. Hydrator 4 requires PHP 8.3, so PHP 8.2 installations keep resolving 3.x.
Works without laminas/laminas-form. laminas-form was already only a suggested dependency, and the module needs no changes to run without it: the form_elements configuration refers to the form element classes only by name. The test suite now covers this. The test and CI application configs load the Laminas\Form module only when it's installed, the form annotation listener tests skip without it, and the CI jobs without optional dependencies remove it. laminas-form is required in require-dev for the form tests.
No runtime code changes.
6.4.3
Declares PHP 8.6 support. The php constraint gains ~8.6.0; the floor is unchanged. CI now runs 8.6 with PHP platform requirements ignored there, because upstream laminas packages still cap PHP at ~8.5.0.
No src/ changes. Under 8.6.0RC2 no deprecation originates in this package.
The spl_object_hash() deprecations you may still see on 8.6 come from laminas/laminas-servicemanager, which is not forked and remains unfixed upstream.
6.4.2
laminas/laminas-modulemanager now accepts ^3.0 as an alternative arm alongside the existing range.
modulemanager 3.0 removes the laminas-config dependency, which changes two things: ConfigListener::loadConfigFile() accepts PHP config files only, and getMergedConfig() no longer takes $returnConfigAsObject and always returns an array. Neither is used here — this package does not call getMergedConfig() and does not load non-PHP config.
Nothing else changes; the existing arm is untouched, so current consumers are unaffected. No src/ changes and no lock movement.
6.4.1
Bug fix only. No dependency or API changes since 6.4.0.
Connection services no longer connect eagerly
6.4.0 guarded the DBAL 4 removal of markDoctrineTypeCommented() like this:
if (method_exists($connection->getDatabasePlatform(), 'markDoctrineTypeCommented')) {which resolves the platform unconditionally. On any server whose version has to be negotiated (PostgreSQL, MySQL), DBAL connects in order to resolve it — so merely building a doctrine.connection.* service opened a socket.
Before 6.4.0, getDatabasePlatform() was only reached inside the two foreach loops, and therefore not called at all when neither doctrineTypeMappings nor doctrineCommentedTypes were configured.
The platform is now resolved once, and only when there is something to apply.
Test coverage
The existing testNoConnectWithoutCustomMappingsAndCommentedTypes asserts exactly the right thing (isConnected() is false) but could not catch this — it uses SQLite, whose platform resolves without connecting.
The new testDoesNotResolvePlatformWhenThereIsNothingToApply points the factory at an unreachable MySQL connection. It throws Connection refused against the 6.4.0 behaviour and passes now.
6.4.0
First release of the datasage fork, matching DoctrineModule 6.4.
Supported PHP: 8.2 – 8.5. Both doctrine/orm ^2.20 and ^3.0 are supported, as are doctrine/dbal ^3.3 and ^4.0.
PHP 8.5 requires ORM 3. The only 8.5-capable
doctrine-laminas-hydrator(3.7.0) requiresdoctrine/persistence ^4, and ORM 2.20 requires^2.4 || ^3— the two cannot coexist. On PHP 8.2–8.4 you can stay on ORM 2.
Cache: PSR-6
Requires doctrine/doctrine-module ^6.4.1, whose doctrine.cache.* services are now Psr\Cache\CacheItemPoolInterface. The ORM Configuration uses setMetadataCache(), setQueryCache(), setResultCache() and setHydrationCache(); the DBAL configuration uses setResultCache().
Annotations removed
Mapping is declared with PHP attributes. Test and CI fixtures are converted and the drivers are AttributeDriver.
Removed
- Yuml controller and developer-tools collectors — the only parts of
src/using laminas-mvc, which has no PHP 8.5 release on any branch.laminas/laminas-mvcandlaminas/laminas-developer-toolsare both dropped. (developer-tools itself caps at PHP 8.4, so the collectors could never have run on 8.5.) laminas/laminas-serializer— unused, and its only 8.5-capable release needs servicemanager ^4, which laminas-form 3 conflicts with.- Dead DBAL 2 compatibility code. Three middleware tests had been silently skipping — they guarded with
class_exists()againstDoctrine\DBAL\Driver\Middleware, which is an interface, so the check was always false. They now actually run.
ORM 3 / DBAL 4 compatibility
| Change | Handling |
|---|---|
EntityManager::create() removed |
Constructor used; event manager passed explicitly, since DBAL 4 removed Connection::getEventManager() — without it ResolveTargetEntityListener never sees onClassMetadataNotFound and interface targets fail to resolve |
| Console helper set removed | Commands built with EntityManagerProvider; --object-manager still honoured via a shared resolver |
| Commands removed in ORM 3 | Registered from a map, skipping classes the installed major doesn't ship |
setClassMetadataFactoryName() typed string |
Only called when the option is set |
| Mapping arrays → value objects | Return types widened; they implement ArrayAccess so readers are unchanged |
LazyGhostTrait removed in Symfony 8 |
Native lazy objects enabled where the ORM supports them |
addNamedQuery, setSQLLogger, markDoctrineTypeCommented, ReservedWordsCommand, EntityManagerHelper |
Guarded |
Upgrading
Install alongside doctrine/doctrine-module ^6.4.1 using a repositories entry pointing at the fork. Applications using the Yuml route, the developer-tools Doctrine panels, or an AnnotationDriver must adjust.
Verified in containers across PHP 8.2–8.5 against both ORM 2.20 and ORM 3 — seven combinations — plus the full CI matrix with MySQL and real CLI command runs.