Skip to content

Commit 4680724

Browse files
lchruscielloic425
andauthored
fix(metadata): resource name collection missing deprecation (#4953)
* fix(metadata): resource name collection missing deprecation * fix(metadata): [Minor] Removal of empty lines and adding class to exclusion Co-authored-by: Loïc Frémont <[email protected]>
1 parent d3f5fb8 commit 4680724

File tree

3 files changed

+25
-0
lines changed

3 files changed

+25
-0
lines changed

phpstan.neon.dist

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,7 @@ parameters:
178178
- src/Core/Metadata/Property/Factory/CachedPropertyNameCollectionFactory.php
179179
- src/Core/Metadata/Property/Factory/ExtractorPropertyNameCollectionFactory.php
180180
- src/Core/Metadata/Property/PropertyNameCollection.php
181+
- src/Core/Metadata/Resource/ResourceNameCollection.php
181182
- src/Core/OpenApi/Model/Components.php
182183
- src/Core/OpenApi/Model/Contact.php
183184
- src/Core/OpenApi/Model/Encoding.php
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
<?php
2+
3+
/*
4+
* This file is part of the API Platform project.
5+
*
6+
* (c) Kévin Dunglas <[email protected]>
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\Core\Metadata\Resource;
15+
16+
class_exists(\ApiPlatform\Metadata\Resource\ResourceNameCollection::class);
17+
18+
if (false) {
19+
final class ResourceNameCollection extends \ApiPlatform\Metadata\Resource\ResourceNameCollection
20+
{
21+
}
22+
}

src/deprecation.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,8 @@ class_alias($interfaceName, $oldInterfaceName);
3939
ApiPlatform\Core\Metadata\Property\Factory\CachedPropertyNameCollectionFactory::class => ApiPlatform\Metadata\Property\Factory\CachedPropertyNameCollectionFactory::class,
4040
ApiPlatform\Core\Metadata\Property\Factory\ExtractorPropertyNameCollectionFactory::class => ApiPlatform\Metadata\Property\Factory\ExtractorPropertyNameCollectionFactory::class,
4141

42+
ApiPlatform\Core\Metadata\Resource\ResourceNameCollection::class => ApiPlatform\Metadata\Resource\ResourceNameCollection::class,
43+
4244
// Test cases
4345
ApiPlatform\Core\Bridge\Symfony\Bundle\Test\ApiTestCase::class => ApiPlatform\Symfony\Bundle\Test\ApiTestCase::class,
4446
ApiPlatform\Core\Test\DoctrineMongoDbOdmFilterTestCase::class => ApiPlatform\Test\DoctrineMongoDbOdmFilterTestCase::class,

0 commit comments

Comments
 (0)