Closed (fixed)
Project:
Drupal core
Version:
main
Component:
composer
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
28 Jan 2026 at 10:34 UTC
Updated:
25 Mar 2026 at 03:15 UTC
Jump to comment: Most recent
Comments
Comment #2
longwaveCurrently blocked on
#3555534: Since symfony/validator 7.4: Support for evaluating options in the base Constraint class is deprecated. Initialize properties in the constructor instead.
#3555532: Since symfony/http-foundation 7.4: Request::get() is deprecated, use properties ->attributes, query or request directly instead.
Comment #3
longwaveAlso blocked by
php-tuf/composer-stagernot supporting Symfony 8 yet, opened https://github.com/php-tuf/composer-stager/pull/436Comment #5
longwaveAlso blocked by:
https://github.com/mglaman/phpstan-drupal/pull/933
https://github.com/asm89/stack-cors/pull/109
but for now we can work around this by referencing forks in composer.json.
Comment #6
longwaveComment #7
longwaveTests should be green except for build tests, which are waiting on our dependencies to update. Postponing again for now.
Comment #8
gábor hojtsyAll of the mentioned dependency issues landed since they were linked. Are we awaiting releases? Let me check:
So looks like it is down to phpstan-drupal only?
Comment #9
gábor hojtsySo the reason that was not yet released is phpstan 2.1.38 changed stub handling, which is breaking phpstan-drupal https://github.com/mglaman/phpstan-drupal/compare/claude/debug-phpstan-s... is a proposal to fix it by restoring some of the 2.1.37 behaviour and https://github.com/phpstan/phpstan/issues/14118 is the issue.
Comment #10
gábor hojtsyComment #11
godotislateLooks like part of #3569092: Update method signatures for addConstraint() and ConstraintManager::create() and remove HasNamedArguments use is in the MR here (or there's overlap at least), but the
#[HasNamedArguments]attribute has been removed from Symfony 8, and is in the MR there.Comment #12
longwave@godotislate I don't think it's possible to get a green test run without making some of those changes here, but we should try to minimise them if possible.
Comment #13
godotislateOh, interesting, I thought all the #[HasNamedArguments] usage would be more of a problem, but I guess at core's PHPStan level, it's ignored?
Comment #14
andypost@longwave Looks like more changes needed as
RequestSanitizerTestfailsComment #15
andypostComment #16
andypostThe failed test caused by changes https://symfony.com/blog/hardening-symfony-recent-security-improvements#...
EDIT it was deprecated in 7.4 https://symfony.com/blog/new-in-symfony-7-4-request-class-improvements#d...
Comment #17
andypostFound existing issue #3007578-13: Discuss how and if new functionality should be added to the RequestSanitizer but there's already expected deprecation in the functional test so I asked ClaudeCode to summarize and the commit message with all details
Comment #18
longwave@andypost Symfony deprecated some methods in that header in v7 and then removed support on V8, I think instead we need to update our test to match what Symfony does and leave RequestSanitizer alone.
Comment #19
andypostThat's what I did () but the problem is that page_cache is running before sanitizer and it check only for POST requests, that's why second test expectations changed (no HIT anymore)
Comment #20
longwaveReverted the changes to RequestSanitizer, this code really only affects OPTIONS now as Symfony sanitizes GET, HEAD, CONNECT and TRACE itself by ignoring the header for these methods and treating them as POST.
As soon as @mglaman releases a new version of phpstan-drupal we should be good to go here.
Comment #21
andypostIt's not enough as I pointed in my commit - see how functional test is broken
Comment #22
longwave@andypost isn't the test invalid now though? The header is ignored by Symfony 8, so the override should just be treated as another POST?
Comment #23
longwaveAdded an additional assertion that proves the Symfony sanitizer does what we expect with the request method, I think this is better.
Comment #24
longwavemglaman/phpstan-drupalhas a Symfony 8 compatible release, so this is now green.Comment #26
catchThis looks great. There is some bc removal for validators, and there's a fair amount of test changes for the request sanitizer change, but mostly because Symfony has partially fixed what we were fixing just in a different way. I kicked off a rebase just in case but I think we should go ahead here to unblock realistic contrib testing against 12.x a bit more.
Comment #27
longwaveRebased following #3569092: Update method signatures for addConstraint() and ConstraintManager::create() and remove HasNamedArguments use
Comment #28
quietone commentedComment #29
longwaveRebased again following #3552827: Replace all expectDeprecation() calls with expectUserDeprecationMessage()
Comment #30
phenaproximaI am not qualified to sign off on the request sanitization parts of this MR, since I'm completely unfamiliar with that. But the dependency changes, and the alterations to validation constraints, appear kosher to me.
Comment #31
godotislateOne nit and one question about the
QUERYmethod.Comment #32
godotislateBack to NW for MR comments.
Comment #33
longwaveThanks for the review - added a return type and a test for QUERY.
Comment #34
godotislatelgtm!
Comment #36
catchCommitted/pushed to main, thanks!
Comment #39
dpiTracking Drush and any CI Next-Major jobs broken by this @ https://github.com/drush-ops/drush/pull/6534