mirror of
https://github.com/retailcrm/NelmioApiDocBundle.git
synced 2025-02-09 02:59:27 +03:00
Fix deprecations (#1924)
This commit is contained in:
parent
c0b57fd371
commit
f5fb7a4088
@ -16,7 +16,7 @@ use Symfony\Component\Config\Definition\ConfigurationInterface;
|
||||
|
||||
final class Configuration implements ConfigurationInterface
|
||||
{
|
||||
public function getConfigTreeBuilder()
|
||||
public function getConfigTreeBuilder(): TreeBuilder
|
||||
{
|
||||
$treeBuilder = new TreeBuilder('nelmio_api_doc');
|
||||
|
||||
|
@ -39,7 +39,7 @@ Open a command console, enter your project directory and execute the following c
|
||||
|
||||
class AppKernel extends Kernel
|
||||
{
|
||||
public function registerBundles()
|
||||
public function registerBundles(): iterable
|
||||
{
|
||||
$bundles = [
|
||||
// ...
|
||||
|
@ -12,6 +12,7 @@
|
||||
namespace Nelmio\ApiDocBundle\Tests\Functional;
|
||||
|
||||
use Nelmio\ApiDocBundle\Exception\UndocumentedArrayItemsException;
|
||||
use Symfony\Component\HttpKernel\KernelInterface;
|
||||
|
||||
class ArrayItemsErrorTest extends WebTestCase
|
||||
{
|
||||
@ -30,7 +31,7 @@ class ArrayItemsErrorTest extends WebTestCase
|
||||
$this->getSwaggerDefinition();
|
||||
}
|
||||
|
||||
protected static function createKernel(array $options = [])
|
||||
protected static function createKernel(array $options = []): KernelInterface
|
||||
{
|
||||
return new TestKernel(TestKernel::ERROR_ARRAY_ITEMS);
|
||||
}
|
||||
|
@ -12,6 +12,7 @@
|
||||
namespace Nelmio\ApiDocBundle\Tests\Functional;
|
||||
|
||||
use Hateoas\Configuration\Embedded;
|
||||
use Symfony\Component\HttpKernel\KernelInterface;
|
||||
|
||||
class BazingaFunctionalTest extends WebTestCase
|
||||
{
|
||||
@ -120,7 +121,7 @@ class BazingaFunctionalTest extends WebTestCase
|
||||
], $this->getModel('BazingaUserTyped')->toArray());
|
||||
}
|
||||
|
||||
protected static function createKernel(array $options = [])
|
||||
protected static function createKernel(array $options = []): KernelInterface
|
||||
{
|
||||
return new TestKernel(TestKernel::USE_JMS | TestKernel::USE_BAZINGA);
|
||||
}
|
||||
|
@ -11,6 +11,8 @@
|
||||
|
||||
namespace Nelmio\ApiDocBundle\Tests\Functional;
|
||||
|
||||
use Symfony\Component\HttpKernel\KernelInterface;
|
||||
|
||||
class JMSFunctionalTest extends WebTestCase
|
||||
{
|
||||
protected function setUp(): void
|
||||
@ -302,7 +304,7 @@ class JMSFunctionalTest extends WebTestCase
|
||||
], $this->getModel('JMSNamingStrategyConstraints')->toArray());
|
||||
}
|
||||
|
||||
protected static function createKernel(array $options = [])
|
||||
protected static function createKernel(array $options = []): KernelInterface
|
||||
{
|
||||
return new TestKernel(TestKernel::USE_JMS);
|
||||
}
|
||||
|
@ -52,7 +52,7 @@ class TestKernel extends Kernel
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function registerBundles()
|
||||
public function registerBundles(): iterable
|
||||
{
|
||||
$bundles = [
|
||||
new FrameworkBundle(),
|
||||
@ -241,7 +241,7 @@ class TestKernel extends Kernel
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function getCacheDir()
|
||||
public function getCacheDir(): string
|
||||
{
|
||||
return parent::getCacheDir().'/'.$this->flags;
|
||||
}
|
||||
@ -249,7 +249,7 @@ class TestKernel extends Kernel
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function getLogDir()
|
||||
public function getLogDir(): string
|
||||
{
|
||||
return parent::getLogDir().'/'.$this->flags;
|
||||
}
|
||||
|
@ -14,10 +14,11 @@ namespace Nelmio\ApiDocBundle\Tests\Functional;
|
||||
use EXSyst\Component\Swagger\Operation;
|
||||
use EXSyst\Component\Swagger\Schema;
|
||||
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase as BaseWebTestCase;
|
||||
use Symfony\Component\HttpKernel\KernelInterface;
|
||||
|
||||
class WebTestCase extends BaseWebTestCase
|
||||
{
|
||||
protected static function createKernel(array $options = [])
|
||||
protected static function createKernel(array $options = []): KernelInterface
|
||||
{
|
||||
return new TestKernel();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user