Is SYMFONY_DEPRECATIONS_HELPER: weak correct for contrib deprecation testing needs?

Created on 11 November 2023, 8 months ago
Updated 5 June 2024, 23 days ago

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

🐛 Bug report
Status

Fixed

Component

Documentation

Created by

🇮🇹Italy mondrake 🇮🇹

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

Merge Requests

Comments & Activities

Production build 0.69.0 2024