Skip to content

Commit

Permalink
Merge pull request #32 from jamesmills/laravel11-support
Browse files Browse the repository at this point in the history
Laravel 11 Support
  • Loading branch information
tibbsa authored Mar 18, 2024
2 parents 8c9c197 + 9ebe3c5 commit 2a1f15f
Show file tree
Hide file tree
Showing 5 changed files with 41 additions and 43 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@ docs
vendor
coverage
.phpunit.result.cache
.phpunit.cache
/.idea
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@

All notable changes to `laravel-notification-rate-limit` will be documented in this file

## 2.2.0 - 2024-03-18

- Added support for Laravel 11 (PHP 8.2/8.3)
- Removed support for PHP 8.0/8.1 and Laravel 9.x

## 2.1.0 - 2023-08-26

- Fixed [Issue #14](https://github.com/jamesmills/laravel-notification-rate-limit/issues/14): Rate limiting will now be checked when notifications are actually being dispatched from the queue, rather than when they are queued up (allowing rate limiting to work against notifications having an associated delay)
Expand Down
17 changes: 8 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,14 @@ Rate Limiting Notifications in Laravel using Laravel's native rate limiter to av

## Version Compatability

| Laravel | Laravel-Notification-Rate-Limit |
|:--------|:--------------------------------|
| 7.x | 1.0.0 |
| 8.x | 1.1.0 |
| 9.x | 2.x |
| 10.x | 2.x |
| Laravel | PHP | Laravel-Notification-Rate-Limit | Date |
|:--------|:--------|:--------------------------------|:-----------|
| 7.x | 7.1/8.0 | 1.0.0 | 2020-05-21 |
| 8.x | 7.1/8.0 | 1.1.0 | 2021-05-20 |
| 9.x | 8.0 | 2.1.0 | 2023-08-26 |
| 10.x | 8.0/8.1 | 2.1.0 | 2023-08-26 |
| 10.x | 8.2/8.3 | 2.2.0 | 2024-03-18 |
| 11.x | 8.2/8.3 | 2.2.0 | 2024-03-18 |

## Installation

Expand Down Expand Up @@ -213,7 +215,4 @@ This package is [Treeware](https://treeware.earth). If you use it in production,
## Inspiration

Inspiration for this package was taken from the article _Rate Limiting Notifications in Laravel_ by [Scott Wakefield](https://twitter.com/scottpwakefield) (now available only via the [Internet Archive's Wayback Machine](https://web.archive.org/web/20210303043709/https://scottwakefield.co.uk/journal/rate-limiting-notifications-in-laravel/)).

## Laravel Package Boilerplate

This package was generated using the [Laravel Package Boilerplate](https://laravelpackageboilerplate.com).
12 changes: 6 additions & 6 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@
}
],
"require": {
"php": "^8.0",
"illuminate/support": "^9.0|^10.0"
"php": "^8.2",
"illuminate/support": "^10.0|^11.0"
},
"require-dev": {
"orchestra/testbench": "^7.0|^8.0",
"phpunit/phpunit": "^9.5",
"timacdonald/log-fake": "^2.0"
"orchestra/testbench": "^8.0|^9.0",
"phpunit/phpunit": "^10.0",
"timacdonald/log-fake": "^2.2.0"
},
"autoload": {
"psr-4": {
Expand All @@ -35,7 +35,7 @@
}
},
"scripts": {
"test": "vendor/bin/phpunit",
"test": "vendor/bin/phpunit --no-coverage",
"test-coverage": "vendor/bin/phpunit --coverage-html coverage"

},
Expand Down
49 changes: 21 additions & 28 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
@@ -1,30 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit bootstrap="vendor/autoload.php"
backupGlobals="false"
backupStaticAttributes="false"
colors="true"
verbose="true"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
processIsolation="false"
stopOnFailure="false">
<testsuites>
<testsuite name="Test Suite">
<directory>tests</directory>
</testsuite>
</testsuites>
<coverage>
<include>
<directory suffix=".php">src/</directory>
</include>
<report>
<html outputDirectory="build/coverage" lowUpperBound="50" highLowerBound="90"/>
<text outputFile="build/coverage.txt" showUncoveredFiles="false" showOnlySummary="true"/>
<clover outputFile="clover.xml"/>
</report>
</coverage>
<logging>
<junit outputFile="build/report.junit.xml"/>
</logging>
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" bootstrap="vendor/autoload.php" backupGlobals="false" colors="true" processIsolation="false" stopOnFailure="false" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.5/phpunit.xsd" cacheDirectory=".phpunit.cache" backupStaticProperties="false">
<testsuites>
<testsuite name="Test Suite">
<directory>tests</directory>
</testsuite>
</testsuites>
<coverage>
<report>
<html outputDirectory="build/coverage" lowUpperBound="50" highLowerBound="90"/>
<text outputFile="build/coverage.txt" showUncoveredFiles="false" showOnlySummary="true"/>
<clover outputFile="clover.xml"/>
</report>
</coverage>
<logging>
<junit outputFile="build/report.junit.xml"/>
</logging>
<source>
<include>
<directory suffix=".php">src/</directory>
</include>
</source>
</phpunit>

0 comments on commit 2a1f15f

Please sign in to comment.