-
-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Abstracted more repeating code, added abstract for fields, made creat… #6008
base: 4.x
Are you sure you want to change the base?
Abstracted more repeating code, added abstract for fields, made creat… #6008
Conversation
…ion of new fields more streamlined and adapted signature to match possible inputs more strictly.
This comment was marked as outdated.
This comment was marked as outdated.
|
||
public function getAsDto(): FieldDto; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
adding methods to an interface is a BC break, you should use @method annotations instead
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You are right, I am afraid, but using @method will not improve the situation; the opposite is the case, as IDEs would indicate methods that are not even there maybe, creating a booby trap for developers. I am considering a individual Interface for the existing fields, which then would be BC compatible by just extending the given Interface. 🤔 Something like FieldTraitAwareInterface
or similar. Thanks for the heads up!
…ion of new fields more streamlined and adapted signature to match possible inputs more strictly.
This PR streamlines how Fields are generated; instead of lots of code duplication (that increases the costs for maintenance), we can deduct it to an Abstract.
In an attempt to further reduce abstracts, this change can be later on used to even further simplify static calls by having the full API of the fields at hand.