Skip to content

Commit

Permalink
Merge pull request #1146 from driesvints/php8
Browse files Browse the repository at this point in the history
Add Support for PHP 8
  • Loading branch information
Sephster authored Nov 25, 2020
2 parents e886a28 + 8e89f55 commit 8837ed9
Show file tree
Hide file tree
Showing 14 changed files with 329 additions and 145 deletions.
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

0 comments on commit 8837ed9

Please sign in to comment.