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: "use" and "::class" doesn't return the same class. #112

Open
KevinTanjung opened this issue Sep 7, 2015 · 2 comments
Open

Bug: "use" and "::class" doesn't return the same class. #112

KevinTanjung opened this issue Sep 7, 2015 · 2 comments

Comments

@KevinTanjung
Copy link

I have been using Boris with Laravel, using the "php artisan tinker" command. I am not sure whether the problem lies on Laravel or Boris, so I submit issue on both repositories.

So, for example I have a class that has the following FCQN, Chiara\User\Entity\Profile.

[1] > use Chiara\User\Entity\Profile
//    true
[2] > Profile::class
//    Profile

So instead of returning the FCQN if using ::class, it will instead only return the actual class name. I am using PHP 5.6 on Ubuntu 14.04.

@krtek4
Copy link

krtek4 commented Oct 12, 2016

The issue is related to the fact that Boris creates an alias for the class using class_alias.

I don't know the reason for that, so I am not sure it can be corrected.

@KevinTanjung
Copy link
Author

Haha its been a year since I post this issue. It has actually been fixed, I think. I cannot test it right now because Laravel has been using Psy Shell.

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