Uuid Generation Console feature integration
Edit on GitHub
You are browsing a previous version of the document. The latest version is 202212.0.
This document describes how to integrate the Uuid Generation Console feature.
Prerequisites
To start feature integration, overview and install the necessary features:
FEATURE | VERSION | INTEGRATION GUIDE |
---|---|---|
Spryker Core | 202204.0 | Spryker Core feature integration |
1) Install the required modules using Composer
composer require spryker/uuid:"^1.0.0" --update-with-dependencies
Verification
Make sure that the following modules have been installed:
MODULE | EXPECTED DIRECTORY |
---|---|
Uuid | vendor/spryker/uuid |
2) Set up transfer objects
Generate transfer changes:
console transfer:generate
Verification
Make sure that the following changes in transfer objects:
TRANSFER | TYPE | EVENT | PATH |
---|---|---|---|
UuidGeneratorConfigurationTransfer | class | created | src/Generated/Shared/Transfer/UuidGeneratorConfigurationTransfer.php |
UuidGeneratorReportTransfer | class | created | src/Generated/Shared/Transfer/UuidGeneratorReportTransfer.php |
3) Set up console command
PLUGIN | SPECIFICATION | PREREQUISITES | NAMESPACE |
---|---|---|---|
UuidGeneratorConsole | Provides the uuid:generate console command. |
None | \Spryker\Zed\Uuid\Communication\Console\UuidGeneratorConsole |
src/Pyz/Glue/Console/ConsoleDependencyProvider.php
<?php
namespace Pyz\Zed\Console;
use Spryker\Zed\Console\ConsoleDependencyProvider as SprykerConsoleDependencyProvider;
use Spryker\Zed\CompanyUserStorage\Communication\Plugin\Event\Subscriber\CompanyUserStorageEventSubscriber;
class ConsoleDependencyProvider extends SprykerConsoleDependencyProvider
{
protected function getConsoleCommands(Container $container)
{
$commands = [
...,
new UuidGeneratorConsole(),
];
return $commands;
}
}
Verification
To make sure you’ve set up UuidGeneratorConsole
, run console | grep uuid:generate
and check that the command is found.
Thank you!
For submitting the form