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

[Bug] ImportFullyQualifiedNamesRector imports functions as classes #1376

Closed
Aerendir opened this issue May 2, 2019 · 1 comment · Fixed by #1377
Closed

[Bug] ImportFullyQualifiedNamesRector imports functions as classes #1376

Aerendir opened this issue May 2, 2019 · 1 comment · Fixed by #1377
Labels

Comments

@Aerendir
Copy link
Contributor

Aerendir commented May 2, 2019

I'm using the library https://github.com/thecodingmachine/safe.

Until now, I've used their functions this way:

\Safe\sprintf(...);

Now, with the new Rector ImportFullyQualifiedNamesRector imported it this way:

use Safe\sprintf;

\Safe\sprintf(...);

This causes issues with static analysis and with PHPStorm.

The solution is to import the functions using import function Safe\sprintf.

See phan/phan#2705

@TomasVotruba
Copy link
Member

I didn't include functions yet. Thanks for reporting

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

Successfully merging a pull request may close this issue.

2 participants