Skip to content

Commit 5ab56f4

Browse files
authored
Merge pull request #16 from byjg/8.1
Upgrade Jwt-Session Packages and Language
2 parents b638f49 + 9610242 commit 5ab56f4

14 files changed

+164
-156
lines changed

.github/workflows/phpunit.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: PHPUnit
2+
on:
3+
push:
4+
branches:
5+
- master
6+
tags:
7+
- "*.*.*"
8+
pull_request:
9+
branches:
10+
- master
11+
12+
jobs:
13+
Build:
14+
runs-on: 'ubuntu-latest'
15+
container: 'byjg/php:${{ matrix.php-version }}-cli'
16+
strategy:
17+
matrix:
18+
php-version:
19+
- "8.2"
20+
- "8.1"
21+
- "8.0"
22+
23+
steps:
24+
- uses: actions/checkout@v4
25+
- run: composer install
26+
- run: ./vendor/bin/phpunit
27+
28+
Documentation:
29+
if: github.ref == 'refs/heads/master'
30+
needs: Build
31+
uses: byjg/byjg.github.io/.github/workflows/add-doc.yaml@master
32+
with:
33+
folder: php
34+
project: ${{ github.event.repository.name }}
35+
secrets: inherit
36+

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
.idea
22
composer.lock
33
vendor
4+
/.phpunit.result.cache
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<component name="ProjectRunConfigurationManager">
2+
<configuration default="false" name="Built-in Server for test" type="PhpBuiltInWebServerConfigurationType" factoryName="PHP Built-in Web Server" document_root="$PROJECT_DIR$/webtest" host="0.0.0.0" port="8081">
3+
<method v="2" />
4+
</configuration>
5+
</component>

.run/PHPUnit.run.xml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<component name="ProjectRunConfigurationManager">
2+
<configuration default="false" name="PHPUnit" type="PHPUnitRunConfigurationType" factoryName="PHPUnit">
3+
<TestRunner configuration_file="$PROJECT_DIR$/phpunit.xml.dist" scope="XML" use_alternative_configuration_file="true" />
4+
<method v="2" />
5+
</configuration>
6+
</component>

.travis.yml

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

README.md

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
# JwtSession
22

3-
[![Opensource ByJG](https://img.shields.io/badge/opensource-byjg.com-brightgreen.svg)](http://opensource.byjg.com)
4-
[![Build Status](https://travis-ci.org/byjg/jwt-session.svg?branch=master)](https://travis-ci.org/byjg/jwt-session)
5-
[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/byjg/jwt-session/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/byjg/jwt-session/?branch=master)
3+
[![Build Status](https://github.com/byjg/jwt-session/actions/workflows/phpunit.yml/badge.svg?branch=master)](https://github.com/byjg/jwt-session/actions/workflows/phpunit.yml)
4+
[![Opensource ByJG](https://img.shields.io/badge/opensource-byjg-success.svg)](http://opensource.byjg.com)
5+
[![GitHub source](https://img.shields.io/badge/Github-source-informational?logo=github)](https://github.com/byjg/jwt-session/)
6+
[![GitHub license](https://img.shields.io/github/license/byjg/jwt-session.svg)](https://opensource.byjg.com/opensource/licensing.html)
7+
[![GitHub release](https://img.shields.io/github/release/byjg/jwt-session.svg)](https://github.com/byjg/jwt-session/releases/)
68

79
JwtSession is a PHP session replacement. Instead of use FileSystem, just use JWT TOKEN.
810
The implementation following the SessionHandlerInterface.
@@ -49,7 +51,7 @@ Because of this _**do not** store in the JWT Token sensible data like passwords_
4951
# Install
5052

5153
```
52-
composer require "byjg/jwt-session=2.0.*"
54+
composer require "byjg/jwt-session"
5355
```
5456

5557

@@ -163,5 +165,12 @@ We store a cookie named AUTH_BEARER_<context name> with the session name. The PH
163165
PHP create it by default but we do not use it;
164166

165167

166-
----
168+
## Dependencies
169+
170+
```mermaid
171+
flowchart TD
172+
byjg/jwt-session --> byjg/jwt-wrapper
173+
```
174+
175+
----
167176
[Open source ByJG](http://opensource.byjg.com)

_config.yml

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

composer.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@
99
"minimum-stability": "dev",
1010
"prefer-stable": true,
1111
"require": {
12-
"php": ">=5.6.0",
13-
"byjg/jwt-wrapper": "2.0.*"
12+
"php": ">=8.0",
13+
"byjg/jwt-wrapper": "4.9.*"
1414
},
1515
"require-dev": {
16-
"phpunit/phpunit": "5.7.*|7.4.*"
16+
"phpunit/phpunit": "5.7.*|7.4.*|^9.6"
1717
},
1818
"license": "MIT"
1919
}

phpunit.xml.dist

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,19 @@ and open the template in the editor.
88
<!-- see http://www.phpunit.de/wiki/Documentation -->
99
<phpunit bootstrap="./vendor/autoload.php"
1010
colors="true"
11+
testdox="true"
1112
convertErrorsToExceptions="true"
1213
convertNoticesToExceptions="true"
1314
convertWarningsToExceptions="true"
15+
convertDeprecationsToExceptions="true"
1416
stopOnFailure="false">
1517

18+
<php>
19+
<ini name="display_errors" value="On" />
20+
<ini name="display_startup_errors" value="On" />
21+
<ini name="error_reporting" value="E_ALL" />
22+
</php>
23+
1624
<filter>
1725
<whitelist>
1826
<directory>./src</directory>

0 commit comments

Comments
 (0)