Is SYMFONY_DEPRECATIONS_HELPER: weak correct for contrib deprecation testing needs?

Migrated issue

Reported by: mondrake

Related to !207 (merged) !179 (merged) !178 (merged) !162 (merged) !86 (closed)

Problem/Motivation

In the templatese we currently have

  variables:
    SYMFONY_DEPRECATIONS_HELPER: weak

'weak' translates into 'max[total]=999999&verbose=0' on the PHPUnit bridge, which means that even if deprecations are tracked, they are not reported. Practically, I see no difference from 'disabled' here.

If I pass '' as variable value, we have a check in strict mode that throws deprecations also for deprecations that are ignored by core via the deprecation-ignore file.

In practice, if I want to run with deprecation tests like core is doing, i.e. to identify calls to core's deprecated code in my contrib so that I can fix it, I need to pass explicitly the path to core's ignore file,

phpunit:
  extends: .phpunit-base
  variables:
    SYMFONY_DEPRECATIONS_HELPER: 'ignoreFile=/builds/project/image_effects/web/core/.deprecation-ignore.txt'

Proposed resolution

IMHO, it would be much more clear if we did not set SYMFONY_DEPRECATIONS_HELPER at all in the template. That will tell core's PHPUnit bootstrap to use the core's ignore file by default. This way we would get deprecation testing in contrib behave as core by default. Then, if you need to disable the bridge, then you set SYMFONY_DEPRECATIONS_HELPER: 'disabled' in your gitlab-ci.

Remaining tasks

User interface changes

API changes

Data model changes

Related issue: Issue #3402134

Related issue: Issue #3349782

Related issue: Issue #3427357

Edited Feb 12, 2026 by drupalbot
Assignee Loading
Time tracking Loading