- Issue created by @kim.pepper
- Status changed to Needs review
11 months ago 11:59pm 19 December 2023 - Status changed to RTBC
11 months ago 2:29pm 20 December 2023 - πΊπΈUnited States smustgrave
Searched for drupal_check_module and the 1 instance has been replaced. CR is there. Think this is good.
- Status changed to Needs review
11 months ago 10:46pm 20 December 2023 - π¬π§United Kingdom catch
I'm not sure how useful this is as an API - what about moving the logic to a protected method on the form itself with no replacement? Does any contrib module call this function?
- π«π·France andypost
4 usages in contrib http://codcontrib.hank.vps-private.net/search?text=drupal_check_module&f...
- π¦πΊAustralia kim.pepper πββοΈπ¦πΊSydney, Australia
There is also very similar/duplicated code for checking run-time requirements in
SystemManager::checkRequirements()
https://git.drupalcode.org/project/drupal/-/blob/11.x/core/modules/syste... - Status changed to Needs work
11 months ago 8:43am 21 December 2023 - π¬π§United Kingdom catch
The page attachments examples from http://codcontrib.hank.vps-private.net/search?text=drupal_check_module&f... look like a bad idea, those modules could directly check their own requirements rather than jump through hoops. mmu is a reasonable example though because it's re-implementing the modules page, but then that's only one or two usages.
The ::getMaxSeverity() method on SystemManager looks identical to the one added here, so we could maybe call that from the form, or move the other helpers into SystemManager? But we definitely shouldn't duplicate that method, so marking needs work.
- π¦πΊAustralia kim.pepper πββοΈπ¦πΊSydney, Australia
Hmm. System manager looks like it deals runtime requirements but also with blocks of Menu Links??
Maybe we should expand this to move the runtime requirements checks from SystemManager to the new RequirementsChecker instead?
\Drupal\system\SystemManager::listRequirements()
actually callsdrupal_load_updates()
which depends onModuleExtensionList
as well. - π¦πΊAustralia kim.pepper πββοΈπ¦πΊSydney, Australia
Checking install and runtime requirements seem to be very different. Perhaps we should just move
getMaxSeverity()
to a utility class instead. - Status changed to Needs review
11 months ago 8:41pm 25 December 2023 - π¦πΊAustralia kim.pepper πββοΈπ¦πΊSydney, Australia
Back to needs review to see if you like this approach.
- Status changed to Needs work
11 months ago 9:32pm 25 December 2023 - π¦πΊAustralia kim.pepper πββοΈπ¦πΊSydney, Australia
I've made changes over at π Add value objects to represent the return of hook_requirements Needs review