Skip to content

Commit 89f0c1d

Browse files
authored
bug #70 Fixed deprecated message for PHP8.4+ (pflueg)
This PR was merged into the 2.0-dev branch. Discussion ---------- "Implicitly marking parameter $translator as nullable is deprecated" fixed | Q | A | ------------- | --- | Branch? | main | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | yes | Fixed tickets | none | License | MIT Found a strangler deprecation issue. You might want to update the phpstan/phpunit packages to the latest version, [which will "unshut" phpstan again](https://github.com/rollerworks/PasswordStrengthValidator/blob/v2.0.2/tests/Validator/PasswordRequirementsValidatorTest.php#L73) 😄 You can fix this with "?->" on the `$constraintViolationAssertion` usages, but need to retest the whole thing throughout your BC list. Thx alot for the package!! Commits ------- fc1661b Fixed deprecated message for PHP8.4+
2 parents b02141c + fc1661b commit 89f0c1d

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/Validator/Constraints/PasswordStrengthValidator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ class PasswordStrengthValidator extends ConstraintValidator
5050
5 => 'very_strong',
5151
];
5252

53-
public function __construct(TranslatorInterface $translator = null)
53+
public function __construct(?TranslatorInterface $translator = null)
5454
{
5555
// If translator is missing create a new translator.
5656
// With the 'en' locale and 'validators' domain.

0 commit comments

Comments
 (0)