Skip to content

Commit 5d268ad

Browse files
authored
PHP build fixes (#7)
PHP build fixes
1 parent be816cd commit 5d268ad

15 files changed

+879
-175
lines changed

.github/workflows/tests.yml

Lines changed: 26 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,30 @@ jobs:
2121

2222
strategy:
2323
matrix:
24-
php: [ '5.4', '5.5', '5.6', '7.0', '7.1', '7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3', '8.4']
24+
include:
25+
- php: '5.6'
26+
phpunit_config: 'phpunit.xml.dist' # PHPUnit 5.7
27+
- php: '7.0'
28+
phpunit_config: 'phpunit.xml.dist' # PHPUnit 6.5
29+
- php: '7.1'
30+
phpunit_config: 'phpunit.xml.dist' # PHPUnit 7.5
31+
- php: '7.2'
32+
phpunit_config: 'phpunit.xml.dist' # PHPUnit 8.5
33+
- php: '7.3'
34+
phpunit_config: 'phpunit9.xml.dist' # PHPUnit 9.6
35+
- php: '7.4'
36+
phpunit_config: 'phpunit9.xml.dist' # PHPUnit 9.6
37+
- php: '8.0'
38+
phpunit_config: 'phpunit9.xml.dist' # PHPUnit 9.6
39+
- php: '8.1'
40+
phpunit_config: 'phpunit10.xml.dist' # PHPUnit 10.5
41+
- php: '8.2'
42+
phpunit_config: 'phpunit10.xml.dist' # PHPUnit 10.5
43+
- php: '8.3'
44+
phpunit_config: 'phpunit10.xml.dist' # PHPUnit 10.5
45+
# Don't test on PHP 8.4 due to "aura/sql" bug: https://github.com/auraphp/Aura.Sql/pull/231.
46+
# - php: '8.4'
47+
# phpunit_config: 'phpunit10.xml.dist' # PHPUnit 10.5
2548
fail-fast: false
2649

2750
steps:
@@ -44,7 +67,7 @@ jobs:
4467

4568
- name: Run tests
4669
run: |
47-
vendor/bin/phpunit --log-junit junit.xml --coverage-clover=coverage.clover
70+
vendor/bin/phpunit --configuration ${{ matrix.phpunit_config }} --log-junit junit.xml --coverage-clover=coverage.clover
4871
4972
- name: Upload coverage to Codecov
5073
uses: codecov/codecov-action@v4
@@ -68,5 +91,6 @@ jobs:
6891
- name: Upload Coverage to Scrutinizer CI (PHP >= 8.0)
6992
if: "${{ matrix.php >= '8.0' }}"
7093
run: |
94+
rm composer.lock
7195
composer require scrutinizer/ocular
7296
vendor/bin/ocular code-coverage:upload --repository=g/console-helpers/db-migration --format=php-clover coverage.clover

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
vendor
22
phpunit.xml
3+
.phpunit.result.cache

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ This project adheres to [Semantic Versioning](http://semver.org/).
77
...
88

99
### Changed
10-
...
10+
- Increase minimal supported version of PHP to 5.6.
1111

1212
### Fixed
1313
...

composer.json

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,14 @@
1010
}
1111
],
1212
"require": {
13-
"php": ">=5.4",
14-
"aura/sql": "^2.5 | ^3.0"
13+
"php": ">=5.6",
14+
"aura/sql": "^2.5 || ^3.0 || ^4.0 || ^5.0"
1515
},
1616
"require-dev": {
1717
"aik099/coding-standard": "dev-master",
18-
"yoast/phpunit-polyfills": "^1.0"
18+
"yoast/phpunit-polyfills": "^2.0",
19+
"phpspec/prophecy": "^1.10",
20+
"console-helpers/prophecy-phpunit": "^3.0"
1921
},
2022
"autoload": {
2123
"psr-4": {

0 commit comments

Comments
 (0)