Skip to content

Commit 4a9c159

Browse files
committed
Fix __DIR__ in global constant
1 parent b537b97 commit 4a9c159

3 files changed

Lines changed: 7 additions & 1 deletion

File tree

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
"nette/utils": "^3.1.1",
2222
"nikic/php-parser": "^4.5.0",
2323
"ondram/ci-detector": "^3.1",
24-
"ondrejmirtes/better-reflection": "^4.3.10",
24+
"ondrejmirtes/better-reflection": "^4.3.11",
2525
"phpdocumentor/type-resolver": "1.0.1",
2626
"phpstan/phpdoc-parser": "^0.4.8",
2727
"react/child-process": "^0.6.1",

tests/PHPStan/Reflection/BetterReflection/SourceLocator/OptimizedSingleFileSourceLocatorTest.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,10 @@ public function dataConst(): array
110110
'ConstFile\\ANOTHER_NAME',
111111
'bar_images',
112112
],
113+
[
114+
'const_with_dir_const',
115+
__DIR__ . '/data',
116+
],
113117
];
114118
}
115119

tests/PHPStan/Reflection/BetterReflection/SourceLocator/data/const.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,5 @@
88
define('ConstFile\\ANOTHER_NAME', 'bar_images');
99

1010
define('TEST_VARIABLE', $foo);
11+
12+
define('const_with_dir_const', __DIR__);

0 commit comments

Comments
 (0)