Skip to content

Commit 43ca427

Browse files
committed
Do not prefix Roave\BetterReflection so that Rector can use it
1 parent 5fad625 commit 43ca427

File tree

4 files changed

+8
-0
lines changed

4 files changed

+8
-0
lines changed

compiler/build/scoper.inc.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,10 @@ function (string $filePath, string $prefix, string $content): string {
121121
return $class;
122122
}
123123

124+
if (strpos($class, 'Roave\\BetterReflection\\') === 0) {
125+
return $class;
126+
}
127+
124128
if (strpos($class, '@') === 0) {
125129
return $class;
126130
}
@@ -213,6 +217,7 @@ function (string $filePath, string $prefix, string $content): string {
213217
'PHPStan\*',
214218
'PhpParser\*',
215219
'Hoa\*',
220+
'Roave\BetterReflection\*',
216221
],
217222
'whitelist-global-functions' => false,
218223
'whitelist-global-classes' => false,

compiler/src/Console/CompileCommand.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -203,6 +203,7 @@ private function buildPreloadScript(): void
203203
$this->buildDir . '/src',
204204
$vendorDir . '/nikic/php-parser/lib/PhpParser',
205205
$vendorDir . '/phpstan/phpdoc-parser/src',
206+
$vendorDir . '/ondrejmirtes/better-reflection/src',
206207
])->exclude([
207208
'Testing',
208209
]) as $phpFile) {

conf/config.neon

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,7 @@ parameters:
9898
- '#^PhpParser\\#'
9999
- '#^PHPStan\\#'
100100
- '#^Hoa\\#'
101+
- '#^Roave\\BetterReflection\\#'
101102
dynamicConstantNames:
102103
- ICONV_IMPL
103104
- LIBXML_VERSION

src/Testing/TestCase.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -238,6 +238,7 @@ private function createRuntimeReflectionProvider(ReflectionProvider $actualRefle
238238
'#^PhpParser\\\\#',
239239
'#^PHPStan\\\\#',
240240
'#^Hoa\\\\#',
241+
'#^Roave\\\\BetterReflection\\#',
241242
],
242243
null
243244
);

0 commit comments

Comments
 (0)