Skip to content

IBX-12046: Removed Symfony 8 deprecated code usage - #2080

Open
ViniTou wants to merge 2 commits into
6.0from
ibx-12046-symfony-deprecations
Open

IBX-12046: Removed Symfony 8 deprecated code usage#2080
ViniTou wants to merge 2 commits into
6.0from
ibx-12046-symfony-deprecations

Conversation

@ViniTou

@ViniTou ViniTou commented Sep 9, 2026

Copy link
Copy Markdown
Contributor
🎫 Issue IBX-12046

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 Twig app.request.get() calls now read the explicit bag — attributes for 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.
  • Validator constraints: all 13 admin-ui constraints now only accept #[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 from Constraint itself). YAML validation.yaml mappings 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 (an AbstractComparison) only needed its tests switched to the positional value argument.
  • #[Assert\Choice([...])] on RoleAssignmentCreateData::$limitationType#[Assert\Choice(choices: [...])] (choices as first argument deprecated in 7.4).
  • subitems_module.limit config node: dropped the unreachable defaultValue(10) from the required node (symfony/config 7.4 deprecation); the effective default is still provided by ezplatform_default_settings.yaml.
  • Tests: PostMountEvent is now constructed with a ComponentMetadata object (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:

  • Admin UI: content view (drafts tab pagination links, translation switcher in the Content tab, multi-file upload language), content type group / content type / role views (breadcrumb 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.
  • Content type / section / URL / field definition forms still report the uniqueness and configuration validation errors.
  • Role assignment creation with limitation type validation.

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: '...')).

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.
@sonarqubecloud

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants