Skip to content

Update kununu/collections requirement from ^7.0 to ^7.0 || ^8.0#108

Open
dependabot[bot] wants to merge 1 commit into
mainfrom
dependabot/composer/kununu/collections-tw-7.0or-tw-8.0
Open

Update kununu/collections requirement from ^7.0 to ^7.0 || ^8.0#108
dependabot[bot] wants to merge 1 commit into
mainfrom
dependabot/composer/kununu/collections-tw-7.0or-tw-8.0

Conversation

@dependabot

@dependabot dependabot Bot commented on behalf of github Jun 27, 2026

Copy link
Copy Markdown
Contributor

Updates the requirements on kununu/collections to permit the latest version.

Release notes

Sourced from kununu/collections's releases.

Version 8.0

What's Changed

Major release. See Backwards compatibility below before upgrading.

Added

  • Collection::intersect(self $other): self|static
    • Returns a new collection with the intersection between two collections of the same type (throws NotSameCollectionTypeException if the other collection is not the same type).
  • Collection::merge(self ...$others): self|static
    • Returns a new collection with the items of this collection followed by the items of the given ones.
    • Items are added through the collection's own append, so any overridden append logic (validation, transformation, keying) is honored.
    • Same-type guard as diff/intersect.
  • Collection::collectionOrNull(): self|static|null
    • Returns null when the collection is empty, otherwise the collection itself.
  • Exception\NotSameCollectionTypeException
    • Thrown by diff, intersect, and merge when the other collection is not the same type
    • Extends InvalidArgumentException, so existing catch (InvalidArgumentException) handlers keep working.
  • AbstractBasicItem::getAllProperties is now cached per class, instead of being recomputed on each new call.
  • KeyValueInterface - a shared interface for key-value containers, implemented by both KeyValue and EnumKeyValue\AbstractEnumKeyValue.
  • KeyValueTrait - extracts the shared storage, iteration, and ArrayAccess behavior of the key-value containers so it can be reused by custom implementations.
  • EnumKeyValue\AbstractEnumKeyValue now supports ArrayAccess (e.g. $item['key']), inherited from the shared KeyValueTrait.

Changed

  • @phpstan-require-extends ArrayIterator was added to CollectionTrait and FilterableCollectionTrait to document (and let static analysis surface) the existing requirement that these traits can only be used by classes extending ArrayIterator.
  • KeyValue and EnumKeyValue\AbstractEnumKeyValue now implement the new KeyValueInterface (previously each declared the underlying ArrayAccess/Countable/IteratorAggregate/FromArray/FromIterable/ToArray interfaces individually). All existing instanceof checks against those interfaces continue to hold.
  • Documentation updated for the new methods.

Backwards compatibility

  • Extending AbstractCollection/AbstractFilterableCollection the upgrade is drop-in
    • The new methods (intersect, merge, collectionOrNull) are inherited automatically
    • No action needed unless your subclass already declares a method with one of those names
      • Incompatible signature ⇒ fatal Declaration ... must be compatible with ... error at class load.
        • Rename your method or align its signature with the interface.
      • Compatible signature ⇒ no error, but your implementation silently overrides the library's.
        • Verify that is intended (and that nothing relied on the new built-in behavior).
  • Direct implementers of Collection (not extending the abstract classes/not using CollectionTrait) must add the three new methods to satisfy the interface.
  • Exception type:
    • diff, intersect, and merge now throw Exception\NotSameCollectionTypeException instead of a plain InvalidArgumentException when the other collection is not the same type
    • It extends InvalidArgumentException, so catch (InvalidArgumentException) keeps working
      • Update any assertions or checks that compare the exact exception class.
  • AbstractEnumKeyValue now also implements ArrayAccess. This is additive — no action needed. (Only relevant if a subclass already declared its own offset* methods, which would now override the inherited ones.)

Other

... (truncated)

Changelog

Sourced from kununu/collections's changelog.

[8.0.0] - 2026-06-22

Major release. See Backwards compatibility below before upgrading.

Added

  • Collection::intersect(self $other): self|static
    • Returns a new collection with the intersection between two collections of the same type (throws NotSameCollectionTypeException if the other collection is not the same type).
  • Collection::merge(self ...$others): self|static
    • Returns a new collection with the items of this collection followed by the items of the given ones.
    • Items are added through the collection's own append, so any overridden append logic (validation, transformation, keying) is honored.
    • Same-type guard as diff/intersect.
  • Collection::collectionOrNull(): self|static|null
    • Returns null when the collection is empty, otherwise the collection itself.
  • Exception\NotSameCollectionTypeException
    • Thrown by diff, intersect, and merge when the other collection is not the same type
    • Extends InvalidArgumentException, so existing catch (InvalidArgumentException) handlers keep working.
  • AbstractBasicItem::getAllProperties is now cached per class, instead of being recomputed on each new call.
  • KeyValueInterface - a shared interface for key-value containers, implemented by both KeyValue and EnumKeyValue\AbstractEnumKeyValue.
  • KeyValueTrait - extracts the shared storage, iteration, and ArrayAccess behavior of the key-value containers so it can be reused by custom implementations.
  • EnumKeyValue\AbstractEnumKeyValue now supports ArrayAccess (e.g. $item['key']), inherited from the shared KeyValueTrait.

Changed

  • @phpstan-require-extends ArrayIterator was added to CollectionTrait and FilterableCollectionTrait to document (and let static analysis surface) the existing requirement that these traits can only be used by classes extending ArrayIterator.
  • KeyValue and EnumKeyValue\AbstractEnumKeyValue now implement the new KeyValueInterface (previously each declared the underlying ArrayAccess/Countable/IteratorAggregate/FromArray/FromIterable/ToArray interfaces individually). All existing instanceof checks against those interfaces continue to hold.
  • Documentation updated for the new methods.

Backwards compatibility

  • Extending AbstractCollection/AbstractFilterableCollection the upgrade is drop-in
    • The new methods (intersect, merge, collectionOrNull) are inherited automatically
    • No action needed unless your subclass already declares a method with one of those names
      • Incompatible signature ⇒ fatal Declaration ... must be compatible with ... error at class load.
        • Rename your method or align its signature with the interface.
      • Compatible signature ⇒ no error, but your implementation silently overrides the library's.
        • Verify that is intended (and that nothing relied on the new built-in behavior).
  • Direct implementers of Collection (not extending the abstract classes/not using CollectionTrait) must add the three new methods to satisfy the interface.
  • Exception type:
    • diff, intersect, and merge now throw Exception\NotSameCollectionTypeException instead of a plain InvalidArgumentException when the other collection is not the same type
    • It extends InvalidArgumentException, so catch (InvalidArgumentException) keeps working
      • Update any assertions or checks that compare the exact exception class.
  • AbstractEnumKeyValue now also implements ArrayAccess. This is additive — no action needed. (Only relevant if a subclass already declared its own offset* methods, which would now override the inherited ones.)

Other

  • Introduce CHANGELOG.md
  • Update CI components and dev dependencies
  • Added a suggest entry for phpunit/phpunit (only needed by consumers extending AbstractCollectionTestCase).
  • composer test/composer test-coverage now run with zend.assertions=1, matching CI.

... (truncated)

Commits

Most Recent Ignore Conditions Applied to This Pull Request
Dependency Name Ignore Conditions
kununu/collections [>= 6.a, < 7]

You can trigger a rebase of this PR by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

Updates the requirements on [kununu/collections](https://github.com/kununu/collections) to permit the latest version.
- [Release notes](https://github.com/kununu/collections/releases)
- [Changelog](https://github.com/kununu/collections/blob/main/CHANGELOG.md)
- [Commits](kununu/collections@v7.0.0...v8.0.0)

---
updated-dependencies:
- dependency-name: kununu/collections
  dependency-version: 8.0.0
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot Bot added the dependencies Pull requests that update a dependency file label Jun 27, 2026
@dependabot dependabot Bot requested a review from csizmazia as a code owner June 27, 2026 15:53
@sonarqubecloud

Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
C Security Rating on New Code (required ≥ A)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants