Skip to content

Commit 199ca67

Browse files
committed
Revert "Our own RobotLoader fork"
This reverts commit b0596e7.
1 parent f83240f commit 199ca67

File tree

4 files changed

+5
-507
lines changed

4 files changed

+5
-507
lines changed

phpcs.xml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -86,9 +86,6 @@
8686
<rule ref="Consistence.NamingConventions.ValidVariableName.NotCamelCaps">
8787
<exclude-pattern>src/Reflection/BetterReflection/SourceLocator/AutoloadSourceLocator.php</exclude-pattern>
8888
</rule>
89-
<rule ref="SlevomatCodingStandard.ControlStructures.DisallowEmpty.DisallowedEmpty">
90-
<exclude-pattern>src/RobotLoader/RobotLoader.php</exclude-pattern>
91-
</rule>
9289
<exclude-pattern>tests/*/data</exclude-pattern>
9390
<exclude-pattern>tests/*/traits</exclude-pattern>
9491
<exclude-pattern>tests/tmp</exclude-pattern>

phpstan-baseline.neon

Lines changed: 4 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
2+
13
parameters:
24
ignoreErrors:
35
-
@@ -125,66 +127,6 @@ parameters:
125127
count: 1
126128
path: src/Reflection/Php/PhpClassReflectionExtension.php
127129

128-
-
129-
message: "#^Construct empty\\(\\) is not allowed\\. Use more strict comparison\\.$#"
130-
count: 1
131-
path: src/RobotLoader/RobotLoader.php
132-
133-
-
134-
message: "#^Only booleans are allowed in a negated boolean, array\\<string, int\\|string\\>\\|null given\\.$#"
135-
count: 1
136-
path: src/RobotLoader/RobotLoader.php
137-
138-
-
139-
message: "#^Only booleans are allowed in a negated boolean, string\\|null given\\.$#"
140-
count: 1
141-
path: src/RobotLoader/RobotLoader.php
142-
143-
-
144-
message: "#^Argument of an invalid type array\\<int, string\\>\\|false supplied for foreach, only iterables are supported\\.$#"
145-
count: 1
146-
path: src/RobotLoader/RobotLoader.php
147-
148-
-
149-
message: "#^Only booleans are allowed in a negated boolean, int\\|false given\\.$#"
150-
count: 1
151-
path: src/RobotLoader/RobotLoader.php
152-
153-
-
154-
message: "#^Parameter \\#3 \\$subject of function str_replace expects array\\|string, string\\|false given\\.$#"
155-
count: 1
156-
path: src/RobotLoader/RobotLoader.php
157-
158-
-
159-
message: "#^Unreachable statement \\- code above always terminates\\.$#"
160-
count: 2
161-
path: src/RobotLoader/RobotLoader.php
162-
163-
-
164-
message: "#^Parameter \\#1 \\$source of function token_get_all expects string, string\\|false given\\.$#"
165-
count: 1
166-
path: src/RobotLoader/RobotLoader.php
167-
168-
-
169-
message: "#^Only booleans are allowed in an if condition, int\\|false\\|null given\\.$#"
170-
count: 2
171-
path: src/RobotLoader/RobotLoader.php
172-
173-
-
174-
message: "#^Only booleans are allowed in &&, string given on the left side\\.$#"
175-
count: 1
176-
path: src/RobotLoader/RobotLoader.php
177-
178-
-
179-
message: "#^Only booleans are allowed in a ternary operator condition, string given\\.$#"
180-
count: 1
181-
path: src/RobotLoader/RobotLoader.php
182-
183-
-
184-
message: "#^Call to function is_array\\(\\) with array\\<string, array\\('file' \\=\\> string, 'time' \\=\\> int\\)\\> will always evaluate to true\\.$#"
185-
count: 1
186-
path: src/RobotLoader/RobotLoader.php
187-
188130
-
189131
message: "#^Property PHPStan\\\\Rules\\\\Registry\\:\\:\\$rules with generic interface PHPStan\\\\Rules\\\\Rule does not specify its types\\: TNodeType$#"
190132
count: 1
@@ -254,3 +196,5 @@ parameters:
254196
message: "#^Method PHPStan\\\\Node\\\\FileNodeTest\\:\\:getRule\\(\\) return type with generic interface PHPStan\\\\Rules\\\\Rule does not specify its types\\: TNodeType$#"
255197
count: 1
256198
path: tests/PHPStan/Node/FileNodeTest.php
199+
200+

src/Command/CommandHelper.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
use PHPStan\File\FileFinder;
1818
use PHPStan\File\FileHelper;
1919
use PHPStan\File\FileReader;
20-
use PHPStan\RobotLoader\RobotLoader;
2120
use Symfony\Component\Console\Input\InputInterface;
2221
use Symfony\Component\Console\Output\ConsoleOutputInterface;
2322
use Symfony\Component\Console\Output\OutputInterface;
@@ -285,7 +284,7 @@ public static function begin(
285284
$autoloadDirectories = $container->getParameter('autoload_directories');
286285
$featureToggles = $container->getParameter('featureToggles');
287286
if (count($autoloadDirectories) > 0 && !$featureToggles['disableRobotLoader']) {
288-
$robotLoader = new RobotLoader();
287+
$robotLoader = new \Nette\Loaders\RobotLoader();
289288
$robotLoader->acceptFiles = array_map(static function (string $extension): string {
290289
return sprintf('*.%s', $extension);
291290
}, $container->getParameter('fileExtensions'));

0 commit comments

Comments
 (0)