impresscms icon indicating copy to clipboard operation
impresscms copied to clipboard

Replace icms_Event with some composer events lib

Open MekDrop opened this issue 7 years ago • 5 comments

Currently we have semi implemented events management class. Some classes in our core use own events handlers (f.e. ipf handler). So, there are some extra code and pain how to manage all this related code. My solution is use some events management library.

I think cakephp/event looks best for us. It could be used both in other classes and as static class. Maybe two things that it misses and could be useful for us are wide events triggering (like phpleague/events has) and non-blocking events handling. But that we could leave for a while not implemented in our core.

MekDrop avatar Feb 15 '18 10:02 MekDrop

I agree with you that in order to make the system more flexible, we absolutely need to be able to trigger or be triggered by events in other modules or objects. There was a start with icms_Events, but it isn't really used to its potential.

I was afraid that the cakephp code would require us to include large parts of cakephp, but it seems that isn't the case. It looks easy to implement so I would go for that.

If this event handling is done well, it can make parts of the code much easier. For example the registration procedure could be split in several parts, and the conclusion of each part could be a different event. That way, you could for example add a validation to a step by just subscribing the validation to an event, all withouth having to change your login code.

fiammybe avatar Feb 15 '18 10:02 fiammybe

This issue was automatically marked as stale

github-actions[bot] avatar May 28 '21 07:05 github-actions[bot]

Just to make not from stale bot this ticket disappear, I will look into.

MekDrop avatar Oct 11 '22 08:10 MekDrop

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or assign sombody or this will be closed in 5 days.

github-actions[bot] avatar Dec 31 '22 02:12 github-actions[bot]

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or assign sombody or this will be closed in 5 days.

github-actions[bot] avatar Mar 06 '23 02:03 github-actions[bot]