diff --git a/.laminas-ci.json b/.laminas-ci.json new file mode 100644 index 0000000..82cd446 --- /dev/null +++ b/.laminas-ci.json @@ -0,0 +1,6 @@ +{ + "ignore_php_platform_requirements": { + "8.4": true + }, + "backwardCompatibilityCheck": true +} diff --git a/LICENSE b/LICENSE index 5b73c90..f5a5fff 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2021 DotKernel +Copyright (c) 2021 Dotkernel Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/README.md b/README.md index a31662d..0898b33 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ > dot-cli is a wrapper on top of [laminas-cli](https://github.com/laminas/laminas-cli) ![OSS Lifecycle](https://img.shields.io/osslifecycle/dotkernel/dot-cli) -![PHP from Packagist (specify version)](https://img.shields.io/packagist/php-v/dotkernel/dot-cli/3.7.0) +![PHP from Packagist (specify version)](https://img.shields.io/packagist/php-v/dotkernel/dot-cli/3.8.0) [![GitHub issues](https://img.shields.io/github/issues/dotkernel/dot-cli)](https://github.com/dotkernel/dot-cli/issues) [![GitHub forks](https://img.shields.io/github/forks/dotkernel/dot-cli)](https://github.com/dotkernel/dot-cli/network) @@ -14,13 +14,13 @@ [![Build Static](https://github.com/dotkernel/dot-cli/actions/workflows/continuous-integration.yml/badge.svg?branch=3.0)](https://github.com/dotkernel/dot-cli/actions/workflows/continuous-integration.yml) [![codecov](https://codecov.io/gh/dotkernel/dot-cli/graph/badge.svg?token=0DFCK2GUBT)](https://codecov.io/gh/dotkernel/dot-cli) -DotKernel component to build console applications based on [laminas-cli](https://github.com/laminas/laminas-cli). +Dotkernel component to build console applications based on [laminas-cli](https://github.com/laminas/laminas-cli). ## Requirements -- PHP >= 8.2 -- laminas/laminas-servicemanager >= 3.11 || >= 4.0, -- laminas/laminas-cli >= 1.4 +- **PHP**: 8.2, 8.3 or 8.4 +- **laminas/laminas-servicemanager**: >= 3.11 || >= 4.0, +- **laminas/laminas-cli**: >= 1.4 ## Setup @@ -61,25 +61,25 @@ php ./bin/cli.php The output should look similar to this, containing information on how to start using dot-cli: ```text - DotKernel CLI 1.0.0 - - Usage: - command [options] [arguments] - - Options: - -h, --help Display help for the given command. When no command is given display help for the list command - -q, --quiet Do not output any message - -V, --version Display this application version - --ansi Force ANSI output - --no-ansi Disable ANSI output - -n, --no-interaction Do not ask any interactive question - -v|vv|vvv, --verbose Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug - - Available commands: - help Display help for a command - list List commands - demo - demo:command Demo command description. +Dotkernel CLI 1.0.0 + +Usage: + command [options] [arguments] + +Options: + -h, --help Display help for the given command. When no command is given display help for the list command + -q, --quiet Do not output any message + -V, --version Display this application version + --ansi Force ANSI output + --no-ansi Disable ANSI output + -n, --no-interaction Do not ask any interactive question + -v|vv|vvv, --verbose Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug + +Available commands: + help Display help for a command + list List commands + demo + demo:command Demo command description. ``` As shown in `config/autoload/cli.global.php`, dot-cli includes a demo command `demo:command` that will help you understand the basics of creating a new command. diff --git a/composer.json b/composer.json index c75dc01..a365310 100644 --- a/composer.json +++ b/composer.json @@ -1,7 +1,7 @@ { "name": "dotkernel/dot-cli", "type": "library", - "description": "DotKernel component for creating console applications based on laminas-cli", + "description": "Dotkernel component for creating console applications based on laminas-cli", "license": "MIT", "homepage": "https://github.com/dotkernel/dot-cli", "keywords": [ @@ -13,7 +13,7 @@ ], "authors": [ { - "name": "DotKernel Team", + "name": "Dotkernel Team", "email": "team@dotkernel.com" } ], @@ -24,7 +24,7 @@ } }, "require": { - "php": "~8.2.0 || ~8.3.0", + "php": "~8.2.0 || ~8.3.0 || ~8.4.0", "laminas/laminas-cli": "^1.4.0", "laminas/laminas-servicemanager": "^3.11.1 || ^4.0" }, diff --git a/config/autoload/cli.global.php b/config/autoload/cli.global.php index b5e83bf..2e7107e 100644 --- a/config/autoload/cli.global.php +++ b/config/autoload/cli.global.php @@ -8,7 +8,7 @@ return [ 'dot_cli' => [ 'version' => '1.0.0', - 'name' => 'DotKernel CLI', + 'name' => 'Dotkernel CLI', 'commands' => [ DemoCommand::getDefaultName() => DemoCommand::class, ], diff --git a/docs/book/v3/configuration.md b/docs/book/v3/configuration.md index d458d9d..f1cae3b 100644 --- a/docs/book/v3/configuration.md +++ b/docs/book/v3/configuration.md @@ -4,7 +4,9 @@ After installation, register `dot-cli` in your project by adding the below line to your configuration aggregator (usually: `config/config.php`): - Dot\Cli\ConfigProvider::class, +```shell +Dot\Cli\ConfigProvider::class, +``` ## Copy bootstrap file @@ -16,7 +18,9 @@ This is the bootstrap file you will use to execute your commands with. Locate in this package the following file `config/autoload/cli.global.php` then copy it to your application's `config/autoload/` directory. This is the config file you will add your commands under the `commands` key, as in the following example: - 'commands' => [ - DemoCommand::getDefaultName() => DemoCommand::class, - ExampleCommand::getDefaultName() => ExampleCommand::class, - ], +```php +'commands' => [ + DemoCommand::getDefaultName() => DemoCommand::class, + ExampleCommand::getDefaultName() => ExampleCommand::class, +], +``` diff --git a/docs/book/v3/installation.md b/docs/book/v3/installation.md index f056936..23011fd 100644 --- a/docs/book/v3/installation.md +++ b/docs/book/v3/installation.md @@ -2,4 +2,6 @@ Install `dotkernel/dot-cli` by executing the following Composer command: - composer require dotkernel/dot-cli +```shell +composer require dotkernel/dot-cli +``` diff --git a/docs/book/v3/lock-files.md b/docs/book/v3/lock-files.md index a716fd9..182083f 100644 --- a/docs/book/v3/lock-files.md +++ b/docs/book/v3/lock-files.md @@ -6,9 +6,11 @@ If a command was force stopped, locate the lock file in the configured directory ## Configuration -Inside `config/autoload/cli.global.php` under the `FileLockerInterface::class` key the file locker can be disabled and the location of the lock files can be changed +Inside `config/autoload/cli.global.php` under the `FileLockerInterface::class` key the file locker can be disabled and the location of the lock files can be changed. - FileLockerInterface::class => [ - 'enabled' => true, - 'dirPath' => getcwd() . '/data/lock', - ], +```php +FileLockerInterface::class => [ + 'enabled' => true, + 'dirPath' => getcwd() . '/data/lock', +], +``` diff --git a/docs/book/v3/testing.md b/docs/book/v3/testing.md index c60791f..0ad03bf 100644 --- a/docs/book/v3/testing.md +++ b/docs/book/v3/testing.md @@ -2,29 +2,33 @@ Using the command line, go to your application's root directory, then type the following command: - php ./bin/cli.php +```shell +php ./bin/cli.php +``` The output should look similar to this, containing information on how to start using dot-cli: - DotKernel CLI 1.0.0 - - Usage: - command [options] [arguments] - - Options: - -h, --help Display help for the given command. When no command is given display help for the list command - -q, --quiet Do not output any message - -V, --version Display this application version - --ansi Force ANSI output - --no-ansi Disable ANSI output - -n, --no-interaction Do not ask any interactive question - -v|vv|vvv, --verbose Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug - - Available commands: - help Display help for a command - list List commands - demo - demo:command Demo command description. +```text +Dotkernel CLI 1.0.0 + +Usage: + command [options] [arguments] + +Options: + -h, --help Display help for the given command. When no command is given display help for the list command + -q, --quiet Do not output any message + -V, --version Display this application version + --ansi Force ANSI output + --no-ansi Disable ANSI output + -n, --no-interaction Do not ask any interactive question + -v|vv|vvv, --verbose Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug + +Available commands: + help Display help for a command + list List commands + demo + demo:command Demo command description. +``` As shown in `config/autoload/cli.global.php`, dot-cli includes a demo command `demo:command` that will help you understand the basics of creating a new command. For more information, see [laminas-cli documentation](https://docs.laminas.dev/laminas-cli/). diff --git a/docs/book/v3/usage.md b/docs/book/v3/usage.md index d415e29..08e5915 100644 --- a/docs/book/v3/usage.md +++ b/docs/book/v3/usage.md @@ -8,4 +8,6 @@ Also update the `$defaultName` property and the description set inside the `conf Using the command line, go to your application's root directory, then type the following command: - php ./bin/cli.php demo:command +```shell +php ./bin/cli.php demo:command +``` diff --git a/mkdocs.yml b/mkdocs.yml index 66c2313..df0fb86 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -16,7 +16,7 @@ nav: - Usage: v3/usage.md - "Setting Up As Cronjob": v3/setting-up-as-cronjob.md site_name: dot-cli -site_description: "DotKernel's component to build console applications" +site_description: "Dotkernel's component to build console applications" repo_url: "https://github.com/dotkernel/dot-cli" plugins: - search diff --git a/test/CommonTrait.php b/test/CommonTrait.php index fb1589e..1878739 100644 --- a/test/CommonTrait.php +++ b/test/CommonTrait.php @@ -37,7 +37,7 @@ protected function generateConfig(string $dirPath): array return [ 'dot_cli' => [ 'version' => '1.0.0', - 'name' => 'DotKernel CLI', + 'name' => 'Dotkernel CLI', 'commands' => [ 'test' => 'test', ],