Skip to content

Commit

Permalink
feature/easy-api-token-use-php-configs-in-tests (#1421)
Browse files Browse the repository at this point in the history
  • Loading branch information
alexndlm committed Jun 19, 2024
1 parent 3000fc3 commit 40b239d
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 17 deletions.
3 changes: 1 addition & 2 deletions packages/EasyApiToken/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<?php
declare(strict_types=1);

namespace Symfony\Component\DependencyInjection\Loader\Configurator;

use Symfony\Bundle\SecurityBundle\Security\FirewallConfig;
use Symfony\Bundle\SecurityBundle\Security\FirewallContext;

return static function (ContainerConfigurator $containerConfigurator): void {
$services = $containerConfigurator->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'));
};

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 40b239d

Please sign in to comment.