Problem/Motivation
New pipeline in 11.x running today hits:
------ ----------------------------------------------------------------------
Line core/tests/Drupal/Tests/Core/Controller/TitleResolverTest.php
------ ----------------------------------------------------------------------
295 Class Drupal\Tests\Core\Controller\ArgumentResolverInterface not
found.
🪪 class.notFound
💡 Learn more at https://phpstan.org/user-guide/discovering-symbols
296 Trying to mock an undefined method getArguments() on class
Drupal\Tests\Core\Controller\ArgumentResolverInterface.
🪪 phpunit.mockMethod
------ ----------------------------------------------------------------------
[ERROR] Found 2 errors
I believe this is caused by the cherry-pick of https://www.drupal.org/project/drupal/issues/3607968 to 11.x
Steps to reproduce
See: https://git.drupalcode.org/project/drupal/-/jobs/11286435
Proposed resolution
Add:
use Symfony\Component\HttpKernel\Controller\ArgumentResolverInterface;
...to: core/tests/Drupal/Tests/Core/Controller/TitleResolverTest.php
Remaining tasks
I'll submit an MR for this in a short while unless anyone beats me to it.
User interface changes
Introduced terminology
API changes
Data model changes
Release notes snippet
Issue fork drupal-3614402
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:
- 3614402-3607968-broke-tests
changes, plain diff MR !16513
Comments
Comment #2
mcdruid commentedComment #4
mcdruid commentedAdding the use statement might have addressed a phpstan issue, but it actually looks like the cherry-pick is not compatible with older PHP (8.3 and 8.4) as it uses the newer "closures in constant expressions" feature.
For example:
Comment #5
longwaveOh I didn't realise this was only in 8.5: https://wiki.php.net/rfc/closures_in_const_expr
I think we should revert that other issue, at least from 11.x.
Comment #6
longwaveThe original issue was reverted from 11.x, nothing more to do here, let's continue over there.