Releases: doctrine-extensions/DoctrineExtensions
Releases · doctrine-extensions/DoctrineExtensions
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
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 inSortableListener::postFlush()
.
This will not be accepted in version 4.0. - Deprecate the annotation reader being allowed to be any object.
In 4.0, aDoctrine\Common\Annotations\Reader
orGedmo\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
supporteddoctrine/annotations
versions support autoloading- Loggable: Constants
LoggableListener::ACTION_CREATE
,LoggableListener::ACTION_UPDATE
andLoggableListener::ACTION_REMOVE
are deprecated. UseLogEntryInterface::ACTION_CREATE
,LogEntryInterface::ACTION_UPDATE
andLogEntryInterface::ACTION_REMOVE
instead.
v3.10.0
v3.9.0
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()
andNestedTreeRepository::removeFromTree()
when something fails in the transaction, it uses thecode
from the original exception to construct the\Gedmo\Exception\RuntimeException
instance instead ofnull
.
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()
andAbstractMaterializedPath::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
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 ofPsr\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 thetranslatable
element in the XML mapping. - Tree: Dropped support for other values than "true", "false", "1" and "0" in the
activate-locking
attribute of thetree
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 thetree-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 aDoctrine\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()
andClosure::updateNode()
. Gedmo\Mapping\Driver\Xml::_loadMappingFile()
behavior in scenarios wherelibxml_disable_entity_loader(true)
was previously
called.- Loggable: Missing support for
versioned
fields atattribute-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 andGedmo\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 tofix-cs
Composer script. - Return value for
replaceRelative()
andreplaceInverseRelative()
atGedmo\Sluggable\Mapping\Event\Adapter\ODM
if the
query result does not implementDoctrine\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.
AsDoctrine\ODM\MongoDB\UnitOfWork
from doctrine/mongodb-odm still usesspl_object_hash()
, allspl_object_hash()
calls were replaced byspl_object_id()
to make it work with both ORM and ODM managers.