Early Bird Registration for DrupalCon Atlanta is now open! By registering during our Early Bird Registration window, you’ll save $100. This window ends on 19 January 2025 and will go by quickly, so don’t wait!
Problem/Motivation
Method "Symfony\Component\HttpFoundation\RedirectResponse::setTargetUrl()" will return "static" as of its next major version. Doing the same in child class "Drupal\Component\HttpFoundation\SecuredRedirectResponse" 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 |
---|---|---|---|
#2 | 3232113-2.patch | 676 bytes | daffie |
Comments
Comment #2
daffie CreditAttribution: daffie commentedI could only find 1 instance where in contrib the method was overridden. See: http://grep.xnddx.ru/node/31687281.
Comment #3
larowlanThis is going to be tricky, we need a corresponding issue for commerce donation
http://grep.xnddx.ru/node/31687281
There are several other extensions in contrib, but only commerce donation touches that method.
Comment #4
larowlanAh, you already found that one 🤦♂️
I think we should file and issue for commerce donation and try to get it fixed there
Comment #5
larowlan#3232249: Add static type-hint to DonationSecuredRedirectResponse::setTargetUrl
Comment #6
larowlanPinged the maintainer in slack
Comment #7
longwavestatic
return type is only introduced in PHP 8, so another thing we can't do until 10.x opens I guess.Comment #9
spokjeComment #10
longwaveBeing bold and marking this RTBC for 10.0.x, as commerce_donation does not yet declare compatibility with Drupal 10.
Comment #12
catchYes I think it's fine to do these in Drupal 10 - contrib modules can safely update their code in Drupal 9 as long as they require PHP 8, or if they conditionally declare the method.
Committed 1553465 and pushed to 10.0.x. Thanks!