Skip to content
CAI
Software that uses CAICheck a score

doctrine-extensions/DoctrineExtensions

55.7

Adequate · 17 November 2026

29.3k

lines of production code

PHP

primary language

5

measurements over time

CAI band scale
CAI trend line
CAI lens gauges

What this system is

This system is a library of behavioral extensions for Doctrine ORM and MongoDB ODM that automatically manages entity metadata and lifecycle events. It provides features for handling translations, soft deletes, hierarchical trees, file uploads, and automatic tracking of timestamps, user attribution, and IP addresses. The library also supports versioned logging of entity changes and generates unique slugs based on configurable rules and relationships.

How it got here

2010–2011 — PHP 8 attributes and test expansion

61 changes.

The project modernized its configuration by adopting PHP 8 attributes for behavioral extensions like Translatable and Sluggable, replacing legacy interface requirements and annotations. This period focused heavily on establishing comprehensive test coverage for all Gedmo extensions across Doctrine ORM and MongoDB ODM, including extensive fixture creation and mapping validation. Infrastructure improvements included setting up linting, static analysis, and Docker-based development environments to support these changes.

2012–2019 — PHP 8 attributes and extension modernization

117 changes.

This period focused on migrating the codebase from legacy Doctrine annotations to native PHP 8 attributes across all behavioral extensions. It introduced new features such as the Translatable, ReferenceIntegrity, and IpTraceable extensions, while refactoring core components like Sluggable and SoftDeleteable to support modern mapping drivers and event adapters. The work also included comprehensive test coverage expansion and the deprecation of older configuration formats to prepare for future major releases.

2020–2026 — Doctrine ORM 3.x compatibility and test expansion

17 changes.

This period focused on ensuring backward compatibility with Doctrine ORM 3.x by introducing internal compatibility traits for hydration, SQL walking, and repository method signatures. Concurrently, extensive test coverage was added for the Translatable, Tree, and Sluggable extensions, including fixtures for PHP 8 attributes, nested tree edge cases, and various data type mappings.

Features

Add Doctrine ORM 8 PHP attributes to translation mapped superclasses

The \AbstractPersonalTranslation\ and \AbstractTranslation\ mapped superclasses now include Doctrine ORM 8 PHP attributes (e.g., \\#\[ORM\\MappedSuperclass\]\, \\#\[ORM\\Column\]\) alongside the existing annotations. This change enables users to leverage native PHP 8 attribute syntax for mapping these translation entities, providing a modern alternative to XML/YAML/annotation-based configuration while maintaining backward compatibility with the existing annotation style.

src/Translatable/Entity/MappedSuperclass · high confidence

Add MongoDB ODM Translation document with PHP 8 attribute support

The new src/Translator/Document/Translation.php file provides a MongoDB ODM document class for storing translation records. It maps the locale, property, and value fields using Doctrine ODM attributes (e.g., \#\[ODM\\Field(type: Type::STRING)\]), enabling PHP 8 attribute-based mapping alongside legacy PHPDoc annotations. This allows the translator to persist translations in MongoDB using the modern attribute syntax.

src/Translator/Document · high confidence

Add MongoDB ODM mapped superclass for log entries

Introduced \AbstractLogEntry\ in the \src/Loggable/Document/MappedSuperclass\ directory to support Doctrine MongoDB ODM. This new class implements \LogEntryInterface\ and uses PHP 8 attributes (alongside legacy annotations) to map log entry fields such as action, logged timestamp, object identifier, class name, version, and data changes, enabling the loggable behavior for MongoDB documents.

src/Loggable/Document/MappedSuperclass · high confidence

Add MongoDB ODM translation mappings and migrate legacy translation class

This change introduces Doctrine MongoDB ODM support for the translatable behavior by adding \AbstractTranslation\ and \AbstractPersonalTranslation\ mapped superclasses in the \src/Translatable/Document/MappedSuperclass\ directory. The new classes use PHP 8 attributes (e.g., \\#\[MongoODM\\MappedSuperclass\]\, \\#\[MongoODM\\Id\]\) alongside legacy docblocks to define fields like \locale\, \objectClass\, \field\, \foreignKey\, and \content\. The \AbstractPersonalTranslation\ class is a renamed and refactored version of the previous \lib/DoctrineExtensions/Translatable/Entity/Translation\, shifting from SQL-oriented annotations (like \@Table\, \@Column\) to MongoDB-specific mappings and adjusting property visibility and types (e.g., \id\ is now nullable string, \entity\ renamed to \object\). This enables users to store translations in MongoDB documents using the Gedmo Translatable extension.

src/Translatable/Document/MappedSuperclass · high confidence

Add PHP 8 attribute mapping for MongoDB ODM LogEntry document

The LogEntry document in src/Loggable/Document now supports Doctrine MongoDB ODM PHP 8 attributes alongside the existing annotations. This allows users leveraging PHP 8+ to utilize native attribute syntax for mapping the LogEntry class and its indexes, ensuring compatibility with modern Doctrine ODM versions while maintaining backward compatibility with annotation-based configuration.

src/Loggable/Document · high confidence

Add PHP 8 attribute mapping for SoftDeleteable traits

The SoftDeleteable traits now support Doctrine ORM and MongoDB ODM mapping via PHP 8 attributes in addition to the existing docblock annotations. This allows users to configure the \deletedAt\ field using native PHP 8 syntax (e.g., \\#\[ORM\\Column(...)\]\ or \\#\[ODM\\Field(...)\]\), providing a modern alternative to annotation-based configuration while maintaining backward compatibility.

src/SoftDeleteable/Traits · high confidence

Add PHP 8 attribute mapping support to Timestampable traits

The Timestampable traits (Timestampable, TimestampableEntity, and TimestampableDocument) now include PHP 8 attributes alongside existing docblock annotations for mapping configuration. This allows users to define timestampable fields using native PHP 8 syntax (e.g., \#\[Gedmo\\Timestampable\]) in addition to the traditional @Gedmo annotations, providing a modern alternative for Doctrine ORM and MongoDB ODM mappings.

src/Timestampable/Traits · high confidence

Add PHP 8 attribute mappings for IP traceable traits

The IpTraceable traits now include Doctrine ORM and MongoDB ODM mapping configurations using PHP 8 attributes (e.g., \#\[ORM\\Column\], \#\[Gedmo\\IpTraceable\]) alongside the existing docblock annotations. This allows users to leverage native PHP 8 attribute syntax for IP traceability on create and update events in both entity and document models.

src/IpTraceable/Traits · high confidence

Add PHP 8 attribute-based mapping for Tree traits

The MaterializedPath, NestedSet, NestedSetEntity, and NestedSetEntityUuid traits in src/Tree/Traits now support PHP 8 attributes alongside existing Doctrine annotations. NestedSetEntity and NestedSetEntityUuid include both @Gedmo and \#\[Gedmo\] annotations/attributes, as well as both @ORM and \#\[ORM\] mappings, allowing users to opt into the modern attribute syntax for tree structure configuration.

src/Tree/Traits · high confidence

Add PHP 8 attributes to AbstractLogEntry mapped superclass

The AbstractLogEntry mapped superclass now supports Doctrine ORM PHP 8 attributes alongside existing annotations. This allows users to configure the log entry entity using native PHP 8 attribute syntax (e.g., \#\[ORM\\Column\]) while maintaining backward compatibility with annotation-based configuration.

src/Loggable/Entity/MappedSuperclass · high confidence

Add TranslationRepository for MongoDB ODM translations

Introduces a new TranslationRepository class for the Doctrine MongoDB ODM translatable extension. This repository provides methods to manage translations for document fields, including translating a specific field value for a document into a locale, finding all translations for a document, and locating a document by its translated field value.

src/Translatable/Document/Repository · high confidence

Add TranslationRepository for managing entity translations

Introduces a new TranslationRepository class that provides methods to interact with translatable entities. Users can now use the \translate()\ method to manually add or update translations for a specific field and locale, and \findTranslations()\ to retrieve all translations for an entity grouped by locale. Additionally, \findObjectByTranslatedField()\ allows finding entities based on their translated content values.

src/Translatable/Entity/Repository · high confidence

Add example entities for Tree, Translatable, and Blameable extensions

The example application now includes \Category\ and \CategoryTranslation\ entities that demonstrate how to use the Doctrine Behavioral Extensions. The \Category\ entity is configured as a nested tree structure, supports translations via the \Translatable\ extension, and tracks creation/update timestamps and user attribution using the \Timestampable\ and \Blameable\ extensions. The \CategoryTranslation\ entity extends \AbstractPersonalTranslation\ to handle localized content, providing a concrete reference for implementing these features in user applications.

example/app/Entity · high confidence

Added CategoryRepository example for NestedTree usage

The example application now includes a CategoryRepository class that extends NestedTreeRepository. This demonstrates how to properly initialize and use the Tree extension's repository for category entities, including the necessary PHPDoc template annotations for type safety.

example/app/Entity/Repository · high confidence

Added LogEntryRepository for MongoDB ODM log management

Introduced a new LogEntryRepository class for Doctrine MongoDB ODM that provides methods to retrieve and revert versioned document logs. Users can now fetch all log entries for a specific document via getLogEntries() and restore a document to a previous state using the revert() method, which reconstructs the document's state by merging historical field data.

src/Loggable/Document/Repository · high confidence

Added MongoDB ODM Translation document with PHP 8 attribute support

A new Translation document class has been added to the Translatable module for Doctrine MongoDB ODM. This class extends the AbstractTranslation superclass and is configured with a unique index on foreign\_key, locale, object\_class, and field to ensure lookup efficiency. The implementation supports both legacy Doctrine annotation syntax and modern PHP 8 attribute syntax, ensuring compatibility with current PHP versions while maintaining backward compatibility.

src/Translatable/Document · high confidence

Added Validator class for reference integrity mapping actions

A new Validator class has been introduced in the ReferenceIntegrity/Mapping namespace to validate mapping information. This class defines constants for reference integrity actions (NULLIFY, PULL, RESTRICT) and provides a method to retrieve the list of available integrity actions, ensuring type safety and consistency in how reference integrity is handled during mapping.

src/ReferenceIntegrity/Mapping · high confidence

Added command to seed and display category translation trees

The example application now includes a new console command, \app:print-category-translation-tree\, which seeds the database with a sample category hierarchy (Food, Fruits, Apple, Milk) containing Lithuanian translations and prints the tree structure in both English and Lithuanian. This demonstrates the library's translation capabilities by querying the entity tree with different locale hints.

example/app/Command · high confidence

Added event adapter interfaces and implementations for Blameable and IpTraceable behaviors

This change introduces the event adapter infrastructure for the Blameable and IpTraceable extensions. It adds the \BlameableAdapter\ and \IpTraceableAdapter\ interfaces, along with their respective Doctrine ORM and ODM adapter implementations (\Gedmo\\Blameable\\Mapping\\Event\\Adapter\\ORM\, \Gedmo\\Blameable\\Mapping\\Event\\Adapter\\ODM\, \Gedmo\\IpTraceable\\Mapping\\Event\\Adapter\\ORM\, and \Gedmo\\IpTraceable\\Mapping\\Event\\Adapter\\ODM\). These classes extend the base Doctrine adapters and implement the specific behavior interfaces, enabling the extensions to hook into the Doctrine event lifecycle for tracking who made changes (Blameable) and the IP address of the request (IpTraceable).

src/Blameable/Mapping/Event, src/IpTraceable/Mapping/Event · high confidence

Blameable traits now support PHP 8 attributes

The Blameable traits for Doctrine ORM (BlameableEntity) and MongoDB ODM (BlameableDocument) have been updated to include PHP 8 attribute mappings (e.g., \#\[ORM\\Column\], \#\[Gedmo\\Blameable\]) alongside the existing docblock annotations. This allows users to configure the Blameable behavior using native PHP 8 attributes, providing a modern alternative to annotation-based configuration while maintaining backward compatibility.

src/Blameable/Traits · high confidence

Implement Loggable adapters for Doctrine ORM and ODM

Added new \ODM.php\ and \ORM.php\ files in the \src/Loggable/Mapping/Event/Adapter\ directory to provide concrete event adapters for Doctrine's MongoDB ODM and ORM. These adapters implement the \LoggableAdapter\ interface, enabling the Loggable behavior to correctly track changes and manage versioning for entities managed by both Doctrine persistence layers.

src/Loggable/Mapping/Event/Adapter · high confidence

Initial release of the Translatable behavior extension

This change introduces the core components for the Translatable behavior, including the \Translatable\ marker interface and the \TranslatableListener\ class. The listener manages the generation and loading of translations for entities, supporting configuration for fields, fallback locales, and translation classes via PHPStan generics. It hooks into Doctrine lifecycle events (postLoad, postPersist, preFlush, onFlush, loadClassMetadata) to handle translation persistence and retrieval, allowing users to mark specific entity fields as translatable.

src/Translatable · high confidence

Introduce IP address tracking for Doctrine entities

The IpTraceable extension is now available, allowing you to automatically record IP addresses on entity fields. By implementing the IpTraceable marker interface and using the @Gedmo\\IpTraceable annotation, fields can be configured to update on create, update, or specific field changes. The listener supports both a static IP value and a pluggable IpAddressProviderInterface for dynamic resolution, with the provider taking precedence when set.

src/IpTraceable · high confidence

Introduce SluggableAdapter interface for slug management

Added the SluggableAdapter interface in the Sluggable extension's mapping event layer, defining methods to retrieve similar slugs and perform relative or inverse-relative slug replacements on managed objects.

src/Sluggable/Mapping/Event · high confidence

Introduce SoftDeleteableWalker for DQL DELETE queries

Added the SoftDeleteableWalker class, which intercepts DQL DELETE statements to perform soft deletes by updating the 'deletedAt' timestamp field instead of removing records. The walker handles both single-table and joined-inheritance strategies, ensuring that soft-deletable entities are correctly managed during query execution.

src/SoftDeleteable/Query/TreeWalker · high confidence

Introduce TranslatableAdapter interface for translation mapping events

Added the TranslatableAdapter interface in the Translatable extension's mapping event namespace. This interface defines the contract for Doctrine event adapters specific to the Translatable extension, including methods to check for personal translations, retrieve default translation classes, load and search for translation records, manage associated translations, and handle value transformation for storage and retrieval.

src/Translatable/Mapping/Event · high confidence

Introduce Uploadable extension with file upload handling and event system

Adds the core components for the Uploadable extension, including the UploadableListener that manages file validation, movement, and metadata updates during entity lifecycle events (preFlush, onFlush, postFlush). Introduces the Events class to define uploadablePreFileProcess and uploadablePostFileProcess hooks, and the Uploadable marker interface to identify uploadable entities. Includes supporting classes for file information (FileInfoInterface, FileInfoArray), filename generation (FilenameGeneratorInterface), and MIME type guessing (MimeTypeGuesser).

src/Uploadable · high confidence

Introduction of Translation model classes for the Doctrine Behavioral Extensions Translator

This change introduces the core data structures for the translator component: \TranslationInterface\, \Translation\ (abstract base class), and \TranslationProxy\. The \Translation\ class provides a standard implementation for storing translatable objects, locale, property names, and values. The \TranslationProxy\ class acts as a dynamic proxy for entity/document translations, intercepting property access to retrieve or store translated values in the correct locale, ensuring that translation lookups are handled transparently when accessing object properties.

src/Translator · high confidence

New Doctrine event adapters for Sortable behavior

Added new \ODM\ and \ORM\ event adapter classes in \src/Sortable/Mapping/Event/Adapter\ to handle position calculations and updates for the Sortable behavior. The ODM adapter uses MongoDB query builders to find max positions and update document positions, while the ORM adapter uses DQL queries and query builders for similar operations on relational entities, including support for group filtering and exclusion logic.

src/Sortable/Mapping/Event/Adapter · high confidence

New Entity Repository implementations for Tree strategies

This change introduces the \Entity\\Repository\ namespace for the Doctrine Tree extension, providing concrete repository classes (\AbstractTreeRepository\, \ClosureTreeRepository\, \MaterializedPathRepository\, and \NestedTreeRepository\) that extend \Doctrine\\ORM\\EntityRepository\. These repositories implement the \RepositoryInterface\ and provide tree-specific query builders and methods (such as \getRootNodesQueryBuilder\, \childrenQueryBuilder\, \getPathQueryBuilder\, and \reorder\) tailored to the Closure, Materialized Path, and Nested Set tree strategies, replacing the previous mechanism where these capabilities were likely mixed into standard entity repositories or handled differently.

src/Tree/Entity/Repository · high confidence

New FileInfoInterface and FileInfoArray implementation for upload handling

The Uploadable component now exposes a dedicated FileInfoInterface and a concrete FileInfoArray implementation to standardize how uploaded file metadata (name, size, type, temporary path, and error code) is accessed. FileInfoArray validates that all required keys are present upon construction and provides typed accessors, ensuring consistent and safe retrieval of file information during upload operations.

src/Uploadable/FileInfo · high confidence

New LogEntryRepository for managing versioned entity logs

A new LogEntryRepository class has been added to the Loggable extension, providing dedicated methods to interact with versioned entity logs. Users can now retrieve all log entries for a specific entity via getLogEntries() or obtain the underlying query with getLogEntriesQuery(). The repository also includes a revert() method that restores an entity to a previous version by applying field values from historical log entries, requiring a subsequent persist and flush to complete the operation. This repository extends Doctrine's EntityRepository and leverages the LoggableListener to manage versioning logic.

src/Loggable/Entity/Repository · high confidence

New MimeType component for file upload validation

The Uploadable extension now includes a dedicated MimeType component containing a MimeTypeGuesser interface and implementation, along with a comprehensive map of MIME types to file extensions. This allows the library to accurately detect and validate file types during uploads using PHP's finfo extension, improving reliability for file handling workflows.

src/Uploadable/MimeType · high confidence

This release introduces a new ReferenceIntegrity extension that allows you to define how related objects behave when their parent is removed. By using the @Gedmo\\ReferenceIntegrity annotation with actions like 'nullify', 'pull', or 'restrict', you can automatically nullify references, remove the object from collections, or prevent deletion if references exist, ensuring data consistency without manual cleanup logic.

src/ReferenceIntegrity · high confidence

New ReferencesAdapter interface for Doctrine event mapping

A new ReferencesAdapter interface has been introduced in the References extension to handle Doctrine event mapping. This interface extends the standard AdapterInterface and defines methods for retrieving object identifiers, fetching single references by class and identifier, and extracting identifiers from objects or proxies, enabling the extension to interact with the Doctrine object manager for reference management.

src/References/Mapping/Event · high confidence

New SoftDeleteableFilter for Doctrine MongoDB ODM

Added the \SoftDeleteableFilter\ class for Doctrine MongoDB ODM, which integrates soft-delete behavior into MongoDB queries. The filter automatically excludes soft-deleted documents by adding criteria to queries, supporting both standard soft-delete and time-aware soft-delete modes. It allows users to selectively disable the filter for specific document classes via \disableForDocument\ and \enableForDocument\ methods, and is marked as final since version 3.11.

src/SoftDeleteable/Filter/ODM · high confidence

New SortableRepository for grouped entity sorting

A new SortableRepository class has been added to the Entity layer, extending Doctrine's EntityRepository to provide specialized methods for retrieving entities sorted by position within specific groups. Users can now query entities using getBySortableGroups, which accepts an array of group values to filter and order results, ensuring that sorting respects defined sortable groups rather than applying a global sort order.

src/Sortable/Entity · high confidence

New TreeObjectHydrator for ORM tree node hydration

A new TreeObjectHydrator class has been added to the ORM hydrator layer to automatically map parent and children properties of tree nodes during hydration. This component hooks into the hydration process to build a children hashmap and populate entity collections, ensuring that tree structures are correctly assembled in memory without requiring additional SELECT queries for sub-nodes.

src/Tree/Hydrator · high confidence

New console entry point for the example application

The example application now includes a dedicated console entry point (example/bin/console) that bootstraps the Symfony Console application using the Doctrine Extensions version as the application identifier. This entry point initializes the EntityManager via a SingleManagerProvider and registers both the default Doctrine ORM/DBAL console commands and the custom PrintCategoryTranslationTreeCommand, providing a standardized way to interact with the example app's CLI tools.

example/bin · high confidence

New event adapter interfaces for Doctrine extensions

The library introduces two new interfaces in the \Gedmo\\Mapping\\Event\ namespace to standardize event handling and time source injection. \AdapterInterface\ defines the contract for Doctrine event adapters, providing methods to access object state, changesets, and scheduled operations for both ORM and ODM unit of works, while deprecating the previous \\_\_call\ magic method approach. \ClockAwareAdapterInterface\ adds support for injecting a PSR-20 \ClockInterface\, allowing event adapters that create \DateTimeInterface\ objects to use a deterministic time source instead of the system clock.

src/Mapping/Event · high confidence

New event adapters for ODM and ORM references behavior

Added new \ODM\ and \ORM\ event adapter classes in the \src/References/Mapping/Event/Adapter\ directory to support the references behavior extension. These adapters implement the \ReferencesAdapter\ interface and provide specific logic for extracting identifiers and retrieving single references for Doctrine MongoDB ODM, PHPCR ODM, and ORM entities, including handling for proxy objects and inheritance types.

src/References/Mapping/Event/Adapter · high confidence

New example demonstrating Doctrine Extensions configuration with attribute support

Added a new \example/em.php\ script that shows how to initialize the Doctrine ORM Entity Manager with Gedmo Behavioral Extensions. The example configures listeners for Sluggable, Tree, Timestampable, Blameable, and Translatable behaviors, and explicitly supports PHP 8 attributes by using \AttributeDriver\ and \AttributeReader\ when available, falling back to annotations for older PHP versions.

example · high confidence

New slug handlers for relative, inverse, and tree-based slugs

The Sluggable extension now includes three new handler classes—RelativeSlugHandler, InversedRelativeSlugHandler, and TreeSlugHandler—along with their supporting interfaces (SlugHandlerInterface, SlugHandlerWithUniqueCallbackInterface) and a deprecated Urlizer utility. RelativeSlugHandler allows slugs to be prefixed by a related object's slug (e.g., 'company/user'), InversedRelativeSlugHandler updates back-related slugs when an inversed relation changes, and TreeSlugHandler recursively slugs parent nodes for hierarchical structures (e.g., 'category/subcategory/item'). These handlers enable more complex, context-aware slug generation beyond simple field-based slugs.

src/Sluggable/Handler · high confidence

New translatable event adapters for Doctrine ORM and ODM

Added new \Gedmo\\Translatable\\Mapping\\Event\\Adapter\\ORM\ and \ODM\ classes that implement the \TranslatableAdapter\ interface. These adapters provide the specific logic required to load, find, insert, and remove translation records for Doctrine ORM entities and MongoDB ODM documents, handling both personal and global translation strategies via DQL queries and document builders.

src/Translatable/Mapping/Event/Adapter · high confidence

Removals

Removal of TranslationRepository class

The TranslationRepository class, which previously provided helper methods for querying translation records (such as findTranslation and findFieldTranslation), has been removed from the codebase. Users can no longer use this specific repository class to interact with translations via these dedicated methods.

lib/DoctrineExtensions/Translatable/Repository · high confidence

Behavioural changes

Add Doctrine ORM PHP 8 attributes to Translation entity

The Translation entity now includes native PHP 8 attributes (\#\[ORM\\Entity\], \#\[ORM\\Table\], \#\[ORM\\UniqueConstraint\]) alongside the existing Doctrine annotations. This dual-mapping approach ensures compatibility with Doctrine ORM versions that support PHP 8 attributes while maintaining backward compatibility with older versions, allowing users to migrate their mapping style without breaking existing functionality.

src/Translatable/Entity · high confidence

Add MongoDB ODM 2.0 compatible Tree repositories

Introduces new \AbstractTreeRepository\ and \MaterializedPathRepository\ classes for the Doctrine MongoDB ODM driver, replacing the previous implementation to ensure compatibility with ODM 2.0. These repositories provide the core tree-strategy logic (such as materialized path queries and hierarchy building) specifically for MongoDB document storage, utilizing the updated \MongoDB\\BSON\\Regex\ for path matching and adhering to the new ODM repository interfaces.

src/Tree/Document · high confidence

Add MongoDB ODM MaterializedPath strategy with BSON type support

Introduces a new MaterializedPath strategy for MongoDB ODM that replaces legacy MongoDate with BSON\\UTCDateTime for lock times and uses MongoDB\\BSON\\Regex for path-based queries, ensuring compatibility with Doctrine ODM 2.0 and doctrine/common 3.0.

src/Tree/Strategy/ODM · high confidence

Add PHP 8 attributes to AbstractClosure mapped superclass

The AbstractClosure entity in the Tree extension now supports PHP 8 attributes alongside existing PHPDoc annotations. This change allows users who prefer or require native PHP 8 attribute syntax for Doctrine ORM mappings to utilize the new \#\[ORM\\...\] attributes for defining the mapped superclass, ID, and column types, ensuring compatibility with modern PHP versions while maintaining backward compatibility with annotation-based configurations.

src/Tree/Entity/MappedSuperclass · high confidence

Added compatibility trait for EntityRepository \_\_call signature

A new \EntityRepositoryCompat\ trait has been introduced to ensure backward compatibility between Doctrine ORM 2.x and 3.x. This trait adapts the return type of the \\_\_call\ magic method—omitting the \mixed\ return type for ORM 2.x environments where it is not supported, while including it for ORM 3.x—allowing the library to function correctly across both major versions without breaking changes.

src/Tool/ORM/Repository · high confidence

Added internal compatibility layer for Doctrine ORM 2.x and 3.x hydrators

New internal traits (EntityManagerRetriever and HydratorCompat) have been added to the ORM hydration tooling to bridge differences between Doctrine ORM 2.x and 3.x. This ensures that custom hydrators can correctly access the entity manager and override lifecycle methods like prepare, cleanup, and hydrateAllData regardless of the underlying ORM version, maintaining backward compatibility without requiring changes to user code.

src/Tool/ORM/Hydration · high confidence

Added mapping validation for soft-delete timestamp fields

A new Validator class has been introduced in the SoftDeleteable mapping layer to ensure that fields designated for soft-delete timestamps use only supported data types. This validation checks the field mapping against a strict list of valid types (such as date, datetime, and timestamp variants) and throws an exception if an unsupported type is detected, preventing configuration errors at runtime.

src/SoftDeleteable/Mapping · high confidence

Behavioral extension annotations now support PHP 8 attributes

All mapping annotation classes in src/Mapping/Annotation (such as Blameable, Timestampable, Sluggable, and Tree) now include PHP 8 attribute syntax (\#\[Attribute\]) alongside their existing docblock annotations, allowing you to use them as native PHP attributes. Additionally, constructors have been standardized to use named arguments, with deprecation warnings triggered if the legacy array-based first argument is passed.

src/Mapping/Annotation · high confidence

Blameable now supports actor providers and user identifier extraction

The Blameable extension now allows tracking changes by an actor via a new \ActorProviderInterface\, which takes precedence over a static user value. When resolving the user identity for blameable fields, the listener automatically extracts the identifier by checking for \getUserIdentifier()\, \getUsername()\, or \\_\_toString()\ methods on the actor object, ensuring compatibility with modern user objects that may not expose a simple string username.

src/Blameable · high confidence

Closure table strategy now requires explicit mapping configuration

The ORM Closure tree strategy now triggers a deprecation warning if the user has not explicitly defined the mapping for the 'ancestor' and 'descendant' associations in the closure table entity. In previous versions, these mappings were generated automatically, but this behavior is being removed to ensure stricter configuration. Users must now manually add the required ManyToOne mappings for 'ancestor' and 'descendant' in their closure table entity to avoid deprecation notices and ensure compatibility with version 4.0.

src/Tree/Strategy/ORM · high confidence

Custom ORM hydrators prevent translation rehydration during object loading

Added \ObjectHydrator\ and \SimpleObjectHydrator\ classes in the \src/Translatable/Hydrator/ORM\ directory that extend Doctrine's base hydrators. When a query uses the \TranslationQueryWalker\, these custom hydrators intercept the preparation and cleanup phases to temporarily set \skipOnLoad\ to true on the \TranslatableListener\. This prevents the \onLoad\ event from triggering retranslation of fields while hydrating existing objects, ensuring that translations are not unnecessarily overwritten or re-processed during read operations.

src/Translatable/Hydrator · high confidence

Deprecate AbstractWrapper::clear() and WrapperInterface::populate()

The \AbstractWrapper::clear()\ and \WrapperInterface::populate()\ methods are now deprecated and will be removed in version 4.0. Calling these methods will trigger a deprecation notice via the \doctrine/deprecations\ library, guiding users to migrate away from these APIs before the next major release.

src/Tool/Wrapper · high confidence

Deprecate annotation and YAML mapping drivers for Blameable

The Annotation and Yaml mapping drivers for the Blameable extension are now deprecated and will be removed in version 4.0. Users relying on PHP annotations or YAML files to configure Blameable fields should migrate to PHP attributes, which are now the supported method. The Attribute driver remains the active implementation, and the valid field types for blameable fields (such as string, int, ulid, uuid, and ascii\_string) are consistently supported across the remaining drivers.

src/Blameable/Mapping/Driver, src/IpTraceable/Mapping/Driver, src/Timestampable/Mapping/Driver · high confidence

Deprecate annotation registration and enable PHP 8 attributes

The \DoctrineExtensions::registerAnnotations()\ method is now deprecated and performs no action, as annotation classes are autoloaded; users should migrate to PHP 8 attributes on PHP 8.0+ by using the new \registerMappingIntoDriverChain\*\ methods which automatically select \AttributeDriver\ over \AnnotationDriver\. This change also introduces \AbstractTrackingListener\ to standardize field tracking logic and adds specific adapter interfaces (\LoggableAdapter\, \TimestampableAdapter\) to support these extensions.

src · high confidence

Deprecate annotation support in mapping drivers

The mapping layer now deprecates the use of Doctrine annotations for defining behavioral extension metadata. Passing a legacy \Doctrine\\Common\\Annotations\\Reader\ or any non-\AttributeReader\ object to the \ExtensionMetadataFactory\ or \MappedEventSubscriber\ triggers a deprecation warning, signaling that support will be removed in version 4.0. Users should migrate their metadata definitions to PHP attributes and ensure an \AttributeReader\ is provided instead.

src/Mapping · high confidence

Deprecate getEntityManager and getEntity in Uploadable event args

The \UploadableBaseEventArgs\ class now triggers deprecation warnings when \getEntityManager()\ and \getEntity()\ are called, indicating these methods are deprecated since version 3.14 and will be removed in version 4.0. Users should migrate to using \getObjectManager()\ and \getObject()\ respectively, which provide the same functionality without triggering deprecations.

src/Uploadable/Event · high confidence

Deprecate legacy event argument accessors in ORM and ODM adapters

The ORM and ODM event adapters now trigger deprecation warnings when using legacy methods like \getEntityManager()\/\getEntity()\ (ORM) or \createLifecycleEventArgsInstance()\ (ODM). These methods are deprecated in favor of the standard \Doctrine\\Common\\EventArgs\ interface methods (\getObjectManager()\, \getObject()\) and custom lifecycle event classes, ensuring compatibility with newer Doctrine versions and preparing for removal in version 4.0.

src/Mapping/Event/Adapter · high confidence

Deprecation of Annotation and Yaml mapping drivers for Loggable extension

The Annotation and Yaml mapping drivers for the Loggable extension are now deprecated and will be removed in version 4.0. Users relying on PHP annotations or YAML files to configure loggable classes and versioned fields should migrate to PHP attributes or XML mapping. The Attribute driver is now the primary supported method for reading extended metadata, while the Xml driver continues to support XML-based configuration.

src/Loggable/Mapping/Driver, src/Tree/Mapping/Driver · high confidence

Deprecation of Annotation and Yaml mapping drivers for SoftDeleteable

The Annotation and Yaml mapping drivers in the SoftDeleteable extension are now deprecated and will be removed in version 4.0. Users relying on PHP annotations or YAML files to configure soft-deleteable entities will receive deprecation notices and should migrate to the new Attribute-based mapping or XML mapping drivers, which remain fully supported and are the recommended approaches for defining soft-delete behavior.

(repo-wide) · high confidence

Deprecation of QueryAnalyzer class

The QueryAnalyzer class in the logging tooling is now deprecated as of version 3.5 and marked as final since version 3.11. Users relying on this class for SQL logging and query performance analysis should be aware that it is scheduled for removal in a future release and should plan to migrate to alternative logging or profiling solutions.

src/Tool/Logging · high confidence

Deprecation of annotation and YAML mapping drivers for Reference Integrity

The mapping drivers for the Reference Integrity extension that rely on PHP annotations (Annotation.php) and YAML configuration files (Yaml.php) are now deprecated and will be removed in version 4.0. Users must migrate to the new PHP 8+ attribute-based mapping driver (Attribute.php) to continue using this feature. The annotation driver now extends the attribute driver, and the YAML driver remains available but marked for removal.

src/ReferenceIntegrity/Mapping/Driver · high confidence

Deprecation of annotation-based mapping in favor of PHP attributes

The mapping drivers in src/Mapping/Driver now officially deprecate the use of PHP annotations, signaling that this approach will be removed in version 4.0. To support this transition, the codebase introduces a new \AttributeReader\ class to handle PHP 8 attributes and an \AttributeAnnotationReader\ wrapper that attempts to read attributes first before falling back to annotations. Existing annotation-based drivers now trigger deprecation warnings when used, and the \AnnotationDriverInterface\ is marked as deprecated. Users are encouraged to migrate their entity metadata definitions from annotations to PHP attributes to ensure future compatibility.

src/Mapping/Driver · high confidence

Exception classes marked as final in version 3.11

The exception classes in the \Gedmo\\Exception\ namespace (such as \BadMethodCallException\, \InvalidMappingException\, and the various \Uploadable\*\ exceptions) are now marked as \final\. This change prevents these classes from being extended, effectively closing the API for inheritance and ensuring that users cannot create custom subclasses of these specific exception types.

src/Exception · high confidence

Filename generator classes marked as final in version 3.11

The \FilenameGeneratorAlphanumeric\ and \FilenameGeneratorSha1\ classes in the \src/Uploadable/FilenameGenerator\ directory are now marked as \@final\ since version 3.11. This change prevents these specific filename generation implementations from being extended by subclasses, effectively closing the API for inheritance in this area while keeping the \FilenameGeneratorInterface\ open for new implementations.

src/Uploadable/FilenameGenerator · high confidence

Introduce LazyCollection for reference many associations

The References extension now uses a new LazyCollection class to handle 'reference many' associations. This change defers the loading of related entities until they are actually accessed, which can improve performance by avoiding unnecessary database queries during object hydration. The ReferencesListener has been updated to instantiate this lazy collection when loading mapped 'referenceMany' fields.

src/References · high confidence

Introduce LogEntryInterface and support for stringable usernames

The Loggable extension now defines a dedicated LogEntryInterface that standardizes the contract for log entry models, providing explicit constants for actions (create, update, remove) and typed methods for managing metadata such as object class, ID, and version. Additionally, the listener has been updated to accept usernames as stringable objects, allowing users to pass user entities that implement \_\_toString, getUserIdentifier, or getUsername instead of requiring plain strings.

src/Loggable · high confidence

Introduce SoftDeleteableAdapter interface for flexible date field support

A new SoftDeleteableAdapter interface has been added to the SoftDeleteable mapping event system. This interface extends the standard Doctrine AdapterInterface and defines a getDateValue method that can return either an integer or a DateTimeInterface object. This change enables the SoftDeleteable extension to support non-DateTime fields, allowing date values to be stored as integers (e.g., Unix timestamps) in addition to standard DateTime objects.

src/SoftDeleteable/Mapping/Event · high confidence

Introduction of extension-specific event adapter interfaces and implementations

The Sortable and Tree extensions now define their own event adapter contracts (\SortableAdapter\ and \TreeAdapter\) and provide concrete implementations for Doctrine ORM and ODM. These new adapter classes extend the base Doctrine adapter classes and implement the respective extension-specific interfaces, establishing a dedicated event handling layer for these behaviors.

src/Sortable/Mapping/Event, src/Tree/Mapping/Event · high confidence

LogEntry entity now supports PHP 8 attributes

The LogEntry entity in src/Loggable/Entity now includes native PHP 8 attributes alongside existing Doctrine annotations. This allows users to leverage the modern attribute syntax for mapping the entity to the ext\_log\_entries table, providing a choice between annotation-based and attribute-based configuration without changing the underlying behavior.

src/Loggable/Entity · high confidence

Materialized Path tree strategy now casts path source to string

The Materialized Path tree strategy now explicitly casts the value of the path source property to a string type before using it to build the path. This ensures consistent path generation regardless of the underlying data type of the source field, preventing potential issues with non-string identifiers in tree structures.

src/Tree/Strategy · high confidence

New Sluggable adapters for ORM and ODM with updated slug replacement logic

Added new Sluggable event adapters for both Doctrine ORM and ODM. The ORM adapter now uses the TranslationWalker for Translatable objects to ensure slug uniqueness across translations, and replaces relative/inverse slugs via DQL update queries. The ODM adapter implements similar logic using MongoDB queries, including support for unique\_base constraints and regex-based slug matching, while fixing return values for replaceRelative and replaceInverseRelative methods to correctly return the count of updated documents.

src/Sluggable/Mapping/Event/Adapter · high confidence

New mapping validation logic for uploadable fields

A new Validator class has been introduced in the mapping layer to enforce strict validation rules for uploadable field configurations. This component ensures that fields designated for file name, MIME type, path, and size adhere to their required data types (e.g., string for names/paths, decimal/float for sizes) and validates that the target storage directory exists and is writable, throwing specific exceptions if these constraints are not met.

src/Uploadable/Mapping · high confidence

New provider interfaces and deprecation of wrapper methods

This release introduces new extension points for tracking actor and IP address references via the newly added ActorProviderInterface and IpAddressProviderInterface, allowing extensions to support user and IP references. It also deprecates the populate() method on WrapperInterface (and AbstractWrapper::clear()) for removal in version 4.0, and adds a ClassUtils utility that gracefully falls back to get\_class() if doctrine/common is not installed.

src/Tool · high confidence

New validation for Tree mapping configurations

A new Validator class has been introduced in the Tree mapping layer to enforce strict type constraints for tree-related fields. This change ensures that parent, path, path source, path hash, lock time, and root fields are mapped to specific, valid database types (e.g., integers for parents, strings for paths, UUIDs for path sources), preventing configuration errors at the mapping level.

src/Tree/Mapping · high confidence

Sluggable extension now uses Symfony String for transliteration and urlization

The Sluggable extension has replaced the behat/transliterator library with Symfony String components for generating slugs. This change updates the default transliteration and urlization callbacks in SluggableListener to use Symfony's AsciiSlugger and string utilities, ensuring consistent slug generation behavior while removing the external dependency.

src/Sluggable · high confidence

Soft-delete support for multi-table deletes in inheritance trees

The soft-deleteable extension now handles DELETE queries involving inheritance hierarchies by intercepting multi-table delete operations. When a delete query targets the root entity of an inheritance tree, the executor transforms the SQL to perform an UPDATE on the root table (setting the soft-delete field to the current timestamp) instead of a hard delete, while preventing the deletion of child entity records. This ensures that soft-deleted entities and their related inheritance data remain intact rather than being permanently removed from the database.

src/SoftDeleteable/Query/TreeWalker/Exec · high confidence

SoftDeleteable adapters now support PSR-20 clock and Doctrine 3/4 field mapping types

The SoftDeleteable event adapters for both ORM and ODM now accept a PSR-20 ClockInterface, allowing users to inject a custom clock for deterministic date handling instead of relying on the system time. Additionally, the adapters have been updated to support Doctrine 3+ field mapping objects (FieldMapping) and correctly handle non-DateTime field types such as integer timestamps and immutable date/time types, ensuring compatibility with newer Doctrine versions and more flexible schema definitions.

src/SoftDeleteable/Mapping/Event/Adapter · high confidence

SoftDeleteable listener now supports configurable post-flush detachment

The SoftDeleteable extension now allows users to control whether soft-deleted entities are automatically detached from the ObjectManager after a flush operation. By passing a boolean to the SoftDeleteableListener constructor (or using setHandlePostFlushEvent), you can enable this behavior to prevent soft-deleted objects from lingering in memory. The listener also introduces dedicated PreSoftDeleteEventArgs and PostSoftDeleteEventArgs classes for these lifecycle events, improving type safety and compatibility with newer Doctrine versions.

src/SoftDeleteable · high confidence

SoftDeleteableFilter now invalidates query cache when entity filtering is toggled

The SoftDeleteableFilter implementation now ensures that calling disableForEntity or enableForEntity changes the filter's internal hash by setting a parameter, which forces Doctrine to invalidate the query cache. This prevents stale SQL results when soft-delete filtering is dynamically enabled or disabled for specific entities during runtime.

src/SoftDeleteable/Filter · high confidence

Sortable behavior now uses Doctrine deprecations library and enforces final/internal status

The Sortable extension has been updated to standardize runtime deprecation handling by integrating the \doctrine/deprecations\ library, ensuring consistent deprecation warnings for users. Additionally, the \SortableListener\ class is now marked as \@final\ and internal, signaling that it is part of the stable public API surface and should not be extended or implemented by user code. The \Sortable\ marker interface remains available for identifying sortable entities, but its usage is now strictly coupled with the finalized listener implementation.

src/Sortable · high confidence

Sortable mapping drivers refactored with deprecation of annotations and YAML

The mapping drivers for the Sortable extension have been restructured to support modern PHP attributes while deprecating older formats. The new Attribute driver is introduced to read metadata from PHP 8 attributes, while the existing Annotation driver is now deprecated (scheduled for removal in version 4.0) and the Yaml driver is also deprecated (since version 3.5). The Xml driver remains unchanged. Users relying on annotations or YAML for sortable configuration should migrate to attributes or XML to avoid future breakage.

src/Sortable/Mapping/Driver · high confidence

Timestampable adapters now support PSR-20 clock and Doctrine ORM 3 field mappings

The Timestampable event adapters for both ORM and ODM now implement ClockAwareAdapterInterface, allowing users to inject a PSR-20 ClockInterface to control time generation instead of relying on the system clock. Additionally, the ORM adapter has been updated to handle Doctrine ORM 3's new FieldMapping object structure returned by ClassMetadata::getFieldMapping(), ensuring correct PHP value conversion for timestamp and immutable date/time fields.

src/Timestampable/Mapping/Event/Adapter · high confidence

Translatable behavior now uses annotations instead of interface implementation

The Translatable extension has removed the requirement for entities to implement the \Translatable\ interface and the \TranslatableException\ class. Instead, translation behavior is now configured via annotations, simplifying entity definitions by removing the need for explicit interface methods like \getTranslatableFields()\ and \getTranslatableLocale()\.

lib/DoctrineExtensions/Translatable · high confidence

Translation entity now uses PHP 8 attributes for Doctrine ORM mapping

The Translation entity in the Translator module has been updated to use PHP 8 attributes (e.g., \#\[ORM\\MappedSuperclass\], \#\[ORM\\Column\]) alongside the existing DocBlock annotations for mapping metadata. This change modernizes the entity's definition to support the newer attribute-based configuration style while maintaining backward compatibility with annotation-based readers, ensuring the entity continues to function correctly within the Doctrine ORM context.

src/Translator/Entity · high confidence

TranslationWalker now extends SqlOutputWalker for ORM compatibility

The TranslationWalker in the Translatable query component has been updated to extend the new SqlOutputWalker class from Doctrine ORM. This change aligns the extension with recent ORM internal API shifts, ensuring that SQL generation for translatable entities continues to function correctly without breaking changes for users relying on the existing translation features.

src/Translatable/Query · high confidence

Tree component refactored into new namespace with updated interfaces and utilities

The Tree extension has been reorganized under the \Gedmo\\Tree\ namespace, introducing new marker and utility interfaces (\Node\, \RepositoryInterface\, \RepositoryUtilsInterface\) and a dedicated \Strategy\ interface to manage tree algorithms. The \TreeListener\ now uses PHPStan generics and specific configuration types to improve type safety, while \RepositoryUtils\ provides updated methods for building tree hierarchies and HTML output. This change aligns the Tree component with modern PHP standards and prepares it for stricter static analysis.

src/Tree · high confidence

Updated XML mapping schemas for Doctrine Extensions 2.1 and 2.2

The XML mapping schemas for Doctrine Extensions have been updated to support new features and extensions. The 2.2 schema adds definitions for SoftDeleteable, Uploadable (including file size and MIME type validation), Reference, and Tree PathHash, while also introducing locking options for Tree mappings. The 2.1 schema adds support for IpTraceable and Blameable extensions, and both schemas now include the fallback option for Translatable mappings.

schemas · high confidence

Fixes

Added compatibility layer for Doctrine ORM 2.x and 3.x SQL walkers

This change introduces a new internal trait, SqlWalkerCompat, which enables the ORM SQL walker to function correctly across both Doctrine ORM 2.x and 3.x versions. The implementation uses runtime reflection to detect the ORM version and dynamically loads the appropriate compatibility trait (SqlWalkerCompatForOrm2 or SqlWalkerCompatForOrm3). These traits ensure that method signatures for SQL generation and execution (such as getExecutor, getFinalizer, and various walk\*Clause methods) align with the specific requirements of each ORM major version, preventing runtime errors when upgrading or maintaining support for multiple ORM versions.

src/Tool/ORM/Walker · high confidence

Test coverage

Added ArticleTemplate fixture for translatable tests; Added Doctrine ODM test fixtures for Loggable embedded documents and references; Added Doctrine ODM test fixtures for ReferenceIntegrity; Added MongoDB ODM fixture documents for translatable tests; Added MongoDB ODM fixture for Sluggable tests; Added MongoDB ODM test fixtures for Sortable behavior; Added ODM document fixtures for Timestampable tests; Added PHP 8 attribute-based mapping fixtures for tests; Added PHP 8 attribute-based test fixtures for MongoDB Tree documents; Added PHP 8 attribute-based test fixtures for Tree extensions; Added PHP 8 attribute-based test fixtures for the genealogy tree hierarchy; Added PHP 8 attribute-based test fixtures for tree mapping; Added SoftDeleteable test fixtures for Doctrine ORM entities; Added Sortable test fixtures with Doctrine 8 attribute mapping; Added Timestampable test fixtures; Added XML mapping fixture classes for behavioral extensions; Added XML mapping tests for Tree, Translatable, and References extensions; Added Yaml mapping fixture classes for Gedmo extensions; Added closure table tree fixture models with PHP 8 attributes; Added comprehensive test coverage for the Sluggable extension; Added comprehensive test coverage for the Translatable behavior; Added mapping tests for Gedmo extensions; Added mock classes for testing MaterializedPath concurrency; Added mock event subscriber classes for mapping tests; Added test coverage for Sluggable behavior edge cases; Added test coverage for Sluggable handlers; Added test coverage for Sortable behavior in Doctrine MongoDB ODM; Added test fixture files for uploadable tests; Added test fixture for BehavioralCategory repository; Added test fixture for Document mapping with annotations and attributes; Added test fixture for Issue 138 translatable query hint replacement; Added test fixture for Issue 922; Added test fixture for MongoDB ODM Article document; Added test fixture for MongoDB ODM translatable entity; Added test fixture for ODM Sluggable upserts; Added test fixture for Sluggable SQL filtering; Added test fixture for Sluggable slug generation with attributes; Added test fixture for Sluggable unique\_base attribute; Added test fixture for Sluggable with PHP 8 attributes; Added test fixture for Tree NestedSet Issue 2517; Added test fixture for custom DBAL type compatibility; Added test fixture for nested tree root handling; Added test fixture for nullable slug behavior; Added test fixture for sluggable translatable articles; Added test fixture for translatable boolean handling; Added test fixture for translatable entity with nullable title; Added test fixture for unmapped Timestampable entity; Added test fixtures for Blameable with Doctrine ODM MongoDB attributes; Added test fixtures for IpTraceable with Doctrine ODM 2.0 attribute support; Added test fixtures for Issue 173; Added test fixtures for Issue 75 (ManyToMany translatable relations); Added test fixtures for Loggable entity scenarios; Added test fixtures for Loggable with attribute mapping support; Added test fixtures for Sluggable Document handlers; Added test fixtures for Sluggable behavior on mapped superclasses; Added test fixtures for Sluggable behavior with JOINED inheritance; Added test fixtures for Sluggable handlers with PHP 8 attributes; Added test fixtures for Sluggable unique\_base behavior with relations; Added test fixtures for Sluggable unique\_base with foreign keys; Added test fixtures for Sluggable with embedded address objects; Added test fixtures for Sluggable with various DateTime types; Added test fixtures for SoftDeleteable ODM document mappings; Added test fixtures for Sortable inheritance and multiple groups; Added test fixtures for Translatable annotation attributes; Added test fixtures for Translatable attribute mapping; Added test fixtures for Translatable attribute support; Added test fixtures for Tree NestedSet Issue 2582; Added test fixtures for combined slug handlers; Added test fixtures for cross-OM reference scenarios; Added test fixtures for personal translation entities; Added test fixtures for personal translations in MongoDB ODM; Added test fixtures for the IpTraceable behavior; Added test fixtures for the Translatable extension; Added test fixtures for translatable inheritance issue \#1123; Added test fixtures for wrapper entity mapping; Added test for Timestampable mapping with SimplifiedXmlDriver; Added test infrastructure for ORM event adapter and deprecation handling; Added test mock for the Encoder mapping extension; Added test stubs for Uploadable component; Added tests for Blameable behavior across ORM and ODM; Added tests for Entity and MongoDocument wrappers; Added tests for FileInfoArray validation; Added tests for FilenameGeneratorAlphanumeric; Added tests for Loggable behavior with annotations, attributes, and MongoDB ODM; Added tests for ReferenceIntegrity extension behavior; Added tests for References extension lazy loading and cross-ORM persistence; Added tests for SoftDeleteable behavior and traits; Added tests for Tree listener edge cases; Added tests for Uploadable Mapping Validator; Added tests for Uploadable behavior with typed properties; Added tests for annotation and attribute mapping consistency; Added tests for custom and forced metadata mapping scenarios; Added tests for mapping driver registration, actor provider, and IP address provider; Added tests for the IpTraceable behavior; Added tests for the Translatable behavior; Added tests for translatable behavior edge cases; Expanded test coverage for Gedmo Tree strategies; Expanded test coverage for Timestampable behavior; Expanded test fixtures for Uploadable entity scenarios; New base test case classes for ORM, ODM, and multi-manager testing.

Dependencies

Initial composer.json for gedmo/doctrine-extensions

The project now includes a composer.json file that defines the library's dependencies and development tools. It requires PHP 7.4 or 8.0+ and specifies compatible versions for core Doctrine packages (collections, event-manager, persistence, common, dbal, orm, mongodb-odm) and Symfony components (cache, string, console, doctrine-bridge, phpunit-bridge, uid, yaml). Development dependencies include PHPUnit 9.6, PHPStan 2.x, and PHP-CS-Fixer. Conflicts are declared to prevent incompatible versions of Doctrine ORM (\<2.20, \>=3.0 \<3.3, \>=4.0) and other libraries, ensuring stable integration with Doctrine ORM 2.20+ and 3.3+, and MongoDB ODM 2.3+.

(dependencies) · high confidence

Housekeeping

Add project configuration and linting infrastructure

This change introduces the foundational configuration files for the project's development workflow. It adds a \.php-cs-fixer.dist.php\ file to enforce coding standards (including PSR-2, Symfony, and Doctrine-specific rules), a \.yamllint\ file for YAML validation, and a \Makefile\ to orchestrate linting tasks for Composer, YAML, and XML schemas. Additionally, it establishes a \phpstan.neon.dist\ configuration for static analysis at level 6, a \phpunit.xml.dist\ for test execution, and a \compose.yaml\ for Docker-based development environments. The \.gitattributes\ file is also added to exclude non-essential files (like docs, tests, and CI configs) from distribution archives, and the \CHANGELOG.md\ is structured to follow the Keep a Changelog format.

(repo-wide) · high confidence

Written by cca.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

How this codebase got here

Score

  • CAI 56.1 → 55.7 (-0.4)
  • Rubric changed (rubric-2026.11.2 → rubric-2026.11.4) — scores are not directly comparable.

Lenses

  • Code Health 49.3 → 47.8 (-1.5)
  • Architecture 82.6 → 86.8 (+4.2)
  • Maturity 55.1 → 55.3 (+0.2)
  • Readiness 62.7 → 62.6 (-0.1)
  • Security 74.0 → 74.0 (0.0)

Resolved (13)

  • Duplicated block (12 lines × 2) (src/Tree/Mapping/Validator.php)
  • Duplicated block (12 lines × 3) (src/Sortable/Mapping/Driver/Attribute.php)
  • Duplicated block (5 lines × 2) (src/SoftDeleteable/Mapping/Driver/Yaml.php)
  • Duplicated block (5 lines × 2) (src/Tree/Entity/Repository/ClosureTreeRepository.php)
  • Duplicated block (7 lines × 2) (src/Sluggable/Mapping/Driver/Yaml.php)
  • Duplicated block (8–9 lines × 2) (src/Sortable/Mapping/Driver/Xml.php)
  • Duplicated block (9 lines × 2) (src/References/ReferencesListener.php)
  • Duplicated block (9 lines × 2) (src/Tree/Mapping/Driver/Xml.php)
  • Duplicated block (9 lines × 3) (src/Tree/Mapping/Validator.php)
  • Further sole-owners (lower concentration)
  • Off-boarding risk: anonymized user #1
  • Orphaned file (src/Translatable/Entity/MappedSuperclass/AbstractTranslation.php)
  • Projects may be oversized for their cohesion

New (30)

  • Circular dependency (src/AbstractTrackingListener.php)
  • Duplicated block (12 lines × 2) (src/Tree/Mapping/Validator.php)
  • Edited copies of one member (3 members, 1+ corresponding lines) (src/Tree/Entity/Repository/ClosureTreeRepository.php)
  • Edited copies of one member (5 members, 13+ corresponding lines) (src/Loggable/Document/Repository/LogEntryRepository.php)
  • Edited copy of a member (10 corresponding lines) (src/Sluggable/Handler/RelativeSlugHandler.php)
  • Edited copy of a member (10 corresponding lines) (src/Tree/Strategy/ODM/MongoDB/MaterializedPath.php)
  • Edited copy of a member (12 corresponding lines) (src/Sluggable/Mapping/Event/Adapter/ORM.php)
  • Edited copy of a member (14 corresponding lines) (src/Translatable/Mapping/Event/Adapter/ODM.php)
  • Edited copy of a member (14 corresponding lines) (src/Translatable/Mapping/Event/Adapter/ODM.php)
  • Edited copy of a member (14 corresponding lines) (src/Tree/Hydrator/ORM/TreeObjectHydrator.php)
  • Edited copy of a member (19 corresponding lines) (src/References/Mapping/Event/Adapter/ODM.php)
  • Edited copy of a member (19 corresponding lines) (src/Tree/Entity/Repository/ClosureTreeRepository.php)
  • Edited copy of a member (20 corresponding lines) (src/Mapping/Driver/AbstractAnnotationDriver.php)
  • Edited copy of a member (20 corresponding lines) (src/Tree/Entity/Repository/NestedTreeRepository.php)
  • Edited copy of a member (22 corresponding lines) (src/Mapping/Event/Adapter/ORM.php)
  • Edited copy of a member (22 corresponding lines) (src/Tree/Document/MongoDB/Repository/AbstractTreeRepository.php)
  • Edited copy of a member (23 corresponding lines) (src/Blameable/BlameableListener.php)
  • Edited copy of a member (26 corresponding lines) (src/Sluggable/Mapping/Event/Adapter/ODM.php)
  • Edited copy of a member (32 corresponding lines) (src/References/ReferencesListener.php)
  • Edited copy of a member (37 corresponding lines) (src/Tree/Entity/Repository/NestedTreeRepository.php)
  • …and 10 more

Written by cca.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

Survey your own repository

doctrine-extensions/DoctrineExtensions was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.

About this page

  • The score is its most recent published measurement, taken on 17 November 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
  • Measured at commit 486719169b3042dd4cdb801f70651f30723aab9e — the exact code this score is about.
  • Scored under rubric-2026.11.4 — the same rubric and the same method as every other entry in this index.
  • Measured by Canine Code Analyzer (cca.canine.dev) using cca measure-2026.11.85+preprod-eba6548ac50f.