Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Problem/Motivation
It would be good to wrap this check into a service that can be extended, tested and overridden.
Proposed resolution
Write a service to handle this functionality.
Remaining tasks
Patch.
User interface changes
None.
API changes
Function is removed, service is added.
Data model changes
None.
Comment | File | Size | Author |
---|---|---|---|
#3 | 2642142-checker-service.patch | 5.65 KB | Sam152 |
|
Comments
Comment #2
Sam152 CreditAttribution: Sam152 as a volunteer and at PreviousNext commentedComment #3
Sam152 CreditAttribution: Sam152 as a volunteer and at PreviousNext commentedComment #5
Sam152 CreditAttribution: Sam152 as a volunteer and at PreviousNext commentedSetting back to needs review, the fails are an error with the bot.
Comment #6
Sam152 CreditAttribution: Sam152 as a volunteer and at PreviousNext commentedComment #7
jibranService can have some unit tests.
This name is misleading imo should be config. settings mean something else in Drupal world.
Let's use $request here.
Can we convert this function to some static method?
Comment #8
Sam152 CreditAttribution: Sam152 as a volunteer and at PreviousNext commentedThere is a ticket to add tests, but I am focusing on getting everything out of the module file first.
Settings is the name of the config object. A new issue can be opened to clarify settings/config. This was basically meant to be a straight move into a service.
$this->settings = $config->get('colorbox.settings');
Good idea.
A later patch removes the need for this function.
Comment #9
frjo CreditAttribution: frjo commentedCommitted to 8-dev, thanks!
Comment #10
frjo CreditAttribution: frjo commented