Skip to content

Commit 946257f

Browse files
support money 4.0, remove prophecy deprecation warnings (#112)
* support money 4.0 * remove prophecy deprecation warnings * drop unsupported php versions
1 parent 15252da commit 946257f

File tree

10 files changed

+1036
-652
lines changed

10 files changed

+1036
-652
lines changed

.github/workflows/main.yml

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@ jobs:
66
strategy:
77
matrix:
88
php-version:
9-
- '7.2'
10-
- '7.3'
119
- '7.4'
1210
- '8.0'
1311
- '8.1'
@@ -31,6 +29,10 @@ jobs:
3129
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
3230
restore-keys: ${{ runner.os }}-composer-
3331

32+
- name: Remove lock for older PHP
33+
if: matrix.php-version == '7.4'
34+
run: rm composer.lock
35+
3436
- name: Install dependencies
3537
run: composer install
3638

@@ -52,7 +54,7 @@ jobs:
5254
- name: Setup PHP, with composer and extensions
5355
uses: shivammathur/setup-php@v2
5456
with:
55-
php-version: 7.4
57+
php-version: 8.0
5658
coverage: none
5759
tools: cs2pr
5860

@@ -78,7 +80,7 @@ jobs:
7880
- name: Setup PHP, with composer and extensions
7981
uses: shivammathur/setup-php@v2
8082
with:
81-
php-version: 7.4
83+
php-version: 8.0
8284
coverage: none
8385

8486
- name: Cache composer dependencies
@@ -103,7 +105,7 @@ jobs:
103105
- name: Setup PHP, with composer and extensions
104106
uses: shivammathur/setup-php@v2
105107
with:
106-
php-version: 7.4
108+
php-version: 8.0
107109
coverage: pcov
108110

109111
- name: Cache composer dependencies
@@ -119,10 +121,10 @@ jobs:
119121
- name: Code coverage
120122
run: ./vendor/bin/phpunit --coverage-clover coverage-clover.xml
121123

122-
- name: Upload code coverage
123-
run: |
124-
curl -LO https://scrutinizer-ci.com/ocular.phar
125-
php ocular.phar code-coverage:upload --format=php-clover coverage-clover.xml
124+
- name: Upload Scrutinizer coverage
125+
uses: sudo-bot/action-scrutinizer@latest
126+
with:
127+
cli-args: --format=php-clover coverage-clover.xml
126128

127129
release:
128130
runs-on: ubuntu-latest

composer.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,12 @@
1313
]
1414
},
1515
"require": {
16-
"php": "^7.2 || ^8.0",
16+
"php": "^7.4 || ^8.0",
1717
"ext-dom": "*",
1818
"ext-libxml": "*",
1919
"ext-simplexml": "*",
2020
"jschaedl/iban-validation": "^1.7",
21-
"moneyphp/money": "^3.3"
21+
"moneyphp/money": "^3.3 || ^4.0"
2222
},
2323
"autoload": {
2424
"psr-4": {
@@ -37,6 +37,7 @@
3737
"require-dev": {
3838
"friendsofphp/php-cs-fixer": "@stable",
3939
"phpstan/phpstan": "@stable",
40-
"phpunit/phpunit": "@stable"
40+
"phpunit/phpunit": "@stable",
41+
"phpspec/prophecy-phpunit": "@stable"
4142
}
4243
}

0 commit comments

Comments
 (0)