phpspec / prophecy

Highly opinionated mocking framework for PHP 5.3+
MIT License
8.53k stars 242 forks source link

MagicCallPatch: prevent deprecation notice #628

Closed jrfnl closed 3 months ago

jrfnl commented 3 months ago

Reflection Docblock has made some internal changes, including deprecating the getArguments() method in favour of getParameters().

As Reflection Docblock updated the minimum PHP requirement to PHP 7.4 with the 5.4.0 release, to maintain the minimum supported version of PHP 7.2 of Prophecy, a toggle is needed to prevent the deprecation notice from Reflection Docblock.

Notes: I did consider the alternative of raising the minimum PHP requirement to PHP 7..4. In my opinion, this would be problematic for the following reason:

As PHPUnit 10 (and 11) brought huge changes, a lot of larger packages have not upgraded to PHPUnit 10/11 yet, so these will be testing their PHP 8.4 readiness with PHPUnit 9, which means that continuing to support PHPUnit 9 is important for the time being.

Refs: