mirror of
https://github.com/retailcrm/NelmioApiDocBundle.git
synced 2025-02-09 02:59:27 +03:00
Fix CS
This commit is contained in:
parent
b4c74ee938
commit
0fada289f5
@ -31,7 +31,6 @@ use Symfony\Component\DependencyInjection\ContainerBuilder;
|
||||
use Symfony\Component\DependencyInjection\Definition;
|
||||
use Symfony\Component\HttpKernel\Kernel;
|
||||
use Symfony\Component\Routing\Loader\Configurator\RoutingConfigurator;
|
||||
use Symfony\Component\Routing\RouteCollectionBuilder;
|
||||
use Symfony\Component\Serializer\Annotation\SerializedName;
|
||||
|
||||
class TestKernel extends Kernel
|
||||
@ -112,7 +111,8 @@ class TestKernel extends Kernel
|
||||
/**
|
||||
* BC for sf < 5.1.
|
||||
*/
|
||||
private function import($routes, $resource, $prefix, $type) {
|
||||
private function import($routes, $resource, $prefix, $type)
|
||||
{
|
||||
if ($routes instanceof RoutingConfigurator) {
|
||||
$routes->withPath($prefix)->import($resource, $type);
|
||||
} else {
|
||||
|
@ -14,6 +14,7 @@ namespace Nelmio\ApiDocBundle\Tests\Functional;
|
||||
use OpenApi\Annotations as OA;
|
||||
use OpenApi\Generator;
|
||||
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase as BaseWebTestCase;
|
||||
use Symfony\Component\DependencyInjection\ContainerInterface;
|
||||
use Symfony\Component\HttpKernel\KernelInterface;
|
||||
|
||||
class WebTestCase extends BaseWebTestCase
|
||||
@ -168,4 +169,16 @@ class WebTestCase extends BaseWebTestCase
|
||||
sprintf('Failed asserting that property "%s" does not exist.', $property)
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* BC symfony < 5.3
|
||||
*/
|
||||
protected static function getContainer(): ContainerInterface
|
||||
{
|
||||
if (method_exists(parent::class, 'getContainer')) {
|
||||
return parent::getContainer();
|
||||
}
|
||||
|
||||
return static::$container;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user