Hi, my team and me are developing vendor package for spryker. We are exepriencing issues with develompent environment setup.
We have package in repository on github. If i download package and i want do develop it, I can not test my implementations because i don't have whole spryker project (just that package).
If I develop my package on spryker project than i can not push changes to repository of my package.
How to solve this ? What is the standard when developing packages for projects like spryker?
Can I maybe just point to another origin branch on github?
You can try the following approach:
composer.json
file to install the package from sources according to
:{ … "config": { "preferred-install": { "your-organization/your-package": : "source", "*": "dist" } } … }
composer config repositories.your-package-repo-identifier vcs https://github.com/your-organization/your-package.git
composer require your-organization/your-package:dev-your-feature-branch
vendor
path of the package in the IDE to treat the files as a repository. For example, in PHPStorm Settings > Version Control > Directory Mappings
vendor
directoryIn order not to modify the project's composer.json
and composer.lock
and keep them a "clean" release version, you could create their development version by copying them outside the project and running the above commands with the environment variable COMPOSER=<path/to/composer.json>
. For example, say you copied composer.json
and composer.lock
one directory level up, then you run COMPOSER=../composer.json composer config repositories.your-package-repo-identifier vcs https://github.com/your-organization/your-package.git
and COMPOSER=../composer.json composer require your-organization/your-package:dev-your-feature-branch
. In this case, the package is pulled inside the project's vendor but the development composer files are outside the project and there is no chance to commit them accidentally.