Skip to content

Emit warnings when using non-abstract base classes when creating plugins#41

Merged
matthiask merged 1 commit intomainfrom
mk/warnings
Feb 5, 2026
Merged

Emit warnings when using non-abstract base classes when creating plugins#41
matthiask merged 1 commit intomainfrom
mk/warnings

Conversation

@matthiask
Copy link
Member

@matthiask matthiask commented Feb 4, 2026

Ich würde gerne diese Warnungen hinzufügen, aber evtl. übersehe ich Use Cases dafür?

Ich habe die Idee, dass es normalerweise oder immer ein Fehler ist, wenn Plugins erstellt werden mit Multi Table Inheritance.

Copy link
Collaborator

@fabiangermann fabiangermann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mir fällt kein bestehender Use Case ein. Und alles was ich mir potentiell vorstellen könnte, wäre auch auf anderem Weg lösbar.

@matthiask
Copy link
Member Author

matthiask commented Feb 5, 2026

Ich habe einen Use Case gefunden, und zwar die Proxies, welche wir zB im JSON Editor verwenden (für JSON Plugins, Structured Data etc.) -- dort haben wir eine nicht-abstrakte Base Class, aber wir könnten in diesem Fall zusätzlich das proxy Flag prüfen.

D.h. der Check dürfte erst beim class_prepared Signal ausgeführt werden. Oder besser, evtl. sollte es sowieso einfach ein System Check sein.

Copy link

@yoshson yoshson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mir fällt sonst auch kein Use Case ein.

Immer wenn man konkrete Objekte (nicht ContentEditor) verwenden will, würde man wohl direkt eine Referenzfeld darauf für das Content-Element nehmen. Sonst wäre es wohl ein ziemlich spezieller Fall und man kann die Warnung immer noch ignorieren?

@matthiask matthiask merged commit d68445a into main Feb 5, 2026
4 checks passed
@matthiask matthiask deleted the mk/warnings branch February 5, 2026 15:12
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.

3 participants