Skip to content

Conversation

@timacdonald
Copy link
Member

The closures registered in the compatibility class are hooks. They also do not have any error handling.

This PR extracts dedicated hook classes for these interactions, adds error handling in case of failures, and then moves their registration into the registerHooks method.

As a potential failure example, imagine the service provider fails and never creates the Core class (possible!), the hooks would then cause issues whenever they ran. The error handling now ensures we do not impact the consuming application.

…FEDD26D60573745254FF765AEED2FBC321B74C908DF9C26D5AEC3F59AEBE01869158F4AF03AC1F5E1
Copy link
Member

@jessarcher jessarcher left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Love this!

@timacdonald timacdonald merged commit 1e65b75 into 1.x Sep 25, 2025
25 checks passed
@timacdonald timacdonald deleted the context-refactor branch September 25, 2025 02:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants