Download the PHP package robotusers/cakephp-tactician without Composer

On this page you can find all versions of the php package robotusers/cakephp-tactician. 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 cakephp-tactician

CakePHP Tactician

Build Status codecov

CakePHP plugin for league/tactician.

NOTE: The plugin is under development.

Installation

Using the plugin

CakePHP integration

This plugin provides Controller and Model integration through Commander library.

Commander is a command bus abstraction library for PHP which enables you to decouple your code from a concrete command bus implementation.

Using the Commander (PHP 7.1+)

Install robotusers/commander:

Set up your controllers:

For more information, read the docs.

Next you should configure the command bus which will be injected into your controllers and models that implement the CommandBusAwareInterface.

Console (CakePHP 3.6+)

For console integration Tactician plugin provides a CommandFactory that injects a command bus into compatible console shells and commands.

Set up your CommandRunner as below:

Application hook (CakePHP 3.3+)

If your application supports middleware you can configure the command bus using an application hook.

You can use helper factory methods for building CommandBus or CakePHP convention enabled CommandHandlerMiddleware:

The command bus configured here will be injected into controllers and models in Model.initialize and Controller.initialize event listener.

Bootstrap

If you're still on pre 3.3 stack you can set up the listener in your bootstrap.php file.

You can use build in quick start class:

QuickStart can load simple CakePHP convention enabled bus if it hasn't been provided:

Conventions locator

CakePHP Conventions locator will look for command handlers based on a convention, that commands should reside under App\Model\Command\ namespace and be suffixed with Command string and handlers should reside under App\Model\Handler\ namespace and be suffixed with Handler string.

In this example App\Model\Command\MakeOrderCommand command will map to App\Model\Handler\MakeOrderHandler handler.

You can change default namespace and suffix using configuration options:

In this example App\Command\MakeOrder command will map to App\Handler\MakeOrder handler. Note a different namespace and no suffix.

Transaction middleware

Transaction middleware is a wrapper for CakePHP ConnectionInterface::transactional(). You need to provide a list of supported commands.

A list supports FQCN or convention supported name (eq Plugin.Name).

This will wrap only Foo and Bar commands in a transaction:

You can include all commands by setting the $commands argument to true and exclude only some commands.

This will wrap all commands in a transaction with an exception for Foo and Bar commands:


All versions of cakephp-tactician with dependencies

PHP Build Version
Package Version
Requires php Version >=7.2
league/tactician Version ^1.0
cakephp/core Version ~4.0
cakephp/datasource Version ~4.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 robotusers/cakephp-tactician contains the following files

Loading the files please wait ....