Radu
Radu

Reputation: 1177

PhpStorm configure vendor extensions individually

I have the following Magento 2 standard project structure, but this can apply to any php composer based project:

.
..
.git
.gitignore
composer.json
composer.lock
vendor/Acme/module1
vendor/Acme/module1/composer.json
vendor/Acme/module1/.git

# .gitignore contains a directive to ignore the vendor directory because the project structure contains nested repositories 

Is there a way to configure PhpStorm to highlight my changes individually for each vendor extension? At this point all my vendor changes are not displayed (because of the directive in the .gitignore file). The only changes that are highlighted are the ones in the main project repo.

Upvotes: 1

Views: 323

Answers (1)

Pavlo Zhukov
Pavlo Zhukov

Reputation: 3347

You may install your vendor module via symlink using this manual https://johannespichler.com/developing-composer-packages-locally/

Then you can add this external folder to your project to simplify development via File | Settings | Directories | Add Content Root action.

enter image description here

Then you need to add your module VCS to your project via File | Settings | Version Control enter image description here

Now you can easily manage your changes separately. enter image description here

For even better control I recommend you use changelists

Upvotes: 2

Related Questions