GetDKAN / dkan

DKAN Open Data Portal
https://dkan.readthedocs.io/en/latest/index.html
GNU General Public License v2.0
374 stars 172 forks source link

Deprecate, disuse EventDispatcherTrait #4313

Open paul-m opened 1 month ago

paul-m commented 1 month ago

Current Behavior

Many services use Drupal\common\EventDispatcherTrait because we needed a backwards-compatibility layer between Drupal 8 and 9. See: https://github.com/GetDKAN/dkan/issues/3592

Currently, no one should be using Drupal 8, and we don't have Drupal 9 in our testing matrix.

Furthermore, services should be injected into other services, avoiding the \Drupal pattern.

So let's deprecate EventDispatcherTrait and remove its usage in DKAN.

Expected Behavior

Steps To Reproduce

See that we use EventDispatcherTrait.

Decide that it's not a good pattern.

Fix it.

Relevant log output (optional)

No response

Anything else?

No response