Part of #1971384: [META] Convert page callbacks to controllers

For instructions on how to convert a page callback into a controller, see the WSCCI Conversion Guide.

Files: 
CommentFileSizeAuthor
#14 interdiff.txt708 bytesjuampy
#14 drupal-convert_menu_login_callback-1987734-14.patch3.14 KBjuampy
PASSED: [[SimpleTest]]: [MySQL] 57,219 pass(es).
[ View ]
#9 drupal-convert_menu_login_callback-1987734-9.patch3.04 KBramlev
PASSED: [[SimpleTest]]: [MySQL] 57,995 pass(es).
[ View ]
#3 drupal-convert_menu_login_callback-1987734-3.patch2.96 KBInternetDevels
PASSED: [[SimpleTest]]: [MySQL] 58,160 pass(es).
[ View ]

Comments

Assigned:Unassigned» damiankloip

I'll knock this one off the list.

As this issue hasn`t been fixed yet we are going to work on it today during Code Sprint UA

Assigned:InternetDevels» Unassigned
Status:Active» Needs review
Issue tags:+CodeSprintUA
StatusFileSize
new2.96 KB
PASSED: [[SimpleTest]]: [MySQL] 58,160 pass(es).
[ View ]

Patch attached.

Status:Needs review» Reviewed & tested by the community

#3 looks good
due to CodeSprintUA - bot overloaded and patch successfully run on dev server via all tests
If bot green - RTBC

Status:Reviewed & tested by the community» Needs work
Issue tags:-WSCCI-conversion, -CodeSprintUA

The last submitted patch, drupal-convert_menu_login_callback-1987734-3.patch, failed testing.

Status:Needs work» Needs review
Issue tags:+WSCCI-conversion, +CodeSprintUA

Status:Needs review» Reviewed & tested by the community

This was just a random test error.

Assigned:Unassigned» ramlev

Status:Reviewed & tested by the community» Needs review
StatusFileSize
new3.04 KB
PASSED: [[SimpleTest]]: [MySQL] 57,995 pass(es).
[ View ]

Rerolled the patch to work on 8.x

Status:Needs review» Needs work

+++ b/core/modules/system/tests/modules/menu_test/lib/Drupal/menu_test/TestControllers.phpundefined
@@ -15,6 +15,13 @@
class TestControllers {

Missing documentation blocks in this file, plus the class should implement ControllerInterface.

See https://drupal.org/node/1953346 for an example.

+++ b/core/modules/system/tests/modules/menu_test/lib/Drupal/menu_test/TestControllers.phpundefined
@@ -15,6 +15,13 @@
+   * Returns page to be used as a login path.

This needs a docblock.

Ignore my comment above.

I wonder why this is not a controller and instead is a POPO. Shouldn't this implement ControllerInterface?

Status:Needs work» Reviewed & tested by the community

I think this is fine, as you only really need ControllerInterface if you have dependencies you need to inject.

Status:Reviewed & tested by the community» Needs work

+++ b/core/modules/system/tests/modules/menu_test/menu_test.moduleundefined
@@ -314,8 +314,7 @@ function menu_test_menu() {
   $items['menu_login_callback'] = array(
     'title' => 'Used as a login path',
-    'page callback' => 'menu_login_callback',
-    'access callback' => TRUE,
+    'route_name' => 'menu_login_callback',
   );

let's remove the whole menu item here...

Status:Needs work» Needs review
StatusFileSize
new3.14 KB
PASSED: [[SimpleTest]]: [MySQL] 57,219 pass(es).
[ View ]
new708 bytes

Here you are.

Status:Needs review» Reviewed & tested by the community

Perfect. Potentially you dropped the "()" but I don't care at all.

Status:Reviewed & tested by the community» Fixed

Committed 35ab9ae and pushed to 8.x. Thanks!

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