Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PHP 8 Support #1146

Merged
merged 34 commits into from
Nov 25, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
c95a4f0
PHP 8 Support
driesvints Nov 10, 2020
c64d65d
Merge remote-tracking branch 'upstream/master' into php8
Sephster Nov 17, 2020
a9f39f0
Update composer dependencies
Sephster Nov 18, 2020
3916ee7
Add version 8 to php versions to test
Sephster Nov 18, 2020
531eb4d
Update composer dependencies for examples
Sephster Nov 23, 2020
f140ce6
Update composer dependencies
Sephster Nov 23, 2020
f8f8320
Update to use version 4 API of JWT package
Sephster Nov 23, 2020
32d7d7a
Update tests to use version 4 of JWT package
Sephster Nov 23, 2020
6b6878b
Temp removal of fail fast
Sephster Nov 23, 2020
ebd78d3
Temp remove phpstan checks
Sephster Nov 23, 2020
109795b
Fix config file for phpunit
Sephster Nov 24, 2020
9a58173
Change to use plainText instead of empty
Sephster Nov 24, 2020
7efa91c
Fix backwards compatibility for aud
Sephster Nov 24, 2020
ad2a1be
Drop support for PHP 7.2
Sephster Nov 24, 2020
e85da74
Fix style CI issues
Sephster Nov 24, 2020
5dd0188
Drop support for PHP 7.2
Sephster Nov 24, 2020
b6266f1
StyleCI fixes
Sephster Nov 24, 2020
309cff6
StyleCI fixes
Sephster Nov 24, 2020
a29ccf7
Set minimum stability to dev temporarily
Sephster Nov 24, 2020
89091b7
remove minimum-stabiity
Sephster Nov 24, 2020
4764e40
Add BC check
Sephster Nov 24, 2020
cb32154
Update dependencies for BC check
Sephster Nov 24, 2020
d600718
Make OAuthServerException constructor final
Sephster Nov 24, 2020
9abc6b8
Revert final for constructor
Sephster Nov 24, 2020
89084a5
Remove PHPStan
Sephster Nov 24, 2020
de7de42
Remove commented phpstan from actions
Sephster Nov 24, 2020
85b8efb
Remove backwards compatibility check
Sephster Nov 24, 2020
3fcfe2c
Update dependencies
Sephster Nov 25, 2020
51cf94e
Remove backwards compat test
Sephster Nov 25, 2020
c968b00
Reinstate BC checker
Sephster Nov 25, 2020
d50709c
Update change log for version 8.2.0
Sephster Nov 25, 2020
0419bf4
Update dependencies
Sephster Nov 25, 2020
682dc07
Update examples dependencies
Sephster Nov 25, 2020
8e89f55
Add docblocks for functions
Sephster Nov 25, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions .github/workflows/backwards-compatibility.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: "Backwards compatibility check"

on:
pull_request:

jobs:
bc-check:
name: "Backwards compatibility check"

runs-on: "ubuntu-latest"

steps:
- name: "Checkout"
uses: "actions/checkout@v2"
with:
fetch-depth: 0

- name: "Backwards Compatibility Check"
uses: docker://nyholm/roave-bc-check-ga
with:
args: --from=${{ github.event.pull_request.base.sha }}
7 changes: 2 additions & 5 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ jobs:
runs-on: ubuntu-latest

strategy:
fail-fast: true
fail-fast: false
matrix:
php: [7.2, 7.3, 7.4]
php: [7.3, 7.4, 8.0]
stability: [prefer-lowest, prefer-stable]

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

- name: Run PHPStan
run: vendor/bin/phpstan analyse -l 7 -c phpstan.neon src tests

- name: Execute tests
run: vendor/bin/phpunit --verbose --coverage-clover=coverage.clover

Expand Down
9 changes: 8 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,14 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).

## [Unreleased]

## [8.2.0] - released 2020-11-25
### Added
- Add a `getRedirectUri` function to the `OAuthServerException` class (PR #1123)
- Support for PHP 8.0 (PR #1146)

### Removed
- Removed support for PHP 7.2 (PR #1146)

### Fixed
- 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)
Expand Down Expand Up @@ -505,7 +511,8 @@ Version 5 is a complete code rewrite.

- First major release

[Unreleased]: https://github.com/thephpleague/oauth2-server/compare/8.1.1...HEAD
[Unreleased]: https://github.com/thephpleague/oauth2-server/compare/8.2.0...HEAD
[8.2.0]: https://github.com/thephpleague/oauth2-server/compare/8.1.1...8.2.0
[8.1.1]: https://github.com/thephpleague/oauth2-server/compare/8.1.0...8.1.1
[8.1.0]: https://github.com/thephpleague/oauth2-server/compare/8.0.0...8.1.0
[8.0.0]: https://github.com/thephpleague/oauth2-server/compare/7.4.0...8.0.0
Expand Down
8 changes: 3 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
[![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)
[![Quality Score](https://img.shields.io/scrutinizer/g/thephpleague/oauth2-server.svg?style=flat-square)](https://scrutinizer-ci.com/g/thephpleague/oauth2-server)
[![Total Downloads](https://img.shields.io/packagist/dt/league/oauth2-server.svg?style=flat-square)](https://packagist.org/packages/league/oauth2-server)
[![PHPStan](https://img.shields.io/badge/PHPStan-enabled-brightgreen.svg?style=flat-square)](https://github.com/phpstan/phpstan)

`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.

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

## Requirements

The following versions of PHP are supported:
The latest version of this package supports the following versions of PHP:

* PHP 7.2
* PHP 7.3
* PHP 7.4
* PHP 8.0

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

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

## Testing

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

```
vendor/bin/phpunit
vendor/bin/phpstan analyse -l 7 -c phpstan.neon src tests
```

## Continuous Integration
Expand Down
12 changes: 6 additions & 6 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,19 @@
"homepage": "https://oauth2.thephpleague.com/",
"license": "MIT",
"require": {
"php": ">=7.2.0",
"php": "^7.3 || ^8.0",
"ext-openssl": "*",
"league/event": "^2.2",
"lcobucci/jwt": "^3.3.1",
"lcobucci/jwt": "^3.4 || ^4.0",
"psr/http-message": "^1.0.1",
"defuse/php-encryption": "^2.2.1",
"ext-json": "*"
},
"require-dev": {
"phpunit/phpunit": "^8.5.4 || ^9.1.3",
"laminas/laminas-diactoros": "^2.3.0",
"phpstan/phpstan": "^0.11.19",
"phpstan/phpstan-phpunit": "^0.11.2",
"phpunit/phpunit": "^9.4.3",
"laminas/laminas-diactoros": "^2.5.0",
"phpstan/phpstan": "^0.12.57",
"phpstan/phpstan-phpunit": "^0.12.16",
"roave/security-advisories": "dev-master"
},
"repositories": [
Expand Down
10 changes: 5 additions & 5 deletions examples/composer.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{
"require": {
"slim/slim": "^3.0.0"
"slim/slim": "^3.12.3"
},
"require-dev": {
"league/event": "^2.2",
"lcobucci/jwt": "^3.3",
"psr/http-message": "^1.0",
"defuse/php-encryption": "^2.2",
"laminas/laminas-diactoros": "^2.1.2"
"lcobucci/jwt": "^3.4 || ^4.0",
"psr/http-message": "^1.0.1",
"defuse/php-encryption": "^2.2.1",
"laminas/laminas-diactoros": "^2.5.0"
},
"autoload": {
"psr-4": {
Expand Down
Loading