Quick start guide¶
tldr; Spryker setup:
Add composer auth for private packagist
Add private packagist to composer repositories
Add
SpringbokConfig::PIPELINE_FOLDER
toconfig_XXX.php
Add console commands to
ConsoleDependencyProvider
Create
Springbok
module and addSpringbokDependencyProvider
to itAdd
Antiloop
namespace for overwriting classes on project level
Installation¶
1. Add composer auth for private packagist
Antiloops Springbok is proprietary software. And is distributed with private packagist. To install it, you need to have access to the private packagist.
To install Springbok, you need to have access to the private packagist. You should have been given an access token for it. You have to add the access token to your COMPOSER_AUTH
or auth.json
file.
To setup COMPOSER_AUTH
environment variable you need to add the following to your .bashrc
or .zshrc
file, or any other file that is loaded when you open a new shell.
export COMPOSER_AUTH='{"http-basic": {"repo.packagist.com": {"username": "your-username", "password": "your-token"}}}'
To setup auth.json
file you need to add the following to your auth.json
file.
{
"http-basic": {
"repo.packagist.com": {
"username": "your-username",
"password": "your-token"
}
}
}
2. Add private packagist to composer repositories
After you have added the access token to your environment, you can install Springbok by running the following command:
composer config repositories.private-packagist composer https://repo.packagist.com/antiloopgmbh/
composer require antiloop/springbok-common
This will install Springbok and all its dependencies.
3. Add ``SpringbokConfig::PIPELINE_FOLDER`` to ``config_XXX.php``
To setup Springbok inside your spryker project, you need to add the following to your config_XXX.php files.
$config[SpringbokConfig::PIPELINE_FOLDER] = APPLICATION_ROOT_DIR . '/config/Zed/springbok';
The part APPLICATION_ROOT_DIR . '/config/Zed/springbok'
is the path to the folder where you want to store your pipeline configurations.
4. Add console commands to ``ConsoleDependencyProvider``
We also need to setup the console commands for Springbok. You should add the following commands to your ConsoleDependencyProvider.
<?php
...
/**
* @return \Symfony\Component\Console\Command\Command[]
*/
public function getConsoleCommands()
{
$commands = [
...
new SpringbokRunConsole(),
new SpringbokDisplayConsole(),
new SpringbokTraceConsole(),
];
return $commands;
}
...
This will add the Springbok console commands to your project. You can read more about the console commands in the Console commands section of the documentation.
5. Create ``Springbok`` module and add ``SpringbokDependencyProvider`` to it
Next step is to add the SpringbokDependencyProvider to project. You should create a new module inside of the Pyz/Zed folder. The module should be called Springbok. Inside of the module you should create a new file called SpringbokDependencyProvider.php. The file should look like this:
<?php
namespace Pyz\Zed\Springbok;
use Antiloop\Springbok\SpringbokDependencyProvider as AntiloopSpringbokDependencyProvider;
use Spryker\Zed\Kernel\Container;
class SpringbokDependencyProvider extends AntiloopSpringbokDependencyProvider
{
/**
* @return array<\Antiloop\Zed\Springbok\Dependency\Plugin\ExtractorPluginInterface>
*/
protected function getExtractorPlugins(): array
{
return [];
}
/**
* @return array<\Antiloop\Zed\Springbok\Dependency\Plugin\TransformerPluginInterface>
*/
protected function getTransformerPlugins(): array
{
return [];
}
/**
* @return array<\Antiloop\Zed\Springbok\Dependency\Plugin\LoaderPluginInterface>
*/
protected function getLoaderPlugins(): array
{
return [];
}
/**
* @return array<\Antiloop\Zed\Springbok\Dependency\Plugin\HookPluginInterface>
*/
protected function getHookPlugins(): array
{
return [];
}
}
This will add the SpringbokDependencyProvider to your project. The SpringbokDependencyProvider is used to add plugins to Springbok.
6. Add ``Antiloop`` namespace for overwriting classes on project level
We also need to tell spryker to use Antiloop as a namespace for overwriting classes on project level. You should add the following to your config_default.php file.
<?php
...
$config[KernelConstants::CORE_NAMESPACES] = [
'Spryker',
'Antiloop',
];
...
Now you have setup Springbok inside your project.You can now start creating your pipelines.
You can read the Pipeline documentation section of the documentation to learn how to create pipelines. The pipeline section will explain how to create a pipeline and how to use the different components of a pipeline.
You can also read the Console commands section of the documentation to learn how to use Springbok in your project. The usage section will explain Springbok’s console commands and how to use them.
Spryker Composer Authentication for private packages https://docs.spryker.com/docs/scos/dev/the-docker-sdk/202311.0/configuring-access-to-private-repositories.html#configuring-an-environment-to-access-private-repositories