-
Notifications
You must be signed in to change notification settings - Fork 11.6k
[5.8] Provide a path of the view in compiled view #27544
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
Conversation
Thanks! |
@mfn oh, I didn't take strict types declaration into account, sorry for that. I'll take a look ASAP, thank you for reporting! |
Having upgraded to the latest stable PhpStorm, this functionality only works if the path is added on top of the compiled view. It currently appends it to the bottom. |
@screenager just to be sure, whether it was tested with 2019.1 Release or not? |
Tested with 2019.1 indeed Let me know if you need anything more |
This re-adds the functionality that was added in laravel/framework#27544 and laravel/framework#27976 and removed again in laravel/framework@33ce7bb. The main difference with this approach is that it takes into account the issue from laravel/framework#27996. By not introducing a newline it doesn't changes anything to the rendered view itself. The path is now applied as the final piece of code. This doesn't allows IDE's to rely on it being the last line though. Instead we use /**PATH and ENDPATH**/ to make sure we have an easy way for the IDE to pick up the path it needs.
This re-adds the functionality that was added in laravel/framework#27544 and laravel/framework#27976 and removed again in laravel/framework@33ce7bb. The main difference with this approach is that it takes into account the issue from laravel/framework#27996. By not introducing a newline it doesn't changes anything to the rendered view itself. The path is now applied as the final piece of code. This doesn't allows IDE's to rely on it being the last line though. Instead we use /**PATH and ENDPATH**/ to make sure we have an easy way for the IDE to pick up the path it needs.
This PR fixes laravel/ideas#1480 by adding the path of the view at the first line of compiled view in order to provide a possibility of Blade debugging in PhpStorm.
This pull-request is a simplified version of the pull-request filed before with fixed shortcomings: #27412 , @taylorotwell please take a look.