PHP code example of coretsia / platform-cli
1. Go to this page and download the library: Download coretsia/platform-cli library . Choose the download type require .
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
coretsia / platform-cli example snippets
$definitions
->classService(
InspectCommand::class,
InspectCommand::class,
[ContainerValueReference::service(OwnerServiceInterface::class)],
)
->tag(
ReservedTags::CLI_COMMAND,
InspectCommand::class,
meta: [
'name' => InspectCommand::NAME,
'summary' => InspectCommand::SUMMARY,
'group' => InspectCommand::GROUP,
'hidden' => InspectCommand::HIDDEN,
'arguments' => InspectCommand::ARGUMENTS,
'options' => InspectCommand::OPTIONS,
],
);
return [
'commands' => [
'overrides' => [],
],
'workflows' => [
'definitions' => [],
],
'output' => [
'format_default' => 'adaptive',
'adaptive' => [
'interactive' => 'table',
'non_interactive' => 'table',
],
'color_default' => 'auto',
'table' => [
'max_width' => 120,
],
],
];
'workflows' => [
'definitions' => [
'verify' => [
'summary' => 'Validate and verify the web target.',
'steps' => [
[
'command' => 'config:validate',
'arguments' => [],
'options' => [
'target' => 'web',
],
],
[
'command' => 'cache:verify',
'arguments' => [],
'options' => [
'target' => 'web',
],
],
],
],
],
],
bash
php coretsia list
php coretsia help
php coretsia doctor
php coretsia config:validate --target=web
bash
php coretsia list
php coretsia help
php coretsia doctor
php coretsia config:validate --target=web
bash
php vendor/bin/coretsia <command>
bash
php coretsia workflow:list
php coretsia workflow:run verify
php coretsia workflow:run verify --format=json