Closed mfendeksilverstripe closed 6 months ago
This configuration option has been added in Silverstripe CMS 5.1.0.
Configuration properties are public API, so we can't introduce them in patch releases - and we're not doing any new minor releases for Silverstripe CMS 4, so this functionality won't be available in Silverstripe CMS 4.
Nice, good to know :)
Unable to disable dev tasks via static configuration
Affected Version
4.13
Description
There is currently no option to disable a dev task via static configuration. The only option on how to disable a dev task is to use the
$enabled
which requires a code change to be made directly to the dev task. This is all good for the dev tasks within the project code but this approach isn't suitable for dev tasks that are provided by modules. Disabling such dev tasks is important to minimise errors as some module dev tasks can be quite dangerous if executed by accident.Suggestion
Make this property static with the option of runtime override.
Before
After
Workaround
One way hot to do this currently is to subclass every dev task that you want to disable and then disable it in your overriding task class.