Problem/Motivation
Method "Symfony\Component\Routing\RequestContext::fromRequest()" will return "static" as of its next major version. Doing the same in child class "Drupal\Core\Routing\RequestContext" will be required when upgrading.
Steps to reproduce
Proposed resolution
Add the "static" return type hint.
Remaining tasks
User interface changes
API changes
Data model changes
Release notes snippet
| Comment | File | Size | Author |
|---|---|---|---|
| #7 | 3232892-7.patch | 645 bytes | spokje |
Comments
Comment #2
daffie commentedWe shall need to wait for branch 10.0 before we can commit this issue as support for the "static" return type hint starts with PHP 8.0.
Comment #3
daffie commentedAdding the same return value as the parent method does. See if this will fix the testbot failure.
Comment #5
daffie commentedPostponing this issue on #3233047: Drupal\Core\Routing\RequestContext::fromRequest() should be returning $this.
Comment #6
daffie commentedComment #7
spokjeUnpostponing since #3233047: Drupal\Core\Routing\RequestContext::fromRequest() should be returning $this landed.
Comment #8
longwaveOK to go into 10.0.x, cannot be backported.
Comment #10
catchCommitted a7825ea and pushed to 10.0.x. Thanks!