I am a novice in PHP and I am working on a legacy project where I am trying to upgrade PHP with Version 8.2 + ubuntu environment. The PHP code is written in ZEND Framework. The legacy code is written in PHP 5.3. I am planning to use Rector framework. According to the Rector, the second step I need to perform is "Running a static Analyzer tool". The tool rector recommends for this step is phpstan.
I am using the same and when I give this command,
vendor/bin/phpstan analyse application
**The PHPStan analyses and reports errors. **
I added a phpstan.neon configuration file, and added basic rules like:
parameters: level:1bootstrapFiles:- /var/www/fem-stage/vendor/autoload.phpscanDirectories:- libraryfileExtensions:- php- ini
I am getting this error.
root:/var/www/fem-stage# vendor/bin/phpstan analyse applicationNote: Using configuration file /var/www/fem-stage/phpstan.neon.In Helpers.php line 62:Missing parameter 'featureToggles. alwaysTrueAlwaysReported'.
When I pass debug Command Line Argument, I am getting 2 PHP Fatal Errors.
PHP Fatal error: Uncaught _PHPStan_01e5828ef\Nette\InvalidArgumentException: Missing parameter 'featureToggles.alwaysTrueAlwaysReported'. in phar:///var/www/fem-stage/vendor/phpstan/phpstan/phpstan.phar/vendor/nette/di/src/DI/Helpers.php:62STACK TRACEFatal error: Uncaught _PHPStan_01e5828ef\Nette\InvalidArgumentException: Missing parameter 'featureToggles.alwaysTrueAlwaysReported'. in phar:///var/www/fem-stage/vendor/phpstan/phpstan/phpstan.phar/vendor/nette/di/src/DI/Helpers.php:62STACK TRACE
Looks like it is not in my PHP Project code. All my PHP code is under the "Current Directory"/application folder.