mirror of
https://github.com/retailcrm/NelmioApiDocBundle.git
synced 2025-02-09 02:59:27 +03:00
Fix symfony 4 support
This commit is contained in:
parent
7a7b7c1030
commit
9c0db1ea51
@ -19,7 +19,7 @@ use Symfony\Component\Serializer\Annotation\Groups;
|
||||
class Article
|
||||
{
|
||||
/**
|
||||
* @Groups("light")
|
||||
* @Groups({"light"})
|
||||
*/
|
||||
public function setAuthor(User $author)
|
||||
{
|
||||
|
@ -14,7 +14,6 @@ namespace Nelmio\ApiDocBundle\Tests\Functional;
|
||||
use EXSyst\Component\Swagger\Operation;
|
||||
use EXSyst\Component\Swagger\Schema;
|
||||
use EXSyst\Component\Swagger\Tag;
|
||||
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
|
||||
|
||||
class FunctionalTest extends WebTestCase
|
||||
{
|
||||
|
@ -11,8 +11,6 @@
|
||||
|
||||
namespace Nelmio\ApiDocBundle\Tests\Functional;
|
||||
|
||||
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
|
||||
|
||||
class SwaggerUiTest extends WebTestCase
|
||||
{
|
||||
public function testSwaggerUi()
|
||||
|
@ -9,6 +9,8 @@
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Nelmio\ApiDocBundle\Tests\Functional;
|
||||
|
||||
use ApiPlatform\Core\Bridge\Symfony\Bundle\ApiPlatformBundle;
|
||||
use Nelmio\ApiDocBundle\NelmioApiDocBundle;
|
||||
use Nelmio\ApiDocBundle\Tests\Functional\TestBundle;
|
||||
@ -62,6 +64,7 @@ class TestKernel extends Kernel
|
||||
'templating' => [
|
||||
'engines' => ['twig'],
|
||||
],
|
||||
'serializer' => ['enable_annotations' => true],
|
||||
]);
|
||||
|
||||
// Filter routes
|
||||
|
27
Tests/Functional/WebTestCase.php
Normal file
27
Tests/Functional/WebTestCase.php
Normal file
@ -0,0 +1,27 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the NelmioApiDocBundle package.
|
||||
*
|
||||
* (c) Nelmio
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Nelmio\ApiDocBundle\Tests\Functional;
|
||||
|
||||
|
||||
use Nelmio\ApiDocBundle\Tests\Functional\TestKernel;
|
||||
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase as BaseWebTestCase;
|
||||
|
||||
class WebTestCase extends BaseWebTestCase
|
||||
{
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
protected static function getKernelClass()
|
||||
{
|
||||
return TestKernel::class;
|
||||
}
|
||||
}
|
@ -16,12 +16,13 @@
|
||||
],
|
||||
"require": {
|
||||
"php": "~7.0|~7.1",
|
||||
"symfony/framework-bundle": "^3.1|^4.0",
|
||||
"symfony/framework-bundle": "^3.2.5|^4.0",
|
||||
"symfony/property-info": "^3.1|^4.0",
|
||||
"exsyst/swagger": "~0.2.3",
|
||||
"zircote/swagger-php": "^2.0.9"
|
||||
},
|
||||
"require-dev": {
|
||||
"symfony/templating": "^2.8|^3.0|^4.0",
|
||||
"symfony/twig-bundle": "^3.0|^4.0",
|
||||
"symfony/asset": "^2.8|^3.0|^4.0",
|
||||
"symfony/console": "^2.8|^3.0|^4.0",
|
||||
|
@ -17,10 +17,6 @@
|
||||
</testsuite>
|
||||
</testsuites>
|
||||
|
||||
<php>
|
||||
<server name="KERNEL_DIR" value="Tests/Functional/" />
|
||||
</php>
|
||||
|
||||
<filter>
|
||||
<whitelist>
|
||||
<directory>.</directory>
|
||||
|
Loading…
x
Reference in New Issue
Block a user