Download the PHP package power-modules/console without Composer

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

Packagist Version PHP Version

A PowerModuleSetup extension for the Power Modules Framework that auto-discovers and registers Symfony Console commands from your modules.

Why a separate interface?

The framework's ExportsComponents is for sharing services between modules via ImportsComponentsSetup — it belongs to inter-module dependency wiring. Console commands are not services another module imports; they are an outward-facing capability of a module. This package introduces ProvidesConsoleCommands to express that cleanly, without conflating command registration with cross-module service sharing.

Installation

Quick Start

1. Create a command in your module:

2. Implement ProvidesConsoleCommands in your module:

3. Add the setup to your application:

4. Run your commands:

How It Works

ConsoleCommandsSetup uses the framework's two-phase setup lifecycle:

PRE phase — for each module implementing ProvidesConsoleCommands, iterates getConsoleCommands() and reads the #[AsCommand] attribute on each class to build a name → class-string command map.

POST phase — two steps:

  1. Application registration (once, on the first module): creates a ContainerCommandLoader from the collected command map and registers a Console\Application in the root container. If an Application is already present there (e.g. pre-registered by another module), it is reused rather than replaced.

  2. Command bridging (per ProvidesConsoleCommands module): registers each command class in the root container, resolved from the module's own container. This keeps each command's DI wiring private to its module while making the command resolvable by the ContainerCommandLoader.

Commands are lazily instantiated — the container resolves a command only when it is actually executed.

Requirements

Architecture

Contributing

Contributions are welcome. This project follows the same standards as the Power Modules Framework:

License

MIT License. See LICENSE for details.


Part of the Power Modules Framework ecosystem.


All versions of console with dependencies

PHP Build Version
Package Version
Requires php Version ^8.4
power-modules/framework Version ^2.2
symfony/console Version ^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 power-modules/console contains the following files

Loading the files please wait ...