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
There's no valid use case for applying the same extension twice to any class, and having an extension applied twice means hooks fire twice which will only ever cause problems.
If an extension is applied, and that extension is already present, a warning or exception should be thrown. Probably an exception.
Things to consider:
Is suddenly throwing an exception a breaking change?
If someone does have some "valid" use case for this scenario (which I don't think is possible but I've been wrong before), throwing an exception would break their use case.
Do we check for class inheritance? e.g. I have Versioned applied, I make a MyVersionedSubclass extends Versioned and apply it. Does this throw the same warning or exception?
I think it should, since the subclass will have all the same methods the original class does and therefore cause the same problems as if the original class was applied a second time
The text was updated successfully, but these errors were encountered:
There's no valid use case for applying the same extension twice to any class, and having an extension applied twice means hooks fire twice which will only ever cause problems.
If an extension is applied, and that extension is already present, a warning or exception should be thrown. Probably an exception.
Things to consider:
Versioned
applied, I make aMyVersionedSubclass extends Versioned
and apply it. Does this throw the same warning or exception?The text was updated successfully, but these errors were encountered: