magento / magento2-phpstorm-plugin

PHPStorm Plugin for Magento 2
Open Software License 3.0
436 stars 102 forks source link

Vendor folder not found when using mage-os fork #1944

Open ProxiBlue opened 9 months ago

ProxiBlue commented 9 months ago

Using community fork mage-os does not work with the plugin, and results in error : 'Vendor dir is corrupt or missing in the current Magento 2 installation path', when setting the mage-os path in plugin configuration.

Steps to reproduce the behavior:

  1. Install mage-os fork. Ref https://mage-os.org/
  2. Setup PHPStorm project to the above install
  3. Install / activate this module
  4. setup this module and point folder to root folder
  5. See this error

Expected behavior (*)

Acceptance of the mage-os vendor folder

image

Having had a quick look, I can see the issue is related to fact that mage-os has moved vendor folder away from /vendor/magento to /vendor/mage-os (a logical move) This module uses hardcoded paths to /vendor/magento to check for setups

image

Please complete the following information: (*)

My suggestion si that the base magento folder should be a configurable value, and paths should be built using that, and not hadcoded to /vendor/magento

a workaround is to add a symlink from old magento folder to mage-os, via composer, so it is generated if vendor is wiped.

 "scripts": {
       "post-install-cmd": [
            "mkdir -p ./vendor/magento && ln -s ./vendor/mage-os/framework ./vendor/magento/"
        ],
}
m2-assistant[bot] commented 9 months ago

Hi @ProxiBlue. Thank you for your report. To speed up processing of this issue, make sure that you provided sufficient information. Add a comment to assign the issue: @magento I am working on this


Join Magento Community Engineering Slack and ask your questions in #github channel.