IBX-12046: Removed Symfony 8 deprecated code usage - #2080
Open
ViniTou wants to merge 2 commits into
Open
Conversation
Replaced Request::get() with explicit attributes/query/request bag access (PHP and Twig), gave every admin-ui validator constraint a #[HasNamedArguments] constructor (options array still accepted with a deprecation), switched the Choice attribute to named arguments and dropped the unreachable default on the required subitems_module.limit config node, so the unit and integration suites report no direct Symfony deprecations on Symfony 7.4.
…constraints 6.0 is a major and Symfony 8 removes options-array support from Constraint itself, so the deprecated array path is dropped outright from all 13 admin-ui validator constraints; only the #[HasNamedArguments] constructor remains. No in-repo or cross-repo callers passed an options array, so no other call sites needed changes.
|
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 code that Symfony 8.0 drops, using the Symfony 7.4-compatible replacements, so admin-ui emits no direct Symfony deprecations on 7.4 (unit suite: 16 → 0, SQLite integration suite: 6 → 0). No dependency constraints were changed.
Request::get()(removed in 8.0): 21 PHP call sites and 12 Twigapp.request.get()calls now read the explicit bag —attributesfor route params (_route,_route_params,siteaccess,locationId,languageCode,contentId,versionNo),query->all('trash_search')for the trash search filters,request->has()for the POSTed version-remove form name.#[HasNamedArguments]construction (?string $message = null, ?array $groups = null, mixed $payload = null); the deprecated options-array constructor path is removed outright (6.0 is a major, and Symfony 8 drops options-array support fromConstraintitself). YAMLvalidation.yamlmappings keep working unchanged (the Symfony loader already uses named arguments). No in-repo or cross-repo callers passed an options array to these constraints (checked across all 115 other ibexa/* repos), so no other call sites needed changes.LocationIsNotSubLocation(anAbstractComparison) only needed its tests switched to the positionalvalueargument.#[Assert\Choice([...])]onRoleAssignmentCreateData::$limitationType→#[Assert\Choice(choices: [...])](choices as first argument deprecated in 7.4).subitems_module.limitconfig node: dropped the unreachabledefaultValue(10)from the required node (symfony/config 7.4 deprecation); the effective default is still provided byezplatform_default_settings.yaml.PostMountEventis now constructed with aComponentMetadataobject (ux-twig-component 2.13 deprecation).No cross-repo signature dependencies: no voters/security contracts were touched and all constraint classes are
final.For QA:
route_name), trash list with search filters → restore/delete keeps the filters in the redirect, version removal (draft and archived), image / image asset field edit actions, UDW REST location browsing.Documentation:
Passing an options array to admin-ui validator constraints (e.g.
new UniqueURL(['message' => '...'])) is removed (BC break, no deprecation period); use named arguments instead (new UniqueURL(message: '...')).