Skip to content

Commit 46b3cb1

Browse files
authored
Merge pull request thephpleague#1171 from Sephster/9.0.0-WIP
Merge Master Into v9-WIP
2 parents 2382db8 + a1fd8f0 commit 46b3cb1

File tree

17 files changed

+388
-179
lines changed

17 files changed

+388
-179
lines changed

.gitattributes

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
/.gitignore export-ignore
88
/.scrutinizer.yml export-ignore
99
/.styleci.yml export-ignore
10-
/.travis.yml export-ignore
1110
/phpstan.neon export-ignore
1211
/phpunit.xml.dist export-ignore
1312
/CHANGELOG.md export-ignore
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: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: tests
2+
3+
on:
4+
push:
5+
pull_request:
6+
schedule:
7+
- cron: '0 0 * * *'
8+
9+
jobs:
10+
tests:
11+
runs-on: ubuntu-latest
12+
13+
strategy:
14+
fail-fast: false
15+
matrix:
16+
php: [7.2, 7.3, 7.4, 8.0]
17+
stability: [prefer-lowest, prefer-stable]
18+
19+
name: PHP ${{ matrix.php }} - ${{ matrix.stability }}
20+
21+
steps:
22+
- name: Checkout code
23+
uses: actions/checkout@v2
24+
25+
- name: Setup PHP
26+
uses: shivammathur/setup-php@v2
27+
with:
28+
php-version: ${{ matrix.php }}
29+
extensions: dom, curl, libxml, mbstring, zip
30+
coverage: pcov
31+
32+
- name: Install dependencies
33+
run: composer update --${{ matrix.stability }} --prefer-dist --no-interaction --no-progress
34+
35+
- name: Execute tests
36+
run: vendor/bin/phpunit --verbose --coverage-clover=coverage.clover
37+
38+
- name: Code coverage
39+
if: ${{ github.ref == 'refs/heads/master' && matrix.php != 8.0 }}
40+
run: |
41+
wget https://scrutinizer-ci.com/ocular.phar
42+
php ocular.phar code-coverage:upload --format=php-clover coverage.clover

.travis.yml

Lines changed: 0 additions & 33 deletions
This file was deleted.

CHANGELOG.md

Lines changed: 29 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,26 +5,43 @@ 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-
98
### Added (v9)
109
- A CryptKeyInterface to allow developers to change the CryptKey implementation with greater ease (PR #1044)
1110
- The authorization server can now finalize scopes when a client uses a refresh token (PR #1094)
1211
- An AuthorizationRequestInterface to make it easier to extend the AuthorizationRequest (PR #1110)
1312

13+
### Fixed (v9)
14+
- If a refresh token has expired, been revoked, cannot be decrypted, or does not belong to the correct client, the server will now issue an `invalid_grant` error and a HTTP 400 response. In previous versions the server incorrectly issued an `invalid_request` and HTTP 401 response (PR #1042) (PR #1082)
15+
16+
### Changed (v9)
17+
- Authorization Request objects are now created through the factory method, `createAuthorizationRequest()` (PR #1111)
18+
- Changed parameters for `finalizeScopes()` to allow a reference to an auth code ID (PR #1112)
19+
20+
21+
## [8.2.3] - released 2020-12-02
22+
### Added
23+
- Re-added support for PHP 7.2 (PR #1165, #1167)
24+
25+
## [8.2.2] - released 2020-11-30
26+
### Fixed
27+
- Fix issue where the private key passphrase isn't correctly passed to JWT library (PR #1164)
28+
29+
## [8.2.1] - released 2020-11-26
30+
### Fixed
31+
- If you have a password on your private key, it is now passed correctly to the JWT configuration object. (PR #1159)
32+
33+
## [8.2.0] - released 2020-11-25
1434
### Added
1535
- Add a `getRedirectUri` function to the `OAuthServerException` class (PR #1123)
36+
- Support for PHP 8.0 (PR #1146)
1637

17-
### Fixed (v9)
18-
- If a refresh token has expired, been revoked, cannot be decrypted, or does not belong to the correct client, the server will now issue an `invalid_grant` error and a HTTP 400 response. In previous versions the server incorrectly issued an `invalid_request` and HTTP 401 response (PR #1042) (PR #1082)
38+
### Removed
39+
- Removed support for PHP 7.2 (PR #1146)
1940

2041
### Fixed
2142
- 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)
2243
- Undefined offset was returned when no client redirect URI was set. Now throw an invalidClient exception if no redirect URI is set against a client (PR #1140)
2344

24-
### Changed (v9)
25-
- Authorization Request objects are now created through the factory method, `createAuthorizationRequest()` (PR #1111)
26-
- Changed parameters for `finalizeScopes()` to allow a reference to an auth code ID (PR #1112)
27-
2845
## [8.1.1] - released 2020-07-01
2946

3047
### Fixed
@@ -517,7 +534,11 @@ Version 5 is a complete code rewrite.
517534

518535
- First major release
519536

520-
[Unreleased]: https://github.com/thephpleague/oauth2-server/compare/8.1.1...HEAD
537+
[Unreleased]: https://github.com/thephpleague/oauth2-server/compare/8.2.3...HEAD
538+
[8.2.3]: https://github.com/thephpleague/oauth2-server/compare/8.2.2...8.2.3
539+
[8.2.2]: https://github.com/thephpleague/oauth2-server/compare/8.2.1...8.2.2
540+
[8.2.1]: https://github.com/thephpleague/oauth2-server/compare/8.2.0...8.2.1
541+
[8.2.0]: https://github.com/thephpleague/oauth2-server/compare/8.1.1...8.2.0
521542
[8.1.1]: https://github.com/thephpleague/oauth2-server/compare/8.1.0...8.1.1
522543
[8.1.0]: https://github.com/thephpleague/oauth2-server/compare/8.0.0...8.1.0
523544
[8.0.0]: https://github.com/thephpleague/oauth2-server/compare/7.4.0...8.0.0

README.md

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,10 @@
22

33
[![Latest Version](http://img.shields.io/packagist/v/league/oauth2-server.svg?style=flat-square)](https://github.com/thephpleague/oauth2-server/releases)
44
[![Software License](https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square)](LICENSE.md)
5-
[![Build Status](https://img.shields.io/travis/thephpleague/oauth2-server/master.svg?style=flat-square)](https://travis-ci.org/thephpleague/oauth2-server)
5+
[![Build Status](https://github.com/thephpleague/oauth2-server/workflows/tests/badge.svg)](https://github.com/thephpleague/oauth2-server/actions)
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,12 @@ 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

3433
* PHP 7.2
3534
* PHP 7.3
3635
* PHP 7.4
36+
* PHP 8.0
3737

3838
The `openssl` and `json` extensions are also required.
3939

@@ -52,16 +52,15 @@ You can contribute to the documentation in the [gh-pages branch](https://github.
5252

5353
## Testing
5454

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

5757
```
5858
vendor/bin/phpunit
59-
vendor/bin/phpstan analyse -l 7 -c phpstan.neon src tests
6059
```
6160

62-
## Continous Integration
61+
## Continuous Integration
6362

64-
We use [Travis CI](https://travis-ci.org/), [Scrutinizer](https://scrutinizer-ci.com/), and [StyleCI](https://styleci.io/) for continuous integration. Check out [our](https://github.com/thephpleague/oauth2-server/blob/master/.travis.yml) [configuration](https://github.com/thephpleague/oauth2-server/blob/master/.scrutinizer.yml) [files](https://github.com/thephpleague/oauth2-server/blob/master/.styleci.yml) if you'd like to know more.
63+
We use [Github Actions](https://github.com/features/actions), [Scrutinizer](https://scrutinizer-ci.com/), and [StyleCI](https://styleci.io/) for continuous integration. Check out [our](https://github.com/thephpleague/oauth2-server/blob/master/.github/workflows/tests.yml) [configuration](https://github.com/thephpleague/oauth2-server/blob/master/.scrutinizer.yml) [files](https://github.com/thephpleague/oauth2-server/blob/master/.styleci.yml) if you'd like to know more.
6564

6665
## Community Integrations
6766

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.2 || ^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": "^8.5.13",
17+
"laminas/laminas-diactoros": "^2.4.1",
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)