Answer the question
In order to leave comments, you need to log in
How to properly organize development with packages?
I have :
phpStorm
application on yii2 (main project)
a separate "cart" package/component connected via composer (personal private repository)
Question:
How can I immediately edit the "cart" package from the main project?
Now I have to open another "cart" project, make changes there, upload it to the repository, then open the main project and do a composer update
Answer the question
In order to leave comments, you need to log in
There is a plugin for composer - wikimedia/composer-merge-plugin . It allows you to include local packages in your project.
Composer.json then looks something like this:
{
"require": {
"wikimedia/composer-merge-plugin": "dev-master"
},
"extra": {
"merge-plugin": {
"require": [
"submodule/composer.json" // Путь до файла composer.json вашей библиотеки.
]
}
}
}
Composer can include dependencies from local directory:
composer.json
{
"repositories": [
{
"type": "path",
"url": "./путь_к_папке_с_зависимостью"
}
],
"require": {
"yourpackage/name": "*"
}
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question