Mock classes with new
in initializers on PHP 8.1
#1160
Merged
new
in initializers on PHP 8.1
#1160