IdType.IdList::fromMapIgnoringNull(callable $mapFunction): static.digital-craftsman/self-aware-normalizers and added denormalizeWhenNotNull for Id and IdList.digital-craftsman/self-aware-normalizers to use the first stable version.digital-craftsman/self-aware-normalizers to get rid of deprecations in PHP 8.4.digital-craftsman/self-aware-normalizers.IdListType in favor of ArrayNormalizableType of digital-craftsman/self-aware-normalizers.toString(): string to Id.mapWithIdKeys(callable $mapFunction): array to IdList.Id and IdList.$exception to $otherwiseThrow in the guard methods of Id and IdList to make it more clear what the parameter does when using named parameters.Id and IdList. This allows for more specific exceptions when the guard fails.Example of using the new (optional) parameter:
$requestingUser->userId->mustNotBeEqualTo(
$command->targetUserId,
static fn () => new Exception\UserCanNotTargetItself(),
);
Reached stability after 2 years of usage in multiple scaled production systems.
readonly keyword to Id and IdList.removeId from IdList to throw an exception when the id is not in the list. This is the same behaviour as the addId method has.IdList now use the string representation of an id as key instead of the index.removeIdWhenInList(Id $id): static to IdList.addIds(self $idList): static to IdList.addIdsWhenNotInList(self $idList): static to IdList.removeIds(self $idList): static to IdList.removeIdsWhenInList(self $idList): static to IdList.notContainsEveryId(self $idList): bool to IdList.containsNoneIds(self $idList): bool to IdList.mustNotContainEveryId(self $idList): void to IdList.mustContainNoneIds(self $idList): void to IdList.fromIdStrings to IdList.IdList's diff method behaves to match array_diff's behavior.
IdList containing all elements that were present in the IdList itself but not in the given IdList (method parameter) as well as all elements that were in the given IdList (method parameter) but not in the IdList itself.IdList containing only the elements that are present in the IdList itself but not in the given IdList (method parameter).containsEveryId(self $idList): bool to IdList.containsSomeIds(self $idList): bool to IdList.mustContainEveryId(self $idList): void to IdList.mustContainSomeIds(self $idList): void to IdList.idAtPosition, mustNotContainDuplicateIds and mustOnlyContainIdsOfHandledClass of IdList from public to private.addIdWhenNotInList doesn't mutate the list.IdList now implements the \IteratorAggregate instead the \Iterator interface to fix comparing lists in tests with equal checks.isExistingInList and isNotExistingInList have been removed. The containsId method of the list class must be used instead.isExistingInList and isNotExistingInList now expect an id list as parameter instead of an array of ids.mustNotBeEmpty(): void to IdList.JSON to JSONB for IdListType to improve comparison performance and enable index creation.final keyword from method generateRandom(): static from Id, so that it can be overridden in subclasses. For example to be able to create UUID version 7 ids instead of the default version 4.public and static to enable automatic registration.OrderedIdList as there weren't enough use cases for it.IdList::fromMap to be static instead of self.mustNotBeEqualTo(self $idList): void to IdList.mustNotBeEqualTo(self $idList): void to OrderedIdList.fromMap(iterable $items, callable $mapFunction): static to IdList.getSupportedTypes to IdNormalizer and IdListNormalizer for new Symfony 6.3 serializer performance improvements.How can I help you explore Laravel packages today?