Skip to content

Commit

Permalink
minor #1250 Test with API Platform 4 (chalasr)
Browse files Browse the repository at this point in the history
This PR was merged into the 3.x branch.

Discussion
----------

Test with API Platform 4

Commits
-------

1221a9f Test with API Platform 4
  • Loading branch information
chalasr committed Nov 9, 2024
2 parents d5f05a1 + 1221a9f commit 6a56ddb
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
14 changes: 10 additions & 4 deletions Tests/Functional/AppKernel.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

namespace Lexik\Bundle\JWTAuthenticationBundle\Tests\Functional;

use ApiPlatform\Metadata\Util\IriHelper;
use ApiPlatform\Symfony\Bundle\ApiPlatformBundle;
use Jose\Bundle\JoseFramework\JoseFrameworkBundle;
use Lexik\Bundle\JWTAuthenticationBundle\LexikJWTAuthenticationBundle;
Expand Down Expand Up @@ -100,17 +101,22 @@ public function registerContainerConfiguration(LoaderInterface $loader): void
];
if (class_exists(ApiPlatformBundle::class)) {
$loader->load(function (ContainerBuilder $container) use (&$router) {
$container->prependExtensionConfig('api_platform', [
$config = [
'title' => 'LexikJWTAuthenticationBundle',
'description' => 'API Platform integration in LexikJWTAuthenticationBundle',
'version' => '1.0.0',
'keep_legacy_inflector' => false,
'use_symfony_listeners' => true,
'formats' => [
'jsonld' => ['application/ld+json'],
'json' => ['application/json']
'json' => ['application/json'],
]
]);
];

if (!class_exists(IriHelper::class)) {
$config['keep_legacy_inflector'] = false;
}

$container->prependExtensionConfig('api_platform', $config);
$container->prependExtensionConfig('lexik_jwt_authentication', [
'api_platform' => [
'check_path' => '/login_check',
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
"symfony/translation-contracts": "^1.0|^2.0|^3.0"
},
"require-dev": {
"api-platform/core": "^3.0",
"api-platform/core": "^3.0|^4.0",
"rector/rector": "^1.2",
"symfony/browser-kit": "^6.4|^7.0",
"symfony/console": "^6.4|^7.0",
Expand Down

0 comments on commit 6a56ddb

Please sign in to comment.