Skip to content

Commit 8dcff7d

Browse files
authored
Merge pull request #42 from pug-php/fix/php-8-4-compatibility
Use all-array before/after
2 parents 0e8e536 + 97c7ea0 commit 8dcff7d

File tree

2 files changed

+22
-23
lines changed

2 files changed

+22
-23
lines changed

.github/workflows/tests.yml

Lines changed: 19 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,17 @@ jobs:
1313
strategy:
1414
fail-fast: false
1515
matrix:
16-
php: ['7.0', '7.1', '7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3']
17-
setup: ['lowest', 'stable', 'next']
16+
php: ['7.0', '7.1', '7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3', '8.4', '8.5']
17+
setup: ['stable']
18+
include:
19+
- php: '7.0'
20+
setup: 'lowest'
21+
- php: '7.0'
22+
setup: 'next'
23+
- php: '8.5'
24+
setup: 'lowest'
25+
- php: '8.5'
26+
setup: 'next'
1827

1928
name: PHP ${{ matrix.php }} - ${{ matrix.setup }}
2029

@@ -42,15 +51,6 @@ jobs:
4251
${{ matrix.php >= 8.1 && 'composer require --no-update phpunit/phpunit:^8.5.14 --no-interaction' || '' }}
4352
composer update --prefer-dist ${{ matrix.setup != 'next' && format('--prefer-{0}', matrix.setup) || '' }} --no-progress --no-suggest ${{ matrix.php >= 8.1 && '--ignore-platform-req=php' || '' }}
4453
45-
- name: Code Climate Test Reporter Preparation
46-
if: matrix.php == '7.4' && matrix.setup == 'stable'
47-
run: |
48-
curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter;
49-
chmod +x ./cc-test-reporter;
50-
./cc-test-reporter before-build;
51-
env:
52-
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
53-
5454
- name: Run test suite
5555
run: |
5656
if [[ ${MATRIX_CONFIG} == "7.4-stable" ]]; then
@@ -62,11 +62,14 @@ jobs:
6262
MATRIX_CONFIG: ${{ matrix.php }}-${{ matrix.setup }}
6363

6464
- name: Code Climate Test Reporter
65-
if: ${{ matrix.php == '7.4' && matrix.setup == 'stable' && env.CC_TEST_REPORTER_ID != '' }}
66-
run: ./cc-test-reporter after-build --exit-code 0
67-
env:
68-
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
65+
if: ${{ matrix.php == '7.4' && matrix.setup == 'stable' }}
66+
uses: qltysh/qlty-action/coverage@v2
67+
with:
68+
token: ${{ secrets.QLTY_COVERAGE_TOKEN }}
69+
files: clover.xml
6970

7071
- name: Coverage
7172
if: matrix.php == '7.4' && matrix.setup == 'stable'
72-
run: bash <(curl -s https://codecov.io/bash)
73+
uses: codecov/codecov-action@v5
74+
with:
75+
token: ${{ secrets.CODECOV_TOKEN }}

src/JsPhpize/Nodes/Dyiade.php

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -26,17 +26,13 @@ class Dyiade extends Value
2626
*/
2727
protected $operator;
2828

29-
public function __construct($operator, Value $leftHand, Value $rightHand, array $before = null, array $after = null)
29+
public function __construct($operator, Value $leftHand, Value $rightHand, array $before = [], array $after = [])
3030
{
3131
$this->operator = $operator;
3232
$this->leftHand = $leftHand;
3333
$this->rightHand = $rightHand;
34-
if ($before !== null) {
35-
$this->before = $before;
36-
}
37-
if ($after !== null) {
38-
$this->after = $after;
39-
}
34+
$this->before = $before;
35+
$this->after = $after;
4036
}
4137

4238
public function getReadVariables()

0 commit comments

Comments
 (0)