Skip to content

Commit

Permalink
Next version
Browse files Browse the repository at this point in the history
  • Loading branch information
GrahamCampbell committed Mar 17, 2024
1 parent 84e646a commit 2afd9d3
Show file tree
Hide file tree
Showing 5 changed files with 42 additions and 23 deletions.
30 changes: 22 additions & 8 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,20 @@ jobs:
strategy:
matrix:
php: ['7.4', '8.0', '8.1', '8.2', '8.3']
laravel: ['8', '9', '10']
laravel: ['8', '9', '10', '11']
exclude:
- php: '7.4'
laravel: '9'
- php: '7.4'
laravel: '10'
- php: '7.4'
laravel: '11'
- php: '8.0'
laravel: '10'
- php: '8.0'
laravel: '11'
- php: '8.1'
laravel: '11'
- php: '8.2'
laravel: '8'
- php: '8.3'
Expand All @@ -44,31 +50,39 @@ jobs:
run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"

- name: Select Laravel 8
uses: nick-invision/retry@v2
uses: nick-invision/retry@v3
with:
timeout_minutes: 5
max_attempts: 5
command: composer require "laravel/framework:^8.83.27" "phpunit/phpunit:^9.6.15" --no-update --no-interaction
command: composer require "laravel/framework:^8.83.27" "phpunit/phpunit:^9.6.17" --no-update --no-interaction
if: "matrix.laravel == '8'"

- name: Select Laravel 9
uses: nick-invision/retry@v2
uses: nick-invision/retry@v3
with:
timeout_minutes: 5
max_attempts: 5
command: composer require "laravel/framework:^9.52.16" "phpunit/phpunit:^9.6.15" --no-update --no-interaction
command: composer require "laravel/framework:^9.52.16" "phpunit/phpunit:^9.6.17" --no-update --no-interaction
if: "matrix.laravel == '9'"

- name: Select Laravel 10
uses: nick-invision/retry@v2
uses: nick-invision/retry@v3
with:
timeout_minutes: 5
max_attempts: 5
command: composer require "laravel/framework:^10.34.2" "phpunit/phpunit:^10.4.2" --no-update --no-interaction
command: composer require "laravel/framework:^10.34.2" "phpunit/phpunit:^10.5.13" --no-update --no-interaction
if: "matrix.laravel == '10'"

- name: Select Laravel 11
uses: nick-invision/retry@v3
with:
timeout_minutes: 5
max_attempts: 5
command: composer require "laravel/framework:^11.0.7" "phpunit/phpunit:^10.5.13" --no-update --no-interaction
if: "matrix.laravel == '11'"

- name: Install PHP Dependencies
uses: nick-invision/retry@v2
uses: nick-invision/retry@v3
with:
timeout_minutes: 5
max_attempts: 5
Expand Down
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@ CHANGE LOG
==========


## V10.2 (17/03/2024)

* Added Laravel 11 support


## V10.1 (04/12/2023)

* Added PHP 8.3 support
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2013-2023 Graham Campbell <hello@gjcampbell.co.uk>
Copyright (c) 2013-2024 Graham Campbell <hello@gjcampbell.co.uk>

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
18 changes: 9 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,19 +16,19 @@ Laravel Throttle was created by, and is maintained by [Graham Campbell](https://

## Installation

This version requires [PHP](https://www.php.net/) 7.4-8.3 and supports [Laravel](https://laravel.com/) 8-10.
This version requires [PHP](https://www.php.net/) 7.4-8.3 and supports [Laravel](https://laravel.com/) 8-11.

| Throttle | L5.5 | L5.6 | L5.7 | L5.8 | L6 | L7 | L8 | L9 | L10 |
|----------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|
| 7.5 | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :x: | :x: | :x: |
| 8.2 | :x: | :x: | :x: | :x: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :x: |
| 9.0 | :x: | :x: | :x: | :x: | :x: | :x: | :white_check_mark: | :white_check_mark: | :x: |
| 10.1 | :x: | :x: | :x: | :x: | :x: | :x: | :white_check_mark: | :white_check_mark: | :white_check_mark: |
| Throttle | L5.5 | L5.6 | L5.7 | L5.8 | L6 | L7 | L8 | L9 | L10 | L11 |
|----------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|
| 7.5 | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :x: | :x: | :x: | :x: |
| 8.2 | :x: | :x: | :x: | :x: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :x: | :x: |
| 9.0 | :x: | :x: | :x: | :x: | :x: | :x: | :white_check_mark: | :white_check_mark: | :x: | :x: |
| 10.2 | :x: | :x: | :x: | :x: | :x: | :x: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |

To get the latest version, simply require the project using [Composer](https://getcomposer.org/):

```bash
$ composer require "graham-campbell/throttle:^10.1"
$ composer require "graham-campbell/throttle:^10.2"
```

Once installed, if you are not using automatic package discovery, then you need to register the `GrahamCampbell\Throttle\ThrottleServiceProvider` service provider in your `config/app.php`.
Expand Down Expand Up @@ -103,7 +103,7 @@ This class implements `Factories\FactoryInterface` completely. This is the only

##### Http\Middleware\ThrottleMiddleware

You may put the `GrahamCampbell\Throttle\Http\Middleware\ThrottleMiddleware` middleware in front of your routes to throttle them. The middleware can take up to two parameters. The two parameters are `limit` and `time`. It may be useful for you to take a look at the [source](https://github.com/GrahamCampbell/Laravel-Throttle/blob/master/src/Http/Middleware/ThrottleMiddleware.php) for this, read the [tests](https://github.com/GrahamCampbell/Laravel-Throttle/blob/master/tests/Functional/MiddlewareTest.php), or check out Laravel's [documentation](http://laravel.com/docs/5.1/middleware) if you need to.
You may put the `GrahamCampbell\Throttle\Http\Middleware\ThrottleMiddleware` middleware in front of your routes to throttle them. The middleware can take up to two parameters. The two parameters are `limit` and `time`. It may be useful for you to take a look at the [source](https://github.com/GrahamCampbell/Laravel-Throttle/blob/10.2/src/Http/Middleware/ThrottleMiddleware.php) for this, read the [tests](https://github.com/GrahamCampbell/Laravel-Throttle/blob/10.2/tests/Functional/MiddlewareTest.php), or check out Laravel's [documentation](https://laravel.com/docs/11.x/middleware) if you need to.

##### ThrottleServiceProvider

Expand Down
10 changes: 5 additions & 5 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,16 @@
],
"require": {
"php": "^7.4.15 || ^8.0.2",
"illuminate/cache": "^8.75 || ^9.0 || ^10.0",
"illuminate/contracts": "^8.75 || ^9.0 || ^10.0",
"illuminate/http": "^8.75 || ^9.0 || ^10.0",
"illuminate/support": "^8.75 || ^9.0 || ^10.0"
"illuminate/cache": "^8.75 || ^9.0 || ^10.0 || ^11.0",
"illuminate/contracts": "^8.75 || ^9.0 || ^10.0 || ^11.0",
"illuminate/http": "^8.75 || ^9.0 || ^10.0 || ^11.0",
"illuminate/support": "^8.75 || ^9.0 || ^10.0 || ^11.0"
},
"require-dev": {
"graham-campbell/analyzer": "^4.1",
"graham-campbell/testbench": "^6.1",
"mockery/mockery": "^1.6.6",
"phpunit/phpunit": "^9.6.15 || ^10.4.2"
"phpunit/phpunit": "^9.6.17 || ^10.5.13"
},
"autoload": {
"psr-4": {
Expand Down

0 comments on commit 2afd9d3

Please sign in to comment.