Skip to content

Commit ed88878

Browse files
authored
Merge pull request #12 from worksome/feature/pest-3.x
chore(deps): update to Pest 3.x and CS 3.x
2 parents c01b3f9 + 7b79c82 commit ed88878

File tree

35 files changed

+190
-125
lines changed

35 files changed

+190
-125
lines changed

.github/workflows/static.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,11 @@ jobs:
1616
- name: Setup PHP
1717
uses: shivammathur/setup-php@v2
1818
with:
19-
php-version: '8.2'
19+
php-version: '8.4'
2020
coverage: none
2121

2222
- name: Install composer dependencies
23-
uses: ramsey/composer-install@v2
23+
uses: ramsey/composer-install@v3
2424

2525
- name: Run PHPStan
2626
run: composer test:types

.github/workflows/tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
strategy:
1515
fail-fast: true
1616
matrix:
17-
php: [8.2]
17+
php: [8.4]
1818
stability: [prefer-stable]
1919

2020
name: P${{ matrix.php }} ${{ matrix.stability }}

composer.json

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,13 @@
99
}
1010
},
1111
"require": {
12-
"php": "^8.2",
12+
"php": "^8.4",
1313
"ext-dom": "*",
14-
"ext-libxml": "*",
15-
"symfony/polyfill-mbstring": "^1.27"
14+
"ext-libxml": "*"
1615
},
1716
"require-dev": {
18-
"pestphp/pest": "^2.0",
19-
"worksome/coding-style": "^2.5"
17+
"pestphp/pest": "^3.8",
18+
"worksome/coding-style": "^3.2"
2019
},
2120
"scripts": {
2221
"lint": "vendor/bin/ecs --fix --ansi",

phpstan-baseline.neon

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
parameters:
2+
ignoreErrors:
3+
-
4+
message: '#^Binary operation "\." between ''\['' and mixed results in an error\.$#'
5+
identifier: binaryOp.invalid
6+
count: 2
7+
path: src/Html2Text.php
8+
9+
-
10+
message: '#^Binary operation "\.\=" between mixed and "\\n" results in an error\.$#'
11+
identifier: assignOp.invalid
12+
count: 1
13+
path: src/Html2Text.php
14+
15+
-
16+
message: '#^Call to an undefined method DOMNode\:\:getAttribute\(\)\.$#'
17+
identifier: method.notFound
18+
count: 11
19+
path: src/Html2Text.php
20+
21+
-
22+
message: '#^Method Worksome\\Html2Text\\Html2Text\:\:iterateOverNode\(\) should return string but returns mixed\.$#'
23+
identifier: return.type
24+
count: 1
25+
path: src/Html2Text.php
26+
27+
-
28+
message: '#^Part \$href \(mixed\) of encapsed string cannot be cast to string\.$#'
29+
identifier: encapsedStringPart.nonString
30+
count: 2
31+
path: src/Html2Text.php
32+
33+
-
34+
message: '#^Part \$output \(mixed\) of encapsed string cannot be cast to string\.$#'
35+
identifier: encapsedStringPart.nonString
36+
count: 8
37+
path: src/Html2Text.php

phpstan.neon.dist

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
includes:
2+
- phpstan-baseline.neon
3+
14
parameters:
25
paths:
36
- src

src/Config.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,11 @@
44

55
namespace Worksome\Html2Text;
66

7-
class Config
7+
readonly class Config
88
{
99
public function __construct(
10-
public readonly bool $dropLinks = false,
10+
public bool $dropLinks = false,
11+
public string $characterSet = 'auto',
1112
) {
1213
}
1314
}

0 commit comments

Comments
 (0)