- Issue created by @drunken monkey
- 🇪🇸Spain fjgarlin
I believe that the behaviour comes because of this line in the core
phpunit.xml.dist
: https://git.drupalcode.org/project/drupal/-/blob/11.x/core/phpunit.xml.d...
failOnWarning="true"
You'd need to override that value to
false
for your module somehow. - 🇪🇸Spain fjgarlin
Given that the core's default value is set to fail and that each module can add their own
phpunit.xml(.dist)
file, I'm closing this as "Work as designed". - 🇬🇧United Kingdom jonathan1055
@drunken monkey If the aim is to see the deprecations but not make your pipeline fail, then an alternative if you don't want your project to have its own phpunit.xml(.dist) as mentioned in #3, is to allow the pipeline job to end with an amber warning not a red failure
phpunit: allow_failure: true
Even with the warning the overall status of the pipeline will be green (providing there are no other red failures).
The downside of this is that real test failures would also be classed and 'OK' and not make the pipeline fail. So another way would be to leave your 'current' phpunit without showing deprecations, but use
OPT_IN_TEST_NEXT_MINOR:1
and show the deprecations there instead. All of the 'next minor' variants are allowed to fail so you do not need to specify that in the job.