fix: improve identifier escaping validation #14739
test-phpstan.yml
on: pull_request
PHP Static Analysis
58s
Annotations
4 errors
|
PHP Static Analysis
Process completed with exit code 1.
|
|
PHP Static Analysis
Internal error: syntax error, unexpected token "(", expecting ";" or "{" while analysing file /home/runner/work/CodeIgniter4/CodeIgniter4/tests/system/Database/Live/ConnectTest.php
Post the following stack trace to https://github.com/phpstan/phpstan/issues/new?template=Bug_report.yaml:
## /home/runner/work/CodeIgniter4/CodeIgniter4/system/Database/BaseConnection.php(1440)
#0 phar:///home/runner/work/CodeIgniter4/CodeIgniter4/vendor/phpstan/phpstan/phpstan.phar/vendor/composer/ClassLoader.php(427): Composer\Autoload\{closure}()
#1 /home/runner/work/CodeIgniter4/CodeIgniter4/system/Database/SQLite3/Connection.php(30): Composer\Autoload\ClassLoader->loadClass()
#2 /home/runner/work/CodeIgniter4/CodeIgniter4/system/Autoloader/Autoloader.php(340): include_once('...')
#3 /home/runner/work/CodeIgniter4/CodeIgniter4/system/Autoloader/Autoloader.php(320): CodeIgniter\Autoloader\Autoloader->includeFile()
#4 /home/runner/work/CodeIgniter4/CodeIgniter4/system/Autoloader/Autoloader.php(296): CodeIgniter\Autoloader\Autoloader->loadInNamespace()
#5 phar:///home/runner/work/CodeIgniter4/CodeIgniter4/vendor/phpstan/phpstan/phpstan.phar/src/Reflection/BetterReflection/SourceLocator/AutoloadFunctionsSourceLocator.php(37): CodeIgniter\Autoloader\Autoloader->loadClass()
#6 phar:///home/runner/work/CodeIgniter4/CodeIgniter4/vendor/phpstan/phpstan/phpstan.phar/vendor/ondrejmirtes/better-reflection/src/SourceLocator/Type/AggregateSourceLocator.php(26): PHPStan\Reflection\BetterReflection\SourceLocator\AutoloadFunctionsSourceLocator->locateIdentifier()
#7 phar:///home/runner/work/CodeIgniter4/CodeIgniter4/vendor/phpstan/phpstan/phpstan.phar/src/Reflection/BetterReflection/SourceLocator/LazySourceLocator.php(31): PHPStan\BetterReflection\SourceLocator\Type\AggregateSourceLocator->locateIdentifier()
#8 phar:///home/runner/work/CodeIgniter4/CodeIgniter4/vendor/phpstan/phpstan/phpstan.phar/vendor/ondrejmirtes/better-reflection/src/SourceLocator/Type/MemoizingSourceLocator.php(30): PHPStan\Reflection\BetterReflection\SourceLocator\LazySourceLocator->locateIdentifier()
#9 phar:///home/runner/work/CodeIgniter4/CodeIgniter4/vendor/phpstan/phpstan/phpstan.phar/vendor/ondrejmirtes/better-reflection/src/Reflector/DefaultReflector.php(29): PHPStan\BetterReflection\SourceLocator\Type\MemoizingSourceLocator->locateIdentifier()
#10 phar:///home/runner/work/CodeIgniter4/CodeIgniter4/vendor/phpstan/phpstan/phpstan.phar/src/Reflection/BetterReflection/Reflector/MemoizingReflector.php(50): PHPStan\BetterReflection\Reflector\DefaultReflector->reflectClass()
#11 phar:///home/runner/work/CodeIgniter4/CodeIgniter4/vendor/phpstan/phpstan/phpstan.phar/src/Reflection/BetterReflection/BetterReflectionProvider.php(145): PHPStan\Reflection\BetterReflection\Reflector\MemoizingReflector->reflectClass()
#12 phar:///home/runner/work/CodeIgniter4/CodeIgniter4/vendor/phpstan/phpstan/phpstan.phar/src/Reflection/ReflectionProvider/MemoizingReflectionProvider.php(37): PHPStan\Reflection\BetterReflection\BetterReflectionProvider->hasClass()
#13 phar:///home/runner/work/CodeIgniter4/CodeIgniter4/vendor/phpstan/phpstan/phpstan.phar/src/Rules/ClassCaseSensitivityCheck.php(35): PHPStan\Reflection\ReflectionProvider\MemoizingReflectionProvider->hasClass()
#14 phar:///home/runner/work/CodeIgniter4/CodeIgniter4/vendor/phpstan/phpstan/phpstan.phar/src/Rules/ClassNameCheck.php(35): PHPStan\Rules\ClassCaseSensitivityCheck->checkClassNames()
#15 phar:///home/runner/work/CodeIgniter4/CodeIgniter4/vendor/phpstan/phpstan/phpstan.phar/src/Rules/Namespaces/ExistingNamesInUseRule.php(116): PHPStan\Rules\ClassNameCheck->checkClassNames()
#16 phar:///home/runner/work/CodeIgniter4/CodeIgniter4/vendor/phpstan/phpstan/phpstan.phar/src/Rules/Namespaces/ExistingNamesInUseRule.php(64): PHPStan\Rules\Namespaces\ExistingNamesInUseRule->checkClasses()
#17 phar:///home/runner/work/CodeIgniter4/CodeIgniter4/vendor/phpstan/phpstan/phpstan.phar/src/Analyser/FileAnalyserCallback.php(134): PHPStan\Rules\Namespaces\ExistingNamesInUseRule->processNode()
#18 phar:///home/runner/work/CodeIgniter4/CodeIgniter4/vendor/php
|
|
PHP Static Analysis:
system/Database/BaseConnection.php#L1467
Syntax error, unexpected '}', expecting EOF on line 1467
|
|
PHP Static Analysis:
system/Database/BaseConnection.php#L1440
Syntax error, unexpected '(', expecting ';' or '{' on line 1440
|