PHPUnit tests fail due to deprecation notices

Created on 17 November 2023, about 1 year ago
Updated 22 December 2023, 11 months ago

Problem/Motivation

PHPUnit tests fail with a message:

  1x: Method "Symfony\Component\Validator\ConstraintValidatorInterface::validate()" might add "void" as a native return type declaration in the future. Do the same in implementation "Drupal\cdn\Plugin\Validation\Constraint\CdnDomainConstraintValidator" now to avoid errors or add an explicit @return annotation to suppress this message.
    1x in CdnDomainConstraintValidatorTest::testValidate from Drupal\Tests\cdn\Unit\Plugin\Validation\Constraint

  1x: Method "Symfony\Component\Validator\ConstraintValidatorInterface::validate()" might add "void" as a native return type declaration in the future. Do the same in implementation "Drupal\cdn\Plugin\Validation\Constraint\CdnSchemeConstraintValidator" now to avoid errors or add an explicit @return annotation to suppress this message.
    1x in CdnSchemeConstraintValidatorTest::testValidate from Drupal\Tests\cdn\Unit\Plugin\Validation\Constraint

Steps to reproduce

  1. Install CDN module
  2. Run PHPUnit
  3. Review PHPUnit logs and see deprecation warning

Proposed resolution

Add an explicit @return annotation

πŸ“Œ Task
Status

Closed: duplicate

Version

4.0

Component

Code

Created by

πŸ‡ΊπŸ‡¦Ukraine dburiak

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

Comments & Activities

Production build 0.71.5 2024