Skip to content

Commit 934b200

Browse files
committed
Project updated
1 parent 5104462 commit 934b200

File tree

15 files changed

+241
-2586
lines changed

15 files changed

+241
-2586
lines changed

.github/build-phar.sh

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
#!/bin/sh
2+
3+
# This file is part of the PPCRE.
4+
#
5+
# (c) Serghei Iakovlev <[email protected]>
6+
#
7+
# For the full copyright and license information, please view
8+
# the LICENSE file that was distributed with this source code.
9+
10+
# -e Exit immediately if a command exits with a non-zero status.
11+
# -u Treat unset variables as an error when substituting.
12+
set -eu
13+
14+
if [ "$(command -v box 2>/dev/null || true)" = "" ]; then
15+
(>&2 printf "To use this script you need to install humbug/box: %s \\n" \
16+
"https://github.com/humbug/box")
17+
(>&2 echo "Aborting.")
18+
exit 1
19+
fi
20+
21+
box validate || exit 1
22+
box compile || exit 1
23+
24+
if [ ! -f "./example.phar" ] || [ ! -x "./example.phar" ]; then
25+
(>&2 echo "Something went wrong when building example.phar")
26+
(>&2 echo "Aborting.")
27+
exit 1
28+
fi

.github/workflows/build.yml

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
name: build
2+
3+
on:
4+
push:
5+
paths-ignore:
6+
- '**.md'
7+
- '**.txt'
8+
pull_request:
9+
branches:
10+
- master
11+
12+
jobs:
13+
linux:
14+
name: "Linux: PHP v${{ matrix.php }}"
15+
runs-on: ubuntu-latest
16+
17+
strategy:
18+
fail-fast: false
19+
20+
matrix:
21+
php:
22+
- '8.1'
23+
24+
steps:
25+
- name: Setup PHP
26+
uses: shivammathur/setup-php@v2
27+
with:
28+
coverage: none
29+
php-version: ${{ matrix.php }}
30+
31+
- name: Checkout Code
32+
uses: actions/checkout@v2
33+
with:
34+
fetch-depth: 1
35+
36+
- name: Get Composer Cache Directory
37+
id: composer-cache
38+
run: echo ::set-output name=dir::$(composer config cache-files-dir)
39+
40+
- name: Setup Composer Cache
41+
uses: actions/cache@v1
42+
with:
43+
path: ${{ steps.composer-cache.outputs.dir }}
44+
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
45+
restore-keys: |
46+
${{ runner.os }}-composer-
47+
48+
- name: Install Project Dependencies
49+
run: composer install --prefer-dist --no-interaction --no-ansi --no-progress --no-suggest --optimize-autoloader --classmap-authoritative
50+
51+
- name: Success Reporting
52+
if: success()
53+
run: git log --format=fuller -5

.github/workflows/release.yml

Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
name: release
2+
3+
on:
4+
push:
5+
tags:
6+
- '*'
7+
8+
jobs:
9+
build:
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- name: Set Environment Variables
14+
uses: allenevans/[email protected]
15+
with:
16+
BOX_VERSION: '3.16.0'
17+
18+
- name: Checkout Code
19+
uses: actions/checkout@v2
20+
with:
21+
fetch-depth: 5
22+
23+
- name: Setup PHP
24+
uses: shivammathur/setup-php@v2
25+
with:
26+
php-version: '8.1'
27+
extensions: intl, zip, zlib
28+
coverage: none
29+
ini-values: memory_limit=1G, phar.readonly=0
30+
31+
# Ensure that deps will work on lowest supported PHP version
32+
- name: Choose a Suitable PHP Version to Build PHAR
33+
run: composer config platform.php 7.0.33
34+
35+
- name: Get Composer Cache Directory
36+
id: composer-cache
37+
run: echo ::set-output name=dir::$(composer config cache-files-dir)
38+
39+
- name: Setup Composer Cache
40+
uses: actions/cache@v1
41+
with:
42+
path: ${{ steps.composer-cache.outputs.dir }}
43+
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
44+
restore-keys: |
45+
${{ runner.os }}-composer-
46+
47+
- name: Setup Composer Token
48+
run: |
49+
if [ ! -z '${{ secrets.COMPOSER_TOKEN }}' ]; then
50+
composer config github-oauth.github.com ${{ secrets.COMPOSER_TOKEN }}
51+
fi
52+
53+
- name: Install Project Dependencies
54+
run: composer install --prefer-dist --no-interaction --no-ansi --no-progress --no-suggest
55+
56+
- name: Install Box
57+
run: |
58+
wget \
59+
"https://github.com/humbug/box/releases/download/${BOX_VERSION}/box.phar" \
60+
--quiet \
61+
-O ./box
62+
63+
chmod +x ./box
64+
sudo mv ./box /usr/local/bin
65+
66+
- name: Build Application PHAR
67+
run: .github/build-phar.sh
68+
69+
- name: Geting Tag Name
70+
id: get-version
71+
run: echo ::set-output name=version::${GITHUB_REF#refs/tags/}
72+
73+
- name: Self-Test
74+
run: ./example.phar --version
75+
76+
- name: Create Release
77+
uses: ncipollo/release-action@v1
78+
with:
79+
# This token is provided by GitHub Actions.
80+
# You DO NOT need to create your own token.
81+
token: ${{ secrets.GITHUB_TOKEN }}
82+
name: ${{ steps.get-version.outputs.version }}
83+
tag: ${{ steps.get-version.outputs.version }}
84+
body: 'Next stable release.'
85+
# This will update existing tags if any
86+
allowUpdates: true
87+
artifacts: example.phar
88+
artifactContentType: application/x-php

.gitignore

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
.travis/phar-private.pem
1+
composer.lock
22
jose.phar
33
jose.phar.pubkey
44
jose.phar.version
5-
.travis/build-key.pem
6-
.travis/secrets.tar

.travis.yml

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

.travis/secrets.tar.enc

-10 KB
Binary file not shown.

app/jose

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ use Jose\Component\KeyManagement\X5UFactory;
1313
use Jose\Component\KeyManagement\JKUFactory;
1414
use Nyholm\Psr7\Factory\Psr17Factory;
1515

16-
if (version_compare(PHP_VERSION, '7.2.0', '<')) {
16+
if (PHP_VERSION_ID < 80100) {
1717
file_put_contents('php://stderr', sprintf(
18-
'This application requires PHP 7.2 version or higher and your system has'.PHP_EOL.
18+
'This application requires PHP 8.1 version or higher and your system has'.PHP_EOL.
1919
'PHP %s version installed'.PHP_EOL.PHP_EOL.
2020
'To solve this issue, upgrade your PHP installation.'.PHP_EOL,
2121
PHP_VERSION
@@ -75,7 +75,4 @@ $application->add(new Console\PemConverterCommand());
7575

7676
$application->add(new Console\GetThumbprintCommand());
7777

78-
$application->add(new Console\UpdateCommand());
79-
$application->add(new Console\RollbackCommand());
80-
8178
$application->run();

bin/deploy.sh

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

bin/parse-manifest.php

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

box.json

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
{
2+
"banner": [
3+
"This file is part of the web-token/jwt-framework.",
4+
"",
5+
"(c) Spomky-Labs <[email protected]>",
6+
"",
7+
"For the full copyright and license information, please view",
8+
"the LICENSE file that was distributed with this source code."
9+
],
10+
"directories": [
11+
"src",
12+
"vendor"
13+
],
14+
"files": [
15+
"LICENSE"
16+
],
17+
"blacklist": [
18+
"tests"
19+
],
20+
"finder": [
21+
{
22+
"in": "src",
23+
"name": "*.*"
24+
},
25+
{
26+
"in": "vendor",
27+
"name": "*.php",
28+
"exclude": [
29+
"CHANGELOG",
30+
"CONTRIBUTING",
31+
"README",
32+
"Tests",
33+
"behat",
34+
"ext",
35+
"bin",
36+
"build",
37+
"doc",
38+
"docs",
39+
"doc-template",
40+
"fixtures",
41+
"test",
42+
"tests",
43+
"test_old",
44+
"vendor-bin",
45+
"Test"
46+
]
47+
}
48+
],
49+
"compression": "GZ",
50+
"compactors": [
51+
"KevinGH\\Box\\Compactor\\Json",
52+
"KevinGH\\Box\\Compactor\\Php"
53+
],
54+
"replacement-sigil": "%",
55+
"git-commit-short": "package_version",
56+
"git-version": "package_version",
57+
"intercept": true,
58+
"main": "app/jose",
59+
"output": "jose.phar"
60+
}

0 commit comments

Comments
 (0)