For the upcoming 3.0.0 release, this PR marks AbstractCollectionStrategy as internal. As a replacement, the new interface CollectionStrategyInterface is introduced. Users writing their own stategies should consider implementing CollectionStrategyInterface instead of extending AbstractCollectionStrategy.
With the new interface, all relevant methods received typed signatures. Collection strategies must provide the following functions:
From Laminas\Hydrator\Strategy\StrategyInterface:
php public function extract($value, ?object $object = null);
public function hydrate($value, ?array $data);
From Doctrine\Laminas\Hydrator\Strategy\CollectionStrategyInterface:
public function getCollectionName(): string;
public function setClassMetadata(ClassMetadata $classMetadata): void;
public function getClassMetadata(): ClassMetadata;
Caution: BC Break
For the upcoming 3.0.0 release, this PR marks
AbstractCollectionStrategy
as internal. As a replacement, the new interfaceCollectionStrategyInterface
is introduced. Users writing their own stategies should consider implementingCollectionStrategyInterface
instead of extendingAbstractCollectionStrategy
.With the new interface, all relevant methods received typed signatures. Collection strategies must provide the following functions:
Laminas\Hydrator\Strategy\StrategyInterface
:php public function extract($value, ?object $object = null);
public function hydrate($value, ?array $data);
Doctrine\Laminas\Hydrator\Strategy\CollectionStrategyInterface
:public function getCollectionName(): string;
public function setClassMetadata(ClassMetadata $classMetadata): void;
public function getClassMetadata(): ClassMetadata;
public function setObject(object $object): void;
public function getObject(): object;