Closed (fixed)
Project:
Drupal core
Version:
10.0.x-dev
Component:
base system
Priority:
Critical
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
20 Apr 2021 at 11:18 UTC
Updated:
22 Aug 2022 at 02:15 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
catchI think we can take the same approach here as we have in #3209618: [Symfony 6] Symfony\Component\HttpKernel\Event\KernelEvent::isMasterRequest() is deprecated, use isMainRequest() instead.
However also noting this:
If we just suppressed the deprecation message, then both core and modules could switch over during Drupal 10, the only issue then is that Drupal 9 + Drupal 11 compatibility wouldn't be possible.
Comment #3
longwaveI don't think there will be a deprecation message, as this is just a constant and so there is no code executed when it is used - this is why they are keeping it around until Symfony 7 I guess. I think we can probably just leave this one until the D10 cycle, there seems no pressing need to do it now with an FC layer.
Comment #4
andypostComment #5
andypostChecked usage and only
Kernel::handle()with middlewares affected but 2/3 of (50) in tests could be easy replacedComment #7
daffie commentedThe problem with this patch is that the constant is used as the default value for the paramter
$typein the methodDrupal\Core\DrupalKernel::handle(Request $request, $type = self::MASTER_REQUEST, $catch = TRUE). Therefor we cannot replace the constant in a minor version release, it must be done in a new major release. Moving this to be committed in D10.0.This issue is part of the get Symfony 6 in D10 and therefor it is a critical issue.
Comment #8
daffie commentedAdded a CR.
Comment #9
catchCan't we make the change everywhere except
Drupal\Core\DrupalKernel::handle(Request $request, $type = self::MASTER_REQUEST, $catch = TRUE).and open a follow-up for that one method to do in Drupal 10?On the other hand Symfony itself won't drop the old constant until Symfony 7, so there is not the same urgency here as other Symfony 6 changes.
Comment #10
daffie commentedThat is why I wanted to wait for the 10.0 branch to commit this patch.
Comment #11
longwave@catch we need an FC layer to do that in Drupal 9 as the constant doesn't exist in Symfony 4. IMO this should just be postponed, we're only making work for ourselves trying to fit it in now if we can wait until we are on Symfony 6.
Comment #12
catchOh good point we'd have to add a shim, yeah let's leave this for Drupal 10 then.
Comment #13
longwaveComment #14
daffie commentedUnpostponing as the 10.0.x branch is open.
Comment #15
daffie commentedComment #16
murilohp commentedHere's the reroll of patch #7 to branch 10.0.x.
Comment #17
longwaveThis still can't go in until at least Symfony 5.4 is committed.
Comment #18
spokjePostponing on #3197482: Update Drupal 10 to depend on Symfony 5.4 (as a stepping stone to Symfony 6, for deprecation checking support) as stated in #17
Comment #19
murilohp commentedThe #3197482 landed! I rerolled #16, let's see now.
Comment #20
murilohp commentedFixing the coding standard errors. I accidentally added a new empty file.
Comment #21
longwaveNearly there, two cases missing that I can see:
Comment #22
murilohp commentedThanks for the review @longwave! Addressing #21 on this new patch.
Comment #23
daffie commentedAll code changes look good to me.
I have installed the patch on my local machine and I could not find any more instances of the old constant.
The IS and the CR are in order.
For me it is RTBC.
Comment #25
catchCommitted 7f93a36 and pushed to 10.0.x. Thanks!
Current status is that contrib modules won't be able to resolve the Symfony 5/6 deprecation until they drop support for Drupal 9.4, but we'll reach that point before the Drupal 11 branch opens and updates to Symfony 7. If Symfony was dropping this in Symfony 6, we'd need to add a shim to Drupal 9, but they're not.
Comment #27
quietone commentedUpdated and published the CR.