Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/4.1.x' into 4.0.x-merge-up-into-…
Browse files Browse the repository at this point in the history
…4.1.x_7QZpeQfq
  • Loading branch information
lcobucci committed Sep 28, 2021
2 parents 5556426 + 71cf170 commit 4a1e591
Show file tree
Hide file tree
Showing 54 changed files with 2,403 additions and 976 deletions.
25 changes: 13 additions & 12 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
/docs export-ignore
/test export-ignore
/.gitattributes export-ignore
/.github export-ignore
/.gitignore export-ignore
/*.yml export-ignore
/CONTRIBUTING.md export-ignore
/*.dist export-ignore
/phpbench.json export-ignore
/composer.lock export-ignore
/README.md export-ignore
/Makefile export-ignore
/docs export-ignore
/test export-ignore
/.gitattributes export-ignore
/.github export-ignore
/.gitignore export-ignore
/*.yml export-ignore
/CONTRIBUTING.md export-ignore
/*.dist export-ignore
/phpbench.json export-ignore
/composer.lock export-ignore
/README.md export-ignore
/Makefile export-ignore
/composer-require-checker.json export-ignore
13 changes: 8 additions & 5 deletions .github/workflows/benchmarks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ jobs:
- "locked"
php-version:
- "7.4"
- "8.0"
operating-system:
- "ubuntu-latest"

Expand All @@ -31,14 +32,16 @@ jobs:
ini-values: memory_limit=-1
tools: composer:v2, cs2pr

- name: Get composer cache directory
id: composer-cache
run: echo "::set-output name=dir::$(composer config cache-files-dir)"

- name: "Cache dependencies"
uses: "actions/cache@v2"
with:
path: |
~/.composer/cache
vendor
key: "php-${{ matrix.php-version }}-${{ matrix.dependencies }}"
restore-keys: "php-${{ matrix.php-version }}-${{ matrix.dependencies }}"
path: ${{ steps.composer-cache.outputs.dir }}
key: "php-${{ matrix.php-version }}-composer-${{ matrix.dependencies }}-${{ hashFiles('**/composer.lock') }}"
restore-keys: "php-${{ matrix.php-version }}-composer-${{ matrix.dependencies }}-"

- name: "Install lowest dependencies"
if: ${{ matrix.dependencies == 'lowest' }}
Expand Down
12 changes: 7 additions & 5 deletions .github/workflows/coding-standards.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,16 @@ jobs:
ini-values: memory_limit=-1
tools: composer:v2, cs2pr

- name: Get composer cache directory
id: composer-cache
run: echo "::set-output name=dir::$(composer config cache-files-dir)"

- name: "Cache dependencies"
uses: "actions/cache@v2"
with:
path: |
~/.composer/cache
vendor
key: "php-${{ matrix.php-version }}-${{ matrix.dependencies }}"
restore-keys: "php-${{ matrix.php-version }}-${{ matrix.dependencies }}"
path: ${{ steps.composer-cache.outputs.dir }}
key: "php-${{ matrix.php-version }}-composer-${{ matrix.dependencies }}-${{ hashFiles('**/composer.lock') }}"
restore-keys: "php-${{ matrix.php-version }}-composer-${{ matrix.dependencies }}-"

- name: "Install lowest dependencies"
if: ${{ matrix.dependencies == 'lowest' }}
Expand Down
67 changes: 67 additions & 0 deletions .github/workflows/composer-json-lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
name: "Lint composer.json"

on:
pull_request:
push:

jobs:
coding-standards:
name: "Lint composer.json"

runs-on: ${{ matrix.operating-system }}

strategy:
matrix:
dependencies:
- "highest"
php-version:
- "7.4"
operating-system:
- "ubuntu-latest"

steps:
- name: "Checkout"
uses: "actions/checkout@v2"

- name: "Install PHP"
uses: "shivammathur/setup-php@v2"
with:
coverage: "none"
php-version: "${{ matrix.php-version }}"
ini-values: memory_limit=-1
tools: composer:v2, composer-normalize, composer-require-checker, composer-unused

- name: Get composer cache directory
id: composer-cache
run: echo "::set-output name=dir::$(composer config cache-files-dir)"

- name: "Cache dependencies"
uses: "actions/cache@v2"
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: "php-${{ matrix.php-version }}-composer-${{ matrix.dependencies }}-${{ hashFiles('**/composer.lock') }}"
restore-keys: "php-${{ matrix.php-version }}-composer-${{ matrix.dependencies }}-"

- name: "Install lowest dependencies"
if: ${{ matrix.dependencies == 'lowest' }}
run: "composer update --prefer-lowest --no-interaction --no-progress"

- name: "Install highest dependencies"
if: ${{ matrix.dependencies == 'highest' }}
run: "composer update --no-interaction --no-progress"

- name: "Install locked dependencies"
if: ${{ matrix.dependencies == 'locked' }}
run: "composer install --no-interaction --no-progress"

- name: "Validate composer.json"
run: "composer validate --strict"

- name: "Normalize composer.json"
run: "composer-normalize --dry-run"

- name: "Check composer.json explicit dependencies"
run: "composer-require-checker check --config-file=$(realpath composer-require-checker.json)"

- name: "Check composer.json unused dependencies"
run: "composer-unused"
12 changes: 7 additions & 5 deletions .github/workflows/mutation-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,16 @@ jobs:
ini-values: memory_limit=-1
tools: composer:v2, cs2pr

- name: Get composer cache directory
id: composer-cache
run: echo "::set-output name=dir::$(composer config cache-files-dir)"

- name: "Cache dependencies"
uses: "actions/cache@v2"
with:
path: |
~/.composer/cache
vendor
key: "php-${{ matrix.php-version }}-${{ matrix.dependencies }}"
restore-keys: "php-${{ matrix.php-version }}-${{ matrix.dependencies }}"
path: ${{ steps.composer-cache.outputs.dir }}
key: "php-${{ matrix.php-version }}-composer-${{ matrix.dependencies }}-${{ hashFiles('**/composer.lock') }}"
restore-keys: "php-${{ matrix.php-version }}-composer-${{ matrix.dependencies }}-"

- name: "Install lowest dependencies"
if: ${{ matrix.dependencies == 'lowest' }}
Expand Down
30 changes: 18 additions & 12 deletions .github/workflows/phpunit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ jobs:
- "development"
php-version:
- "7.4"
- "8.0"
operating-system:
- "ubuntu-latest"

Expand All @@ -29,18 +30,21 @@ jobs:
- name: "Install PHP"
uses: "shivammathur/setup-php@v2"
with:
coverage: "none"
php-version: "${{ matrix.php-version }}"
ini-values: memory_limit=-1
tools: composer:v2, cs2pr

- name: Get composer cache directory
id: composer-cache
run: echo "::set-output name=dir::$(composer config cache-files-dir)"

- name: "Cache dependencies"
uses: "actions/cache@v2"
with:
path: |
~/.composer/cache
vendor
key: "php-${{ matrix.php-version }}-${{ matrix.dependencies }}"
restore-keys: "php-${{ matrix.php-version }}-${{ matrix.dependencies }}"
path: ${{ steps.composer-cache.outputs.dir }}
key: "php-${{ matrix.php-version }}-composer-${{ matrix.dependencies }}-${{ hashFiles('**/composer.lock') }}"
restore-keys: "php-${{ matrix.php-version }}-composer-${{ matrix.dependencies }}-"

- name: "Install lowest dependencies"
if: ${{ matrix.dependencies == 'lowest' }}
Expand All @@ -62,7 +66,7 @@ jobs:
run: "make phpunit"

phpunit-rc:
name: "PHPUnit tests on PHP 8"
name: "PHPUnit tests (nightly)"

runs-on: ${{ matrix.operating-system }}

Expand All @@ -71,7 +75,7 @@ jobs:
dependencies:
- "locked"
php-version:
- "8.0"
- "8.1"
operating-system:
- "ubuntu-latest"

Expand All @@ -87,14 +91,16 @@ jobs:
ini-values: memory_limit=-1
tools: composer:v2, cs2pr

- name: Get composer cache directory
id: composer-cache
run: echo "::set-output name=dir::$(composer config cache-files-dir)"

- name: "Cache dependencies"
uses: "actions/cache@v2"
with:
path: |
~/.composer/cache
vendor
key: "php-${{ matrix.php-version }}-${{ matrix.dependencies }}"
restore-keys: "php-${{ matrix.php-version }}-${{ matrix.dependencies }}"
path: ${{ steps.composer-cache.outputs.dir }}
key: "php-${{ matrix.php-version }}-composer-${{ matrix.dependencies }}-${{ hashFiles('**/composer.lock') }}"
restore-keys: "php-${{ matrix.php-version }}-composer-${{ matrix.dependencies }}-"

- name: "Install locked dependencies"
if: ${{ matrix.dependencies == 'locked' }}
Expand Down
72 changes: 72 additions & 0 deletions .github/workflows/release-on-milestone-closed.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
# https://help.github.com/en/categories/automating-your-workflow-with-github-actions

name: "Automatic Releases"

on:
milestone:
types:
- "closed"

jobs:
release:
name: "GIT tag, release & create merge-up PR"
runs-on: ubuntu-latest

steps:
- name: "Checkout"
uses: "actions/checkout@v2"

- name: "Release"
uses: "laminas/automatic-releases@v1"
with:
command-name: "laminas:automatic-releases:release"
env:
"SHELL_VERBOSITY": "3"
"GITHUB_TOKEN": ${{ secrets.ORGANIZATION_ADMIN_TOKEN }}
"SIGNING_SECRET_KEY": ${{ secrets.SIGNING_SECRET_KEY }}
"GIT_AUTHOR_NAME": ${{ secrets.GIT_AUTHOR_NAME }}
"GIT_AUTHOR_EMAIL": ${{ secrets.GIT_AUTHOR_EMAIL }}

- name: "Create Merge-Up Pull Request"
uses: "laminas/automatic-releases@v1"
with:
command-name: "laminas:automatic-releases:create-merge-up-pull-request"
env:
"SHELL_VERBOSITY": "3"
"GITHUB_TOKEN": ${{ secrets.GITHUB_TOKEN }}
"SIGNING_SECRET_KEY": ${{ secrets.SIGNING_SECRET_KEY }}
"GIT_AUTHOR_NAME": ${{ secrets.GIT_AUTHOR_NAME }}
"GIT_AUTHOR_EMAIL": ${{ secrets.GIT_AUTHOR_EMAIL }}

- name: "Create and/or Switch to new Release Branch"
uses: "laminas/automatic-releases@v1"
with:
command-name: "laminas:automatic-releases:switch-default-branch-to-next-minor"
env:
"SHELL_VERBOSITY": "3"
"GITHUB_TOKEN": ${{ secrets.ORGANIZATION_ADMIN_TOKEN }}
"SIGNING_SECRET_KEY": ${{ secrets.SIGNING_SECRET_KEY }}
"GIT_AUTHOR_NAME": ${{ secrets.GIT_AUTHOR_NAME }}
"GIT_AUTHOR_EMAIL": ${{ secrets.GIT_AUTHOR_EMAIL }}

- name: "Bump Changelog Version On Originating Release Branch"
uses: "laminas/automatic-releases@v1"
with:
command-name: "laminas:automatic-releases:bump-changelog"
env:
"SHELL_VERBOSITY": "3"
"GITHUB_TOKEN": ${{ secrets.GITHUB_TOKEN }}
"SIGNING_SECRET_KEY": ${{ secrets.SIGNING_SECRET_KEY }}
"GIT_AUTHOR_NAME": ${{ secrets.GIT_AUTHOR_NAME }}
"GIT_AUTHOR_EMAIL": ${{ secrets.GIT_AUTHOR_EMAIL }}

- name: "Create new milestones"
uses: "laminas/automatic-releases@v1"
with:
command-name: "laminas:automatic-releases:create-milestones"
env:
"SHELL_VERBOSITY": "3"
"GITHUB_TOKEN": ${{ secrets.GITHUB_TOKEN }}
"SIGNING_SECRET_KEY": ${{ secrets.SIGNING_SECRET_KEY }}
"GIT_AUTHOR_NAME": ${{ secrets.GIT_AUTHOR_NAME }}
"GIT_AUTHOR_EMAIL": ${{ secrets.GIT_AUTHOR_EMAIL }}
12 changes: 7 additions & 5 deletions .github/workflows/static-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,16 @@ jobs:
ini-values: memory_limit=-1
tools: composer:v2, cs2pr

- name: Get composer cache directory
id: composer-cache
run: echo "::set-output name=dir::$(composer config cache-files-dir)"

- name: "Cache dependencies"
uses: "actions/cache@v2"
with:
path: |
~/.composer/cache
vendor
key: "php-${{ matrix.php-version }}-${{ matrix.dependencies }}"
restore-keys: "php-${{ matrix.php-version }}-${{ matrix.dependencies }}"
path: ${{ steps.composer-cache.outputs.dir }}
key: "php-${{ matrix.php-version }}-composer-${{ matrix.dependencies }}-${{ hashFiles('**/composer.lock') }}"
restore-keys: "php-${{ matrix.php-version }}-composer-${{ matrix.dependencies }}-"

- name: "Install lowest dependencies"
if: ${{ matrix.dependencies == 'lowest' }}
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ phpcs:

.PHONY: phpstan
phpstan:
@vendor/bin/phpstan analyse
@vendor/bin/phpstan analyse --memory-limit=-1

.PHONY: phpbench
phpbench:
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
[![Latest Stable Version]](https://packagist.org/packages/lcobucci/jwt)
[![Unstable Version]](https://packagist.org/packages/lcobucci/jwt)

[![Build Status]](https://github.com/lcobucci/jwt/actions?query=workflow%3A%22PHPUnit%20Tests%22+branch%3Amaster)
[![Build Status]](https://github.com/lcobucci/jwt/actions?query=workflow%3A%22PHPUnit%20Tests%22+branch%3A4.1.x)
[![Code Coverage]](https://codecov.io/gh/lcobucci/jwt)

A simple library to work with JSON Web Token and JSON Web Signature based on the [RFC 7519](https://tools.ietf.org/html/rfc7519).
Expand Down Expand Up @@ -32,5 +32,5 @@ free to check out Auth0's PHP SDK and free plan at
[Total Downloads]: https://img.shields.io/packagist/dt/lcobucci/jwt.svg?style=flat-square
[Latest Stable Version]: https://img.shields.io/packagist/v/lcobucci/jwt.svg?style=flat-square
[Unstable Version]: https://img.shields.io/packagist/vpre/lcobucci/jwt.svg?style=flat-square
[Build Status]: https://img.shields.io/github/workflow/status/lcobucci/jwt/PHPUnit%20tests/master?style=flat-square
[Code Coverage]: https://codecov.io/gh/lcobucci/jwt/branch/master/graph/badge.svg
[Build Status]: https://img.shields.io/github/workflow/status/lcobucci/jwt/PHPUnit%20tests/4.1.x?style=flat-square
[Code Coverage]: https://codecov.io/gh/lcobucci/jwt/branch/4.1.x/graph/badge.svg
8 changes: 8 additions & 0 deletions composer-require-checker.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"symbol-whitelist" : [
"null", "true", "false",
"static", "self", "parent",
"array", "string", "int", "float", "bool", "iterable", "callable", "void", "object",
"OpenSSLAsymmetricKey"
]
}
Loading

0 comments on commit 4a1e591

Please sign in to comment.