I am trying to develop simple Magento 2 module. Accoding to Composer integration guide I had to put all my dependencies into composer.json file into my module root. According to Default File Structure Guide I had to put my code in app/code directory (on development stage, before release). So the question is how to enable magento to load me dependencies from app/code/vendor-name/package-name/composer.json
file?
- If I run
bin/magento setup:upgrade
my module is enabled, but dependencies are not loaded to /vendor
- If I run
composer update
from magento root dir, my module dependencies are still not loaded
- If I run
composer install
from app/code/[my module dir], dependencies are loaded into app/code/[my module dir]/vendor, but not into [magento root]/vendor dir
What is the best practice for module development with composer dependencies?