-
-
Notifications
You must be signed in to change notification settings - Fork 614
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
43 additions
and
3 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
35 changes: 35 additions & 0 deletions
35
Tests/Functional/Bundle/DependencyInjection/BundleExtension.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,35 @@ | ||
<?php | ||
|
||
namespace Lexik\Bundle\JWTAuthenticationBundle\Tests\Functional\Bundle\DependencyInjection; | ||
|
||
use Symfony\Component\DependencyInjection\ContainerBuilder; | ||
use Symfony\Component\DependencyInjection\Extension\PrependExtensionInterface; | ||
use Symfony\Component\HttpKernel\DependencyInjection\Extension; | ||
use Symfony\Component\HttpKernel\Kernel; | ||
|
||
class BundleExtension extends Extension implements PrependExtensionInterface | ||
{ | ||
/** | ||
* {@inheritdoc} | ||
*/ | ||
public function prepend(ContainerBuilder $container) | ||
{ | ||
// Annotation must be disabled since this bundle doesn't use Doctrine | ||
// The framework allows enabling/disabling them only since symfony 3.2 where | ||
// doctrine/annotations has been removed from required dependencies | ||
$annotationsEnabled = (int) Kernel::MAJOR_VERSION >= 3 && (int) Kernel::MINOR_VERSION >= 2; | ||
|
||
if (!$annotationsEnabled) { | ||
return; | ||
} | ||
|
||
$container->prependExtensionConfig('framework', ['annotations' => ['enabled' => false]]); | ||
} | ||
|
||
/** | ||
* {@inheritdoc} | ||
*/ | ||
public function load(array $configs, ContainerBuilder $container) | ||
{ | ||
} | ||
} |
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