Skip to content

Commit 16a3def

Browse files
authored
Merge pull request #174 from Brain-WP/feature/improve-mockery-version-constraints-and-run-lowest-ci
Composer: improve version constraints for Mockery and improve CI
2 parents 11cacba + cf74be5 commit 16a3def

File tree

2 files changed

+7
-10
lines changed

2 files changed

+7
-10
lines changed

.github/workflows/php-qa.yml

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -83,17 +83,9 @@ jobs:
8383

8484
strategy:
8585
matrix:
86-
php-versions: ['5.6', '7.0', '7.1', '7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3']
86+
php-versions: ['5.6', '7.0', '7.1', '7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3', '8.4', '8.5', '8.6']
8787
dependency-versions: ['lowest', 'highest']
8888

89-
include:
90-
- php-versions: '8.4'
91-
dependency-versions: 'highest'
92-
- php-versions: '8.5'
93-
dependency-versions: 'highest'
94-
- php-versions: '8.6'
95-
dependency-versions: 'highest'
96-
9789
continue-on-error: ${{ matrix.php-versions == '8.6' }}
9890

9991
steps:
@@ -118,6 +110,11 @@ jobs:
118110
# Bust the cache at least once a month - output format: YYYY-MM.
119111
custom-cache-suffix: $(date -u "+%Y-%m")
120112

113+
# Mockery is only compatible with PHP 8.4 as of Mockery 1.6.10, so we need to update what "lowest" means.
114+
- name: Update Mockery lowest (PHP >= 8.4)
115+
if: ${{ matrix.php-versions >= '8.4' && matrix.dependency-versions == 'lowest' }}
116+
run: composer require mockery/mockery:"1.6.10"
117+
121118
- name: Migrate test configuration (>= 7.3)
122119
if: ${{ matrix.php-versions >= 7.3 && matrix.dependency-versions == 'highest' }}
123120
run: ./vendor/bin/phpunit --migrate-configuration

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
"license": "MIT",
2929
"require": {
3030
"php": ">=5.6.0",
31-
"mockery/mockery": "^1.3.5 || ^1.4.4",
31+
"mockery/mockery": "~1.3.6 || ~1.4.4 || ~1.5.1 || ^1.6.10",
3232
"antecedent/patchwork": "^2.1.17"
3333
},
3434
"require-dev": {

0 commit comments

Comments
 (0)