Problem/Motivation

Symfony deprecated passing an array of options to their constraint classes. In #3522497: Passing an $options array to constraint constructors is deprecated, use named arguments instead, passing an array of options to Drupal constraint plugins that were subclasses of those constraints was deprecated.

To align with the Symfony efforts, passing an array of options to any Drupal constraint plugin should be deprecated. In addition, passing anything other than associative array to addConstraint() should be deprecated as well.

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

Introduced terminology

API changes

Data model changes

Release notes snippet

Comments

godotislate created an issue. See original summary.

godotislate’s picture

MR 12291 for #3522497: Passing an $options array to constraint constructors is deprecated, use named arguments instead should have a lot of the work needed here, so changes would need to be transferred to an MR here after the original issue is in.

Version: 11.x-dev » main

Drupal core is now using the main branch as the primary development branch. New developments and disruptive changes should now be targeted to the main branch.

Read more in the announcement.

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.