OpenMage / magento-lts

Official OpenMage LTS codebase | Migrate easily from Magento Community Edition in minutes! Download the source code for free or contribute to OpenMage LTS | Security vulnerability patches, bug fixes, performance improvements and more.
https://www.openmage.org
Open Software License 3.0
863 stars 438 forks source link

feature request: Event for configuration actions (save/delete) on path #3977

Open pquerner opened 1 month ago

pquerner commented 1 month ago

Description (*)

In my opinion OpenMage could need a few new events around configuration alteration or deletion. A general event such as core_config_data_delete_commit_after is already thrown, but maybe a core_config_data_delete_<xml_path> is more readable.

Expected behavior (*)

Add event so that a listener can be set on a specific xml_path. Or even specific value. (When XML Path changes from X to Y, or its new value is Z)

Benefits

For example, if you ever wanted to know that a specific path was changed for the system configuration, so that you can run an observer on it.

Additional information

Right now you may listen on core_config_data_delete_commit_after and the others, which kinda works but often adds boilerplate code to find out which xml path was changed. Or what the new value is (I think that info is even missing, aka old value <> new value)

fballiano commented 1 month ago

If we have a PR I think we can accept that

hirale commented 1 month ago

some third-party modules like admin action logs have something similar