Skip to content

Commit

Permalink
version php82
Browse files Browse the repository at this point in the history
  • Loading branch information
leodisarli committed Nov 3, 2023
1 parent dea2da5 commit d559a23
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 12 deletions.
13 changes: 10 additions & 3 deletions .github/workflows/php.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,21 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: Setup PHP Action
uses: shivammathur/setup-php@2.26.0
with:
php-version: 8.2
extensions: dom
coverage: xdebug

- name: Validate composer.json and composer.lock
run: composer validate

- name: Cache Composer packages
id: composer-cache
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: vendor
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}
Expand All @@ -36,4 +43,4 @@ jobs:
- name: export coverage
run: |
export CODECOV_TOKEN="${{ secrets.CODECOV_TOKEN }}"
bash <(curl -s https://codecov.io/bash)
bash <(curl -s https://codecov.io/bash)
16 changes: 12 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,19 @@
# JWT Manager PHP

[![Latest Version](https://img.shields.io/github/v/release/not-empty/jwt-manager-php-lib.svg?style=flat-square)](https://github.com/not-empty/jwt-manager-php-lib/releases)
[![codecov](https://codecov.io/gh/not-empty/jwt-manager-php-lib/graph/badge.svg?token=AEMV163UW6)](https://codecov.io/gh/not-empty/jwt-manager-php-lib)
[![CI Build](https://img.shields.io/github/actions/workflow/status/not-empty/jwt-manager-php-lib/php.yml)](https://github.com/not-empty/jwt-manager-php-lib/actions/workflows/php.yml)
[![Downloads Old](https://img.shields.io/packagist/dt/kiwfy/jwt-manager-php?logo=old&label=downloads%20legacy)](https://packagist.org/packages/kiwfy/jwt-manager-php)
[![Downloads](https://img.shields.io/packagist/dt/not-empty/jwt-manager-php-lib?logo=old&label=downloads)](https://packagist.org/packages/not-empty/jwt-manager-php-lib)
[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square)](http://makeapullrequest.com)
[![Packagist License (custom server)](https://img.shields.io/packagist/l/not-empty/jwt-manager-php-lib)](https://github.com/not-empty/jwt-manager-php-lib/blob/master/LICENSE)

PHP library to manage JWT authentication

### Installation

[Release 6.0.0](https://github.com/not-empty/jwt-manager-php-lib/releases/tag/6.0.0) Requires [PHP](https://php.net) 8.2

[Release 5.0.0](https://github.com/not-empty/jwt-manager-php-lib/releases/tag/5.0.0) Requires [PHP](https://php.net) 8.1

[Release 4.0.0](https://github.com/not-empty/jwt-manager-php-lib/releases/tag/4.0.0) Requires [PHP](https://php.net) 7.4
Expand Down Expand Up @@ -80,12 +88,12 @@ var_dump($result);
if you want an environment to run or test it, you can build and install dependences like this

```sh
docker build --build-arg PHP_VERSION=8.1.4-cli -t not-empty/jwt-manager-php-lib:php81 -f contrib/Dockerfile .
docker build --build-arg PHP_VERSION=8.2-cli -t not-empty/jwt-manager-php-lib:php82 -f contrib/Dockerfile .
```

Access the container
```sh
docker run -v ${PWD}/:/var/www/html -it not-empty/jwt-manager-php-lib:php81 bash
docker run -v ${PWD}/:/var/www/html -it not-empty/jwt-manager-php-lib:php82 bash
```

Verify if all dependencies is installed
Expand All @@ -111,12 +119,12 @@ To ensure that the entire project is fine:
First you need to building a correct environment to install all dependences

```sh
docker build --build-arg PHP_VERSION=8.1.4-cli -t not-empty/jwt-manager-php-lib:php81 -f contrib/Dockerfile .
docker build --build-arg PHP_VERSION=8.2-cli -t not-empty/jwt-manager-php-lib:php82 -f contrib/Dockerfile .
```

Access the container
```sh
docker run -v ${PWD}/:/var/www/html -it not-empty/jwt-manager-php-lib:php81 bash
docker run -v ${PWD}/:/var/www/html -it not-empty/jwt-manager-php-lib:php82 bash
```

Install all dependences
Expand Down
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"name": "not-empty/jwt-manager-php-lib",
"description": "PHP library to manage JWT authentication",
"version": "5.0.0",
"version": "6.0.0",
"type": "library",
"license": "GPL-3.0-only",
"require": {
"php": "^8.1"
"php": "^8.2"
},
"require-dev": {
"phpunit/phpunit": "^9.6",
Expand Down
4 changes: 2 additions & 2 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion contrib/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ARG PHP_VERSION=8.1.4-cli
ARG PHP_VERSION=8.2-cli

FROM php:${PHP_VERSION}

Expand Down

0 comments on commit d559a23

Please sign in to comment.