Closed (fixed)
Project:
Drupal core
Version:
9.1.x-dev
Component:
phpunit
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
4 Feb 2020 at 13:51 UTC
Updated:
28 Apr 2020 at 20:29 UTC
Jump to comment: Most recent
#3107732: Add return typehints to setUp/tearDown methods in concrete test classes introduced void return typehints in setUp, tearDown and other PHPUnit TestCase inherited methods to comply with PHPUnit 8 declarations, for Drupal core test code.
However, that is not enforced yet, and we need to contributors that they have to adjust their test classes.
Deprecate named methods conditionally on not having a void return typehint.
Comments
Comment #2
alexpott@mondrake thanks for filing this issue - it'd be great to add the deprecation code as a proof-of-concept to #3107732: Add return typehints to setUp/tearDown methods in concrete test classes but then remove it prior to commit- and then copy that hunk of code to this issue.
Comment #3
mondrakeThis was done directly in the 9.1.x patch of #3107732: Add return typehints to setUp/tearDown methods in concrete test classes.