Skip to content

Refactor/dto collections#7430

Open
michaelKaefer wants to merge 2 commits intoEasyCorp:4.xfrom
michaelKaefer:refactor/dto-collections
Open

Refactor/dto collections#7430
michaelKaefer wants to merge 2 commits intoEasyCorp:4.xfrom
michaelKaefer:refactor/dto-collections

Conversation

@michaelKaefer
Copy link
Contributor

Mini refactor. For easier review I did two commits.

Please feel free to decline it, it is really a minor thing..

Notes:

  • Contains a minor BC break. If someone uses CollectionInterface as a type hint and for example an object of FilterCollection is passed as an argument it will throw an error. I guess this is an absolute edge case (and if it exists somewhere it can be fixed easily).
  • Deprecates CollectionInterface because it is not used nor needed. I checked in Symfony core, here I only found collections, bags, lists etc. that directly implement SPL interfaces.
  • Deprecates the static factory methods just because I found no reason why the constructor is private and an extra factory method is needed. (I understand that DTO collections are no services and they do not use service injection in the constructor via the container but in Symfony these collections, bags, lists, etc. all have a public constructor and no static factory method).

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant