All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
- Add
\Heptacom\HeptaConnect\Dataset\Base\UnsafeClassString
based on class\Heptacom\HeptaConnect\Dataset\Base\Contract\ClassStringReferenceContract
with\Heptacom\HeptaConnect\Dataset\Base\ClassStringReferenceCollection
and\Heptacom\HeptaConnect\Dataset\Base\Support\AbstractClassStringReferenceCollection
to have a string references, that could be a class-string for better type safe class strings - Add base class
\Heptacom\HeptaConnect\Dataset\Base\Contract\ClassStringContract
to have a type safe way to make class string references for better type safe class strings - Add base class
\Heptacom\HeptaConnect\Dataset\Base\Contract\SubtypeClassStringContract
to have a type safe way to make class string references that are of a subtype for better type safe class strings - Add
\Heptacom\HeptaConnect\Dataset\Base\EntityType
with\Heptacom\HeptaConnect\Dataset\Base\EntityTypeCollection
as a type safe subtype class reference to\Heptacom\HeptaConnect\Dataset\Base\Contract\DatasetEntityContract
for better type safe class strings - Add
\Heptacom\HeptaConnect\Dataset\Base\Contract\DatasetEntityContract::class
as factory method to create an instance of\Heptacom\HeptaConnect\Dataset\Base\EntityType
for better type safe class strings - Add
\Heptacom\HeptaConnect\Dataset\Base\Exception\InvalidClassNameException
,\Heptacom\HeptaConnect\Dataset\Base\Exception\InvalidSubtypeClassNameException
and\Heptacom\HeptaConnect\Dataset\Base\Exception\UnexpectedLeadingNamespaceSeparatorInClassNameException
to reference class-string issues for better type safe class strings - Add exception code
1655559294
to\Heptacom\HeptaConnect\Dataset\Base\Contract\ClassStringContract::__construct
when the given class string has a leading namespace separator - Add exception code
1655559295
to\Heptacom\HeptaConnect\Dataset\Base\Contract\ClassStringContract::__construct
when the given class string does not refer to an existing class or interface - Add exception code
1655559296
to\Heptacom\HeptaConnect\Dataset\Base\Contract\SubtypeClassStringContract::__construct
when the given class string is not of the expected type - Add method
\Heptacom\HeptaConnect\Dataset\Base\Support\AbstractCollection::withoutItems
from implementation into the interface\Heptacom\HeptaConnect\Dataset\Base\Contract\CollectionInterface::withoutItems
- Add method
\Heptacom\HeptaConnect\Dataset\Base\Support\AbstractCollection::chunk
from implementation into the interface\Heptacom\HeptaConnect\Dataset\Base\Contract\CollectionInterface::chunk
- Add method
\Heptacom\HeptaConnect\Dataset\Base\Support\AbstractCollection::asArray
from implementation into the interface\Heptacom\HeptaConnect\Dataset\Base\Contract\CollectionInterface::asArray
- Add method
\Heptacom\HeptaConnect\Dataset\Base\Support\AbstractCollection::reverse
from implementation into the interface\Heptacom\HeptaConnect\Dataset\Base\Contract\CollectionInterface::reverse
- Add method
\Heptacom\HeptaConnect\Dataset\Base\Support\AbstractCollection::isEmpty
from implementation into the interface\Heptacom\HeptaConnect\Dataset\Base\Contract\CollectionInterface::isEmpty
- Add method
\Heptacom\HeptaConnect\Dataset\Base\Support\AbstractCollection::contains
to check whether the given item is in the collection - Add method
\Heptacom\HeptaConnect\Dataset\Base\Support\AbstractCollection::containsByEqualsCheck
for any extending class to build alternative contains implementations based upon comparison - Add method
\Heptacom\HeptaConnect\Dataset\Base\Support\AbstractCollection::asUnique
to build a collection with items that are not identical to the other items in the collection - Add
\Heptacom\HeptaConnect\Dataset\Base\Contract\CollectionInterface::pushIgnoreInvalidItems
as alternative to\Heptacom\HeptaConnect\Dataset\Base\Contract\CollectionInterface::push
to push items into collections, without exceptions on invalid items - Add
\InvalidArgumentException
to\Heptacom\HeptaConnect\Dataset\Base\Support\AbstractCollection
using the new method\Heptacom\HeptaConnect\Dataset\Base\Support\AbstractCollection::validateItems
when items are added, that are not compliant with the collection's validation - Add
\InvalidArgumentException
to\Heptacom\HeptaConnect\Dataset\Base\Support\AbstractCollection::offsetGet
and\Heptacom\HeptaConnect\Dataset\Base\Support\AbstractCollection::offsetSet
when items are accessed with keys, that are not numeric
- Change return type of
\Heptacom\HeptaConnect\Dataset\Base\Contract\ForeignKeyAwareInterface::getForeignEntityType
fromclass-string
to\Heptacom\HeptaConnect\Dataset\Base\EntityType
to improve type safety for better type safe class strings - Change return type of
\Heptacom\HeptaConnect\Dataset\Base\Contract\CollectionInterface::filter
fromGenerator
tostatic
to improve its code usage for fluent syntax and better accessibility of other collection methods - Change return type of
\Heptacom\HeptaConnect\Dataset\Base\Contract\CollectionInterface::filterValid
fromGenerator
toiterable
- Replace type hints to real union types in
\Heptacom\HeptaConnect\Dataset\Base\Date::add
,\Heptacom\HeptaConnect\Dataset\Base\Date::sub
,\Heptacom\HeptaConnect\Dataset\Base\Date::setTime
and\Heptacom\HeptaConnect\Dataset\Base\Date::setTimestamp
- Add implementation reference to
\Stringable
when__toString
is already implemented in\Heptacom\HeptaConnect\Dataset\Base\Contract\ClassStringReferenceContract
- Change default value from
\Heptacom\HeptaConnect\Dataset\Base\Support\AttachmentAwareTrait::$attachments
a new instance tonull
- Change default value from
\Heptacom\HeptaConnect\Dataset\Base\Support\DependencyAwareTrait::$dependencies
a new instance tonull
- Add possible exception
\InvalidArgumentException
to be thrown from\Heptacom\HeptaConnect\Dataset\Base\Contract\CollectionInterface::push
and\Heptacom\HeptaConnect\Dataset\Base\Support\AbstractCollection::__construct
when validating items, that are added to the collection items
- Deprecate
\Heptacom\HeptaConnect\Dataset\Base\TypedDatasetEntityCollection::getType
in favour of\Heptacom\HeptaConnect\Dataset\Base\TypedDatasetEntityCollection::getEntityType
to improve type safety for better type safe class strings - Deprecate
$type
parameter in\Heptacom\HeptaConnect\Dataset\Base\TypedDatasetEntityCollection::__construct
to be a string. Prefer an instance of\Heptacom\HeptaConnect\Dataset\Base\EntityType
for better type safe class strings
- Remove support for
php: 7.4
as it will not receive any updates anymore, it is unlikely to be used. By raising the minimum PHP version we also make use of features introduced by PHP 8.0, which mainly have no effect on public API - Remove
\Heptacom\HeptaConnect\Dataset\Base\Contract\DeferralAwareInterface
and\Heptacom\HeptaConnect\Dataset\Base\Support\DeferralAwareTrait
as it has not been a practical solution to defer closure execution in a different process - Remove composer dependency
opis/closure
as it is no longer needed with the removal of closure deferrals introduced in HEPTAconnect 0.5
- Deprecate and discourage usage of
\Heptacom\HeptaConnect\Dataset\Base\Contract\DeferralAwareInterface
and\Heptacom\HeptaConnect\Dataset\Base\Support\DeferralAwareTrait
as it has not been a practical solution to defer closure execution in a different process
- Add method
\Heptacom\HeptaConnect\Dataset\Base\Support\AbstractCollection::withoutItems
to create safely new instances of the same type but without content - Add method
\Heptacom\HeptaConnect\Dataset\Base\Support\AbstractCollection::chunk
to iterate over the items prepared in a buffer of a certain size - Add method
\Heptacom\HeptaConnect\Dataset\Base\Support\AbstractCollection::asArray
to access the items of the collection as fixed size array - Add method
\Heptacom\HeptaConnect\Dataset\Base\Support\AbstractCollection::reverse
to reverse the order of the collection items - Add method
\Heptacom\HeptaConnect\Dataset\Base\Support\AbstractCollection::isEmpty
to check whether the collection is empty without counting - Add aggregation methods
\Heptacom\HeptaConnect\Dataset\Base\ScalarCollection\FloatCollection::sum
,\Heptacom\HeptaConnect\Dataset\Base\ScalarCollection\FloatCollection::max
and\Heptacom\HeptaConnect\Dataset\Base\ScalarCollection\FloatCollection::min
to reduce boilerplate code when aggregating a float collection - Add aggregation methods
\Heptacom\HeptaConnect\Dataset\Base\ScalarCollection\IntegerCollection::sum
,\Heptacom\HeptaConnect\Dataset\Base\ScalarCollection\IntegerCollection::max
and\Heptacom\HeptaConnect\Dataset\Base\ScalarCollection\IntegerCollection::min
to reduce boilerplate code when aggregating an integer collection
- Add method
\Heptacom\HeptaConnect\Dataset\Base\ScalarCollection\StringCollection::join
to implode strings
- Add
\Heptacom\HeptaConnect\Dataset\Base\Support\AttachmentAwareTrait::isAttached
to check for a specific instance of an object in the attachment list - Add
\Heptacom\HeptaConnect\Dataset\Base\Support\AttachmentAwareTrait::detach
to remove a specific instance from the attachment list - Add
\Heptacom\HeptaConnect\Dataset\Base\Contract\AttachmentAwareInterface
to match the trait\Heptacom\HeptaConnect\Dataset\Base\Support\AttachmentAwareTrait
and add it to\Heptacom\HeptaConnect\Dataset\Base\Contract\DatasetEntityContract
- Add class
\Heptacom\HeptaConnect\Dataset\Base\File\FileReferenceContract
as a base class for various file reference implementations - Add class
\Heptacom\HeptaConnect\Dataset\Base\File\FileReferenceCollection
as a collection for\Heptacom\HeptaConnect\Dataset\Base\File\FileReferenceContract
- Implement possible usage of interface FQCNs as parameter in the methods
\Heptacom\HeptaConnect\Dataset\Base\Support\AttachmentAwareTrait::hasAttached
,\Heptacom\HeptaConnect\Dataset\Base\Support\AttachmentAwareTrait::getAttachment
,\Heptacom\HeptaConnect\Dataset\Base\Support\AttachmentAwareTrait::detachByType
- Set
array-key
type on iterating over collections that implement the\Heptacom\HeptaConnect\Dataset\Base\Contract\CollectionInterface
toint
as they only accept iterables keyed byint
- Add final modifier to
\Heptacom\HeptaConnect\Dataset\Base\ScalarCollection\BooleanCollection
,\Heptacom\HeptaConnect\Dataset\Base\ScalarCollection\DateCollection
,\Heptacom\HeptaConnect\Dataset\Base\ScalarCollection\DateTimeCollection
,\Heptacom\HeptaConnect\Dataset\Base\ScalarCollection\FloatCollection
,\Heptacom\HeptaConnect\Dataset\Base\ScalarCollection\IntegerCollection
,\Heptacom\HeptaConnect\Dataset\Base\ScalarCollection\StringCollection
,\Heptacom\HeptaConnect\Dataset\Base\TaggedCollection\TaggedBooleanCollection
,\Heptacom\HeptaConnect\Dataset\Base\TaggedCollection\TaggedDateCollection
,\Heptacom\HeptaConnect\Dataset\Base\TaggedCollection\TaggedDateTimeCollection
,\Heptacom\HeptaConnect\Dataset\Base\TaggedCollection\TaggedFloatCollection
,\Heptacom\HeptaConnect\Dataset\Base\TaggedCollection\TaggedIntegerCollection
,\Heptacom\HeptaConnect\Dataset\Base\TaggedCollection\TaggedStringCollection
,\Heptacom\HeptaConnect\Dataset\Base\TaggedCollection\TagItem
,\Heptacom\HeptaConnect\Dataset\Base\Translatable\ScalarCollection\TranslatableBooleanCollection
,\Heptacom\HeptaConnect\Dataset\Base\Translatable\ScalarCollection\TranslatableDateCollection
,\Heptacom\HeptaConnect\Dataset\Base\Translatable\ScalarCollection\TranslatableDateTimeCollection
,\Heptacom\HeptaConnect\Dataset\Base\Translatable\ScalarCollection\TranslatableFloatCollection
,\Heptacom\HeptaConnect\Dataset\Base\Translatable\ScalarCollection\TranslatableIntegerCollection
,\Heptacom\HeptaConnect\Dataset\Base\Translatable\ScalarCollection\TranslatableStringCollection
,\Heptacom\HeptaConnect\Dataset\Base\Translatable\TranslatableBoolean
,\Heptacom\HeptaConnect\Dataset\Base\Translatable\TranslatableDate
,\Heptacom\HeptaConnect\Dataset\Base\Translatable\TranslatableDateTime
,\Heptacom\HeptaConnect\Dataset\Base\Translatable\TranslatableFloat
,\Heptacom\HeptaConnect\Dataset\Base\Translatable\TranslatableInteger
,\Heptacom\HeptaConnect\Dataset\Base\Translatable\TranslatableString
,\Heptacom\HeptaConnect\Dataset\Base\AttachmentCollection
,\Heptacom\HeptaConnect\Dataset\Base\Date
,\Heptacom\HeptaConnect\Dataset\Base\Dependency
,\Heptacom\HeptaConnect\Dataset\Base\DependencyCollection
and\Heptacom\HeptaConnect\Dataset\Base\TypedDatasetEntityCollection
to ensure correct usage of implementation. Decoration by their interfaces or base classes is still possible
- Copy and deprecate
\Heptacom\HeptaConnect\Dataset\Base\Support\AttachmentAwareTrait::unattach
to\Heptacom\HeptaConnect\Dataset\Base\Support\AttachmentAwareTrait::detachByType
for correct usage of English language and distinguish from\Heptacom\HeptaConnect\Dataset\Base\Support\AttachmentAwareTrait::detach
- Change composer dependency
bentools/iterable-functions: >=1 <2
tobentools/iterable-functions: >=1.4 <2
to ensure availability ofiterable_map
- Remove the code for unit tests, configuration for style checks as well as the Makefile
- Change composer dependency
bentools/iterable-functions: >=1
tobentools/iterable-functions: >=1 <2
- Change method name of
\Heptacom\HeptaConnect\Dataset\Base\Contract\ForeignKeyAwareInterface::getForeignDatasetEntityClassName
to\Heptacom\HeptaConnect\Dataset\Base\Contract\ForeignKeyAwareInterface::getForeignEntityType
- Amend typehint for
\Heptacom\HeptaConnect\Dataset\Base\Support\AbstractCollection::__construct
,\Heptacom\HeptaConnect\Dataset\Base\TypedDatasetEntityCollection::__construct
and\Heptacom\HeptaConnect\Dataset\Base\Contract\CollectionInterface::push
to improve static code analysis.
- Change signature
\Heptacom\HeptaConnect\Dataset\Base\TypedDatasetEntityCollection::__construct
to allow iterables instead of array like other collections
- New method
\Heptacom\HeptaConnect\Dataset\Base\Contract\CollectionInterface::column
to improve common cases from\Heptacom\HeptaConnect\Dataset\Base\Contract\CollectionInterface::map
usage
- Amend
\Heptacom\HeptaConnect\Dataset\Base\Contract\CollectionInterface::map
typehint for callables to improve static code analysis
- New composer dependency
opis/closure: ^3.6
to allow serialization of closures - New class
\Heptacom\HeptaConnect\Dataset\Base\TypedDatasetEntityCollection
to have a dataset entity collection that ensures to contain a single type only to improve common case\Heptacom\HeptaConnect\Dataset\Base\Contract\CollectionInterface::filter
- New class
\Heptacom\HeptaConnect\Dataset\Base\Translatable\ScalarCollection\AbstractTranslatableScalarCollection
to allow translations of any collections - New class
\Heptacom\HeptaConnect\Dataset\Base\Translatable\ScalarCollection\TranslatableBooleanCollection
to allow translations of type\Heptacom\HeptaConnect\Dataset\Base\ScalarCollection\BooleanCollection
- New class
\Heptacom\HeptaConnect\Dataset\Base\Translatable\ScalarCollection\TranslatableDateCollection
to allow translations of type\Heptacom\HeptaConnect\Dataset\Base\ScalarCollection\DateCollection
- New class
\Heptacom\HeptaConnect\Dataset\Base\Translatable\ScalarCollection\TranslatableDateTimeCollection
to allow translations of type\Heptacom\HeptaConnect\Dataset\Base\ScalarCollection\DateTimeCollection
- New class
\Heptacom\HeptaConnect\Dataset\Base\Translatable\ScalarCollection\TranslatableFloatCollection
to allow translations of type\Heptacom\HeptaConnect\Dataset\Base\ScalarCollection\FloatCollection
- New class
\Heptacom\HeptaConnect\Dataset\Base\Translatable\ScalarCollection\TranslatableIntegerCollection
to allow translations of type\Heptacom\HeptaConnect\Dataset\Base\ScalarCollection\IntegerCollection
- New class
\Heptacom\HeptaConnect\Dataset\Base\Translatable\ScalarCollection\TranslatableStringCollection
to allow translations of type\Heptacom\HeptaConnect\Dataset\Base\ScalarCollection\StringCollection
- New method in
\Heptacom\HeptaConnect\Dataset\Base\Contract\DeferralAwareInterface::copyDeferrals
to copy deferrals from one deferral aware to another one - New default implementation of method
\Heptacom\HeptaConnect\Dataset\Base\Contract\DeferralAwareInterface::copyDeferrals
in\Heptacom\HeptaConnect\Dataset\Base\Support\DeferralAwareTrait
- Rename
\Heptacom\HeptaConnect\Dataset\Base\Translatable\GenericTranslatable
to\Heptacom\HeptaConnect\Dataset\Base\Translatable\AbstractTranslatable
- Add
\Heptacom\HeptaConnect\Dataset\Base\Contract\DeferralAwareInterface
to\Heptacom\HeptaConnect\Dataset\Base\Contract\DatasetEntityContract