Download the PHP package echo-fusion/contracts without Composer

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

Contracts

CI Packagist PHP

Welcome to the EchoFusion Contracts repository! This package defines the core interfaces and abstractions that are shared across the EchoFusion framework, ensuring consistency and flexibility in how components interact with each other.

Part of EchoFusion, a modular PHP framework built from small packages.

Installation

Requirements

What is inside

Every interface lives in the namespace EchoFusion\Contracts\<Package>. A package depends on this one instead of on another concrete package, so any implementation can be swapped for another.

Namespace Interfaces Implemented by
AuthManager AuthManagerInterface, GuardInterface, StatefulGuardInterface, UserInterface, UserProviderInterface, PasswordHasherInterface authmanager
ConfigManager ConfigInterface configmanager
DatabaseManager ConnectionInterface, DatabaseManagerInterface databasemanager
EventManager EventInterface (a PSR-14 stoppable event), EventManagerInterface (a PSR-14 dispatcher and listener provider) eventmanager
MiddlewareManager MiddlewareManagerInterface, MiddlewarePipelineInterface middlewaremanager
ModuleManager ModuleInterface, ModuleManagerInterface modulemanager
PluginManager PluginInterface (receives the container), PluginManagerInterface pluginmanager
RouteManager RouterInterface (find a route), RouteRegistrarInterface (register routes), RouteInterface (immutable definition), RouteMatchInterface, RouteMatcherInterface, RouteLoaderInterface routemanager
ServiceManager ServiceManagerInterface, SettableContainerInterface servicemanager
ServiceProvider ServiceProviderInterface any package that registers services
SessionManager SessionInterface sessionmanager
TemplateManager TemplateEngineInterface, TemplateManagerInterface templatemanager

Usage

Implement an interface in your own code, or type-hint it so any implementation can be passed in. For example, a service provider:

Upgrading from 1.x to 2.0

Change What to do
RouterInterface no longer has get(), post() ... options() They moved to RouteRegistrarInterface. Type-hint it where you register routes; the Router of routemanager implements both.
RouteInterface has no setters Routes are values: create them complete (new Route($name, $method, $path, $action, ...)).
EventManagerInterface is a PSR-14 dispatcher Call dispatch($event); trigger() is gone from the interface. detach() is part of it. EventInterface extends PSR-14's StoppableEventInterface.
PluginInterface::register() receives a container register(SettableContainerInterface $container).

Every other interface is unchanged, so packages that do not use the ones above only need their echo-fusion/contracts constraint widened to ^1.x || ^2.0.

Versioning

Contracts follow semantic versioning. A new interface or class is a minor release. Adding a method to an existing interface is a breaking change and needs a new major version.

Testing

Credits

License

The MIT License (MIT). Please see LICENSE for more information.


All versions of contracts with dependencies

PHP Build Version
Package Version
Requires php Version ~8.1.0 || ~8.2.0 || ~8.3.0
psr/http-message Version ^2.0
psr/http-server-middleware Version ^1.0
psr/container Version ^2.0
psr/event-dispatcher Version ^1.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 echo-fusion/contracts contains the following files

Loading the files please wait ...