Problem/Motivation
Currently the request service is injected into the Flood\DatabaseBackend. In Symfony 2.4 the request_stack service replaces the request service.
Proposed resolution
Inject the request_stack service instead of the request service into the flood database backend. Also add test coverage fro the Flood\DatabaseBackend backend.
Remaining tasks
None
User interface changes
None
API changes
None
| Comment | File | Size | Author |
|---|---|---|---|
| #9 | 2223631-use-request-stack-in-database-flood-backend-8.diff | 9.52 KB | znerol |
Comments
Comment #1
znerol commentedComment #2
dawehnerIs there a particular reason why this is done like that? it feels more like fixing a symptom than the actual underlying problem.
Comment #3
znerol commentedAddressed #2. Discussed with @dawehner: We can safely expect flood control to not be used outside the kernel request/response loop.
Also converted
Drupal\Core\Flood\MemoryBackend(which only seems to be used in the test case) and copy-pasted the test-case for memory-backend such that database-backend is covered also. The test strategy should probably be revisited in a follow-up, but let's not block the request-stack conversion on this.Comment #4
dawehnerIt is quite cool that you actually added new test coverage
Comment #6
znerol commented3: 2223631-use-request-stack-in-database-flood-backend-3.diff queued for re-testing.
Comment #7
znerol commentedBack to RTBC, last test-failure was a test-bot-failure.
Comment #9
znerol commentedReroll.
Comment #10
znerol commentedComment #11
dawehnerComment #12
alexpottCommitted 797c8de and pushed to 8.x. Thanks!