Closed (fixed)
Project:
OhDear Integration
Version:
2.x-dev
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
21 Nov 2023 at 17:12 UTC
Updated:
28 Mar 2024 at 15:24 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
casey commentedIn development environments the api key is typically not provided. When the api key is missing currently every drush call triggers at least one " [error] OhDear site id is missing! Fix it ..."
Comment #3
useernamee commented@casey - good point - should we add some checkbox to tell the module that the site is not online? Or maybe we should just handle missing API key differently (e.g. we could move the functionality into submodule).
Are there any good examples from other modules, how they handle similar scenarios?
Comment #4
useernamee commentedI've checked the patch.
ohdear_integration.settingsservice should be removed as well from services.yml file.Then from:
- https://git.drupalcode.org/project/ohdear_integration/-/blob/2.x/src/OhD...
Otherwise the patch looks good. It just need a few more things to take care of.
Comment #7
roderikI did the requested, and/but:
ohdear_integration.settingsfrom the service file, because this is a published stable module and its users might be using the service. Instead, there's a deprecation message now. Maybe you can do a followup task for removing them in v3.I hope you don't mind long lines because I just replaced
ohDearIntegrationSettingswithconfigFactory->get('ohdear_integration.settings')on the same single line.Tested, after a 'drush cr', to make sure I didn't do anything dumb:
OhDearIntegrationControllerandOhDearSdkService::getSiteId()Did not test:
OhDearSdkService::getSite()- because I have no Ohdear API key/settings handy. Reviewed the change, and it looks right / functionally-unchanged to me.Comment #8
useernamee commentedReviewed and it looks good.
Thank you @casey & @roderik for you contributions.
Comment #10
useernamee commented