shish / safe

All PHP functions, rewritten to throw exceptions instead of returning false
MIT License
5 stars 0 forks source link

Error when using phpstan plugin #15

Closed WyriHaximus closed 1 week ago

WyriHaximus commented 2 weeks ago

Getting the following error when using the PHPSTan plugin for safe:

     Internal error: Could not find thecodingmachine/safe's functionsList.php file. while analysing file
     /home/wyrihaximus/Projects/WyriHaximus/php-generative-composer-plugin-tooling/src/Filter/Package/ComposerJsonHasItemWithSpecificValue.php

     Run PHPStan with -v option and post the stack trace to:
     https://github.com/phpstan/phpstan/issues/new?template=Bug_report.yaml

I'm assuming the original phpstan plugin is not compatible with this replacement package.

shish commented 1 week ago

That does appear to be the case when I create a fresh project with these packages installed, I wonder how it has been working without error with my existing projects o_O

But yeah looking at the code, it looks like the plugin will also need to be forked because the path to functionsList.php is hard-coded...

shish commented 1 week ago

Forked the plugin to update the references (and also fix a bunch of bit-rot in the plugin...): https://packagist.org/packages/shish/phpstan-safe-rule