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.
Updated: Comment #22
Note to committers: give mparker credit (he worked on two of the conversions):
Issue #1987870 by disasm, mparker | vijaycs85: Convert theme_test() callbacks to a new style controller.
Problem/Motivation
Convert all theme_test module callbacks to a new Controller
Proposed resolution
Remaining tasks
Reviews
Related Issues
#1987594: Convert _theme_test_suggestion() to a new style controller
#1987592: Convert _theme_test_alter() to a new style controller
Original report by @vijaycs85
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.
Comment | File | Size | Author |
---|---|---|---|
#25 | drupal8.theme_test.1987870-25.patch | 8.13 KB | disasm |
#25 | interdiff.txt | 879 bytes | disasm |
#19 | drupal8.system-module.1987870-19.patch | 8.12 KB | disasm |
#19 | interdiff.txt | 2.43 KB | disasm |
#18 | drupal8.system-module.1987870-18.patch | 7.56 KB | disasm |
Comments
Comment #1
vijaycs85Need to rewrite the whole module to make test sync with current test implementation. For more details, please refer: #1988802: [META] Rewrite test modules in system to provide better unit testing.
Comment #2
ayelet_Cr CreditAttribution: ayelet_Cr commentedComment #3
disasm CreditAttribution: disasm commentedComment #4
disasm CreditAttribution: disasm commentedfirst pass. still needs to have drupal_add_css calls converted to a render array.
Comment #6
dawehnerYou should also remove the previous code.
Comment #7
disasm CreditAttribution: disasm commentedconverting drupal_add_css to render array. removing code I forgot to delete.
Comment #9
disasm CreditAttribution: disasm commentedApparently arrays can't be instantiated as objects with the new keyword. In other words, I messed up ;-) Here's a fix.
Comment #10
disasm CreditAttribution: disasm commentedrenaming render_array -> build.
Comment #12
disasm CreditAttribution: disasm commentedactually returning the render array now instead of return some other variable that isn't set.
Comment #14
disasm CreditAttribution: disasm commentedtrying a combination of all three remaining theme_test callbacks.
Comment #16
disasm CreditAttribution: disasm commentedtry again.
Comment #18
disasm CreditAttribution: disasm commentedreverting testTemplate to return theme() to pass tests.
Comment #19
disasm CreditAttribution: disasm commentedadding the last remaining callback in that module for good measure.
Comment #21
disasm CreditAttribution: disasm commented#19: drupal8.system-module.1987870-19.patch queued for re-testing.
Comment #21.0
disasm CreditAttribution: disasm commentedupdate
Comment #22
xjmThanks for your work on this issue! Please see #1971384-43: [META] Convert page callbacks to controllers for an update on the routing system conversion process.
Comment #23
dawehnerI am sorry ... too many whitespaces.
Let's put an empty line between there.
Comment #24
dawehner.
Comment #25
disasm CreditAttribution: disasm commentedchanges requested in #23 completed.
Comment #26
dawehnerThank you very much!
Comment #28
disasm CreditAttribution: disasm commented#25: drupal8.theme_test.1987870-25.patch queued for re-testing.
Comment #29
dawehnerThis was just a random failure.
Comment #30
webchickCommitted and pushed to 8.x. Thanks!
Comment #31.0
(not verified) CreditAttribution: commentedadding related issues.