Download the PHP package tobento/service-console without Composer

On this page you can find all versions of the php package tobento/service-console. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package service-console

Console Service

Command Line Interface using Symfony Console as default implementation.

Table of Contents

Getting started

Add the latest version of the console service project running this command.

Requirements

Highlights

Documentation

Console

Create Console

Add Command

After Creating Commands you can add them in the console:

Run Console

Execute Command

You may want to execute a command instead of running the console.

Example with command class

Example with command name

Creating Commands

Command

You may use the to create simple commands.

Check out the Interactor section to learn more about it.

Arguments and Options

Arguments in detail

Options in detail

Abstract Command

Simply extend from the to create more complex commands.

Check out Arguments and Options for more detail.

Using Signature

You may use the as an alternative way to define the name, description, arguments and options of your command.

Arguments

Options

Options are optional in general!

Interactor

The interactor let you interact with the input and output from the console while handling your command:

Retrieving Argument and Option Values

Retrieve input argument(s) and option(s) if specified. See Arguments and Options.

Argument details

Option details

Retrieving Raw Input

You may use the method to retrieve the raw input that was passed to the command.

Writing Output

Writing formatted output

You may write formatted output by the following way:

Writing tables

Asking Questions

Secret question

You may ask a secret question:

Confirmation question

You may ask for confirmation:

Choice question

You may ask a choice question:

Progress Bar

Verbosity Levels

Command Parameters

Ignore Validation Errors Parameter

You may add the parameter to ignore validation errors which may be useful in some cases.

Locking

Not supported yet.

Signals

Not supported yet.

Events

You may listen to the following events if you have defined a event listener in the console:

Event Description
The Event is fired executing the console command.
The Event is fired executing the console command.

Testing

You may test commands using the .

You may check out the for examples.

Passing input arguments and options

Passing Container Or Console

With input

You may use the method returning a new instance:

Symfony

Symfony Console

Symfony Custom Interactor

You may create a custom interactor using the parameter:

Credits


All versions of service-console with dependencies

PHP Build Version
Package Version
Requires php Version >=8.0
psr/container Version ^2.0
psr/event-dispatcher Version ^1.0
tobento/service-autowire Version ^1.0.9
symfony/console Version ^6.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package tobento/service-console contains the following files

Loading the files please wait ....