-
-
Notifications
You must be signed in to change notification settings - Fork 50
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
Fix file_get_contents warning in ContextFactory #16
Conversation
c5a0a01
to
4d9d237
Compare
There is another case breaking: when the filename is |
Your "fix" makes it impossible to read the docblock of such classes entirely though, even if they don't use aliases. So I'm not sure it is the appropriate fix |
@stof what do you think of this alternative fix? |
This is much better for the second issue. But I still think that the bug is still there for evaled code. you should add a test for it |
@stof done |
2a53fb4
to
73319e8
Compare
I've pushed a better fix (use |
73319e8
to
17156bc
Compare
ping @mvriel It's a blocking bug for Prophecy integration (see phpspec/prophecy#264). |
👍 |
Hiya @dunglas, Looks good, and thanks for including tests to verify this behaviour. I will merge it. |
Fix file_get_contents warning in ContextFactory
Thank you very much @mvriel |
Currently, a warning like
warning: file_get_contents(): Filename cannot be empty in [...]/prophecy/vendor/phpdocumentor/type-resolver/src/Types/ContextFactory.php line 48
is generated by the library if there is no filename associated with the reflector passed toContextFactory
.This PR fix this.