Skip to content

Conversation

@orlandothoeny
Copy link
Contributor

@orlandothoeny orlandothoeny commented Nov 18, 2025

Allows configuring the bundle to make it skip the rate limiting when the storage backend throws an exception.
Can be configured for all routes, or by setting it per attribute. Can also be combined, the attribute overrides whe global config.

I have also made some general small refactorings, I have split those into a separate commit to make reviewing easier. They shouldn't contain anything that changes behaviour. => Moved to #141

In general, the behaviour is the same as before. The fail open setting has to be explicitly enabled.

Adresses #89

Changelog:

  • Add possiblity to configure to skip rate limiting on storage error. Can be configured globally by setting the noxlogic_rate_limit.fail_open parameter and/or per #[RateLimit(failOpen: true)] Attribute
  • Added RateLimitStorageExceptionInterface as possible exception to StorageInterface methods

@orlandothoeny
Copy link
Contributor Author

Hi @goetas,

First off, I really appreciate your maintenance work.
I don't want to be pushy, but do you have a bit of time to review this PR by any chance?

Wish you nice holidays,
Orlando

@goetas
Copy link
Collaborator

goetas commented Dec 15, 2025

hi, your change looks great. however I'm really afraid of the backward compatibility of all the other unrelated addition you did in your PR (I mean all the additional type checks).

@orlandothoeny
Copy link
Contributor Author

Hi @goetas,

Thanks for the swift reply. I'll see if I can split off the refactorings into a separate PR. And I'll have a more detailed look to find BC breaks in those.

Changelog:
* Add possiblity to configure to skip rate limiting on storage error. Can be configured globally by setting the `noxlogic_rate_limit.fail_open` parameter and/or per `#[RateLimit(failOpen: true)]` Attribute
* Added `RateLimitStorageExceptionInterface` as possible exception to `StorageInterface` methods
Comment on lines +3 to +4
treatPhpDocTypesAsCertain: false
reportUnmatchedIgnoredErrors: false
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not great.. I hat to add these to get the PHPStan CI step to pass on all PHP + Symfony version combinations. Because on newer Symfony versions, the method.notFound error is not thrown anymore in Configuration::getConfigTreeBuilder()

@orlandothoeny
Copy link
Contributor Author

@goetas I have split off the misc refactorings into #141 and removed them from this PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants