-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: API Platform documentation bridge
- Loading branch information
1 parent
8320b46
commit ce4cd27
Showing
3 changed files
with
40 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
34 changes: 34 additions & 0 deletions
34
DependencyInjection/CompilerPass/ApiPlatformCompilerPass.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
<?php | ||
|
||
/* | ||
* This file is part of the CoopTilleulsForgotPasswordBundle package. | ||
* | ||
* (c) Vincent Chalamon <vincent@les-tilleuls.coop> | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
*/ | ||
|
||
declare(strict_types=1); | ||
|
||
namespace CoopTilleuls\ForgotPasswordBundle\DependencyInjection\CompilerPass; | ||
|
||
use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; | ||
use Symfony\Component\DependencyInjection\ContainerBuilder; | ||
|
||
/** | ||
* @author Vincent Chalamon <vincent@les-tilleuls.coop> | ||
*/ | ||
final class ApiPlatformCompilerPass implements CompilerPassInterface | ||
{ | ||
public function process(ContainerBuilder $container): void | ||
{ | ||
if (!$container->hasDefinition('api_platform.swagger.normalizer.documentation')) { | ||
$container->removeDefinition('coop_tilleuls_forgot_password.normalizer.documentation'); | ||
} | ||
|
||
if (!$container->hasDefinition('api_platform.openapi.factory')) { | ||
$container->removeDefinition('coop_tilleuls_forgot_password.openapi.factory'); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters