Skip to content

Commit 35535ae

Browse files
quentin389GitHub Enterprise
authored andcommitted
Merge pull request #12 from php/DEVXP-363_update_nikic_php_parser_to_version_5.3.1
[DEVXP-363]: Update nikic/PHP-Parser to version 5.3.1
2 parents 8a28bf7 + bfcb66f commit 35535ae

File tree

19 files changed

+298
-236
lines changed

19 files changed

+298
-236
lines changed

CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,15 @@
11
# SoftMocks ChangeLog
22

3+
## 4.0.0
4+
5+
Changes:
6+
- Minimum PHP version is now `7.4`.
7+
- Updated `nikic/php-parser` from version `^4.19.1` to `^5.3.1`.
8+
- Soft Mocks now automatically uses PHP Parser for currently installed PHP version. This should work well for most
9+
use cases, but can still be overwritten by passing a parameter to `\Badoo\SoftMocks::init()`
10+
- Fixed an error where heredoc or nowdoc comments would cause the rewritten file to have code at incorrect lines.
11+
12+
313
## 3.7
414

515
Changes:

README.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ The idea behind "Soft Mocks" - as opposed to "hardcore" mocks that work on the l
55
[![GitHub release](https://img.shields.io/github/release/badoo/soft-mocks.svg)](https://github.com/badoo/soft-mocks/releases/latest)
66
[![Total Downloads](https://img.shields.io/packagist/dt/badoo/soft-mocks.svg)](https://packagist.org/packages/badoo/soft-mocks)
77
[![Daily Downloads](https://img.shields.io/packagist/dd/badoo/soft-mocks.svg)](https://packagist.org/packages/badoo/soft-mocks)
8-
[![Minimum PHP Version](http://img.shields.io/badge/php-%3E%3D%205.5-8892BF.svg)](https://php.net/)
8+
[![Minimum PHP Version](http://img.shields.io/badge/php-%3E%3D%207.4-8892BF.svg)](https://php.net/)
99
[![License](https://img.shields.io/packagist/l/badoo/soft-mocks.svg)](https://packagist.org/packages/badoo/soft-mocks)
1010

1111
## Installation
@@ -290,6 +290,12 @@ Then you can change SoftMocks and run tests to be sure that all works:
290290
./vendor/bin/phpunit
291291
```
292292

293+
And finally, check tests on all supported PHP versions (requires Docker):
294+
295+
```
296+
./run-tests.sh
297+
```
298+
293299
Remember to update CHANGELOG.md.
294300

295301
If you are bumping the PHPUnit version, update readme with maximum supported version.

composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@
1010
}
1111
],
1212
"require": {
13-
"php": ">=7.0",
13+
"php": ">=7.4",
1414
"ext-json": "*",
1515
"ext-mbstring": "*",
16-
"nikic/php-parser": "^4.19.1"
16+
"nikic/php-parser": "^5.3.1"
1717
},
1818
"require-dev": {
1919
"vaimo/composer-patches": "4.22.4",

run-tests.sh

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
#!/bin/bash
2+
3+
set -e
4+
5+
echo "PHP 7.4 START"
6+
docker build -q -f tests/docker-php/Dockerfile -t testing74 --build-arg PHP_VERSION=7.4 .
7+
docker run --rm testing74
8+
echo "PHP 7.4 END"
9+
10+
echo "PHP 8.0 START"
11+
docker build -q -f tests/docker-php/Dockerfile -t testing80 --build-arg PHP_VERSION=8.0 .
12+
docker run --rm testing80
13+
echo "PHP 8.0 END"
14+
15+
echo "PHP 8.1 START"
16+
docker build -q -f tests/docker-php/Dockerfile -t testing81 --build-arg PHP_VERSION=8.1 .
17+
docker run --rm testing81
18+
echo "PHP 8.1 END"
19+
20+
echo "PHP 8.2 START"
21+
docker build -q -f tests/docker-php/Dockerfile -t testing82 --build-arg PHP_VERSION=8.2 .
22+
docker run --rm testing82
23+
echo "PHP 8.2 END"
24+
25+
echo "PHP 8.3 START"
26+
docker build -q -f tests/docker-php/Dockerfile -t testing83 --build-arg PHP_VERSION=8.3 .
27+
docker run --rm testing83
28+
echo "PHP 8.3 END"
29+
30+
echo "PHP 8.4 START"
31+
docker build -q -f tests/docker-php/Dockerfile -t testing84 --build-arg PHP_VERSION=8.4 .
32+
docker run --rm testing84
33+
echo "PHP 8.4 END"
34+
35+
echo "ALL OK!"

0 commit comments

Comments
 (0)