Download the PHP package php-di/kernel without Composer

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

PHP-DI application kernel

Kernel for building modules with PHP-DI.

Build Status Coverage Status

Introduction

The Kernel let's you build an application based on PHP-DI modules.

Installation

Usage

The kernel's role is to create the container. It does so by registering all the configuration files of the modules we ask it to load:

If you want to register configuration on the container, you can:

Installing a module

To install a 3rd party module:

Creating a module

  1. the Composer package name is the module name
  2. create a resource directory in your package, usually res/
  3. create as many PHP-DI configuration files as needed in res/config/

That's it. Here is what your package should look like:

When the module is registered in the kernel like this:

all the files in vendor/foo/bar/res/config/*.php will be loaded.

Your main application will probably contain configuration files too: it is also a module. Since it may not have a package name in composer.json you will need to set one. You can name it app, for example:

That way you can let the kernel load your application as a module:

Environments

Applications often need to behave differently according to the environment: dev, prod, etc.

PHP-DI's Kernel let you write config for specific environments through a simple convention:

You can then instruct the environment to load:

Note that environments are optional.


All versions of kernel with dependencies

PHP Build Version
Package Version
Requires php Version ^7.0
php-di/php-di Version ^6.0
mindplay/composer-locator Version ^2.1.2
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 php-di/kernel contains the following files

Loading the files please wait ....