IBX-12046: Removed Symfony 8 deprecated code usage - #121
Open
ViniTou wants to merge 2 commits into
Open
Conversation
- Validator\Constraints\Password: replaced getDefaultOption()-less positional-options constructor with named-argument constructor (#[HasNamedArguments]), keeping a deprecated options-array BC path (trigger_deprecation) for existing callers; UserAccountPassword inherits it unchanged. - Content\View\Filter\ContentEditViewFilter: replaced deprecated Request::get() with an explicit attributes/query/request bag lookup.
Nothing in the platform sets this flag as a route attribute or form field; a query-string flag on the edit URL is the only source, so the generic three-bag lookup inherited from Request::get() is dropped.
|
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 code paths that Symfony 8.0 drops, while staying on Symfony 7.4, so the repository no longer emits direct Symfony deprecation notices:
Validator\Constraints\Passwordrelied on the baseSymfony\Component\Validator\Constraint::__construct()options-array handling, which is deprecated since symfony/validator 7.4. Added a#[HasNamedArguments]constructor with named parameters (mirroringibexa/core'sUniqueIdentifierconstraint), while keeping a BC options-array path that raises anibexa/content-formsdeprecation notice instead.UserAccountPasswordinherits the fix without changes.FieldValuealso extendsConstraintbut is never instantiated with an options array in this repo (or any other Ibexa repo, verified with a cross-repo grep), so it triggers no deprecation and was left untouched.Content\View\Filter\ContentEditViewFilterused the deprecatedRequest::get(); replaced with an explicitattributes→query→requestbag lookup, since the "validate" flag's origin (route attribute vs. query vs. submitted form field) isn't fixed.ibexa/*repos) thatIbexa\ContentForms\Validator\Constraints\*is never referenced outside this repo, so no merge-order coordination is needed.For QA:
Password/UserAccountPasswordconstraints).ContentEditViewFilterbehavior is unchanged.Documentation:
Ibexa\ContentForms\Validator\Constraints\Password::__construct()(and inherited byUserAccountPassword) now accepts named arguments (contentType,message,groups,payload); passing an options array as the first argument still works but is deprecated.