nvlad / yii2support

Yii2 Support for PhpStorm / IntelliJ IDEA
https://plugins.jetbrains.com/idea/plugin/9388-yii2-support
Other
294 stars 53 forks source link

Views within modules within the vendor directory aren't found #216

Open Manu311 opened 5 years ago

Manu311 commented 5 years ago

What steps will reproduce the problem?

Have any package installed via composer, which contains views. Example: yiisoft/yii2-debug Have that package, or the entire vendor-directory not marked as excluded, so the files are actually parsed. Open up a controller which renders a view and try to click on the link usually generated by this plugin. (example in yii2-debug: /vendor/yiisoft/yii2-debug/src/controllers/DefaultController.php:122 $this->renderPartial('view'))

What is the expected result?

The link in the example should redirect to the file /vendor/yiisoft/yii2-debug/src/views/default/toolbar.php

What do you get instead?

It searches for the file at /vendor/debug/views/default/toolbar.php

Additional info

The example is not the point where it causes issues for me, but modules created by our company, which contain views, are located within similar directories (and not in /app/modules/...), so we can't use this plugin to trace back which view is called.

Q A
IDE Name PhpStorm
IDE Version 2018.2.5
Plugin version 0.10.56.22
Yii App Template advanced
buddh4 commented 5 years ago

Same here, older versions of the plugin simply checked the ../views folder which worked for us almost everywhere. I think the new lookup behaviour with a single Yii root path does not work for more complex projects with external modules (outside of the main project) or a changed directory structure.

The same applies for creating views, when I try to create a view within a module which resides outside of the root project i expect the view to be created in ../views but the view will be created under /root/modules/mymodule/views.

Would be great to add the old "simple" view mapping as fallback or by configuration.

papppeter commented 5 years ago

HI,

i would suggest to do this as well, the new mapping is just not working correctly.

is somebody is able to do this? as i see this project is not really supported any more.

honsa commented 4 years ago

Have the same issue.

The strange thing is, if I click on the view using ctrl+left mouse, the correct view gets open.