Skip to content

Commit

Permalink
Merge pull request #16 from byjg/8.1
Browse files Browse the repository at this point in the history
 Upgrade Jwt-Session Packages and Language
  • Loading branch information
byjg authored Aug 25, 2024
2 parents b638f49 + 9610242 commit 5ab56f4
Show file tree
Hide file tree
Showing 14 changed files with 164 additions and 156 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/phpunit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: PHPUnit
on:
push:
branches:
- master
tags:
- "*.*.*"
pull_request:
branches:
- master

jobs:
Build:
runs-on: 'ubuntu-latest'
container: 'byjg/php:${{ matrix.php-version }}-cli'
strategy:
matrix:
php-version:
- "8.2"
- "8.1"
- "8.0"

steps:
- uses: actions/checkout@v4
- run: composer install
- run: ./vendor/bin/phpunit

Documentation:
if: github.ref == 'refs/heads/master'
needs: Build
uses: byjg/byjg.github.io/.github/workflows/add-doc.yaml@master
with:
folder: php
project: ${{ github.event.repository.name }}
secrets: inherit

1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
.idea
composer.lock
vendor
/.phpunit.result.cache
5 changes: 5 additions & 0 deletions .run/Built-in Server for test.run.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<component name="ProjectRunConfigurationManager">
<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">
<method v="2" />
</configuration>
</component>
6 changes: 6 additions & 0 deletions .run/PHPUnit.run.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="PHPUnit" type="PHPUnitRunConfigurationType" factoryName="PHPUnit">
<TestRunner configuration_file="$PROJECT_DIR$/phpunit.xml.dist" scope="XML" use_alternative_configuration_file="true" />
<method v="2" />
</configuration>
</component>
14 changes: 0 additions & 14 deletions .travis.yml

This file was deleted.

19 changes: 14 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
# JwtSession

[![Opensource ByJG](https://img.shields.io/badge/opensource-byjg.com-brightgreen.svg)](http://opensource.byjg.com)
[![Build Status](https://travis-ci.org/byjg/jwt-session.svg?branch=master)](https://travis-ci.org/byjg/jwt-session)
[![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)
[![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)
[![Opensource ByJG](https://img.shields.io/badge/opensource-byjg-success.svg)](http://opensource.byjg.com)
[![GitHub source](https://img.shields.io/badge/Github-source-informational?logo=github)](https://github.com/byjg/jwt-session/)
[![GitHub license](https://img.shields.io/github/license/byjg/jwt-session.svg)](https://opensource.byjg.com/opensource/licensing.html)
[![GitHub release](https://img.shields.io/github/release/byjg/jwt-session.svg)](https://github.com/byjg/jwt-session/releases/)

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

```
composer require "byjg/jwt-session=2.0.*"
composer require "byjg/jwt-session"
```


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


----
## Dependencies

```mermaid
flowchart TD
byjg/jwt-session --> byjg/jwt-wrapper
```

----
[Open source ByJG](http://opensource.byjg.com)
66 changes: 0 additions & 66 deletions _config.yml

This file was deleted.

6 changes: 3 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@
"minimum-stability": "dev",
"prefer-stable": true,
"require": {
"php": ">=5.6.0",
"byjg/jwt-wrapper": "2.0.*"
"php": ">=8.0",
"byjg/jwt-wrapper": "4.9.*"
},
"require-dev": {
"phpunit/phpunit": "5.7.*|7.4.*"
"phpunit/phpunit": "5.7.*|7.4.*|^9.6"
},
"license": "MIT"
}
8 changes: 8 additions & 0 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,19 @@ and open the template in the editor.
<!-- see http://www.phpunit.de/wiki/Documentation -->
<phpunit bootstrap="./vendor/autoload.php"
colors="true"
testdox="true"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
convertDeprecationsToExceptions="true"
stopOnFailure="false">

<php>
<ini name="display_errors" value="On" />
<ini name="display_startup_errors" value="On" />
<ini name="error_reporting" value="E_ALL" />
</php>

<filter>
<whitelist>
<directory>./src</directory>
Expand Down
Loading

0 comments on commit 5ab56f4

Please sign in to comment.