Convert PasswordConstraint plugins to attributes

Created on 25 March 2024, about 1 year ago

Problem/Motivation

Doctrine annotations are EOL and Drupal core is moving to attributes. We should support attributes too.

See https://www.drupal.org/node/3229001 β†’

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

πŸ“Œ Task
Status

Needs review

Version

4.0

Component

Code

Created by

πŸ‡¦πŸ‡ΊAustralia kim.pepper πŸ„β€β™‚οΈπŸ‡¦πŸ‡ΊSydney, Australia

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

  • Issue created by @kim.pepper
  • πŸ‡¦πŸ‡ΊAustralia kim.pepper πŸ„β€β™‚οΈπŸ‡¦πŸ‡ΊSydney, Australia
  • Status changed to Needs review about 1 year ago
  • πŸ‡¦πŸ‡ΊAustralia kim.pepper πŸ„β€β™‚οΈπŸ‡¦πŸ‡ΊSydney, Australia
  • Pipeline finished with Success
    about 1 year ago
    Total: 185s
    #128153
  • πŸ‡¦πŸ‡ΊAustralia mstrelan

    FWIW this would need to be in a branch that requires Drupal 10.2 or higher.

  • πŸ‡¦πŸ‡ΊAustralia kim.pepper πŸ„β€β™‚οΈπŸ‡¦πŸ‡ΊSydney, Australia

    I added back the annotations so we can remove in the next major.

  • Pipeline finished with Success
    about 1 year ago
    Total: 178s
    #129013
  • πŸ‡¦πŸ‡ΊAustralia mstrelan

    Unfortunately that's not enough, we'd need a backwards compatible call in PasswordConstraintPluginManager::construct to parent::construct. Currently on 10.1 we get something like this when enabling the module:

    TypeError: Drupal\Core\Plugin\DefaultPluginManager::__construct(): Argument #6 ($additional_annotation_namespaces) must be of type array, string given, called in /data/app/modules/contrib/password_policy/src/PasswordConstraintPluginManager.php on line 27 in Drupal\Core\Plugin\DefaultPluginManager->__construct() (line 130 of /data/app/core/lib/Drupal/Core/Plugin/DefaultPluginManager.php).
    
  • Pipeline finished with Success
    about 1 year ago
    Total: 186s
    #129049
  • πŸ‡¦πŸ‡ΊAustralia kim.pepper πŸ„β€β™‚οΈπŸ‡¦πŸ‡ΊSydney, Australia

    I think all BC concerns have been addressed.

  • Pipeline finished with Success
    8 months ago
    Total: 220s
    #246218
Production build 0.71.5 2024