IBX-12046: Removed Symfony 8 deprecated code usage - #145
Open
ViniTou wants to merge 2 commits into
Open
Conversation
Replaced Request::get() with an explicit attributes bag lookup in UserRegisterController, and aligned the Password, EmailInvitation and UserPassword validator constraints with the Symfony 7.4 constructor contract (#[HasNamedArguments], BC-preserving options array with a deprecation notice for external callers). Updated the two in-repo form types that instantiated Password with a positional options array to use named arguments instead.
…constraints 6.0 is a major and Symfony 8 removes options-array support from Constraint itself; the form types already use named arguments and no other package instantiates Password, EmailInvitation or UserPassword.
|
mikadamczyk
approved these changes
Sep 11, 2026
konradoboza
approved these changes
Sep 11, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


Related PRs:
Description:
Removes usages of Symfony 8-removed APIs while staying on Symfony 7.4, so this repo's unit and SQLite integration suites report zero direct Symfony deprecations:
Request::get()inUserRegisterController::registerFromInvitationAction()replaced with$request->attributes->get('inviteHash')(the value is a route path attribute).Password,EmailInvitationandUserPasswordvalidator constraints (src/lib/Validator/Constraints/) gained a#[HasNamedArguments]constructor mirroring Symfony 7.4's own constraints (e.g. core'sUniqueIdentifier). The options-array form is dropped outright: 6.0 is a major, Symfony 8 removes it fromConstraintanyway, and no package in the organisation instantiates these constraints with an array.Passwordfrom a positional options array (UserPasswordChangeType,UserPasswordResetType) were updated to use named arguments, as were the test call sites.Confirmed nothing outside this repo instantiates or extends these three constraint classes (searched all
ibexa/*repos on6.0, including admin-ui, corporate-account and content-forms), so no merge-order coordination is required.No dependency majors were touched (Symfony stays on
^7.4, no PHPUnit/rector changes).For QA:
/from-invite/register/{inviteHash}and/user/from-invite/register/{inviteHash}) to confirm the invite hash is still read correctly.UserPasswordChangeType,UserPasswordResetType) to confirm password-strength validation against a user's content type still works.Documentation:
Ibexa\User\Validator\Constraints\Password,EmailInvitationandUserPasswordnow have an explicit, named-argument constructor (contentType,user,message,groups,payloadforPassword;message,groups,payloadfor the other two). The options-array form is no longer accepted.