Skip to content

Commit 47f1c8c

Browse files
committed
Added support for PHP 7.1
1 parent 74a2d70 commit 47f1c8c

File tree

4 files changed

+19
-14
lines changed

4 files changed

+19
-14
lines changed

.github/workflows/Test.yml

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,23 +3,25 @@ name: Test
33

44
on:
55
push:
6-
tags-ignore:
7-
- '**'
86
paths:
97
- '*.php'
108
- 'composer.json'
9+
branches:
10+
- main
1111
pull_request:
1212
paths:
1313
- '*.php'
1414
- 'composer.json'
15+
branches:
16+
- main
1517
workflow_dispatch:
1618

1719
jobs:
1820
run:
1921
runs-on: ubuntu-latest
2022
strategy:
2123
matrix:
22-
php: [ '7.2', '7.3', '7.4' ]
24+
php: [ '7.1', '7.2', '7.3', '7.4' ]
2325
name: PHP ${{ matrix.php-versions }} Test
2426

2527
steps:
@@ -32,13 +34,10 @@ jobs:
3234
php-version: ${{ matrix.php }}
3335
extensions: json
3436
coverage: none
35-
tools: cs2pr, phpstan, phpunit
37+
tools: phpunit
3638
env:
3739
COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3840

39-
- name: Run PHPStan
40-
run: phpstan analyse --error-format=checkstyle src | cs2pr
41-
4241
- name: Setup problem matchers for PHPUnit
4342
run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
4443

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@
33
vendor
44
.php_cs.cache
55
composer.lock
6+
composer.phar

README.md

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
JSONPath ![Test](https://github.com/SoftCreatR/JSONPath/workflows/Test/badge.svg?branch=main)
1+
JSONPath for PHP 7.1+ ![Test](https://github.com/SoftCreatR/JSONPath/workflows/Test/badge.svg?branch=main)
22
=============
33

44
This is a [JSONPath](http://goessner.net/articles/JsonPath/) implementation for PHP based on Stefan Goessner's JSONPath script.
@@ -15,13 +15,18 @@ This project aims to be a clean and simple implementation with the following goa
1515
Installation
1616
---
1717

18-
**PHP 7.2+**
18+
**PHP 7.1+**
1919
```bash
2020
composer require softcreatr/jsonpath
2121
```
22-
**PHP < 7.2**
22+
**PHP < 7.1**
2323

24-
Support for PHP < 7.2 has been completely dropped. A legacy branch is maintained in the original repository in php-5.x and can be composer-installed as follows: `"flow/jsonpath": "dev-php-5.x"`
24+
Support for PHP < 7.1 has been dropped. However, legacy branches exist for PHP 5.6 and 7.0 and can be composer-installed as follows:
25+
26+
* PHP 7.0: `"flow/jsonpath": "dev-php-70"`
27+
* PHP 5.6: `"flow/jsonpath": "dev-php-56"`
28+
29+
🔻 Please note, that these legacy branches (based on JSONPath 0.6.2) are protected. There are no intentions to make any updates here. Please consider upgrading to PHP 7.2 or newer.
2530

2631
JSONPath Examples
2732
---
@@ -127,7 +132,7 @@ Changelog
127132
---------
128133

129134
### 0.6.x
130-
- Dropped support for PHP < 7.2
135+
- Dropped support for PHP < 7.1
131136
- Switched from (broken) PSR-0 to PSR-4
132137
- Updated PHPUnit to 8.5 / 9.4
133138
- Updated tests

composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,14 @@
1818
}
1919
],
2020
"require": {
21-
"php": ">=7.2",
21+
"php": ">=7.1 || <8.1",
2222
"ext-json": "*"
2323
},
2424
"replace": {
2525
"flow/jsonpath": "*"
2626
},
2727
"require-dev": {
28-
"phpunit/phpunit": "^8 || ^9"
28+
"phpunit/phpunit": "<7.0 || >= 10.0"
2929
},
3030
"config": {
3131
"optimize-autoloader": true,

0 commit comments

Comments
 (0)