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

Comments

daffie created an issue. See original summary.

daffie’s picture

Status: Active » Needs review
StatusFileSize
new593 bytes

We 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.

daffie’s picture

StatusFileSize
new467 bytes
new797 bytes

Adding the same return value as the parent method does. See if this will fix the testbot failure.

Status: Needs review » Needs work

The last submitted patch, 3: 3232892-3.patch, failed testing. View results

daffie’s picture

daffie’s picture

Version: 9.3.x-dev » 10.0.x-dev
spokje’s picture

Status: Postponed » Needs review
StatusFileSize
new645 bytes
longwave’s picture

Status: Needs review » Reviewed & tested by the community

OK to go into 10.0.x, cannot be backported.

  • catch committed a7825ea on 10.0.x
    Issue #3232892 by daffie, Spokje: [Symfony 6] Add "static" type hint to...
catch’s picture

Status: Reviewed & tested by the community » Fixed

Committed a7825ea and pushed to 10.0.x. Thanks!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.