diff --git a/packages/EasyApiToken/composer.json b/packages/EasyApiToken/composer.json index d3f801914..7639005e3 100644 --- a/packages/EasyApiToken/composer.json +++ b/packages/EasyApiToken/composer.json @@ -24,8 +24,7 @@ "phpseclib/phpseclib": "^3.0", "phpunit/phpunit": "^10.2", "symfony/cache": "^6.4", - "symfony/http-client": "^6.4", - "symfony/yaml": "^6.4" + "symfony/http-client": "^6.4" }, "autoload": { "psr-4": { diff --git a/packages/EasyApiToken/tests/Fixture/config/default_firewall_context.php b/packages/EasyApiToken/tests/Fixture/config/default_firewall_context.php new file mode 100644 index 000000000..722a53ef1 --- /dev/null +++ b/packages/EasyApiToken/tests/Fixture/config/default_firewall_context.php @@ -0,0 +1,21 @@ +services(); + + $services->set('firewall_config', FirewallConfig::class) + ->arg('$name', 'my-firewall') + ->arg('$userChecker', 'my-user-checker'); + + $services->set('firewall_context', FirewallContext::class) + ->arg('$listeners', []) + ->arg('$exceptionListener', null) + ->arg('$logoutListener', null) + ->arg('$config', service('firewall_config')); +}; diff --git a/packages/EasyApiToken/tests/Fixture/config/default_firewall_context.yaml b/packages/EasyApiToken/tests/Fixture/config/default_firewall_context.yaml deleted file mode 100644 index 4fdab2499..000000000 --- a/packages/EasyApiToken/tests/Fixture/config/default_firewall_context.yaml +++ /dev/null @@ -1,14 +0,0 @@ -services: - firewall_config: - class: Symfony\Bundle\SecurityBundle\Security\FirewallConfig - arguments: - $name: 'my-firewall' - $userChecker: 'my-user-checker' - - firewall_context: - class: Symfony\Bundle\SecurityBundle\Security\FirewallContext - arguments: - $listeners: [] - $exceptionListener: null - $logoutListener: null - $config: '@firewall_config' diff --git a/packages/EasyApiToken/tests/Unit/src/Common/Provider/AbstractFirewallAwareDecoderProviderTest.php b/packages/EasyApiToken/tests/Unit/src/Common/Provider/AbstractFirewallAwareDecoderProviderTest.php index f1930dd03..85e0d7daf 100644 --- a/packages/EasyApiToken/tests/Unit/src/Common/Provider/AbstractFirewallAwareDecoderProviderTest.php +++ b/packages/EasyApiToken/tests/Unit/src/Common/Provider/AbstractFirewallAwareDecoderProviderTest.php @@ -25,7 +25,7 @@ public static function providerTestDecoderProvider(): iterable yield 'Default firewall from container' => [ 'my-firewall', [ - __DIR__ . '/../../../../Fixture/config/default_firewall_context.yaml', + __DIR__ . '/../../../../Fixture/config/default_firewall_context.php', ], [ 'firewall_context' => true,