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.
I noticed the book module was systematically missing a trick to lock down the parameter types specified on its interfaces.
I have added a array prefix to all parameter that need it...
If the test fall over then maybe the annotations were incorrect.
Comment | File | Size | Author |
---|---|---|---|
#4 | interdiff-0-4.txt | 3.96 KB | martin107 |
#4 | array-2431271-4.patch | 7.72 KB | martin107 |
array-0.patch | 3.76 KB | martin107 | |
Comments
Comment #1
martin107 CreditAttribution: martin107 commentedComment #2
martin107 CreditAttribution: martin107 commentedComment #4
martin107 CreditAttribution: martin107 commentedOpps forgot to alter the implementation functions.
Now that I am focusing on it, I see another fly in the ointment, so I have opened up another issue.
#2431297: Remove unused parameter from BookManagerInterface::getActiveTailIds()
Comment #5
martin107 CreditAttribution: martin107 commentedComment #7
dawehnerAt this point in time this would be a BC break, so I fear we have to move this to 9.x
Comment #8
catchWe should look at creating new interfaces with the new methods having correct type hints, then BookManager/BookOutlineStorage could implement both. Then deprecate the old interface + methods. That's doable in a minor release so moving back to 8.x
Comment #12
borisson_Instead of doing this for the book module, we should probably do this with a phpcs rule. If we want to do this, this might have to be merged with #1811202: Add missing type hinting to Update module docblocks? Not sure what the best path forward here is.
Comment #14
joachim CreditAttribution: joachim as a volunteer commentedSounds like this needs further work.
Comment #24
quietone CreditAttribution: quietone at PreviousNext commentedThis extension is being deprecated, see #3376070: [Meta] Tasks to deprecate Book module. It will be removed from core and moved to a contrib project, #3376101: [11.x] [Meta] Tasks to remove Book.
This is now Postponed. The status is set according to two policies. The Remove a core extension and move it to a contributed project and the Extensions approved for removal policies.
This issue may be re-opened if it can be considered critical, If unsure, re-open the issue and ask in a comment.