Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
nicodemuz opened this issue Dec 28, 2023 · 6 comments

Comments

@nicodemuz
Copy link

After running the command:

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

I receive:

Cannot locate enable

How should I proceed?

@nicodemuz
Copy link
Author

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>
...

@weirdan
Copy link
Member

weirdan commented Dec 28, 2023

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.

@nicodemuz
Copy link
Author

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

@weirdan
Copy link
Member

weirdan commented Dec 28, 2023

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

@nicodemuz
Copy link
Author

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
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants