[5.1] Ignore more deprecations for Mockery mocks

This commit is contained in:
Thomas Calvet 2020-10-02 15:05:43 +02:00
parent 8ae323b8a7
commit 58e6cb1ddc
1 changed files with 1 additions and 1 deletions

View File

@ -76,7 +76,7 @@ class RouteCollection implements \IteratorAggregate, \Countable
*/
public function add(string $name, Route $route/*, int $priority = 0*/)
{
if (\func_num_args() < 3 && __CLASS__ !== static::class && __CLASS__ !== (new \ReflectionMethod($this, __FUNCTION__))->getDeclaringClass()->getName() && !$this instanceof \PHPUnit\Framework\MockObject\MockObject && !$this instanceof \Prophecy\Prophecy\ProphecySubjectInterface) {
if (\func_num_args() < 3 && __CLASS__ !== static::class && __CLASS__ !== (new \ReflectionMethod($this, __FUNCTION__))->getDeclaringClass()->getName() && !$this instanceof \PHPUnit\Framework\MockObject\MockObject && !$this instanceof \Prophecy\Prophecy\ProphecySubjectInterface && !$this instanceof \Mockery\MockInterface) {
trigger_deprecation('symfony/routing', '5.1', 'The "%s()" method will have a new "int $priority = 0" argument in version 6.0, not defining it is deprecated.', __METHOD__);
}