psalm-plugin-doctrine icon indicating copy to clipboard operation
psalm-plugin-doctrine copied to clipboard

"Cannot locate enable" after running "vendor/bin/psalm-plugin enable weirdan/doctrine-psalm-plugin"

Open nicodemuz opened this issue 2 years ago • 6 comments

After running the command:

vendor/bin/psalm-plugin enable weirdan/doctrine-psalm-plugin

I receive:

Cannot locate enable

How should I proceed?

nicodemuz avatar Dec 28 '23 16:12 nicodemuz

I believe I got it working by modifying the psalm.xml file manually:

...
    <plugins>
        <pluginClass class="Psalm\PhpUnitPlugin\Plugin"/>
        <pluginClass class="Weirdan\DoctrinePsalmPlugin\Plugin"/>
    </plugins>
...

nicodemuz avatar Dec 28 '23 16:12 nicodemuz

Are you sure you used psalm-plugin and not psalm in your cli invocation? Because that's what psalm would output when asked to check a non-existing file/folder.

weirdan avatar Dec 28 '23 16:12 weirdan

Are you sure you used psalm-plugin and not psalm in your cli invocation? Because that's what psalm would output when asked to check a non-existing file/folder.

I copied the commands from the repo readme file.

image

nicodemuz avatar Dec 28 '23 16:12 nicodemuz

Curious. What does ls -l vendor/bin/psalm-plugin output?

weirdan avatar Dec 28 '23 17:12 weirdan

Curious. What does ls -l vendor/bin/psalm-plugin output?

ls -l vendor/bin/psalm-plugin
-rwxrwxr-x 1 nico nico 3330 Dec 27 11:27 vendor/bin/psalm-plugin

nicodemuz avatar Dec 28 '23 17:12 nicodemuz

These are my used versions:

composer show | grep psalm
psalm/plugin-phpunit                                  0.18.4                                    Psalm plugin for PHPUnit
vimeo/psalm                                           5.18.0                                    A static analysis tool for finding errors in PHP applications
weirdan/doctrine-psalm-plugin                         v2.9.0                                    Stubs to let Psalm understand Doctrine better

nicodemuz avatar Dec 28 '23 18:12 nicodemuz