contao / manager-plugin

Contao Manager Plugin
GNU Lesser General Public License v3.0
4 stars 9 forks source link

Allow plugins to be disabled dynamically #53

Closed aschempp closed 1 year ago

aschempp commented 1 year ago

This allows plugins to be disabled dynamically, e.g. for validation a license.

It is intentionally called "DisabledPlugin" because

  1. there already is a mechanism to disable plugins for packages
  2. plugins are enabled by default, so the interface is only required to explicitly disable.
m-vo commented 1 year ago

What I don't get conceptually is: How would you decide if a plugin is disabled or not? You do not have access to the container for instance. So file system access on every request? Because otherwise you could as well check it once in getBundles() (and return [] in case).

aschempp commented 1 year ago

What I don't get conceptually is: How would you decide if a plugin is disabled or not? You do not have access to the container for instance. So file system access on every request? Because otherwise you could as well check it once in getBundles() (and return [] in case).

That's a question we can't really answer just yet. Our idea was that one could e.g. do a license check, but yes it obviously needs to be something very low-work. Maybe we should discuss the idea again.

aschempp commented 1 year ago

As discussed on the Contao Call we don't want to add this feature. It potentially causes issues if a plugin is disabled at runtime, and it still is possible to bypass all existing methods in a plugin if really necessary.