Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .laminas-ci.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"ignore_php_platform_requirements": {
"8.4": true
},
"backwardCompatibilityCheck": true
}
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -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
Expand Down
48 changes: 24 additions & 24 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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

Expand Down Expand Up @@ -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.
Expand Down
6 changes: 3 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
@@ -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": [
Expand All @@ -13,7 +13,7 @@
],
"authors": [
{
"name": "DotKernel Team",
"name": "Dotkernel Team",
"email": "team@dotkernel.com"
}
],
Expand All @@ -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"
},
Expand Down
2 changes: 1 addition & 1 deletion config/autoload/cli.global.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
return [
'dot_cli' => [
'version' => '1.0.0',
'name' => 'DotKernel CLI',
'name' => 'Dotkernel CLI',
'commands' => [
DemoCommand::getDefaultName() => DemoCommand::class,
],
Expand Down
14 changes: 9 additions & 5 deletions docs/book/v3/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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,
],
```
4 changes: 3 additions & 1 deletion docs/book/v3/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
```
12 changes: 7 additions & 5 deletions docs/book/v3/lock-files.md
Original file line number Diff line number Diff line change
Expand Up @@ -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',
],
```
44 changes: 24 additions & 20 deletions docs/book/v3/testing.md
Original file line number Diff line number Diff line change
Expand Up @@ -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/).
4 changes: 3 additions & 1 deletion docs/book/v3/usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
```
2 changes: 1 addition & 1 deletion mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion test/CommonTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -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',
],
Expand Down
Loading