File tree Expand file tree Collapse file tree
e2e/result-cache-restore-without-reflection Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -307,6 +307,11 @@ jobs:
307307 echo "$OUTPUT"
308308 ../bashunit -a matches "Note: Using configuration file .+phpstan.neon." "$OUTPUT"
309309 ../bashunit -a contains 'Result cache not used because the metadata do not match: metaExtensions' "$OUTPUT"
310+ - script : |
311+ cd e2e/result-cache-restore-without-reflection
312+ composer install
313+ ../../bin/phpstan -vvv
314+ ../../bin/phpstan -vvv
310315 - script : |
311316 cd e2e/bug-12606
312317 export CONFIGTEST=test
Original file line number Diff line number Diff line change 1+ /vendor
2+ composer.lock
Original file line number Diff line number Diff line change 1+ {
2+ "require-dev" : {
3+ "phpstan/phpstan-symfony" : " @dev" ,
4+ "phpstan/extension-installer" : " ^1.4" ,
5+ "phpstan/phpstan-doctrine" : " @dev"
6+ },
7+ "autoload" : {
8+ "classmap" : [
9+ " lib/"
10+ ]
11+ },
12+ "config" : {
13+ "allow-plugins" : {
14+ "phpstan/extension-installer" : true
15+ }
16+ }
17+ }
Original file line number Diff line number Diff line change 1+ <?php declare (strict_types = 1 );
2+
3+ namespace E2EFixture ;
4+
5+ use LogicException ;
6+ use PHPStan \BetterReflection \Identifier \Identifier ;
7+ use PHPStan \BetterReflection \Identifier \IdentifierType ;
8+ use PHPStan \BetterReflection \Reflection \Reflection ;
9+ use PHPStan \BetterReflection \Reflector \Reflector ;
10+ use PHPStan \BetterReflection \SourceLocator \Type \SourceLocator ;
11+
12+ final class ThrowingSourceLocator implements SourceLocator
13+ {
14+
15+ public function locateIdentifier (Reflector $ reflector , Identifier $ identifier ): ?Reflection
16+ {
17+ throw new LogicException ('SourceLocator::locateIdentifier must not be called during result cache construction ' );
18+ }
19+
20+ public function locateIdentifiersByType (Reflector $ reflector , IdentifierType $ identifierType ): array
21+ {
22+ throw new LogicException ('SourceLocator::locateIdentifiersByType must not be called during result cache construction ' );
23+ }
24+
25+ }
Original file line number Diff line number Diff line change 1+ parameters :
2+ level : 8
3+ paths :
4+ - src
5+
6+ services :
7+ betterReflectionSourceLocator :
8+ class : PHPStan\BetterReflection\SourceLocator\Type\SourceLocator
9+ factory : E2EFixture\ThrowingSourceLocator
10+ autowired : false
Original file line number Diff line number Diff line change 1+ <?php
2+
3+ echo "" ;
4+
You can’t perform that action at this time.
0 commit comments