Skip to content

Commit 54625ff

Browse files
committed
Adjust phpstan.neon ignoring rules for < PHP 8.4
1 parent dad705e commit 54625ff

2 files changed

Lines changed: 20 additions & 6 deletions

File tree

phpstan.neon

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,6 @@ parameters:
6060
excludePaths:
6161
- src/cli/src/Flow/CLI/Command/*
6262
- src/core/etl/src/Flow/ETL/Formatter/ASCII/ASCIITable.php
63-
- src/core/etl/src/Flow/ETL/Function/HTMLQuerySelectorAll.php
64-
- src/core/etl/src/Flow/ETL/Function/HTMLQuerySelector.php
65-
- src/core/etl/src/Flow/ETL/Row/Entry/HTMLEntry.php
6663
- src/core/etl/src/Flow/ETL/Sort/ExternalSort/RowsMinHeap.php
6764
- src/adapter/etl-adapter-avro/*
6865
- src/adapter/etl-adapter-elasticsearch/src/Flow/ETL/Adapter/Elasticsearch/ElasticsearchPHP/SearchResults.php
@@ -73,7 +70,6 @@ parameters:
7370
- src/lib/parquet/src/Flow/Parquet/ThriftModel/*
7471
- src/lib/parquet/src/Flow/Parquet/BinaryReader/*
7572
- src/lib/parquet/src/Flow/Parquet/Dremel/ColumnData/DefinitionConverter.php
76-
- src/lib/types/src/Flow/Types/Type/Logical/HTMLType.php
7773

7874
tmpDir: var/phpstan/cache
7975

@@ -89,6 +85,23 @@ parameters:
8985
-
9086
function: 'dj()'
9187

88+
ignoreErrors:
89+
-
90+
identifier: class.notFound
91+
path: src/core/etl/src/Flow/ETL/Row/Entry/HTMLEntry.php
92+
93+
-
94+
identifier: class.notFound
95+
path: src/core/etl/src/Flow/ETL/Function/HTMLQuerySelector.php
96+
97+
-
98+
identifier: class.notFound
99+
path: src/core/etl/src/Flow/ETL/Function/HTMLQuerySelectorAll.php
100+
101+
-
102+
identifier: class.notFound
103+
path: src/lib/types/src/Flow/Types/Type/Logical/HTMLType.php
104+
92105
includes:
93106
- tools/phpstan/vendor/spaze/phpstan-disallowed-calls/extension.neon
94107

src/lib/types/src/Flow/Types/Type/Logical/HTMLType.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
$@isx
2424
REGXP;
2525

26-
public function assert(mixed $value) : HTMLDocument
26+
public function assert(mixed $value) : HTMLDocument // @phpstan-ignore class.notFound
2727
{
2828
if ($this->isValid($value)) {
2929
return $value;
@@ -32,14 +32,15 @@ public function assert(mixed $value) : HTMLDocument
3232
throw InvalidTypeException::value($value, $this);
3333
}
3434

35-
public function cast(mixed $value) : HTMLDocument
35+
public function cast(mixed $value) : HTMLDocument // @phpstan-ignore class.notFound
3636
{
3737
if (!$this->isValid($value)) {
3838
throw new CastingException($value, $this);
3939
}
4040

4141
/* @phpstan-ignore-next-line */
4242
if (\is_string($value)) {
43+
/* @phpstan-ignore-next-line class.notFound */
4344
return HTMLDocument::createFromString($value);
4445
}
4546

0 commit comments

Comments
 (0)