To install the Spryker SDK for your development needs, clone the project and export SPRYKER_SDK_ENV with the dev environment and create an alias:
git clone git@github.com:spryker-sdk/sdk.git && \
cd sdk; \
PATH_TO_SDK=$(pwd) && \
if [ -e ~/.zshrc ]; then \
echo 'export SPRYKER_SDK_ENV=dev' >> ~/.zshrc && \
echo 'alias spryker-sdk="$PATH_TO_SDK/bin/spryker-sdk.sh"' >> ~/.zshrc && \
source ~/.zshrc; \
else \
echo 'export SPRYKER_SDK_ENV=dev' >> ~/.bashrc && \
echo 'alias spryker-sdk="'$PATH_TO_SDK'/bin/spryker-sdk.sh"' >> ~/.bashrc && \
source ~/.bashrc; \
fi; \
git describe --abbrev=0 --tags > VERSION; \
spryker-sdk --mode=docker sdk --install- To run a task or a command, execute the following command:
spryker-sdk <task|command>- To debug a task or a command, make sure the server name in IDE is
spryker-sdkand run the following command:
spryker-sdk --mode=debug <task|command>- To run the Spryker SDK in the production environment, execute the following command:
SPRYKER_SDK_ENV=prod spryker-sdk <task|command>- To run any command inside the docker container, execute the following command:
spryker-sdk --mode=docker "<command>"
spryker-sdk --mode=docker "cd /data && composer cs-check"- To jump into the docker container, execute the following command:
spryker-sdk --mode=docker /bin/bashInside the container, you can find the SDK helper with useful commands, shortcuts, and aliases.
To refresh state after switching to a new branch, run the following command:
spryker-sdk --mode=docker sdk --refreshor
spryker-sdk --mode=docker sdk rHere is the full list of commands you can use:
spryker-sdk --mode=docker sdk --help
--refresh, -r refreshes cache vendor and DB
--composer, -c runs the SDK composer
accepts composer arguments like 'sdk --composer install' 'sdk -c cs-check'
--cache-clear, -cl alias for 'rm -rf var/cache && bin/console cache:clear'
--cs-fix, -cf alias for 'composer cs-fix'
--cs-check, -cc alias for 'composer cs-check'
--stan, -s alias for 'composer stan'
--unit, -u runs codeception unit tests
accepts arguments like 'sdk -u someUnitTest.php'
--acceptance, -a runs codeception acceptance tests
accepts arguments like 'sdk -u someAcceptanceTest.php'For details on the project configuration management, see the Symfony configuration docshttps://symfony.com/doc/current/configuration.html).
If you face issues with:
- pulling container from the Docker registry,
- file permissions and ownership on files created by the SDK,
you can build your own container from the SDK sources. Refer to Building flavored Spryker SDKs for details.