tempest-framework
tempest-framework copied to clipboard
feat: Adds Timebox utility class and extends Clock
Motivation: Timebox is useful in:
- authentication, to prevent certain types of attacks (https://ephort.dk/blog/laravel-timing-attack-vulnerability/?ref=securinglaravel.com)
- sub-minute scheduler, where we want every iteration of scheduler to run for exactly one second
After this gets merged, I'll adjust https://github.com/tempestphp/tempest-console/pull/24 to utilize it
Pull Request Test Coverage Report for Build 9045933531
Warning: This coverage report may be inaccurate.
This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.
- For more information on this, see Tracking coverage changes with pull request builds.
- To avoid this issue with future PRs, see these Recommended CI Configurations.
- For a quick fix, rebase this PR at GitHub. Your next report should be accurate.
Details
- 30 of 33 (90.91%) changed or added relevant lines in 4 files are covered.
- 21 unchanged lines in 4 files lost coverage.
- Overall coverage increased (+0.3%) to 86.566%
| Changes Missing Coverage | Covered Lines | Changed/Added Lines | % |
|---|---|---|---|
| src/Clock/GenericClock.php | 1 | 2 | 50.0% |
| src/Clock/MockClock.php | 4 | 6 | 66.67% |
| <!-- | Total: | 30 | 33 |
| Files with Coverage Reduction | New Missed Lines | % |
|---|---|---|
| src/Http/Session/Managers/FileSessionManager.php | 1 | 97.73% |
| src/Tempest.php | 4 | 0.0% |
| src/Application/ApplicationInitializer.php | 7 | 0.0% |
| src/functions.php | 9 | 64.0% |
| <!-- | Total: | 21 |
| Totals | |
|---|---|
| Change from base Build 8947731007: | 0.3% |
| Covered Lines: | 1321 |
| Relevant Lines: | 1526 |
💛 - Coveralls
Since we're not going for sub-minute scheduling, I don't think we should add this PR for now.
Maybe when we're further working on Auth we can reconsider it, but I'm gonna close it for now. Thanks for thinking along though! Really appreciate all your work 😁