Download the PHP package duncan3dc/console without Composer

On this page you can find all versions of the php package duncan3dc/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 console

console

Create command line php applications using symfony/console.
This is basically a fork of symfony/console which does things a little differently and adds some extra features.
Most of the features are useful when running commands in a background context (such as via crontab).

release build coverage

Loading Commands

Commands can be automatically created from classes (meaning you don't need to call setName() inside your command class) using the following criteria:

Of course, they can still be added the symfony way

Output

We use league/climate for terminal output, whilst also maintaining support for the symfony way.
So all of the following is possible:

Time Limit Commands

Commands can limit how long they are run for, and end in a controlled way when the limit is reached.
Inside your command's class you can call the timeout() method and pass the number of seconds your command should run for.

This behaviour can be overridden by passing the when running the application, this will cause the timeout() method to always return false

Calling An Existing Command

The symfony way of calling an existing command can be a little long-winded, with steps that seem unnecessary (eg, specifying the command name twice).
The runCommand() method provides a simplified way of doing this (using the example from the symfony docs):

This also ensures any command event listeners that have been registered are called, which symfony does not do

Command Locking

All commands are automatically locked to prevent the same command being run simultaneously on the same host.
You can prevent particular commands from locking using the doNotLock() method:

_When a command cannot run it will exit with status 201, represented by the class constant Application::STATUSLOCKED

Tab Completion

Tab completion is provided by stecman/symfony-console-completion and instructions on setting it up for your application can be found in the README.md of that repository.

Namespace Listing

When you are entering commands in completion mode, it can often be useful to view the list of available commands in the namespace.
For example you might type cat then press tab which would complete the namespace, and the namespace separator:

But when you press tab again, you might be presented with a list of commands (or sub-namespaces) you don't entirely recognise. At this point the symfony way would be to delete the colon, run your cursor back to before your namespace, and type list:

Then having identified the command you need from the listing you would then need to type what you had earlier, before entering the command you require:

To make this use case easier, we have made running a command with a trailing colon, an alias for the list command shown above, so you can actually run:

Which will list all your available commands, then you can press the up arrow to retrieve that same command from your shell's history and carry on entering the command name, much quicker

duncan3dc/console for enterprise

Available as part of the Tidelift Subscription

The maintainers of duncan3dc/console and thousands of other packages are working with Tidelift to deliver commercial support and maintenance for the open source dependencies you use to build your applications. Save time, reduce risk, and improve code health, while paying the maintainers of the exact dependencies you use. Learn more.


All versions of console with dependencies

PHP Build Version
Package Version
Requires duncan3dc/symfony-climate Version ^1.0
filp/whoops Version ^2.15
league/climate Version ^3.8.2
nunomaduro/collision Version ^3.0 || ^4.0 || ^5.0 || ^6.0 || ^7.0 || ^8.0
stecman/symfony-console-completion Version ^0.11 || ^0.12 || ^0.13
symfony/console Version ^5.3.16 || ^6.0.19 || ^7.0
symfony/event-dispatcher Version ^5.3 || ^6.0.19 || ^7.0
symfony/filesystem Version ^5.3 || ^6.0.19 || ^7.0
symfony/finder Version ^5.3.16 || ^6.0.19 || ^7.0
symfony/lock Version ^5.3 || ^6.0.19 || ^7.0
php Version ^7.4 || ^8.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 duncan3dc/console contains the following files

Loading the files please wait ....