You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I know that this stems from an upstream issue, but currently the phpmd plugin fails as a lot of PHP deprecation warnings are also getting sent to STDOUT, which causes none-ls to fail as it is expecting pure JSON output.
[TRACE Sun 13 Jul 2025 11:36:31 AM EDT] /nix/store/3d2yf60cznhy5v3hq4afhjmf52rvzm02-vim-pack-dir/pack/myNeovimPackages/start/none-ls.nvim/lua/null-ls/helpers/generator_factory.lua:0: output:
Deprecated: PHPMD\Rule\CleanCode\BooleanArgumentFlag::isBooleanValue(): Implicitly marking parameter $value as nullable is deprecated, the explicit nullable type must be used instead in /nix/store/dnpxi9h9y9mr22pvkhnbmg647as3g81f-phpmd-2.15.0/share/php/phpmd/src/main/php/PHPMD/Rule/CleanCode/BooleanArgumentFlag.php on line 77
Deprecated: PHPMD\Rule\UnusedPrivateField::isValidPropertyNode(): Implicitly marking parameter $node as nullable is deprecated, the explicit nullable type must be used instead in /nix/store/dnpxi9h9y9mr22pvkhnbmg647as3g81f-phpmd-2.15.0/share/php/phpmd/src/main/php/PHPMD/Rule/UnusedPrivateField.php on line 150
Deprecated: PHPMD\Report::__construct(): Implicitly marking parameter $baselineValidator as nullable is deprecated, the explicit nullable type must be used instead in /nix/store/dnpxi9h9y9mr22pvkhnbmg647as3g81f-phpmd-2.15.0/share/php/phpmd/src/main/php/PHPMD/Report.php on line 61
Deprecated: PDepend\Source\Language\PHP\PHPBuilder::buildEnum(): Implicitly marking parameter $type as nullable is deprecated, the explicit nullable type must be used instead in /nix/store/dnpxi9h9y9mr22pvkhnbmg647as3g81f-phpmd-2.15.0/share/php/phpmd/vendor/pdepend/pdepend/src/main/php/PDepend/Source/Language/PHP/PHPBuilder.php on line 2592
Deprecated: PDepend\Source\Language\PHP\PHPBuilder::buildEnumCase(): Implicitly marking parameter $value as nullable is deprecated, the explicit nullable type must be used instead in /nix/store/dnpxi9h9y9mr22pvkhnbmg647as3g81f-phpmd-2.15.0/share/php/phpmd/vendor/pdepend/pdepend/src/main/php/PDepend/Source/Language/PHP/PHPBuilder.php on line 2612
Deprecated: PDepend\Source\Language\PHP\AbstractPHPParser::setNodePositionsAndReturn(): Implicitly marking parameter $tokens as nullable is deprecated, the explicit nullable type must be used instead in /nix/store/dnpxi9h9y9mr22pvkhnbmg647as3g81f-phpmd-2.15.0/share/php/phpmd/vendor/pdepend/pdepend/src/main/php/PDepend/Source/Language/PHP/AbstractPHPParser.php on line 2388
Deprecated: PDepend\Source\Language\PHP\AbstractPHPParser::throwUnexpectedTokenException(): Implicitly marking parameter $token as nullable is deprecated, the explicit nullable type must be used instead in /nix/store/dnpxi9h9y9mr22pvkhnbmg647as3g81f-phpmd-2.15.0/share/php/phpmd/vendor/pdepend/pdepend/src/main/php/PDepend/Source/Language/PHP/AbstractPHPParser.php on line 8073
Deprecated: PDepend\Source\AST\AbstractASTType::setTokens(): Implicitly marking parameter $startToken as nullable is deprecated, the explicit nullable type must be used instead in /nix/store/dnpxi9h9y9mr22pvkhnbmg647as3g81f-phpmd-2.15.0/share/php/phpmd/vendor/pdepend/pdepend/src/main/php/PDepend/Source/AST/AbstractASTType.php on line 401
Deprecated: PDepend\Source\AST\ASTMethod::setParent(): Implicitly marking parameter $parent as nullable is deprecated, the explicit nullable type must be used instead in /nix/store/dnpxi9h9y9mr22pvkhnbmg647as3g81f-phpmd-2.15.0/share/php/phpmd/vendor/pdepend/pdepend/src/main/php/PDepend/Source/AST/ASTMethod.php on line 196
Deprecated: PDepend\Source\AST\ASTArtifactList\CollectionArtifactFilter::setFilter(): Implicitly marking parameter $filter as nullable is deprecated, the explicit nullable type must be used instead in /nix/store/dnpxi9h9y9mr22pvkhnbmg647as3g81f-phpmd-2.15.0/share/php/phpmd/vendor/pdepend/pdepend/src/main/php/PDepend/Source/AST/ASTArtifactList/CollectionArtifactFilter.php on line 103
Deprecated: PDepend\Metrics\Analyzer\CouplingAnalyzer::calculateCoupling(): Implicitly marking parameter $coupledType as nullable is deprecated, the explicit nullable type must be used instead in /nix/store/dnpxi9h9y9mr22pvkhnbmg647as3g81f-phpmd-2.15.0/share/php/phpmd/vendor/pdepend/pdepend/src/main/php/PDepend/Metrics/Analyzer/CouplingAnalyzer.php on line 378
(JSON output from phpmd here)
[TRACE Sun 13 Jul 2025 11:36:31 AM EDT] /nix/store/3d2yf60cznhy5v3hq4afhjmf52rvzm02-vim-pack-dir/pack/myNeovimPackages/start/none-ls.nvim/lua/null-ls/diagnostics.lua:0: received diagnostics from source 2
[TRACE Sun 13 Jul 2025 11:36:31 AM EDT] /nix/store/3d2yf60cznhy5v3hq4afhjmf52rvzm02-vim-pack-dir/pack/myNeovimPackages/start/none-ls.nvim/lua/null-ls/diagnostics.lua:0: {}
[TRACE Sun 13 Jul 2025 11:36:31 AM EDT] /nix/store/3d2yf60cznhy5v3hq4afhjmf52rvzm02-vim-pack-dir/pack/myNeovimPackages/start/none-ls.nvim/lua/null-ls/diagnostics.lua:0: received diagnostics from source 10
[TRACE Sun 13 Jul 2025 11:36:31 AM EDT] /nix/store/3d2yf60cznhy5v3hq4afhjmf52rvzm02-vim-pack-dir/pack/myNeovimPackages/start/none-ls.nvim/lua/null-ls/diagnostics.lua:0: { {
col = 0,
end_col = 0,
end_lnum = 1,
lnum = 0,
message = "phpmd error: cannot parse output as JSON.",
severity = 1,
source = "phpmd"
} }
phpmd itself is currently being run using PHP 8.4 in my setup, I am aware of this issue upstream that is related just hoping there is an easy work around until version 3 of phpmd eventually releases.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
I know that this stems from an upstream issue, but currently the phpmd plugin fails as a lot of PHP deprecation warnings are also getting sent to STDOUT, which causes none-ls to fail as it is expecting pure JSON output.
phpmd itself is currently being run using PHP 8.4 in my setup, I am aware of this issue upstream that is related just hoping there is an easy work around until version 3 of phpmd eventually releases.
Beta Was this translation helpful? Give feedback.
All reactions