Skip to content

Commit 3a9e809

Browse files
author
Andrei Onita
committed
format README.md according to QA Checks
1 parent 79791d0 commit 3a9e809

File tree

1 file changed

+20
-8
lines changed

1 file changed

+20
-8
lines changed

README.md

Lines changed: 20 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,38 +15,44 @@
1515

1616
DotKernel component to build console applications based on [laminas-cli](https://github.com/laminas/laminas-cli).
1717

18-
### Requirements
18+
## Requirements
19+
1920
- PHP >= 8.2
2021
- laminas/laminas-servicemanager >= 3.11,
2122
- laminas/laminas-cli >= 1.4
2223

24+
## Setup
25+
26+
### 1. Install package
2327

24-
### Setup
25-
#### 1. Install package
2628
Run the following command in your application's root directory:
2729

2830
composer require dotkernel/dot-cli
2931

30-
#### 2. Register ConfigProvider
32+
### 2. Register ConfigProvider
33+
3134
Open your application's `config/config.php` and the following line under the _DK packages_ comment:
3235

3336
Dot\Cli\ConfigProvider::class,
3437

35-
#### 3. Copy bootstrap file
38+
### 3. Copy bootstrap file
39+
3640
Locate file `bin/cli.php` in this package, then copy it to your application's `bin/` directory.
3741
This is the bootstrap file you will use to execute your commands with.
3842

39-
#### 4. Copy config file
43+
### 4. Copy config file
44+
4045
Locate in this package the following file `config/autoload/cli.global.php` then copy it to your application's `config/autoload/` directory.
4146
This is the config file you will add your commands to.
4247

48+
## Testing
4349

44-
### Testing
4550
Using the command line, go to your application's root directory, then type the following command:
4651

4752
php /bin/cli.php
4853

4954
The output should look similar to this, containing information on how to start using dot-cli:
55+
5056
```text
5157
DotKernel CLI 1.0.0
5258
@@ -68,20 +74,26 @@ Available commands:
6874
demo
6975
demo:command Demo command description.
7076
```
77+
7178
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.
7279
For more information, see [laminas-cli documentation](https://docs.laminas.dev/laminas-cli/).
7380

74-
### Setting up as cronjob
81+
## Setting up as cronjob
82+
7583
```text
7684
* * * * * /opt/plesk/php/7.4/bin/php /var/www/vhosts/example.com/httpdocs/bin/cli.php demo:command -q
7785
```
86+
7887
or
88+
7989
```text
8090
* * * * * cd /var/www/vhosts/example.com/httpdocs/bin && /opt/plesk/php/7.4/bin/php ./cli.php demo:command -q
8191
```
92+
8293
Adapt the command to your specifications by replacing **7.4** with your PHP version and **example.com** with your domain name.
8394

8495
Note the **-q** (or **--quiet**) option at the end of the command - it serves as a flag to inform the Application that no output should be returned (unless it's an error).
8596

8697
## License
98+
8799
MIT

0 commit comments

Comments
 (0)