Comments

paravibe’s picture

Assigned: Unassigned » paravibe

I am working on it.

paravibe’s picture

Status: Active » Needs review
StatusFileSize
new42.66 KB

Please review.

irek02’s picture

I applied and test the patch. All looks good except that there is still one occurrence of module_invoke_all() left in core/includes/form.inc:822 :
$forms = module_invoke_all('forms', $form_id, $args);

I didn't find any examples on using Drupal::moduleHandler()->invokeAll('') for forms, so I'm not sure how it should be handled in this case...

paravibe’s picture

This patch also replace in core/includes/form.inc, thanks irek02

benjy’s picture

Status: Needs review » Needs work

Everything looks good apart from module_invoke_all() is still referenced in a few comments. Can we fix those up also.

paravibe’s picture

Status: Needs work » Needs review
StatusFileSize
new49.32 KB

Done ;)

Status: Needs review » Needs work

The last submitted patch, 2045923-6-replace-module_invoke_all-call.patch, failed testing.

paravibe’s picture

Status: Needs work » Needs review
benjy’s picture

Status: Needs review » Needs work

I'm not sure if this should be absolute or not, i know namespaces are meant to be absolute in comments but not sure about the global class thing. Ill try find someone else to review.

+++ b/core/includes/update.incundefined
@@ -1247,22 +1247,22 @@ function update_already_performed($module, $number) {
- * @see module_invoke_all()
+ * @see Drupal::moduleHandler()->invokeAll()
 
benjy’s picture

Status: Needs work » Needs review
benjy’s picture

Status: Needs review » Needs work

@drupalrv discussed in IRC and the rule I'm told is to use absolute so please update the comment to be:

@see \Drupal::moduleHandler()->invokeAll()

and then we should be good to go!

paravibe’s picture

Status: Needs work » Needs review
StatusFileSize
new49.34 KB

OK. Fixed this.

benjy’s picture

Status: Needs review » Needs work

Sorry, I spotted a couple more.

This comment should be absolute reference.

+++ b/core/includes/update.incundefined
@@ -1247,22 +1247,22 @@ function update_already_performed($module, $number) {
+ * This function is similar to Drupal::moduleHandler()->invokeAll(), with the

This should be absolute also.

+++ b/core/modules/simpletest/lib/Drupal/simpletest/UnitTestBase.phpundefined
@@ -15,7 +15,7 @@
+ * watchdog(), module_implements(), Drupal::moduleHandler()->invokeAll() etc.
paravibe’s picture

New one ;)

paravibe’s picture

Status: Needs work » Needs review
paravibe’s picture

Previous patch no longer applies. So please review new one.

benjy’s picture

Status: Needs review » Needs work
+++ b/core/modules/rdf/rdf.moduleundefined
@@ -109,7 +109,7 @@ function rdf_rdf_namespaces() {
+  // namespace, do not use Drupal::moduleHandler()->invokeAll().

Should be absolute.

paravibe’s picture

Status: Needs work » Needs review
StatusFileSize
new49.6 KB

Sorry, missed this.
Please, review another one.

benjy’s picture

Status: Needs review » Reviewed & tested by the community

Looks good.

alexpott’s picture

Status: Reviewed & tested by the community » Needs work

I think we should tackle this is two separate issues - one issue to convert all the prodecural code to use Drupal::module_handler() and another to inject the module handler correctly for all the OO code. A review of the OO code changes will follow...

tim.plunkett’s picture

Status: Needs work » Reviewed & tested by the community
StatusFileSize
new28.16 KB
new17.68 KB
benjy’s picture

Status: Reviewed & tested by the community » Needs work

as per https://drupal.org/node/2045931#comment-7697279 we should be injecting the container in OO code.

tim.plunkett’s picture

Status: Needs work » Reviewed & tested by the community

Yes, this is RTBC just for the procedural patch. The OO patch is just a starting point for a new issue.

benjy’s picture

OK sounds good :)

alexpott’s picture

Title: Replace all module_invoke_all() deprecated function calls. » Replace all module_invoke_all() deprecated function calls in procedural code.
Status: Reviewed & tested by the community » Fixed

Committed the procedural code changes e33ddd1 and pushed to 8.x. Thanks!

Opened #2055371: Replace all module_invoke_all() deprecated function calls in OO code to do the OO code conversion.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.