6.3.0 - 2025-05-23
- Add support for Symfony
7.1and7.2 - Add support for PHP
8.4 - Add
ObjectCollectionMakerandObjectNullableCollectionMaker - Add collections for some PHP internal interfaces, all in namespace
Steevanb\PhpCollection\ObjectCollection:BackedEnumCollectionBackedEnumNullableCollectionCountableCollectionCountableNullableCollectionDateTimeInterfaceCollectionDateTimeInterfaceNullableCollectionJsonSerializableCollectionJsonSerializableNullableCollectionSerializableCollectionSerializableNullableCollectionStringableCollectionStringableNullableCollectionUnitEnumCollectionUnitEnumNullableCollectionAdd collections for some PHP internal classes, all in namespaceSteevanb\PhpCollection\ObjectCollection:
DateIntervalCollectionDateIntervalNullableCollectionDatePeriodCollectionDatePeriodNullableCollectionDateTimeCollectionDateTimeNullableCollectionDateTimeImmutableCollectionDateTimeImmutableNullableCollectionDateTimeZoneCollectionDateTimeZoneNullableCollectionReflectionCollectionReflectionNullableCollectionReflectionAttributeCollectionReflectionAttributeNullableCollectionReflectionClassCollectionReflectionClassNullableCollectionReflectionClassConstantCollectionReflectionClassConstantNullableCollectionReflectionEnumCollectionReflectionEnumNullableCollectionReflectionEnumBackedCaseCollectionReflectionEnumBackedCaseNullableCollectionReflectionEnumUnitCaseCollectionReflectionEnumUnitCaseNullableCollectionReflectionExtensionCollectionReflectionExtensionNullableCollectionReflectionFiberCollectionReflectionFiberNullableCollectionReflectionFunctionCollectionReflectionFunctionNullableCollectionReflectionFunctionAbstractCollectionReflectionFunctionAbstractNullableCollectionReflectionGeneratorCollectionReflectionGeneratorNullableCollectionReflectionIntersectionTypeCollectionReflectionIntersectionTypeNullableCollectionReflectionMethodCollectionReflectionMethodNullableCollectionReflectionNamedTypeCollectionReflectionNamedTypeNullableCollectionReflectionObjectCollectionReflectionObjectNullableCollectionReflectionParameterCollectionReflectionParameterNullableCollectionReflectionPropertyCollectionReflectionPropertyNullableCollectionReflectionReferenceCollectionReflectionReferenceNullableCollectionReflectionTypeCollectionReflectionTypeNullableCollectionReflectionUnionTypeCollectionReflectionUnionTypeNullableCollectionSplFileInfoCollectionSplFileInfoNullableCollectionSplFileObjectCollectionSplFileObjectNullableCollectionStdClassCollectionStdClassNullableCollection
6.2.0 - 2024-07-08
- Add
AbstractCollection::getFirst()andAbstractCollection::getLast()
6.1.0 - 2024-05-24
- Add support for Symfony
7.0
6.0.1 - 2024-05-15
- Documentation
6.0.0 - 2024-05-15
- Add support for Symfony
6.3and6.4 - Add support for PHP
8.3 - Update CI dependencies
- Add support for generics
- [BC break] Remove
ObjectCollectionDenormalizer::createObjectCollection()andadd() - [BC break] Rename ObjectCollectionDenormalizer::denormalizeObject()
todenormalizeValue()` - [BC break] Remove
ScalarCollectionInterface - [BC break] Remove
ScalarCollectionDenormalizer::createScalarCollection() - Add
bridge/to phpstan - Add generics everywhere it's possible
- [BC break] Remove
FloatCollectionInterfaceandFloatNullableCollectionInterface - [BC break] Remove
IntegerCollectionInterfaceandIntegerNullableCollectionInterface - [BC break] Remove
StringCollectionInterfaceandStringNullableCollectionInterface - [BC break]
AbstractCollection::getStringKeys()returnStringCollectioninstead ofStringCollectionInterface - [BC break]
AbstractCollection::getIntegerKeys()returnIntegerCollectioninstead ofIntegerCollectionInterface - [BC break] Rename AbstractCollection::
doReplace()toreplace() - [BC break] Rename AbstractCollection::
doGet()toget() - [BC break] Rename AbstractCollection::
doHas()tocontains() - [BC break] Add
CollectionInterface::__construct() - [BC break] Change return type of
CollectionInterface::getIntegerKeys()fromIntegerCollectionInterfacetoIntegerCollection - [BC break] Change return type of
CollectionInterface::getStringKeys()fromStringCollectionInterfacetoStringCollection - [BC break] Add
CollectionInterface::get() - [BC break] Add
CollectionInterface::contains() - [BC break] Add
CollectionInterface::replace() - [BC break] Remove
AbstractEnumCollection, useAbstractObjectCollectioninstead - [BC break] Add
AbstractObjectCollection::getValueFqcn() - [BC break] Add parameter
$valuetoAbstractObjectCollection::getAssertInstanceOfError() - [BC break] Add
AbstractObjectNullableCollection::getValueFqcn() - [BC break] Add parameter
$valuetoAbstractObjectNullableCollection::getAssertInstanceOfError() - [BC break] Add parameter
$valuetoObjectCollectionTrait::getAssertInstanceOfError() - [BC break] Remove
ObjectCollectionTrait::assertClassName() ObjectCollectionTrait::castValueToString()can cast the value from\BackedEnumand\UnitEnum- Because of generics, remove methods in
FloatCollection:__construct(),replace(),has(),get(),merge()andtoArray() - Because of generics, remove methods in
FloatNullableCollection:__construct(),replace(),has(),get(),merge()andtoArray() - Because of generics, remove methods in
IntegerCollection:__construct(),replace(),has(),get(),merge()andtoArray() - Because of generics, remove methods in
IntegerNullableCollection:__construct(),replace(),has(),get(),merge()andtoArray() - Because of generics, remove methods in
StringCollection:__construct(),replace(),has(),get(),merge()andtoArray() - Because of generics, remove methods in
StringNullableCollection:__construct(),replace(),has(),get(),merge()andtoArray() - Edhrendal Add
AbstractCollection::isEmpty() - Remove
CollectionInterface::getIntegerKeys()andCollectionInterface::getStringKeys(). It still exists inAbstractCollection. - [BC break] Remove parameter
$readOnlyinCollectionInterface::setReadOnly() - [BC break] Remove
ValueAlreadyExistsException - [BC break] Rename
AbstractCollection::canAddValue()toassertValueType() - [BC break] Remove
ValueAlreadyExistsModeEnumand all it's usages:AbstractCollection::__construct(),CollectionInterface::getValueAlreadyExistsMode()etc - Remove
AbstractCollection::isSameValues() - Remove
AbstractCollection::castValueToString(),AbstractObjectCollection::castValueToString()andAbstractObjectNullableCollection::castValueToString() - [BC break] Remove
ComparisonModeEnumand all it's usages:ObjectCollectionTrait::getComparisonMode() - Remove
ObjectCollectionTrait::isSameValues()
5.0.1 - 2023-03-14
- Fix
AbstractCollection::doAdd()who was not callingcanAddValue()
5.0.0 - 2023-03-14
- [BC break] Rename repository, namespace and everything else from
TypedArraytoCollection - Define PHP
8.1as default PHP version in Docker imagesteevanb/php-typed-array:ci - Update Composer to
2.5.4 - [BC break] Remove
AbstractTypedArray::$nullValueMode - Call
$this->clear()inAbstractTypedArray::setValues() - Rework
AbstractTypedArray::changeKeyCase() - [BC break] Remove
NullValueException - [BC break] Remove
NullValueModeEnum - Add PHPDoc everywhere to force return types in
toArray() - [BC break] Remove
AbstractScalarArray - Add
ScalarArrayInterfaceforScalarArrayDenormalizer - [BC break] Remove
ScalarArray: it was not enough typed, too much types can be added - [BC break]
FloatArray,IntArrayandStringArraynow accepts only the right type (null is not allowed too), values will not be casted by the TypedArray - [BC break] Remove
ByteStringArray,CodePointStringArrayandUnicodeStringArray: they are specific to another library - Add
FloatNullableArray,IntNullableArray,StringNullableArrayandObjectNullableArraywho allownulland the right type - [BC break] Remove
setValueAlreadyExistMode(), now it's a parameter in__construct() - [BC break] Change
__construct()parameters for all TypedArray classes - [BC break] AbstractEnumArray new extends
AbstractTypedArrayand notObjectArray - [BC break] Rename
Steevanb\PhpTypedArray\ObjectComparisonModeEnumtoSteevanb\PhpTypedArray\ObjectArray\ComparisonModeEnum - [BC break] Remove
ObjectArrayto force anObjectArrayto have instance of only one class/interface. - [BC break] Default comparison mode for
ObjectArrayisHASH(it wasSTRING) - [BC break] Rename
ValueAlreadyExistExceptiontoValueAlreadyExistsExceptionandAbstractTypedArray::getValueAlreadyExistMode()toAbstractTypedArray::getValueAlreadyExistsMode() - [BC break] Remove parameter
$offsetofAbstractTypedArray::canAddValue() - [BC break] Rename
IntCollectiontoIntegerCollection - [BC break] Remove implementations of
\Iteratorand\ArrayAccess, too much bugs in PHP with this interfaces - [BC break] Remove phpstan rule
- [BC break]
AbstractCollection::changeKeyCase()parameter$casetype changed frominttoKeyCaseEnum
4.0.0 - 2022-12-20
- [BC break] Remove support for PHP 7.1, 7.2, 7.3, 7.4 and 8.0
- Add support for PHP 8.2
- [BC break] Remove support for Symfony < 6.1
- Add support for Symfony 6.1 and 6.2
- [BC break] Rename namespace first part from
steevanbtoSteevanb - [BC break]
AbstractTypedArray::NULL_VALUE_ALLOW,NULL_VALUE_DO_NOT_ADDandNULL_VALUE_EXCEPTIONare replaced byNullValueModeEnum - [BC break]
AbstractTypedArray::VALUE_ALREADY_EXIST_ADD,VALUE_ALREADY_EXIST_DO_NOT_ADDandVALUE_ALREADY_EXIST_EXCEPTIONare replaced byValueAlreadyExistsModeEnum - [BC break]
ObjectArray::COMPARISON_STRINGandCOMPARISON_OBJECT_HASHare replaced byObjectComparisonModeEnum - [BC break] Add types everywhere we can
- Add
AbstractEnumArrayto store PHP 8.1\UnitEnum. - [BC break]
ObjectArraycould not store instances of\UnitEnumanymore. - [BC break] Remove ReadOnlyInterface, merged into CollectionInterface
3.3.2 - 2021-12-23
- Add #[\ReturnTypeWillChange] when needed to remove a new deprecated with PHP 8.1
3.3.1 - 2021-09-11
- Fix
composer requireversion inREADME.mdin GitHub Actions workflowRelease
3.3.0 - 2021-09-11
- Add
AbstractTypedArray::reset() - Add
AbstractTypedArray::changeKeyCase() - CI moved from CircleCI to GitHub Actions
- Add tools in
bin/ci:composer-validate,phpunit-coverage,shellcheckandunused-scanner - Rework
bin/cibinaries - Add
bin/releasebinaries - Add GitHub Actions workflow
Release
3.2.0 - 2021-05-13
- Add
ReadOnlyInterface - Add
AbstractTypedArray::setReadOnly()andAbstractTypedArray::isReadOnly()
3.1.1 - 2021-05-10
- Fix
.gitattributes
3.1.0 - 2021-05-10
- Allow PHP
^8.0(it was already compatible) - [BC break] Removed
steevanb\PhpTypedArray\ScalarArray\BoolArray: do not work and will never work due to\Iterator
3.0.1 - 2021-02-18
- Fix
ObjectArrayDenormalizer::createObjectArray() - Fix Symfony bridge tests
3.0.0 - 2021-02-18
- Add tests for symfony/serializer
4.4,5.0,5.1and5.2 - [BC break] Removed
steevanb\PhpTypedArray\Bridge\Symfony\Normalizer\ObjectArray\AbstractObjectArrayDenormalizer - [BC break] Removed
steevanb\PhpTypedArray\Bridge\Symfony\Normalizer\ObjectArray\ByteStringArrayDenormalizer - [BC break] Removed
steevanb\PhpTypedArray\Bridge\Symfony\Normalizer\ObjectArray\CodePointStringArrayDenormalizer - [BC break] Removed
steevanb\PhpTypedArray\Bridge\Symfony\Normalizer\ObjectArray\UnicodeStringArrayDenormalizer - Moved
steevanb\PhpTypedArray\Bridge\Symfony\Normalizer\ObjectArray\ObjectArrayDenormalizertosteevanb\PhpTypedArray\Bridge\Symfony\Normalizer\ObjectArrayDenormalizer - [BC break] Removed
steevanb\PhpTypedArray\Bridge\Symfony\Normalizer\ScalarArray\AbstractScalarArrayDenormalizer - [BC break] Removed
steevanb\PhpTypedArray\Bridge\Symfony\Normalizer\ScalarArray\BoolArrayDenormalizer - [BC break] Removed
steevanb\PhpTypedArray\Bridge\Symfony\Normalizer\ScalarArray\FloatArrayDenormalizer - [BC break] Removed
steevanb\PhpTypedArray\Bridge\Symfony\Normalizer\ScalarArray\IntArrayDenormalizer - [BC break] Removed
steevanb\PhpTypedArray\Bridge\Symfony\Normalizer\ScalarArray\ScalarArrayDenormalizer - [BC break] Removed
steevanb\PhpTypedArray\Bridge\Symfony\Normalizer\ScalarArray\StringArrayDenormalizer - Add
steevanb\PhpTypedArray\Bridge\Symfony\Normalizer\ScalarArrayDenormalizerto replacesteevanb\PhpTypedArray\Bridge\Symfony\Normalizer\ScalarArray\*Denormalizer - Create Docker image
steevanb/php-typed-array-ci:1.0.0who contains symfony/serializer versions and phpstan
2.6.0 - 2021-02-03
- Add
ObjectArrayDenormalizerto denormalize all instances ofObjectArray - Deprecate
ByteStringArrayDenormalizer,CodePointStringArrayDenormalizerandUnicodeStringArrayDenormalizer(replaced byObjectArrayDenormalizer) - Launch unit tests with PHP 7.1, 7.2, 7.3 and 7.4 (only 7.4 before)
- Fix
AbstractTypedArrayreturn types for PHP 7.1, 7.2 and 7.3
2.5.0 - 2020-12-30
- Add
TypedArrayInterfaceand use it inAbstractTypedArray - Add
DisallowTypedArrayRulefor phpstan
2.4.0 - 2020-12-03
- Add Symdony bridge
- Add Denormalizer for symfony/serializer component
2.3.0 - 2020-11-10
- Add
steevanb\PhpTypedArray\ScalarArray\BoolArray - Add
steevanb\PhpTypedArray\ScalarArray\FloatArray - Add
steevanb\PhpTypedArray\ScalarArray\ScalarArray - Add some unit tests
2.2.0 - 2020-10-29
- Add merge() function to all but ObjectArray
- Update CI
2.1.2 - 2019-10-11
- Documentation
2.1.1 - 2019-10-11
- Documentation
2.1.0 - 2019-10-11
- [BaBeuloula] Add
steevanb\PhpTypedArray\ObjectArray\ByteStringArray - [BaBeuloula] Add
steevanb\PhpTypedArray\ObjectArray\CodePointStringArray - [BaBeuloula] Add
steevanb\PhpTypedArray\ObjectArray\UnicodeStringArray - Add composerRequireChecker
- Add phpcf
- Update phpcs to 2.0.10
- Add phpstan
2.0.1 - 2019-05-10
- Add
/** @return $this */when a method return self for PHPStorm autocompletion.
2.0.0 - 2019-04-27
- Moved
steevanb\PhpTypedArray\IntArray,steevanb\PhpTypedArray\IntNullableArray,steevanb\PhpTypedArray\StringArrayandsteevanb\PhpTypedArray\StringNullableArrayintosteevanb\PhpTypedArray\ScalarArraynamespace. - Moved
steevanb\PhpTypedArray\ObjectArrayintosteevanb\PhpTypedArray\ObjectArraynamespace. - Moved
steevanb\PhpTypedArray\NonUniqueValueExceptionintosteevanb\PhpTypedArray\Exceptionnamespace. steevanb\PhpTypedArray\Exception\NonUniqueValueExceptionextendssteevanb\PhpTypedArray\Exception\PhpTypedArrayExceptioninstead of\Exception.steevanb\PhpTypedArray\AbstractTypedArray::castValueToStringrenamed tocastValueToString.- Removed
steevanb\PhpTypedArray\IntNullableArrayandsteevanb\PhpTypedArray\StringNullableArray, usesetNullValueMode()instead. - Replaced
AbstractTypedArray::setUniqueValues(),isUniqueValues(),setExceptionOnNonUniqueValue()andisExceptionOnNonUniqueValue()bysetValueAlreadyExistMode(). - Renamed
AbstractTypedArray::asArray()totoArray(). - All throwned exceptions are instance of
steevanb\PhpTypedArray\PhpTypedArrayExceptioninstead of\Exception. - Create
steevanb\PhpTypedArray\InvalidTypeExceptionthrowned instead of\Exceptionwhen trying to add a value into a AbstractTypedArray. - Renamed
steevanb\PhpTypedArray\NonUniqueValueExceptiontosteevanb\PhpTypedArray\ValueAlreadyExistException. - Removed
steevanb\PhpTypedArray\AbstractTypedArray::merge(), too much differences with PHParray_merge()function and it could be called directly:array_merge($typedArray1->toArray(), $typedArray2->toArray()).
1.1.0 - 2018-08-05
- Add
AbstractTypedArray::merge(). - Add
AbstractTypedArray::setUniqueValues()andAbstractTypedArray::isUniqueValues(). - Add
AbstractTypedArray::setExceptionOnNonUniqueValue()andAbstractTypedArray::isExceptionOnNonUniqueValue(). - Add
AbstractTypedArray::__construct()$uniqueValuesand$exceptionOnNonUniqueValueparameters.
1.0.1 - 2018-08-05
- Change array type hint to iterable in
AbstractTypedArray::__construct().
- Create
\IntArray,\IntNullableArray,\StringArray,\StringNullableArrayand\ObjectArray.