Skip to content

Commit 405673a

Browse files
authored
Merge pull request #104 from BKWLD/feature/allow-phug-2
Allow Phug 2
2 parents ea134c9 + 5245de1 commit 405673a

5 files changed

Lines changed: 21 additions & 29 deletions

File tree

.github/workflows/coverage.yml

Lines changed: 13 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,13 @@ jobs:
1313
strategy:
1414
fail-fast: false
1515
matrix:
16-
php: ['8.2']
16+
php: ['8.4']
1717
setup: ['stable']
1818

1919
name: PHP
2020

2121
steps:
22-
- uses: actions/checkout@v2
22+
- uses: actions/checkout@v5
2323

2424
- name: Setup PHP
2525
uses: shivammathur/setup-php@v2
@@ -30,36 +30,28 @@ jobs:
3030

3131
- name: Cache Composer packages
3232
id: composer-cache
33-
uses: actions/cache@v2
33+
uses: actions/cache@v4
3434
with:
3535
path: vendor
3636
key: ${{ runner.os }}-${{ matrix.setup }}-php-${{ matrix.php }}-${{ hashFiles('**/composer.lock') }}
3737
restore-keys: |
3838
${{ runner.os }}-${{ matrix.setup }}-php-${{ matrix.php }}-
3939
40-
- name: Code Climate Test Reporter Preparation
41-
run: |
42-
curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
43-
chmod +x ./cc-test-reporter
44-
./cc-test-reporter before-build
45-
env:
46-
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
47-
4840
- name: Install dependencies
4941
if: steps.composer-cache.outputs.cache-hit != 'true'
5042
run: |
51-
${{ matrix.php >= 8 && 'composer require --no-update phpunit/phpunit:^9.5.10 --no-interaction;' || '' }}
5243
composer update --prefer-dist --no-interaction ${{ format('--prefer-{0}', matrix.setup) || '' }}
5344
5445
- name: Run test suite
5546
run: vendor/bin/phpunit --coverage-text --coverage-clover=coverage.xml
5647

57-
- name: Code Climate Test Reporter
58-
if: ${{ env.CC_TEST_REPORTER_ID != '' }}
59-
run: |
60-
cp coverage.xml clover.xml
61-
bash <(curl -s https://codecov.io/bash)
62-
./cc-test-reporter after-build --coverage-input-type clover --exit-code 0
63-
env:
64-
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
65-
CODACY_PROJECT_TOKEN: ${{ secrets.CODACY_PROJECT_TOKEN }}
48+
- name: Coverage - Qltysh
49+
uses: qltysh/qlty-action/coverage@v2
50+
with:
51+
token: ${{ secrets.QLTY_COVERAGE_TOKEN }}
52+
files: clover.xml
53+
54+
- name: Coverage - Codecov
55+
uses: codecov/codecov-action@v5
56+
with:
57+
token: ${{ secrets.CODECOV_TOKEN }}

.github/workflows/tests.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,13 @@ jobs:
1313
strategy:
1414
fail-fast: false
1515
matrix:
16-
php: ['7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3']
16+
php: ['7.2', '7.4', '8.0', '8.2', '8.4', '8.5']
1717
setup: ['lowest', 'stable', 'next']
1818

1919
name: PHP ${{ matrix.php }} - ${{ matrix.setup }}
2020

2121
steps:
22-
- uses: actions/checkout@v2
22+
- uses: actions/checkout@v5
2323

2424
- name: Setup PHP
2525
uses: shivammathur/setup-php@v2
@@ -29,7 +29,7 @@ jobs:
2929

3030
- name: Cache Composer packages
3131
id: composer-cache
32-
uses: actions/cache@v2
32+
uses: actions/cache@v4
3333
with:
3434
path: vendor
3535
key: ${{ runner.os }}-${{ matrix.setup }}-php-${{ matrix.php }}-${{ hashFiles('**/composer.lock') }}
@@ -39,7 +39,6 @@ jobs:
3939
- name: Install dependencies
4040
if: steps.composer-cache.outputs.cache-hit != 'true'
4141
run: |
42-
${{ matrix.php >= 8 && 'composer require --no-update phpunit/phpunit:^9.5.10 --no-interaction;' || '' }}
4342
composer update --prefer-dist --no-interaction ${{ matrix.setup != 'next' && format('--prefer-{0}', matrix.setup) || '' }}
4443
env:
4544
MULTI_TESTER_LABELS: install

composer.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,16 @@
66
"php": "^7.2 || ^8.0",
77
"illuminate/support": ">=6",
88
"illuminate/view": ">=6",
9-
"phug/component": "^1.1.3",
9+
"phug/component": "^1.1.3 || ^2.0.0",
1010
"pug-php/pug": "^3.3.1",
1111
"pug-php/pug-assets": "^1.0.1",
1212
"pug/installer": "^1.0.0",
1313
"composer-plugin-api": "^1.0 || ^2.0"
1414
},
1515
"require-dev": {
1616
"composer/composer": "^1.2 || ^2.0",
17-
"phpunit/phpunit": "^8.5"
17+
"phpunit/phpunit": "^8.5.52 || ^9.6.34",
18+
"illuminate/queue": ">=6"
1819
},
1920
"minimum-stability": "dev",
2021
"license": "MIT",

src/PugHandlerInterface.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,5 +83,5 @@ public function getCompiler(): PhugCompiler;
8383
*
8484
* @return void
8585
*/
86-
public function compileWith($path, callable $callback = null): void;
86+
public function compileWith($path, ?callable $callback = null): void;
8787
}

src/PugHandlerTrait.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ public function getCompiler(): CompilerInterface
202202
*
203203
* @return void
204204
*/
205-
public function compileWith($path, callable $callback = null): void
205+
public function compileWith($path, ?callable $callback = null): void
206206
{
207207
$path = $this->extractPath($path);
208208

0 commit comments

Comments
 (0)