You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As a developer I want to use a drupal module that uses PHP best practices like dependency injection.
Technical Requirements
Research Symphony and Drupal Services. See if it makes sense to implement API endpoints as symphony services
Update module to use service instead of raw calls to PHPSDK
Add any phpunit tests as necessary.
Background
This module currently very much uses a D7 pattern, of using \Drupal::config() (~ variable_get()) and then instantiating objects all over the place.
Instead of exposing services that have their configuration injected, and those services can then be injected again, without every piece of code needing to retrieve the configuration and instantiate such an object again with that configuration.
I've done some cursory research from what I can tell it makes the most sense to implement the service in CloudFlare rather than PHPSDK due to the dependencies on CMI.
Business Requirements
Technical Requirements
Background
This module currently very much uses a D7 pattern, of using
\Drupal::config()
(~variable_get()
) and then instantiating objects all over the place.Instead of exposing services that have their configuration injected, and those services can then be injected again, without every piece of code needing to retrieve the configuration and instantiate such an object again with that configuration.
Clear example of this: https://github.com/wimleers/cloudflare/commit/3281a7d74033b3ee2ab13834cd2bf24e327c62bc#diff-a35ab1b58293fa8fcf5e19b41a5f79e8L104.
The text was updated successfully, but these errors were encountered: