Our company has private packages which are shared between projects. We use composer to install our private packages.
Our static composer repository is located on this URL:http://45.33.79.118/satis/web/
To add our composer packages repository to composer.json add this lines:
{
"repositories": [
{
"type": "composer",
"url": "http://45.33.79.118/satis/web"
}
]
}
In console run:
composer require "jackborn/payplan"
- Delete the
vendor/jackborn/paylan
folder if you want to change payplan package. Delete just this package folder - run
composer install "jackborn/payplan" --prefer-source
This will install package with git inside. This will allow you to go into the package folder and commit, push and pull changes from this package.
When you make desired chanegs you need to commit and push them liek this:
cd vendor/jackborn/payplan
git branch
to make sure which branch is activegit add specific_file.php
and never useadd .
because you want to be sure what are you commitinggit push origin master
to push changes to package repositorycd ....
if you use zsh or get back four steps to be located into project root.- Now you are into your main project but your project need to get latest package version and write it down into
composet.lock
file composer update "jackborn/payplan" --prefer-source
git add composer.lock
git commit -m "Describe why we update payplan package"
- If you want to push now run
git push origin master