From 2afd9d3703ca901f1777a0fa654e653835447ac2 Mon Sep 17 00:00:00 2001 From: Graham Campbell Date: Sun, 17 Mar 2024 23:18:21 +0000 Subject: [PATCH] Next version --- .github/workflows/tests.yml | 30 ++++++++++++++++++++++-------- CHANGELOG.md | 5 +++++ LICENSE | 2 +- README.md | 18 +++++++++--------- composer.json | 10 +++++----- 5 files changed, 42 insertions(+), 23 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 8839233..ac80a22 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -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' @@ -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 diff --git a/CHANGELOG.md b/CHANGELOG.md index 7181dae..bd8f5ae 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/LICENSE b/LICENSE index 38268b3..0d13eeb 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2013-2023 Graham Campbell +Copyright (c) 2013-2024 Graham Campbell Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/README.md b/README.md index 238b0df..305c437 100644 --- a/README.md +++ b/README.md @@ -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`. @@ -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 diff --git a/composer.json b/composer.json index 2161e02..0ab9815 100644 --- a/composer.json +++ b/composer.json @@ -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": {