Fix symfony 4 support

This commit is contained in:
Guilhem Niot 2017-06-14 13:47:53 +02:00
parent 7a7b7c1030
commit 9c0db1ea51
7 changed files with 33 additions and 9 deletions

View File

@ -19,7 +19,7 @@ use Symfony\Component\Serializer\Annotation\Groups;
class Article
{
/**
* @Groups("light")
* @Groups({"light"})
*/
public function setAuthor(User $author)
{

View File

@ -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
{

View File

@ -11,8 +11,6 @@
namespace Nelmio\ApiDocBundle\Tests\Functional;
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
class SwaggerUiTest extends WebTestCase
{
public function testSwaggerUi()

View File

@ -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

View 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;
}
}

View File

@ -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",

View File

@ -17,10 +17,6 @@
</testsuite>
</testsuites>
<php>
<server name="KERNEL_DIR" value="Tests/Functional/" />
</php>
<filter>
<whitelist>
<directory>.</directory>