Skip to content

Commit e2869b1

Browse files
authored
Merge pull request #29 from WebFiori/dev
Drop Support for PHP 5
2 parents f5fe3f4 + 8518394 commit e2869b1

12 files changed

Lines changed: 307 additions & 32 deletions

File tree

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Build PHP 7
1+
name: Build PHP 7.0
22

33
on:
44
push:
@@ -9,11 +9,12 @@ on:
99
jobs:
1010
test:
1111
runs-on: ${{ matrix.os }}
12+
1213
strategy:
1314
fail-fast: true
1415
matrix:
1516
os: [ ubuntu-latest ]
16-
php: [7.1, 7.0, 5.6]
17+
php: [7.0]
1718

1819
name: PHP${{matrix.php}} - ${{matrix.os}}
1920

@@ -25,8 +26,14 @@ jobs:
2526
uses: shivammathur/setup-php@v2
2627
with:
2728
php-version: ${{ matrix.php }}
28-
extensions: mysqli, mbstring
29-
tools: phpunit:5.7.27
30-
29+
extensions: mysqli, mbstring, sqlsrv
30+
tools: phpunit:5.7.27, composer
31+
32+
- name: Install Dependencies
33+
run: composer install --prefer-source --no-interaction --no-dev
34+
3135
- name: Execute Tests
3236
run: phpunit
37+
38+
- name: CodeCov
39+
uses: codecov/codecov-action@v1

.github/workflows/php71.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Build PHP 7.1
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
pull_request:
7+
branches: [ master ]
8+
9+
jobs:
10+
test:
11+
runs-on: ${{ matrix.os }}
12+
13+
strategy:
14+
fail-fast: true
15+
matrix:
16+
os: [ ubuntu-latest ]
17+
php: [7.1]
18+
19+
name: PHP${{matrix.php}} - ${{matrix.os}}
20+
21+
steps:
22+
- name: Clone Repo
23+
uses: actions/checkout@v1
24+
25+
- name: Setup PHP
26+
uses: shivammathur/setup-php@v2
27+
with:
28+
php-version: ${{ matrix.php }}
29+
extensions: mysqli, mbstring, sqlsrv
30+
tools: phpunit:5.7.27, composer
31+
32+
- name: Install Dependencies
33+
run: composer install --prefer-source --no-interaction --no-dev
34+
35+
- name: Execute Tests
36+
run: phpunit
37+
38+
- name: CodeCov
39+
uses: codecov/codecov-action@v1

.github/workflows/php72.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: Build PHP 7.2
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
pull_request:
7+
branches: [ master ]
8+
9+
jobs:
10+
test:
11+
runs-on: ${{ matrix.os }}
12+
13+
strategy:
14+
fail-fast: true
15+
matrix:
16+
os: [ ubuntu-latest ]
17+
php: [7.2]
18+
19+
name: PHP${{matrix.php}} - ${{matrix.os}}
20+
21+
steps:
22+
- name: Clone Repo
23+
uses: actions/checkout@v1
24+
25+
- name: Setup PHP
26+
uses: shivammathur/setup-php@v2
27+
with:
28+
php-version: ${{ matrix.php }}
29+
extensions: mysqli, mbstring, sqlsrv
30+
tools: phpunit:8.5.13
31+
32+
- name: Install Dependencies
33+
run: composer install --prefer-source --no-interaction --no-dev
34+
35+
- name: Execute Tests
36+
run: phpunit
37+
38+
- name: CodeCov
39+
uses: codecov/codecov-action@v1
40+
41+

.github/workflows/php73.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: Build PHP 7.3
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
pull_request:
7+
branches: [ master ]
8+
9+
jobs:
10+
test:
11+
runs-on: ${{ matrix.os }}
12+
13+
strategy:
14+
fail-fast: true
15+
matrix:
16+
os: [ ubuntu-latest ]
17+
php: [7.3]
18+
19+
name: PHP${{matrix.php}} - ${{matrix.os}}
20+
21+
steps:
22+
- name: Clone Repo
23+
uses: actions/checkout@v1
24+
25+
- name: Setup PHP
26+
uses: shivammathur/setup-php@v2
27+
with:
28+
php-version: ${{ matrix.php }}
29+
extensions: mysqli, mbstring, sqlsrv
30+
tools: phpunit:8.5.13
31+
32+
- name: Install Dependencies
33+
run: composer install --prefer-source --no-interaction --no-dev
34+
35+
- name: Execute Tests
36+
run: phpunit
37+
38+
- name: CodeCov
39+
uses: codecov/codecov-action@v1
40+
41+
42+

.github/workflows/php74.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: Build PHP 7.4
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
pull_request:
7+
branches: [ master ]
8+
9+
jobs:
10+
test:
11+
runs-on: ${{ matrix.os }}
12+
13+
strategy:
14+
fail-fast: true
15+
matrix:
16+
os: [ ubuntu-latest ]
17+
php: [7.4]
18+
19+
name: PHP${{matrix.php}} - ${{matrix.os}}
20+
21+
steps:
22+
- name: Clone Repo
23+
uses: actions/checkout@v1
24+
25+
- name: Setup PHP
26+
uses: shivammathur/setup-php@v2
27+
with:
28+
php-version: ${{ matrix.php }}
29+
extensions: mysqli, mbstring, sqlsrv
30+
tools: phpunit:8.5.13
31+
32+
- name: Install Dependencies
33+
run: composer install --prefer-source --no-interaction --no-dev
34+
35+
- name: Execute Tests
36+
run: phpunit
37+
38+
- name: CodeCov
39+
uses: codecov/codecov-action@v1
40+
41+
42+

.github/workflows/php80.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: Build PHP 8.0
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
pull_request:
7+
branches: [ master ]
8+
9+
jobs:
10+
test:
11+
runs-on: ${{ matrix.os }}
12+
strategy:
13+
fail-fast: true
14+
matrix:
15+
os: [ ubuntu-latest ]
16+
php: [ 8.0 ]
17+
18+
name: PHP${{matrix.php}} - ${{matrix.os}}
19+
20+
steps:
21+
- name: Clone Repo
22+
uses: actions/checkout@v1
23+
24+
- name: Setup PHP
25+
uses: shivammathur/setup-php@v2
26+
with:
27+
php-version: ${{ matrix.php }}
28+
extensions: mysqli, mbstring, sqlsrv
29+
tools: phpunit:8.5.13
30+
31+
- name: Shutdown Ubuntu MySQL
32+
run: sudo service mysql stop
33+
34+
- name: Install Dependencies
35+
run: composer install --prefer-source --no-interaction --no-dev
36+
37+
- name: Execute Tests
38+
run: phpunit
39+
40+
- name: CodeCov
41+
uses: codecov/codecov-action@v1
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,20 @@
1-
name: Build PHP 7,8
1+
name: Build PHP 8.2
22

33
on:
44
push:
55
branches: [ master ]
66
pull_request:
7-
branches: [ master, dev ]
7+
branches: [ master ]
88

99
jobs:
1010
test:
1111
runs-on: ${{ matrix.os }}
12+
1213
strategy:
1314
fail-fast: true
1415
matrix:
1516
os: [ ubuntu-latest ]
16-
php: [8.0, 7.4, 7.3, 7.2]
17+
php: [8.2]
1718

1819
name: PHP${{matrix.php}} - ${{matrix.os}}
1920

@@ -25,19 +26,21 @@ jobs:
2526
uses: shivammathur/setup-php@v2
2627
with:
2728
php-version: ${{ matrix.php }}
28-
extensions: mysqli, mbstring
29-
tools: phpunit:8.5.13
29+
extensions: mysqli, mbstring, sqlsrv
30+
tools: phpunit:9.5.20, composer
31+
32+
33+
- name: Install Dependencies
34+
run: composer install --prefer-source --no-interaction --no-dev
3035

3136
- name: Execute Tests
3237
run: phpunit
33-
38+
3439
- name: CodeCov
3540
uses: codecov/codecov-action@v1
3641

3742
- name: SonarCloud
3843
uses: SonarSource/sonarcloud-github-action@master
3944
env:
4045
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
41-
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
42-
43-
46+
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}

.github/workflows/php82.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: Build PHP 8.2
2+
3+
on:
4+
push:
5+
branches: [ master, dev ]
6+
pull_request:
7+
branches: [ master ]
8+
9+
jobs:
10+
test:
11+
runs-on: ${{ matrix.os }}
12+
13+
strategy:
14+
fail-fast: true
15+
matrix:
16+
os: [ ubuntu-latest ]
17+
php: [8.2]
18+
19+
name: PHP${{matrix.php}} - ${{matrix.os}}
20+
21+
steps:
22+
- name: Clone Repo
23+
uses: actions/checkout@v1
24+
25+
- name: Setup PHP
26+
uses: shivammathur/setup-php@v2
27+
with:
28+
php-version: ${{ matrix.php }}
29+
extensions: mysqli, mbstring, sqlsrv
30+
tools: phpunit:9.5.20, composer
31+
32+
- name: Shutdown Ubuntu MySQL
33+
run: sudo service mysql stop
34+
35+
- name: Install Dependencies
36+
run: composer install --prefer-source --no-interaction --no-dev
37+
38+
- name: Execute Tests
39+
run: phpunit
40+
41+
- name: CodeCov
42+
uses: codecov/codecov-action@v1

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@ test.*
33
.php_cs.cache
44
.phpunit.result.cache
55
clover.xml
6+
*.phar

README.md

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,15 @@
33
A helper class library for creating JSON or JSONx strings in PHP. It can be used to create well-formatted json strings from any variable type (strings, numbers, boolean arrays and even objects).
44

55
<p align="center">
6-
<img src="https://github.com/WebFiori/json/workflows/Build%20PHP%207,8/badge.svg?branch=master">
6+
<a target="_blank" href="https://github.com/WebFiori/json/actions/workflows/php81.yml">
7+
<img src="https://github.com/WebFiori/json/workflows/Build%20PHP%208.1/badge.svg?branch=master">
8+
</a>
79
<a href="https://codecov.io/gh/WebFiori/json">
810
<img src="https://codecov.io/gh/WebFiori/json/branch/master/graph/badge.svg" />
911
</a>
12+
<a href="https://sonarcloud.io/dashboard?id=WebFiori_json">
13+
<img src="https://sonarcloud.io/api/project_badges/measure?project=WebFiori_json&metric=alert_status" />
14+
</a>
1015
<a href="https://packagist.org/packages/webfiori/jsonx">
1116
<img src="https://img.shields.io/packagist/dt/webfiori/jsonx?color=light-green">
1217
</a>
@@ -24,7 +29,16 @@ Accoording to [json.org](https://www.json.org/json-en.html), JSON is a data exch
2429
* Ability to manupulate JSON properties as needed.
2530

2631
## Supported PHP Versions
27-
The library supports all versions from PHP 5.6 up to PHP 8.1.
32+
| Build Status |
33+
|:-----------:|
34+
|<a target="_blank" href="https://github.com/WebFiori/json/actions/workflows/php70.yml"><img src="https://github.com/WebFiori/json/workflows/Build%20PHP%207.0/badge.svg?branch=master"></a>|
35+
|<a target="_blank" href="https://github.com/WebFiori/json/actions/workflows/php71.yml"><img src="https://github.com/WebFiori/json/workflows/Build%20PHP%207.1/badge.svg?branch=master"></a>|
36+
|<a target="_blank" href="https://github.com/WebFiori/json/actions/workflows/php72.yml"><img src="https://github.com/WebFiori/json/workflows/Build%20PHP%207.2/badge.svg?branch=master"></a>|
37+
|<a target="_blank" href="https://github.com/WebFiori/json/actions/workflows/php73.yml"><img src="https://github.com/WebFiori/json/workflows/Build%20PHP%207.3/badge.svg?branch=master"></a>|
38+
|<a target="_blank" href="https://github.com/WebFiori/json/actions/workflows/php74.yml"><img src="https://github.com/WebFiori/json/workflows/Build%20PHP%207.4/badge.svg?branch=master"></a>|
39+
|<a target="_blank" href="https://github.com/WebFiori/json/actions/workflows/php80.yml"><img src="https://github.com/WebFiori/json/workflows/Build%20PHP%208.0/badge.svg?branch=master"></a>|
40+
|<a target="_blank" href="https://github.com/WebFiori/json/actions/workflows/php81.yml"><img src="https://github.com/WebFiori/json/workflows/Build%20PHP%208.1/badge.svg?branch=master"></a>|
41+
|<a target="_blank" href="https://github.com/WebFiori/json/actions/workflows/php82.yml"><img src="https://github.com/WebFiori/json/workflows/Build%20PHP%208.2/badge.svg?branch=dev"></a><br>(dev)|
2842

2943
## Installation
3044
If you are using composer to manage your dependencies, then it is possible to install the library by including the entry `"webfiori/jsonx":"*"` in the `require` section of your `composer.json` file to install the latest release.

0 commit comments

Comments
 (0)