Skip to content

Commit 41ee03d

Browse files
authored
[TASK] Fix CI issues (#505)
+ adjust PHP global import & default value + update PHPStan baseline file (@todo for later)
1 parent ff692a0 commit 41ee03d

File tree

3 files changed

+23
-18
lines changed

3 files changed

+23
-18
lines changed

phpstan-baseline.neon

Lines changed: 21 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,13 @@ parameters:
3131
path: src/Command/ExtensionsTerJsonCreateCommand.php
3232

3333
-
34-
message: '#^Property App\\Command\\ExtensionsTerJsonCreateCommand\:\:\$extensions \(array\<int, SimpleXMLElement\>\) does not accept array\<SimpleXMLElement\>\.$#'
34+
message: '#^Possibly invalid array key type mixed\.$#'
35+
identifier: offsetAccess.invalidOffset
36+
count: 2
37+
path: src/Command/ExtensionsTerJsonCreateCommand.php
38+
39+
-
40+
message: '#^Property App\\Command\\ExtensionsTerJsonCreateCommand\:\:\$extensions \(array\<int, SimpleXMLElement\>\) does not accept array\<SimpleXMLElement\>\|null\.$#'
3541
identifier: assign.propertyType
3642
count: 1
3743
path: src/Command/ExtensionsTerJsonCreateCommand.php
@@ -97,7 +103,13 @@ parameters:
97103
path: src/Command/ListMissingDownloadsCommand.php
98104

99105
-
100-
message: '#^Parameter \#1 \$packages of method App\\Service\\ComposerPackagesService\:\:cleanPackagesForVersions\(\) expects array\<string, bool\|string\>, array\<mixed\> given\.$#'
106+
message: '#^Possibly invalid array key type mixed\.$#'
107+
identifier: offsetAccess.invalidOffset
108+
count: 2
109+
path: src/Command/ListMissingDownloadsCommand.php
110+
111+
-
112+
message: '#^Parameter \#1 \$packages of method App\\Service\\ComposerPackagesService\:\:cleanPackagesForVersions\(\) expects array\<string, bool\|string\>, array\<string, mixed\> given\.$#'
101113
identifier: argument.type
102114
count: 1
103115
path: src/Controller/DefaultController.php
@@ -192,6 +204,12 @@ parameters:
192204
count: 1
193205
path: src/Enum/AbstractEnum.php
194206

207+
-
208+
message: '#^Possibly invalid array key type mixed\.$#'
209+
identifier: offsetAccess.invalidOffset
210+
count: 2
211+
path: src/Enum/AbstractEnum.php
212+
195213
-
196214
message: '#^Class App\\Form\\AuthorType extends generic class Symfony\\Component\\Form\\AbstractType but does not specify its types\: TData$#'
197215
identifier: missingType.generics
@@ -301,7 +319,7 @@ parameters:
301319
path: src/Service/ComposerPackagesService.php
302320

303321
-
304-
message: '#^Parameter \#1 \$child of method Symfony\\Component\\Form\\FormBuilderInterface\<mixed\>\:\:add\(\) expects string\|Symfony\\Component\\Form\\FormBuilderInterface, list\<string\>\|string given\.$#'
322+
message: '#^Parameter \#1 \$child of method Symfony\\Component\\Form\\FormBuilderInterface\<mixed\>\:\:add\(\) expects string\|Symfony\\Component\\Form\\FormBuilderInterface, array\<int, string\>\|string given\.$#'
305323
identifier: argument.type
306324
count: 1
307325
path: src/Service/ComposerPackagesService.php
@@ -318,18 +336,6 @@ parameters:
318336
count: 1
319337
path: src/Twig/Filter/SortByVersion.php
320338

321-
-
322-
message: '#^Parameter \#1 \$str of function strtr expects string, string\|false given\.$#'
323-
identifier: argument.type
324-
count: 1
325-
path: src/Utility/StringUtility.php
326-
327-
-
328-
message: '#^Parameter \#2 \$from of function strtr expects string, string\|false given\.$#'
329-
identifier: argument.type
330-
count: 1
331-
path: src/Utility/StringUtility.php
332-
333339
-
334340
message: '#^Method App\\Tests\\Functional\\Controller\\Api\\ApiCase\:\:decodeResponse\(\) should return array\<string, mixed\> but returns array\<mixed, mixed\>\.$#'
335341
identifier: return.type

src/Entity/Release.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ class Release implements \JsonSerializable, \Stringable
4545
#[ORM\Id]
4646
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::STRING)]
4747
#[Groups(['content', 'data'])]
48-
private string $version;
48+
private string $version = '';
4949

5050
#[OA\Property(example: '2017-12-12T16:48:22+00:00')]
5151
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::DATETIME_MUTABLE)]

tests/Functional/Controller/Web/DownloadControllerTest.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@
2626
use App\Tests\Functional\AbstractCase;
2727
use App\Tests\Functional\Fixtures\MajorVersionFixtures;
2828
use App\Tests\Functional\Fixtures\ReleaseFixtures;
29-
use Iterator;
3029
use Symfony\Component\HttpFoundation\Response;
3130

3231
class DownloadControllerTest extends AbstractCase
@@ -60,7 +59,7 @@ public function webDownloadVersion(
6059
}
6160

6261
/**
63-
* @return Iterator<string, array{
62+
* @return \Iterator<string, array{
6463
* requestVersion: string,
6564
* requestFormat: string,
6665
* expectedCode: int

0 commit comments

Comments
 (0)