Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Doctrine Extensions Laravel Package

gedmo/doctrine-extensions

Doctrine Behavioral Extensions adds powerful behaviors to Doctrine ORM and MongoDB ODM, including Sluggable, Timestampable, Blameable, Loggable, and Translatable, easily attached via Doctrine's event system.

View on GitHub
Deep Wiki
Context7
v3.22.2

Fixed

  • SoftDeleteable: Resolve the event manager listeners from the object manager to support doctrine/persistence >= 4.0 and doctrine/event-manager >= 2.1
  • Loggable: PHPDoc template bounds to support Symfony TypeInfo (#3044)
  • Tree: TreeObjectHydrator compatibility with ORM 3 when parent property is defined before children property in entity (#3041)
  • Tree: Inserting multiple root nodes in one flush operation with the nested set strategy when root nodes are not persisted first (#2582)
v3.22.1

Changed

  • All: Removed the dollar sign from the generated cache ID for extension metadata to ensure only characters mandated by PSR-6 are used, improving compatibility with caching implementations with strict character requirements (#2978)
v3.22.0

Added

  • Support for Symfony 8
v3.21.0

Added

  • SoftDeleteable: $handlePostFlushEvent parameter to SoftDeleteableListener::__construct() to enable or disable handling of the postFlush event (#2958)

Changed

  • Translatable: Optimized database indexes for better performance by reordering unique constraint fields and removing redundant indexes
  • SoftDeleteable: Handling of the postFlush event is disabled by default (#2958)
  • Sluggable: Replaced abandoned behat/transliterator with symfony/string for default transliteration and urlization steps (#2985)
  • Use ClassMetadata::getFieldValue() and ClassMetadata::setFieldValue() methods to support doctrine/orm >= 3.4 (#2966)

Fixed

  • SoftDeleteable: Prevent cascade persist from re-inserting soft-deleted entities still referenced in the identity map (#2958)
  • Sluggable: Fix type error when generating slug using embedded properties (#2965)
v3.20.1

Fixed

  • Compatibility with doctrine/mongodb-odm ^2.11 (#2945)
v3.20.0

Fixed

  • SoftDeleteable: Resolved a bug where a soft-deleted object isn't remove from the ObjectManager (#2930)

Added

  • IP address provider for use with extensions with IP address references (#2928)
v3.19.0

Added

  • Actor provider for use with extensions with user references (#2914)

Changed

  • Updated minimum versions for doctrine/orm to ^2.20 || ^3.3

Fixed

  • Regression with doctrine/orm ^2.20 || ^3.3 that caused the translation walker to produce queries with duplicated LIMIT clauses (issue #2917)
v3.18.0

Added

  • Support for doctrine/persistence ^4.0

Deprecated

  • Sluggable: Annotation-specific mapping parameters (#2837)

Fixed

  • Fix regression with doctrine/dbal >= 4.0 that caused MariaDB to improperly attempt LONGTEXT casting in TranslationWalker (issue #2887)
  • Tree: allow usage of UuidV4 as path source with the materialized path strategy
v3.17.1

Fixed

  • Removed invalid [@note](https://github.com/note) annotation from AbstractLogEntry::$data, which was causing issues in projects using annotation parsers
v3.17.0

Added

  • Support for doctrine/dbal >= 4.0 with all extensions, except Loggable

Changed

  • Extend Throwable from Gedmo\Exception interface
v3.16.1

Fixed

  • Restructure the SqlWalkerCompat trait to fix optimized autoloading
v3.16.0

Added

  • Support for doctrine/orm 3
  • Blameable: Added UUID in allowed types list for Blameable fields in Annotation
  • Blameable: Allow ascii_string to validTypes (issue #2726)
  • Sluggable: Allow ascii_string to validTypes
  • IpTraceable: Allow ascii_string to validTypes
  • Sluggable: Use TranslationWalker hint when looking for similar slugs (getSimilarSlugs method) for entities which implement Translatable interface and have uniqueOverTranslations: true Slug option (#100, #2530)

Deprecated

  • Support for defining mapping information from annotations has been deprecated and will be removed in 4.0, use PHP attributes mapping instead.

Fixed

  • Tree: Cascade remove not being triggered on entity children at MaterializedPath::removeNode().
  • Tree: Materialize Path strategy when using autogenerated identifiers.
v3.15.0

Added

  • SoftDeleteable: Gedmo\SoftDeleteable\Event\PreSoftDeleteEventArgs and Gedmo\SoftDeleteable\Event\PostSoftDeleteEventArgs classes.
  • Add support for injecting a psr/clock implementation into event adapters that create new DateTimeInterface objects (SoftDeleteable and Timestampable)

Changed

  • Make doctrine/annotations an optional dependency.
  • Remove [@internal](https://github.com/internal) annotation from Gedmo\Mapping\Driver\AttributeReader.

Deprecated

  • Do not add type-hinted parameters Gedmo\SoftDeleteable\Event\PreSoftDeleteEventArgs and Gedmo\SoftDeleteable\Event\PostSoftDeleteEventArgs classes to preSoftDelete and postSoftDelete events.
  • The createLifecycleEventArgsInstance() method on Gedmo\Mapping\Event\AdapterInterface implementations is deprecated, use your own subclass of Doctrine\Persistence\Event\LifecycleEventArgs as needed.

Fixed

  • Add conflict against "doctrine/orm" >= 3.
  • Add conflict against "doctrine/dbal" => 4.
v3.14.0

Added

  • Support for Symfony 7
  • Tree: Added [@template](https://github.com/template) and [@template-extends](https://github.com/template-extends) annotations to the Tree repositories

Changed

  • Dropped support for PHP < 7.4
  • Dropped support for Symfony < 5.4
  • Dropped support for doctrine/dbal < 3.2

Deprecated

  • Calling Gedmo\Mapping\Event\Adapter\ORM::getObjectManager() and getObject() on EventArgs that do not implement getObjectManager() and getObject() (such as old EventArgs implementing getEntityManager() and getEntity())
  • Calling Gedmo\Uploadable\Event\UploadableBaseEventArgs::getEntityManager() and getEntity(). Call getObjectManager() and getObject() instead.
v3.13.0

Fixed

  • References: fixed condition in XML Driver that did not allow to retrieve from the entity definition the mappedBy and inversedBy fields (#2670)
  • Fix bug collecting metadata for inherited mapped classes (#2651)
v3.12.0

Added

  • Tree: setSibling() and getSibling() methods in the Node interface through the BC [@method](https://github.com/method) annotation
  • Tree: Support array of fields and directions in the $sortByField and $direction parameters at AbstractTreeRepository::recover()
  • Loggable: Support for composite identifiers

Changed

  • Named arguments have precedence over the values passed in the $data array in annotation classes at Gedmo\Mapping\Annotation\ namespace
  • Removed conflict against "doctrine/cache" < 1.11, as this library is not used
  • Return type from TranslationProxy::__set() (from TranslationProxy to void)

Fixed

  • Tree: Creation of dynamic Node::$sibling property, which is deprecated as of PHP >= 8.2
  • Return type from TranslationProxy::__set() in order to honor its original signature (void)

Deprecated

  • Tree: Not implementing Node interface in classes that are used as nodes
  • Implementing the Gedmo\Tool\WrapperInterface::getIdentifier() method without the second argument ($flatten) is deprecated and will be required in version 4.0
v3.11.1

Fixed

  • Loggable: Remove unfixable deprecation when extending LoggableListener
  • Remove unfixable deprecations when extending repository classes
  • Fix error caused by the attempt of "doctrine/annotations" parsing a [@note](https://github.com/note) annotation
v3.11.0

Added

  • Tree: Add Nested::ALLOWED_NODE_POSITIONS constant in order to expose the available node positions
  • Support for doctrine/collections 2.0
  • Support for doctrine/event-manager 2.0
  • Loggable: Add LogEntryInterface interface in order to be implemented by log entry models

Fixed

  • Sortable: Fix return value check of Comparable interface (#2541)
  • Uploadable: Retrieve the correct metadata when uploading entities of different classes (#2071)
  • Translatable: Fix property existence check at TranslatableListener::getTranslatableLocale()

Deprecated

  • In order to close the API, [@final](https://github.com/final) and [@internal](https://github.com/internal) annotations were added to all non base classes, which means that extending these classes is deprecated and can not be inherited in version 4.0.
  • Sortable: Accepting a return type other than "integer" from Comparable::compareTo() is deprecated in SortableListener::postFlush(). This will not be accepted in version 4.0.
  • Deprecate the annotation reader being allowed to be any object. In 4.0, a Doctrine\Common\Annotations\Reader or Gedmo\Mapping\Driver\AttributeReader instance will be required.
  • Gedmo\DoctrineExtensions::registerAnnotations() is deprecated and will be removed in 4.0, the method has been no-op'd as all supported doctrine/annotations versions support autoloading
  • Loggable: Constants LoggableListener::ACTION_CREATE, LoggableListener::ACTION_UPDATE and LoggableListener::ACTION_REMOVE are deprecated. Use LogEntryInterface::ACTION_CREATE, LogEntryInterface::ACTION_UPDATE and LogEntryInterface::ACTION_REMOVE instead.
v3.10.0

Changed

  • Bump "doctrine/event-manager" dependency from ^1.0 to ^1.2.

Fixed

  • Tree: TreeRoot without "rootIdentifierMethod" when calling getNextSiblings() (#2518)
  • Sortable: Fix duplicated positions when manually updating position on more than one object (#2439)
v3.9.0

Fixed

  • Tree: Allow sorting children by a ManyToOne relation (#2492)
  • Tree: Fix passing null to abs() function
  • Timestampable: Use an attribute in Timestampable attribute docs

Deprecated

  • Tree: Passing null as argument 8 to Nested::shiftRangeRL()
v3.8.0

Added

  • Sluggable: Add support for DateTimeImmutable fields
  • Tree: [NestedSet] childrenQueryBuilder() to allow specifying sort order separately for each field
  • Tree: [NestedSet] Added option to reorder only direct children in reorder() method

Changed

  • Tree: In ClosureTreeRepository::removeFromTree() and NestedTreeRepository::removeFromTree() when something fails in the transaction, it uses the code from the original exception to construct the \Gedmo\Exception\RuntimeException instance instead of null.

Fixed

  • Sluggable: Cast slug to string before passing it as argument 2 to preg_match() (#2473)
  • Sortable: [SortableGroup] Fix sorting date columns in SQLite (#2462).
  • PHPDoc of AbstractMaterializedPath::removeNode() and AbstractMaterializedPath::getChildren()
  • Retrieving the proper metadata cache from Doctrine when using a CacheWarmer.
v3.7.0

Added

  • Add support for doctrine/persistence 3

Changed

  • Removed call to deprecated ClassMetadataFactory::getCacheDriver() method.
  • Dropped support for doctrine/mongodb-odm < 2.3.
  • Make doctrine/cache an optional dependency.

Fixed

  • Loggable: Fix appendNumber renaming for files without extension (#2228)
v3.6.0

Added

  • Translatable: Add defaultTranslationValue option to allow null or string value (#2167). TranslatableListener can hydrate object properties with null value, but it may cause a Type error for non-nullable getter upon a missing translation.

Fixed

  • Uploadable: FileInfoInterface::getSize() return type declaration (#2413).
  • Tree: Setting a new Tree Root when Tree Parent is null.
  • Tree: update cache key used by Closure to match Doctrine's one (#2416).
  • Tree: persist order does not affect entities on Closure (#2432)
v3.5.0

Added

  • SoftDeleteable: Support to use annotations as attributes on PHP >= 8.0.
  • Blameable: Support to use annotations as attributes on PHP >= 8.0.
  • IpTraceable: Support to use annotations as attributes on PHP >= 8.0.
  • Sortable: Support to use annotations as attributes on PHP >= 8.0.
  • Sluggable: Support to use annotations as attributes on PHP >= 8.0.
  • Uploadable: Support to use annotations as attributes on PHP >= 8.0.
  • Tree: Support to use annotations as attributes on PHP >= 8.0.
  • References: Support to use annotations as attributes on PHP >= 8.0.
  • ReferenceIntegrity: Support to use annotations as attributes on PHP >= 8.0.
  • SoftDeleteable: Support for custom column types (like Carbon).
  • Timestampable: Support for custom column types (like Carbon).
  • Translatable: Added an index to Translation entity to speed up searches using Gedmo\Translatable\Entity\Repository\TranslationRepository::findTranslations() method.
  • Gedmo\Mapping\Event\AdapterInterface::getObject() method.

Fixed

  • Blameable, IpTraceable, Timestampable: Type handling for the tracked field values configured in the origin field.
  • Loggable: Using only PHP 8 attributes.
  • References: Avoid deprecations using LazyCollection with PHP 8.1
  • Tree: Association mapping problems using Closure tree strategy (by manually defining mapping on the closure entity).
  • Wrong PHPDoc type declarations.
  • Avoid calling deprecated AbstractClassMetadataFactory::getCacheDriver() method.
  • Avoid deprecations using doctrine/mongodb-odm >= 2.2
  • Translatable: Gedmo\Translatable\Document\Repository\TranslationRepository::findObjectByTranslatedField() method accessing a non-existing key.

Deprecated

  • Tree: When using Closure tree strategy, it is deprecated not defining the mapping associations of the closure entity.
  • Gedmo\Tool\Logging\DBAL\QueryAnalizer class without replacement.
  • Using YAML mapping is deprecated, you SHOULD migrate to attributes, annotations or XML.
  • Gedmo\Mapping\Event\AdapterInterface::__call() method.
  • Gedmo\Tool\Wrapper\AbstractWrapper::clear() method.
  • Gedmo\Tool\Wrapper\WrapperInterface::populate() method.

Changed

  • In order to use a custom cache for storing configuration of an extension, the user has to call setCacheItemPool() on the extension listener passing an instance of Psr\Cache\CacheItemPoolInterface.
v3.4.0

Added

  • PHP 8 Attributes support for Doctrine MongoDB to document & traits.
  • Support for doctrine/dbal >=3.2.
  • Timestampable: Support to use annotations as attributes on PHP >= 8.0.
  • Loggable: Support to use annotations as attributes on PHP >= 8.0.

Changed

  • Translatable: Dropped support for other values than "true", "false", "1" and "0" in the fallback attribute of the translatable element in the XML mapping.
  • Tree: Dropped support for other values than "true", "false", "1" and "0" in the activate-locking attribute of the tree element in the XML mapping.
  • Tree: Dropped support for other values than "true", "false", "1" and "0" in the append_id, starts_with_separator and ends_with_separator attributes of the tree-path element in the XML mapping.
  • Dropped support for doctrine/dbal < 2.13.1.
  • The third argument of Gedmo\SoftDeleteable\Query\TreeWalker\Exec\MultiTableDeleteExecutor::__construct() requires a Doctrine\ORM\Mapping\ClassMetadata instance.
v3.3.1

Fixed

  • Translatable: Using ORM/ODM attribute mapping and translatable annotations.
  • Tree: Missing support for tree-path-hash fields in XML mapping.
  • Tree: Check for affected rows at ClosureTreeRepository::cleanUpClosure() and Closure::updateNode().
  • Gedmo\Mapping\Driver\Xml::_loadMappingFile() behavior in scenarios where libxml_disable_entity_loader(true) was previously called.
  • Loggable: Missing support for versioned fields at attribute-override in XML mapping.
v3.3.0

Added

  • Support to use Translatable annotations as attributes on PHP >= 8.0.

Deprecated

  • Gedmo\Mapping\Driver\File::$_paths property and Gedmo\Mapping\Driver\File::setPaths() method are deprecated and will be removed in version 4.0, as they are not used.

Fixed

  • Value passed in the --config option to fix-cs Composer script.
  • Return value for replaceRelative() and replaceInverseRelative() at Gedmo\Sluggable\Mapping\Event\Adapter\ODM if the query result does not implement Doctrine\ODM\MongoDB\Iterator\Iterator.
  • Restored compatibility with doctrine/orm >= 2.10.2 (#2272). Since doctrine/orm 2.10, Doctrine\ORM\UnitOfWork relies on SPL object IDs instead of hashes, thus we need to adapt our codebase in order to be compatible with this change. As Doctrine\ODM\MongoDB\UnitOfWork from doctrine/mongodb-odm still uses spl_object_hash(), all spl_object_hash() calls were replaced by spl_object_id() to make it work with both ORM and ODM managers.
v3.2.0

Primarily marks Doctrine Extensions as conflicting with ORM 2.10 due to breaking Translations. Big thanks to @phansys for help identifying and fixing! 🙌🏼

Added

  • PHP 8 Attributes for Doctrine ORM to entities & traits (#2251)

Fixed

  • Removed legacy checks targeting older versions of PHP (#2201)
  • Added missing XSD definitions (#2244)
  • Replaced undefined constants from Doctrine\DBAL\Types\Type at Gedmo\Translatable\Mapping\Event\Adapter\ORM::foreignKey() (#2250)
  • Add conflict against "doctrine/orm" >=2.10 in order to guarantee the schema extension (see https://github.com/doctrine/orm/pull/8852) (#2255)
v3.1.0

Fixed

  • Allow installing doctrine/cache 2.0 (thanks @alcaeus!)
  • Make doctrine/cache a dev dependency
v3.0.5

Fixed

  • Use path_separator when removing children (#2217)
v3.0.4

Fixed

  • Add hacky measure to resolve incompatibility with DoctrineBundle 2.3 #2211
v3.0.3

Fixed

  • Add PHP 8 compatibility to composer.json, resolving minor function parameter deprecations #2194
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
robertmarney/lara-hierarchial-collections
simonschaufi/rule-doc-generator
emissaoja/emissaoja
blackbricksoftware/gravityforms-civicrm-form-processor
al-rahabi/fancy-crud
jinas/dhivatar-component
mltstephane/laravel-quality
bernskiold/laravel-talentlms
bernskioldmedia/laravel-form-architect
youbar/easy-crud
c-point-labs/laravel-hostyourai
dbravoan/dbcms-admin-theme-dbcms
dbravoan/dbcms-theme-db-cyber
dbravoan/dbcms-blocks-basic
dbravoan/dbcms-module-content-audit
dbravoan/dbcms-module-ai-assistant
paygate-to/paygate-php
padosoft/askmydocs-connector-base
defstudio/supercharged-carbon
bernskioldmedia/laravel-matomo