Closed (fixed)
Project:
Field Validation
Version:
3.0.x-dev
Component:
Code
Priority:
Major
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
14 May 2025 at 15:35 UTC
Updated:
16 Oct 2025 at 04:19 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
marcus_johansson commentedComment #4
marcus_johansson commentedComment #5
marcus_johansson commentedComment #6
scott_euser commentedThis looks good to me. I think given 3x is beta, release notes should just make it clear in case anyone is extending any constraints, that they should add the return types + types to their messages in order to remain compatible.
E.g.
Will result in
And
Will result in
Comment #7
vivek panicker commentedPatch worked for me as well.
Was able to run update hooks successfully.
Comment #8
pearls commentedHere's the log while upgrading to Drupal 11.2.0.rc2
MR !15 solved the problem.
+1 for RTBC
Comment #9
jrockowitz commentedComment #10
digitalcatalyst commentedtested this patch when upgrading, from core 11.1.7 to 11.2.0, updates were failing with
PHP Fatal error: Declaration of Drupal\field_validation\Plugin\Validation\Constraint\TimeConstraint::validatedBy() must be compatible with Symfony\Component\Validator\Constraint::validatedBy(): string in /var/www/sites/drupal/multisite/web/modules/contrib/field_validation/src/Plugin/Validation/Constraint/TimeConstraint.php on line 21after patch updates all ran fine.
Comment #11
seattlehimay commentedTested patch from #9 while upgrading from d10 to D11.2.2. This patched worked great, and eliminated the error I had been seeing upon trying update the database via drush:
Fatal error: Type of Drupal\field_validation\Plugin\Validation\Constraint\LessThanOrEqualConstraint::$message must
be string (as in class Symfony\Component\Validator\Constraints\LessThanOrEqual) in /var/www/html/web/modules/contri
b/field_validation/src/Plugin/Validation/Constraint/LessThanOrEqualConstraint.php on line 16
Comment #12
anybodyDefinitely major, this breaks projects and updates. Any chance to tag a new release?
Comment #13
doxigo commentedThis works as expected, and this is a major blocker, can anyone tag a new release please?
Comment #15
abhisekmazumdarThank you all for moving this forward. I have created a new release: field_validation 3.0.0-beta5.
Comment #18
darren ohComment #19
darren oh