Skip to content

Commit

Permalink
fix(di): fix missing container injection from Sf6 (#12)
Browse files Browse the repository at this point in the history
* fix(di): fix missing container injection from Sf6 & refactor using bindings

* chore: added a CODEOWNERS file
  • Loading branch information
shavounet authored Oct 3, 2022
1 parent 6b3ee49 commit 239d2b3
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 28 deletions.
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* @BedrockStreaming/api
36 changes: 8 additions & 28 deletions src/Resources/config/services.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,34 +2,14 @@ services:
_defaults:
autowire: true
autoconfigure: true
bind:
Symfony\Component\DependencyInjection\ContainerInterface $container: '@service_container'
int $limit: '%bedrock_rate_limit.limit%'
int $period: '%bedrock_rate_limit.period%'
array $routes: '%bedrock_rate_limit.routes%'
bool $limitByRoute: '%bedrock_rate_limit.limit_by_route%'
bool $displayHeaders: '%bedrock_rate_limit.display_headers%'
iterable $rateLimitModifiers: !tagged rate_limit.modifiers

Bedrock\Bundle\RateLimitBundle\:
resource: '../../../src/*'

Bedrock\Bundle\RateLimitBundle\EventListener\ReadRateLimitAttributeListener:
arguments:
$limit: '%bedrock_rate_limit.limit%'
$period: '%bedrock_rate_limit.period%'
$limitByRoute: '%bedrock_rate_limit.limit_by_route%'
$rateLimitModifiers: !tagged rate_limit.modifiers

Bedrock\Bundle\RateLimitBundle\EventListener\ReadRateLimitConfigurationListener:
arguments:
$limit: '%bedrock_rate_limit.limit%'
$period: '%bedrock_rate_limit.period%'
$rateLimitModifiers: !tagged rate_limit.modifiers
$routes: '%bedrock_rate_limit.routes%'

Bedrock\Bundle\RateLimitBundle\EventListener\ReadGraphQLRateLimitAttributeListener:
arguments:
$limit: '%bedrock_rate_limit.limit%'
$period: '%bedrock_rate_limit.period%'
$rateLimitModifiers: !tagged rate_limit.modifiers

Bedrock\Bundle\RateLimitBundle\EventListener\LimitRateListener:
arguments:
$displayHeaders: '%bedrock_rate_limit.display_headers%'

Bedrock\Bundle\RateLimitBundle\EventListener\AddRateLimitHeadersListener:
arguments:
$displayHeaders: '%bedrock_rate_limit.display_headers%'

0 comments on commit 239d2b3

Please sign in to comment.