Skip to content

Releases: doctrine-extensions/DoctrineExtensions

v3.12.0

08 Jul 20:42
v3.12.0
Compare
Choose a tag to compare

Added

  • Tree: setSibling() and getSibling() methods in the Node interface through the BC @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

20 Feb 19:26
v3.11.1
Compare
Choose a tag to compare

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 annotation

v3.11.0

26 Jan 00:17
v3.11.0
Compare
Choose a tag to compare

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 and @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

14 Nov 20:29
v3.10.0
Compare
Choose a tag to compare

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

22 Sep 02:40
v3.9.0
Compare
Choose a tag to compare

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

17 Jul 12:08
v3.8.0
Compare
Choose a tag to compare

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

17 May 07:04
Compare
Choose a tag to compare

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

19 Mar 10:28
20e682c
Compare
Choose a tag to compare

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

10 Jan 22:05
dd1a143
Compare
Choose a tag to compare

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

05 Dec 19:43
v3.4.0
Compare
Choose a tag to compare

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.