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.
Problem/Motivation
menu_test_theme_page_callback()
is marked as @deprecated.
Proposed resolution
Remove the usages of menu_test_theme_page_callback()
as well as the function itself.
Remaining tasks
User interface changes
API changes
Data model changes
Beta phase evaluation
Issue category | Bug because @deprecated code is buggy. |
---|---|
Issue priority | Normal because the code is functional. |
Prioritized changes | Prioritized because we are removing a @deprecated function. |
Disruption | Totally not disruptive because it's not widely called. |
Comment | File | Size | Author |
---|---|---|---|
#18 | interdiff-16-18.txt | 496 bytes | sdstyles |
#18 | 2563801-18.patch | 4.69 KB | sdstyles |
#2 | remove-usage-menu-test-page-callback-2563801-1.patch | 1.44 KB | rashid_786 |
#5 | remove-usage-menu-test-page-callback-2563801-5.patch | 1.42 KB | rashid_786 |
#7 | interdiff-2563801-5-7.txt | 1.29 KB | rashid_786 |
Comments
Comment #2
rashid_786 CreditAttribution: rashid_786 as a volunteer commentedfiled an issue also to remove the callback itself #2564161.
Comment #3
rashid_786 CreditAttribution: rashid_786 as a volunteer commentedComment #4
Mile23Thanks. :-)
A couple things:
$inherited is documented as being optional, but isn't optional in the code. We should follow the code for this refactoring, so change the docs so $inherited isn't optional.
Adds whitespace.
Comment #5
rashid_786 CreditAttribution: rashid_786 as a volunteer commentedupdated patch with suggested changes.
Comment #6
NikhilValand CreditAttribution: NikhilValand commentedIn general, all lines of code should not be longer than 80 characters.
https://www.drupal.org/coding-standards#linelength
In general, all lines of code should not be longer than 80 characters.
https://www.drupal.org/coding-standards#linelength
Comment #7
rashid_786 CreditAttribution: rashid_786 as a volunteer commentedline length has been reduced less than 80 characters.
Comment #8
lachezar.valchev CreditAttribution: lachezar.valchev at FFW commentedHi all,
I will make a review on this today :)
BR.
Comment #9
lachezar.valchev CreditAttribution: lachezar.valchev at FFW commentedHi,
The patch applies nice on the latest 8.0.x-dev.
However, when run it through the Coder, there are a couple of errors listed below.
Doc comment short description must be on the first line.
Whitespace found at end of line.
Line indented incorrectly; expected 6 spaces, found 4.
Comment #10
keopxChanges applied
Comment #11
oenie CreditAttribution: oenie commentedLooks ok to me, RTBC ?
Comment #12
lachezar.valchev CreditAttribution: lachezar.valchev at FFW commentedHi,
Patch applies nicely and looks good to me as well.
Regards,
Lachezar
Comment #13
alexpottThese are services - we should be injecting them into the controller properly rather than using
\Drupal
.If MenuTestController extended ControllerBase this would be simply a matter of implementing a
create
method.Comment #14
alexpottAlso given this is a test method I think removal of
menu_test_theme_page_callback()
in this issue is fine too. It is test code.Comment #15
joshi.rohit100Comment #16
sdstyles CreditAttribution: sdstyles at FFW commentedAlso according to #14 removed menu_test_theme_page_callback()
Comment #17
Mile23Looks great, except for one thing:
Improper docblock alignment.
Sooooooo close. :-)
Comment #18
sdstyles CreditAttribution: sdstyles at FFW commentedFixed.
Comment #19
sdstyles CreditAttribution: sdstyles at FFW commentedComment #20
Mile23Diggit. :-)
RTBC unless it fails.
Comment #21
alexpottCommitted 17a9dac and pushed to 8.0.x. Thanks!
Comment #24
andypost