-
Notifications
You must be signed in to change notification settings - Fork 23
Support safe ^2.0 #28
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
Support safe ^2.0 #28
Conversation
WEN MERGE? 😢 |
@moufmouf Could you take a look when you have time? I'm only a maintainer on the safe repo, not on this one :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just updated to this alongside safe 2.0.2, it seems to work.
release? 🙏 |
I've created a release on my fork for anyone to use until this PR is merged:
If you use this, please take into consideration that I will abandon/remove the fork as soon as this PR is merged. |
@dbrekelmans you have error in your fork in public static function getFunctionList(): array
{
if (self::$functions === null) {
if (\file_exists(__DIR__.'/../../../safe/generated/functionsList.php')) {
$functions = require __DIR__.'/../../../safe/generated/functionsList.php';
} elseif (\file_exists(__DIR__.'/../../../../../vendor/thecodingmachine/safe/generated/functionsList.php')) {
$functions = require __DIR__.'/../../../../../vendor/thecodingmachine/safe/generated/functionsList.php';
} else {
throw new \RuntimeException('Could not find thecodingmachine/safe\'s functionsList.php file.');
}
// Let's index these functions by their name
self::$functions = \Safe\array_combine($functions, $functions);
}
return self::$functions;
} |
@webard I'm not sure what you mean... I didn't change anything in my fork except for merging this PR. https://github.com/dbrekelmans/phpstan-safe-rule/blob/v1.2.0/src/Utils/FunctionListLoader.php |
@dbrekelmans thecodingmachine/safe and thecodingmachine/phpstan-safe-rule are in same directory. in vendor. Your package is in dbrekelmans/phpstan-safe-rule, so you need change path relativity in function |
@webard Ah I see what you mean, thanks for the heads up. I don't have time to fix it myself today, but if you are willing to create a PR, I can merge and release it |
Hey @dbrekelmans, I'm really sorry I only see this now. |
No problem @moufmouf, thanks for adding me as a maintainer! |
No description provided.