Skip to content

Commit 8837ed9

Browse files
authored
Merge pull request #1146 from driesvints/php8
Add Support for PHP 8
2 parents e886a28 + 8e89f55 commit 8837ed9

File tree

14 files changed

+329
-145
lines changed

14 files changed

+329
-145
lines changed
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: "Backwards compatibility check"
2+
3+
on:
4+
pull_request:
5+
6+
jobs:
7+
bc-check:
8+
name: "Backwards compatibility check"
9+
10+
runs-on: "ubuntu-latest"
11+
12+
steps:
13+
- name: "Checkout"
14+
uses: "actions/checkout@v2"
15+
with:
16+
fetch-depth: 0
17+
18+
- name: "Backwards Compatibility Check"
19+
uses: docker://nyholm/roave-bc-check-ga
20+
with:
21+
args: --from=${{ github.event.pull_request.base.sha }}

.github/workflows/tests.yml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ jobs:
1111
runs-on: ubuntu-latest
1212

1313
strategy:
14-
fail-fast: true
14+
fail-fast: false
1515
matrix:
16-
php: [7.2, 7.3, 7.4]
16+
php: [7.3, 7.4, 8.0]
1717
stability: [prefer-lowest, prefer-stable]
1818

1919
name: PHP ${{ matrix.php }} - ${{ matrix.stability }}
@@ -32,9 +32,6 @@ jobs:
3232
- name: Install dependencies
3333
run: composer update --${{ matrix.stability }} --prefer-dist --no-interaction --no-progress
3434

35-
- name: Run PHPStan
36-
run: vendor/bin/phpstan analyse -l 7 -c phpstan.neon src tests
37-
3835
- name: Execute tests
3936
run: vendor/bin/phpunit --verbose --coverage-clover=coverage.clover
4037

CHANGELOG.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,14 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
55
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
66

77
## [Unreleased]
8+
9+
## [8.2.0] - released 2020-11-25
810
### Added
911
- Add a `getRedirectUri` function to the `OAuthServerException` class (PR #1123)
12+
- Support for PHP 8.0 (PR #1146)
13+
14+
### Removed
15+
- Removed support for PHP 7.2 (PR #1146)
1016

1117
### Fixed
1218
- Fix typo in parameter hint. `code_challenged` changed to `code_challenge`. Thrown by Auth Code Grant when the code challenge does not match the regex. (PR #1130)
@@ -505,7 +511,8 @@ Version 5 is a complete code rewrite.
505511

506512
- First major release
507513

508-
[Unreleased]: https://github.com/thephpleague/oauth2-server/compare/8.1.1...HEAD
514+
[Unreleased]: https://github.com/thephpleague/oauth2-server/compare/8.2.0...HEAD
515+
[8.2.0]: https://github.com/thephpleague/oauth2-server/compare/8.1.1...8.2.0
509516
[8.1.1]: https://github.com/thephpleague/oauth2-server/compare/8.1.0...8.1.1
510517
[8.1.0]: https://github.com/thephpleague/oauth2-server/compare/8.0.0...8.1.0
511518
[8.0.0]: https://github.com/thephpleague/oauth2-server/compare/7.4.0...8.0.0

README.md

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
[![Coverage Status](https://img.shields.io/scrutinizer/coverage/g/thephpleague/oauth2-server.svg?style=flat-square)](https://scrutinizer-ci.com/g/thephpleague/oauth2-server/code-structure)
77
[![Quality Score](https://img.shields.io/scrutinizer/g/thephpleague/oauth2-server.svg?style=flat-square)](https://scrutinizer-ci.com/g/thephpleague/oauth2-server)
88
[![Total Downloads](https://img.shields.io/packagist/dt/league/oauth2-server.svg?style=flat-square)](https://packagist.org/packages/league/oauth2-server)
9-
[![PHPStan](https://img.shields.io/badge/PHPStan-enabled-brightgreen.svg?style=flat-square)](https://github.com/phpstan/phpstan)
109

1110
`league/oauth2-server` is a standards compliant implementation of an [OAuth 2.0](https://tools.ietf.org/html/rfc6749) authorization server written in PHP which makes working with OAuth 2.0 trivial. You can easily configure an OAuth 2.0 server to protect your API with access tokens, or allow clients to request new access tokens and refresh them.
1211

@@ -29,11 +28,11 @@ This library was created by Alex Bilbie. Find him on Twitter at [@alexbilbie](ht
2928

3029
## Requirements
3130

32-
The following versions of PHP are supported:
31+
The latest version of this package supports the following versions of PHP:
3332

34-
* PHP 7.2
3533
* PHP 7.3
3634
* PHP 7.4
35+
* PHP 8.0
3736

3837
The `openssl` and `json` extensions are also required.
3938

@@ -52,11 +51,10 @@ You can contribute to the documentation in the [gh-pages branch](https://github.
5251

5352
## Testing
5453

55-
The library uses [PHPUnit](https://phpunit.de/) for unit tests and [PHPStan](https://github.com/phpstan/phpstan) for static analysis of the code.
54+
The library uses [PHPUnit](https://phpunit.de/) for unit tests.
5655

5756
```
5857
vendor/bin/phpunit
59-
vendor/bin/phpstan analyse -l 7 -c phpstan.neon src tests
6058
```
6159

6260
## Continuous Integration

composer.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,19 @@
44
"homepage": "https://oauth2.thephpleague.com/",
55
"license": "MIT",
66
"require": {
7-
"php": ">=7.2.0",
7+
"php": "^7.3 || ^8.0",
88
"ext-openssl": "*",
99
"league/event": "^2.2",
10-
"lcobucci/jwt": "^3.3.1",
10+
"lcobucci/jwt": "^3.4 || ^4.0",
1111
"psr/http-message": "^1.0.1",
1212
"defuse/php-encryption": "^2.2.1",
1313
"ext-json": "*"
1414
},
1515
"require-dev": {
16-
"phpunit/phpunit": "^8.5.4 || ^9.1.3",
17-
"laminas/laminas-diactoros": "^2.3.0",
18-
"phpstan/phpstan": "^0.11.19",
19-
"phpstan/phpstan-phpunit": "^0.11.2",
16+
"phpunit/phpunit": "^9.4.3",
17+
"laminas/laminas-diactoros": "^2.5.0",
18+
"phpstan/phpstan": "^0.12.57",
19+
"phpstan/phpstan-phpunit": "^0.12.16",
2020
"roave/security-advisories": "dev-master"
2121
},
2222
"repositories": [

examples/composer.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
{
22
"require": {
3-
"slim/slim": "^3.0.0"
3+
"slim/slim": "^3.12.3"
44
},
55
"require-dev": {
66
"league/event": "^2.2",
7-
"lcobucci/jwt": "^3.3",
8-
"psr/http-message": "^1.0",
9-
"defuse/php-encryption": "^2.2",
10-
"laminas/laminas-diactoros": "^2.1.2"
7+
"lcobucci/jwt": "^3.4 || ^4.0",
8+
"psr/http-message": "^1.0.1",
9+
"defuse/php-encryption": "^2.2.1",
10+
"laminas/laminas-diactoros": "^2.5.0"
1111
},
1212
"autoload": {
1313
"psr-4": {

0 commit comments

Comments
 (0)