Download the PHP package vherus/depot without Composer

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

Depot - PHP Command Bus

Build Status Scrutinizer Code Quality

Install

composer require vherus/depot

Usage

Out of the box, there are two ways to use Depot. You can either explicitly provide a map of commands => handlers, or (my favourite) you can use the NativeNamespaceResolver to automatically resolve your handlers.

First, we'll look at the automatic resolver.

The NativeNamespaceResolver will look in the commands current directory and a subdirectory of Handler and Handlers to try and resolve the correct handler for the given command. If it's unable to resolve it, it'll throw a Depot\Exception\UnresolvableHandlerException.

So all you need to do is create your command:

And a handler with the same name, suffixed with 'Handler', in either the current namespace or a sub-namespace named 'Handler' or 'Handlers'.

Alternatively, you can use the map resolver to be more explicit about your handler resolutions.

Decoration

Depot does not come with any "decorators" out of the box; at least, not yet. However, since Depot is rather simple, it's very easy to decorate. You could, for example, create your own implementation of the Depot CommandBus interface and pass the provided NativeCommandBus into it.

For example:

Framework Specifics

Laravel

I'm not in the habit of creating "ServiceProviders" and "Laravel Bridges" - I feel it's important that you be able to decide exactly how to use any given package. However, I have included an adapter for the Laravel IoC container.

To set up Depot with Laravel, you could simply add something like the below to your AppServiceProvider:

This will allow you to go ahead an inject Depot\CommandBus as a dependency into your classes as normal.

Note: I have no intention of providing a "facade".


All versions of depot with dependencies

PHP Build Version
Package Version
Requires php Version >=7.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 vherus/depot contains the following files

Loading the files please wait ....