Open tobzsc opened 6 years ago
There was also a discussion about this for laravel https://github.com/laravel/ideas/issues/647
That would be awesome indeed!
Laravel generates files that I believe could be leveraged by the package (as mentioned by @barryvdh in the discussion linked above) to provide the necessary doc blocks / jump to source capabilities. See screenshot of generated files: https://cl.ly/9cac6d888a9a
🙏
This would be a giant help especially with testing, anyone got any ideas on how to start it?
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. If this issue is still present on the latest version of this library on supported Laravel versions, please let us know by replying to this issue so we can investigate further. Thank you for your contribution! Apologies for any delayed response on our side.
The issue is still present in v2.7.0.
Meanwhile, is there a workaround for this?
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. If this issue is still present on the latest version of this library on supported Laravel versions, please let us know by replying to this issue so we can investigate further. Thank you for your contribution! Apologies for any delayed response on our side.
The issue is still present in v2.8.1. I don't know of any workarounds but am slowly starting to think we need to stop using real time facades in our project 🙄
No the right place for this discussion I know, but I don't use Facades at all.
It's always better to explicitly declare your dependencies (constructor injection).
Of course these are not "your next blog" projects, but they're bigger etc. ide-helper is still invaluable especially the phpdoc of properties on models, now that static analyzers also take advantage of them.
Not all but most/many facades to have already very useful phpdoc in Laravel so most things will work already sufficient enough in modern IDEs.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. If this issue is still present on the latest version of this library on supported Laravel versions, please let us know by replying to this issue so we can investigate further. Thank you for your contribution! Apologies for any delayed response on our side.
+1
For anyone looking at this thread, in your folder storage/framework/cache, you will find files like
facade-0ddfd85831f9b9c062057cf8727fa4f6ec6410ef.php
Inside, you'll have the real time facade generated, looking like
<?php
namespace Facades\App\Services\CreateProductImages;
use Illuminate\Support\Facades\Facade;
/**
* @see \App\Services\CreateProductImages\CreateProductImages
*/
class CreateProductImages extends Facade
{
/**
* Get the registered name of the component.
*
* @return string
*/
protected static function getFacadeAccessor()
{
return 'App\Services\CreateProductImages\CreateProductImages';
}
}
Doing a search and replace on @see --> @mixin will give PHPStorm (didn't test on other IDEs) auto "jump to source" and autocomplete.
This is not ideal but it works. Not sure if this is laravel-ide-helper territory though.
Hope this helps!
I'm not using them either, but if it's easy to do, we might add them? If there is a PR, let me know.
@barryvdh I created a PR for this now :) https://github.com/barryvdh/laravel-ide-helper/pull/1455
Any plans to look at this ? Could be real helpfull!
I have tried several version from latest stable to latest master. The package does not have real-time facade support, doesn't it?
Is there any way to add such a feature?