Problem/Motivation
Hit what looks to be a straight up bug in main while porting tome to D12 - this route provider in kernel tests has a return type of array https://git.drupalcode.org/project/drupal/-/blob/main/core/tests/Drupal/... but the inner provider returns an iterator https://git.drupalcode.org/project/drupal/-/blob/main/core/lib/Drupal/Co...
Failing build in tome https://git.drupalcode.org/project/tome/-/jobs/10863619
Steps to reproduce
Proposed resolution
Fix the return type
Remaining tasks
User interface changes
Introduced terminology
API changes
Data model changes
Release notes snippet
Issue fork drupal-3610170
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
- 3610170-incorrect-return-type
changes, plain diff MR !16297
Comments
Comment #3
larowlanNot sure if this warrants a test, its test code where the bug is
Comment #4
godotislateThis seems fine, though I assume the code in question is not used in any core tests, otherwise an error would have surfaced by now.
One q: RouteProviderInterface is documented like this:
We should probably update that doc, either by replacing the array return type with iterator if it's safe, or maybe making it array or iterator. Can probably be done in a follow up though?
Comment #5
larowlanYou're right - I think we should fix that here as those docs are probably why we ended up with this bug
We have a kernel test for the concrete route provider so I can add a new method that exercises the get all method so we at least have some calls/coverage
Comment #6
larowlanComment #7
larowlanTest only job passes because the actual bug is in a test folder, so that doesn't get reverted
Comment #8
godotislatelgtm
Comment #10
catchCommitted/pushed to main, thanks!