Skip to content
Permalink
Browse files

Merge branch '4.3' into 4.4

* 4.3:
  Fix more bad tests
  Fix test fixtures with deprecated method signatures.
  Fix 4.3 tests forward compat
  [Messenger] fix empty amqp body returned as false
  Fix routing cache broken when using generator_class
  • Loading branch information...
nicolas-grekas committed Sep 6, 2019
2 parents 1e85818 + 6b9d84b commit a634102b14695a5821f4a9f33b73c51b870b0708
@@ -0,0 +1,27 @@
<?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Bridge\Monolog\Tests;
use Symfony\Bridge\Monolog\Logger;
class ClassThatInheritLogger extends Logger
{
public function getLogs(): array
{
return parent::getLogs();
}
public function countErrors(): int
{
return parent::countErrors();
}
}
@@ -128,33 +128,12 @@ public function testReset()
/**
* @group legacy
* @expectedDeprecation The "Symfony\Bridge\Monolog\Logger::getLogs()" method will have a new "Request $request = null" argument in version 5.0, not defining it is deprecated since Symfony 4.2.
*/
public function testInheritedClassCallGetLogsWithoutArgument()
{
$loggerChild = new ClassThatInheritLogger('test');
$loggerChild->getLogs();
}
/**
* @group legacy
* @expectedDeprecation The "Symfony\Bridge\Monolog\Logger::countErrors()" method will have a new "Request $request = null" argument in version 5.0, not defining it is deprecated since Symfony 4.2.
*/
public function testInheritedClassCallCountErrorsWithoutArgument()
public function testInheritedClassWithoutArgument()
{
$loggerChild = new ClassThatInheritLogger('test');
$loggerChild->getLogs();
$loggerChild->countErrors();
}
}
class ClassThatInheritLogger extends Logger
{
public function getLogs(): array
{
return parent::getLogs();
}
public function countErrors(): int
{
return parent::countErrors();
}
}
@@ -0,0 +1,27 @@
<?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Bridge\Monolog\Tests\Processor;
use Symfony\Bridge\Monolog\Processor\DebugProcessor;
class ClassThatInheritDebugProcessor extends DebugProcessor
{
public function getLogs(): array
{
return parent::getLogs();
}
public function countErrors(): int
{
return parent::countErrors();
}
}
@@ -66,20 +66,12 @@ public function testWithRequestStack()
/**
* @group legacy
* @expectedDeprecation The "Symfony\Bridge\Monolog\Processor\DebugProcessor::getLogs()" method will have a new "Request $request = null" argument in version 5.0, not defining it is deprecated since Symfony 4.2.
*/
public function testInheritedClassCallGetLogsWithoutArgument()
{
$debugProcessorChild = new ClassThatInheritDebugProcessor();
$debugProcessorChild->getLogs();
}
/**
* @group legacy
* @expectedDeprecation The "Symfony\Bridge\Monolog\Processor\DebugProcessor::countErrors()" method will have a new "Request $request = null" argument in version 5.0, not defining it is deprecated since Symfony 4.2.
*/
public function testInheritedClassCallCountErrorsWithoutArgument()
public function testInheritedClassWithoutArgument()
{
$debugProcessorChild = new ClassThatInheritDebugProcessor();
$debugProcessorChild->getLogs();
$debugProcessorChild->countErrors();
}
@@ -96,16 +88,3 @@ private function getRecord($level = Logger::WARNING, $message = 'test')
];
}
}
class ClassThatInheritDebugProcessor extends DebugProcessor
{
public function getLogs(): array
{
return parent::getLogs();
}
public function countErrors(): int
{
return parent::countErrors();
}
}

0 comments on commit a634102

Please sign in to comment.
You can’t perform that action at this time.