Download the PHP package ssnepenthe/apheleia-cli without Composer

On this page you can find all versions of the php package ssnepenthe/apheleia-cli. 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 apheleia-cli

apheleia-cli

Apheleia CLI provides an alternate approach to writing WP-CLI commands. It eliminates the need for docblock command definitions and should allow you to take full advantage of the autocomplete features in your favorite editor.

The syntax for Apheleia commands is loosely modeled after the symfony/console package.

Warning

This package is currently in development and is subject to breaking changes without notice until v1.0 has been tagged.

It is one in a series of WordPress toys I have been working on with the intention of exploring ways to modernize the feel of working with WordPress.

As the label suggests, it should be treated as a toy.

Installation

Usage

I think this is best explained through examples, so let's demonstrate some different ways we might implement the example hello command from the WP-CLI handbook commands cookbook.

The preferred approach is to create self-contained command classes.

Extend the Command class using the configure method to define the command signature and the handle method to define the command logic to be executed when the command is called:

Commands are registered using the CommandRegistry.

There is a significant difference between the command we have created and the original version: WP-CLI does not have any description text to display for the parent example command when you run wp help example.

There are a couple of different approaches we can take to fix this.

The first is to register a dedicated namespace alongside our HelloCommand:

The second is to take advantage of command groups.

First we need to remove the parent command portion of our command name:

And then we use the group method on our registry. The callback provided to the group method will receive a registry instance that has been scoped such that any commands added within the callback will automatically be registered as children of the example command:

It is also possible to define a command without extending the Command class:

Advanced Usage

By default, command handlers should be written more-or-less the same as they would if you were working directly with WP-CLI. That is to say they should always expect to receive a list of command arguments as the first parameter and an associative array of command options as the second:

However, commands can modify handler signatures by overriding their handlerInvokerClass property.

This package only ships with one alternative handler invoker: the PhpDiHandlerInvoker. It uses the php-di/invoker package to call command handlers.

Before it can be used, you must install php-di/invoker:

Then set the handler invoker on your command (or a base command from which all of your commands extend):

With this in place, command handlers can now ask for command parameters by name:


All versions of apheleia-cli with dependencies

PHP Build Version
Package Version
Requires 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 ssnepenthe/apheleia-cli contains the following files

Loading the files please wait ....