sandhje / vscode-phpmd

VSCode PHP Mess Detector extension
MIT License
15 stars 4 forks source link

Add support for PHP 7.3 #45

Closed monooso closed 4 years ago

monooso commented 5 years ago

The extension currently throws an error if the installed version of PHP is > 7.2.

Details:

[Extension Host] Error: Command failed: php /Users/username/.vscode/extensions/fterrag.vscode-php-cs-fixer-0.1.0/php-cs-fixer fix --using-cache=no --rules=@PSR1,@PSR2,@Symfony,-yoda_style /Users/path/to/Filename.php
PHP needs to be a minimum version of PHP 5.6.0 and maximum version of PHP 7.2.*.
sandhje commented 5 years ago

Thank you for reporting, I'll test it over the coming days and submit a fix.

sandhje commented 4 years ago

Probably this is some configuration issue in your system as I can use PHP 7.3 without any problems:

[Info  - 10:06:28] PHP command test successful (PHP 7.3.11 (cli) ...)
[Info  - 10:06:28] PHP Mess Detector test succesful (PHPMD 2.6.0)
[Info  - 10:06:28] File c:\Projects\spanner\src\Config.php test successful
[Info  - 10:06:28] Running phpmd command (php c:\Projects\vscode-phpmd\phpmd\phpmd.phar "c:\Projects\spanner\src\Config.php" xml "cleancode,codesize,controversial,design,unusedcode,naming")
[Info  - 10:06:29] PHP Mess Detector validation completed for file:///c%3A/Projects/spanner/src/Config.php. 2 problems found
[Info  - 10:06:29] Document validation after open completed successfully

Please enable verbose logging and try to run the phpmd command manually to see if there are any configuration issues. In my case the command would be php c:\Projects\vscode-phpmd\phpmd\phpmd.phar "c:\Projects\spanner\src\Config.php" xml as shown in the logs.