Download the PHP package netglue/laminas-symfony-console without Composer

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

Laminas/Mezzio + Symfony Console Bootstrap

PHPUnit Test Suite codecov

Project Abandoned

Laminas CLI has been released - please use that instead: https://github.com/laminas/laminas-cli

Introduction

This very small component provides a couple of PSR-11 factories and opinionated configuration to get Symfony’s CLI tooling bootstrapped quickly in a Mezzio application (It might also play nice with Laminas MVC but I don’t really use that anymore…).

At the time of writing, I was unaware of laminas/laminas-cli which does all the things this lib does and more.

Once laminas-cli is released, I will likely kill this lib off, so you should probably just go and check out the official Laminas component, that said, it hasn't been released yet so if you want something to install now, this lib will also load commands listed under config.laminas-cli.commands, so you can list your commands there and then swap out this library with Laminas CLI when it's released.

Anyhow, this lib assumes that you'll probably be using a PSR-11 compatible container and that you will want to use that container to lazy load your console commands.

Installation

During installation into a Mezzio app you should be asked to inject configuration in the same way as other laminas components thanks to the Laminas component installer. If you choose not to do this, or want to set things up manually, then you should include src/ConfigProvider.php somewhere in your config.

Handy binary…

A "binary" is shipped so that you can call vendor/bin/cli my:command once you're all setup. You can set the name of the application displayed on the console by setting a configuration value in console.name.

As environments and paths differ, this 'binary' will simply try to locate the root of project and then look for config/container.php in order to get hold of the container from this conventional location. There's a good chance this might not work in your setup, but making a binary like this is pretty trivial and would look similar to the following:

Configuration

Commands are made available to the container-based command loader by configuring a map of command:name => CommandName::class, for example:

Auto-Add InvokableFactory…

It's expected that you will write factories for your commands, but the container loader factory will observe whether a) the container is an instance of the Laminas Service Manager and b) whether the feature has been enabled and automatically register an invokable factory for any command that is not present in the container.

This feature is opt-in, therefore you have to explicitly enable it by setting console.auto_add_invokable_factory to true.

fin.


All versions of laminas-symfony-console with dependencies

PHP Build Version
Package Version
Requires php Version >=7.3
psr/container Version ^1.0
symfony/console Version ^5
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 netglue/laminas-symfony-console contains the following files

Loading the files please wait ....