Skip to content

Commit a5d017d

Browse files
authored
test(symfony): use a component enum in UpgradeApiFilterVisitorTest (#8907)
1 parent 61beb4e commit a5d017d

2 files changed

Lines changed: 22 additions & 2 deletions

File tree

‎src/Symfony/Tests/Bundle/Command/UpgradeApiFilterVisitorTest.php‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616
use ApiPlatform\Symfony\Bundle\Command\Upgrade\UpgradeApiFilterParameter;
1717
use ApiPlatform\Symfony\Bundle\Command\Upgrade\UpgradeApiFilterVisitor;
18-
use ApiPlatform\Tests\Fixtures\TestBundle\Entity\Issue7126\StringBackedEnum;
18+
use ApiPlatform\Symfony\Tests\Fixtures\Enum\StringBackedEnum;
1919
use PhpParser\NodeTraverser;
2020
use PhpParser\NodeVisitor\CloningVisitor;
2121
use PhpParser\ParserFactory;
@@ -125,7 +125,7 @@ class ConvertedEnum
125125
126126
use ApiPlatform\Doctrine\Orm\Filter\ExactFilter;
127127
use ApiPlatform\Metadata\QueryParameter;
128-
use ApiPlatform\Tests\Fixtures\TestBundle\Entity\Issue7126\StringBackedEnum;
128+
use ApiPlatform\Symfony\Tests\Fixtures\Enum\StringBackedEnum;
129129
use Symfony\Component\TypeInfo\TypeIdentifier;
130130
use Symfony\Component\TypeInfo\Type\BackedEnumType;
131131
use Symfony\Component\TypeInfo\Type\BuiltinType;
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<?php
2+
3+
/*
4+
* This file is part of the API Platform project.
5+
*
6+
* (c) Kévin Dunglas <dunglas@gmail.com>
7+
*
8+
* For the full copyright and license information, please view the LICENSE
9+
* file that was distributed with this source code.
10+
*/
11+
12+
declare(strict_types=1);
13+
14+
namespace ApiPlatform\Symfony\Tests\Fixtures\Enum;
15+
16+
enum StringBackedEnum: string
17+
{
18+
case One = 'one';
19+
case Two = 'two';
20+
}

0 commit comments

Comments
 (0)