You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Howdy @andrewtch - not a bad idea and I can envision a use case for this. I don't foresee us shooting down a PR for this new functionality. Although, I do favor @Maker\Skip or some variation along those lines instead of skipping inherited methods / properties.
@jrushlow - the only drawback in @maker\Skip is that Maker does not use any annotation :) introducing a single annotation with a pretty edge use case may be a bit too much.
The problem actually is not about the skipping fields, but about the incorrect typehint for inherited methods.
Can we add an annotation like
@Maker\Skip
to entity fields so getters / setters are not regenerated with --regenerate --overwrite command?The use case applies to Gedmo PersonalTranslations, for example. If you use it you have a field in your entities, $object, which is defined like so:
there are getters / setters without type in mapped superclass, so when maker bundle generates
setObject(Product $object)
, it breaks inheritance.Another option would be skipping getter / setter generation if there is one in parent class.
What do you think?
Edit: Oh, it seems like I've have had a similar issue with Traits couple years ago #181
The text was updated successfully, but these errors were encountered: