Download the PHP package hoathis/symfony-console-bridge without Composer

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

Hoa

Hoa is a modular, extensible and structured set of PHP libraries. Moreover, Hoa aims at being a bridge between industrial and research worlds.

Hoathis\SymfonyConsoleBridge Build Status

All the examples in this readme are available and working in the test application.

Installation

With Composer, to include this library into your dependencies, you need to require hoathis/symfony-console-bridge:

Please, read the website to get more informations about how to install.

Finally, install dependencies:

How to use

Symfony

To use this library with the Symfony framework, please use the dedicated bundle: hoathis/symfony-console-bundle.

Output

Hoathis\SymfonyConsoleBridge\Output\ConsoleOutput is an alternative to the native ConsoleOutput which is able to detect output type and automatically configure verbosity and text decoration.

Let's have the following command:

Running:

As you will see in your terminal, output will be decorated and verbose by default. However if you run:

The verbosity level will automatically be switched to very verbose because the output has detected that you were redirecting it to a file.

Here are the rules used to determine verbosity level and text decoration support:

Verbosity Decoration
Pipe normal disabled
Redirect very verbose disabled
Terminal verbose enabled

Those rules will only be used if you do not provide any verbosity level using command line arguments. If you want to redirect outputs to a file using the debug verbosity level, simply run:

You can still force ANSI output using the --ansi option:

Want to try it? Run bin/console output:verbosity to get a live demo and code snippet.

Formatter

Hoathis\SymfonyConsoleBridge\Formatter\OutputFormatterStyle will let you do everything you were able to do with the native symfony/console formatter with some more cool things:

To use those new OutputFormatterStyle, use the usual API:

As you can see in the previous example, you can replace built-in styles by simply redifining them with the new formatter.

Want to try it? Run bin/console output:formatter:custom or bin/console output:formatter:native to get a live demo and code snippet.

Helpers

The real power of the library comes from its helpers: they let you manage every terminal components. You will first have to manually load them:

Every helper has a dedicated test command. Just run bin/console list to get a list.

Window

The window helper will let you manipulate the current terminal window. It provides several utility methods, each one being bound to an action:

Many other utility methods are available:

Want to try it? Run bin/console helper:window:animate to get a live demo and code snippet.

Cursor

The cursor helper will let you manipulate the cursor. It provides several utility methods, each one being bound to an action:

Many other utility method are available:

Want to try it? Run bin/console helper:cursor:draw to get a live demo and code snippet.

Readline

The readline helper will help you gather inputs from the user. It provides some methods to ask and validates user's inputs:

Note that for select you can provide a special choice that will display as a separator using 'label' => ReadlineHelper::SEPARATOR items in you choices list.

Want to try it? Run bin/console helper:readline:select or bin/console helper:readline:autocomplete to get a live demo and code snippet.

Pager

The pager helper will let you display outputs through a pager so the user can easily read and scroll. The helper provides two pagers: less and more. You will have to feed them using a closure wrapping code producing output:

Want to try it? Run bin/console helper:pager:less or bin/console helper:pager:more to get a live demo and code snippet.

Tput

The tput helper will help you get informed about user's terminal capabilities. The helper provides a single entry point to all capabilities: the get method. Here is how you would do to get the clear_screen capability:

Want to try it? Run bin/console helper:tput:capabilities or bin/console helper:tput:echo or bin/console helper:tput:get to get a live demo and code snippet.


All versions of symfony-console-bridge with dependencies

PHP Build Version
Package Version
Requires php Version >=5.3.3
hoa/console Version >=1.0,<3.0
symfony/console Version ~2.3,>=2.3.6|~3.0.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 hoathis/symfony-console-bridge contains the following files

Loading the files please wait ....