Problem/Motivation
Method "Symfony\Component\Validator\ConstraintValidatorInterface::validate()" might add "void" as a native return type declaration in the future. Do the same in implementation "Drupal\genpass\Plugin\Validation\Constraint\GenpassModeConstraintValidator" now to avoid errors or add an explicit @return annotation to suppress this message.
The work in the constraint is done in 2 private functions. The interface defined method is missing the void.
In Drupal 12:
------ -----------------------------------------------------------------------
Line src/Plugin/Validation/Constraint/GenpassModeConstraintValidator.php
------ -----------------------------------------------------------------------
35 Return type mixed of method
Drupal\genpass\Plugin\Validation\Constraint\GenpassModeConstraintVali
dator::validate() is not covariant with return type void of method
Symfony\Component\Validator\ConstraintValidatorInterface::validate().
🪪 method.childReturnType (non-ignorable)
------ -----------------------------------------------------------------------
Steps to reproduce
Run phpunit tests with D11.3 core.
Proposed resolution
Add void return type to the parent method.
Remaining tasks
- ✅ File an issue
- ➖ Addition/Change/Update/Fix
- ➖ Testing to ensure no regression
- ➖ Automated unit testing coverage
- ➖ Automated functional testing coverage
- ➖ Security
- ➖ Code review by maintainers
- ➖ Full testing and approval
- ➖ Credit contributors
- ➖ Release notes snippet
- ❌ Release
User interface changes
- N/A
API changes
- N/A
Data model changes
- N/A
Release notes snippet
- N/A
Issue fork genpass-3580790
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
elc commentedIn Drupal 12 it causes a hard failure.
Comment #5
elc commentedComment #9
elc commented2.2.x branch is defunct, released in 3.0.x.
@see #3581914: Release naming - Use 3.0.x for latest release