enriquepiatti / Magicento

PHPStorm plugin for Magento developers
115 stars 35 forks source link

[Magento2] Magicento conflicts with composer plugin setting "Add packages as libraries" #254

Closed Koc closed 6 years ago

Koc commented 7 years ago

I've configured composer plugin: default

after this all vendor folders added to ignore list default

it is normal case. In fact they are properly indexed by phpstorm (for example Symfony2 plugin works ok with same composer settings). But there is no item create plugin in menus:

alt+enter does nothing.

alt+ins default

alt+m default

There is no any final method in class.

When I've removed module-catalog folder from ignored path - menu item returns on alt+enter.

  1. Can we unify Magicento actions? There is 3 different hotkey combinations, does we need all of them? Why not reuse alt+ins for plugins, for example?
  2. Can you ask @Haehnchen how to properly index vendors when "Add packages as libraries" setting is turned on?
Haehnchen commented 7 years ago

libraries are inside allScope

GlobalSearchScope.getScopeRestrictedByFileTypes(GlobalSearchScope.allScope(project), TwigFileType.INSTANCE))
GlobalSearchScope.allScope(project)
FileBasedIndex.getInstance().getContainingFiles(EventAnnotationStubIndex.KEY, eventName, GlobalSearchScope.allScope(project))
Koc commented 7 years ago

thanx @Haehnchen, you are the best as always 👍

More info about "Add packages as libraries" setting https://www.jetbrains.com/help/phpstorm/using-composer-dependency-manager.html

Koc commented 6 years ago

@enriquepiatti please fix

enriquepiatti commented 6 years ago

@Koc this is actually a problem with "Intentions" not with Libraries, Magicento2 is searching on libraries too (there is also a new setting in v1.7.0 to control this on Magicento2 settings). But this should be solved now (since v1.7.0) because Intentios are now also available as Magicento2 actions (ALT+M), so instead of using the intention shortcut (ALT+ENTER) you should use ALT+M in this case (both things are doing the same anyway).