Download the PHP package dotkernel/dot-cli without Composer
On this page you can find all versions of the php package dotkernel/dot-cli. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package dot-cli
dot-cli
Dotkernel component to build console applications based on laminas-cli.
dot-cli is a wrapper on top of laminas-cli
Documentation
Documentation is available at: https://docs.dotkernel.org/dot-cli/.
Badges
Requirements
- PHP: 8.2, 8.3, 8.4 or 8.5
- laminas/laminas-servicemanager: >= 3.11 || >= 4.0,
- laminas/laminas-cli: >= 1.15
Setup
1. Install package
Run the following command in your application's root directory:
2. Register ConfigProvider
Open your application's config/config.php and the following line under the DK packages comment:
3. Copy bootstrap file
Locate file bin/cli.php in this package, then copy it to your application's bin/ directory.
This is the bootstrap file you will use to execute your commands with.
4. Copy config file
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 to.
Testing
Using the command line, go to your application's root directory, then type the following command:
The output should look similar to this, containing information on how to start using dot-cli:
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.
Setting up as a cronjob
or
Adapt the command to your specifications by replacing 7.4 with your PHP version and example.com with your domain name.
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).
License
MIT
All versions of dot-cli with dependencies
laminas/laminas-cli Version ^1.15.0
laminas/laminas-servicemanager Version ^3.11.1 || ^4.0