Overview

Pipelines are reporting deprecations that are ignored by Drupal Core.

    1) /builds/project/experience_builder/vendor/symfony/deprecation-contracts/function.php:25
    Since symfony/validator 7.3: Passing an array of options to configure the "Drupal\Core\Validation\Plugin\Validation\Constraint\NotNullConstraint" constraint is deprecated, use named arguments instead.
    
    Triggered by:
    
    * Drupal\Tests\experience_builder\Kernel\ApiAutoSaveControllerTest::testApiAutoSaveControllerGet (8157 times)
      /builds/project/experience_builder/tests/src/Kernel/ApiAutoSaveControllerTest.php:77
    
    * Drupal\Tests\experience_builder\Kernel\ApiAutoSaveControllerTest::testDelete (7843 times)
      /builds/project/experience_builder/tests/src/Kernel/ApiAutoSaveControllerTest.php:733
    
    * Drupal\Tests\experience_builder\Kernel\ApiAutoSaveControllerTest::testPost#authorized, with global (8414 times)
      /builds/project/experience_builder/tests/src/Kernel/ApiAutoSaveControllerTest.php:301
    
    * Drupal\Tests\experience_builder\Kernel\ApiAutoSaveControllerTest::testPost#authorized, without global (8256 times)
      /builds/project/experience_builder/tests/src/Kernel/ApiAutoSaveControllerTest.php:301
    
    * Drupal\Tests\experience_builder\Kernel\ApiAutoSaveControllerTest::testPost#unauthorized, with global (7848 times)
      /builds/project/experience_builder/tests/src/Kernel/ApiAutoSaveControllerTest.php:301
    
    * Drupal\Tests\experience_builder\Kernel\ApiAutoSaveControllerTest::testPost#unauthorized, without global (7848 times)
      /builds/project/experience_builder/tests/src/Kernel/ApiAutoSaveControllerTest.php:301

And this make review pipelines report a bit more complex.

This issue is to test if it makes sense to ignore it, and if so, how.

Proposed resolution

Include the core/.deprecations-ignore.txt in the SYMFONY_DEPRECATIONS_HELPER to avoid these deprecations in the phpunit reports.

User interface changes

Command icon 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

isholgueras created an issue. See original summary.

dydave’s picture

I can also confirm seeing these deprecation messages in current build pipelines, see:
https://git.drupalcode.org/issue/admin_toolbar-3532958/-/jobs/5862610#L129

    1 test triggered 1 deprecation:
    
    1) /builds/issue/admin_toolbar-3532958/vendor/symfony/deprecation-contracts/function.php:25
    Since symfony/validator 7.3: Passing an array of options to configure the "Drupal\Core\Validation\Plugin\Validation\Constraint\NotNullConstraint" constraint is deprecated, use named arguments instead.
    
    Triggered by:
    
    * Drupal\Tests\admin_toolbar_search\FunctionalJavascript\AdminToolbarToolsSearchTest::testToolbarSearch (34 times)
      /builds/issue/admin_toolbar-3532958/admin_toolbar_search/tests/src/FunctionalJavascript/AdminToolbarToolsSearchTest.php:112
    

 
Would you have any advice on how these deprecation warnings could be addressed?

The error message is not very clear: would there be any code changes expected on our end?
See the line of code reported above:
https://git.drupalcode.org/issue/admin_toolbar-3532958/-/blob/3532958-35...

What should we change to fix these warnings in the code reported as deprecated?

Any pointers, related issues or recommendations would be greatly appreciated.
Thanks in advance!

isholgueras’s picture

Assigned: Unassigned » isholgueras

I've configured it to just have deprecations we have in experience_builder.
I've also disabled the fail on deprecations with:
- SYMFONY_DEPRECATIONS_HELPER= "disabled&ignoreFile=$DRUPAL_PROJECT_FOLDER/.phpunit-deprecation-ignore.txt" (see more)
- PHPUNIT_FAIL_ON_PHPUNIT_DEPRECATION=0: (see more)

But the job is still failing. Any idea?

isholgueras’s picture

Status: Active » Needs review
isholgueras’s picture

I've set

SYMFONY_DEPRECATIONS_HELPER=max[total]=99999

and it doesn't work either.

Project: Experience Builder » Drupal Canvas
Version: 0.x-dev » 1.x-dev

Experience Builder has been renamed to Drupal Canvas in preparation for its beta release. You can now track issues on the new project page.

scott_euser’s picture

Status: Needs review » Needs work

It looks like its still throwing that deprecation (stumbling across this when I hit it myself). Moving back to needs work but will update if I manage to solve it elsewhere in contrib. Trying to see what's different from the Core fix: https://www.drupal.org/project/drupal/issues/3522497

wim leers’s picture

I think many of these are legitimate.

Like the one that Scott just confirmed.

Why not just turn this into a bunch of Novice-tagged issues? 😊 WDYT? :D