Download the PHP package issei-m/sf-dependency-injection-plugin without Composer

On this page you can find all versions of the php package issei-m/sf-dependency-injection-plugin. 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 sf-dependency-injection-plugin

sfDependencyInjectionPlugin

Build Status

Provides integration Symfony2's Dependency Injection component with your older symfony (1.4+) project.

Installation

Using Composer would be best way:

Here, Composer would install this plugin in your plugins directory and some other libraries plugin depends on into vendor.

If you don't use Composer, you need to install this plugin and some others manually.

Usage

First, create your services.yml in %SF_ROOT%/config/services.yml. It can be defined your parameters/services to each different environments.

Something like:

The services.yml is supporting the configuratoin cascade like the settings.yml, and it can be located in several different config directory for apps (e.g.apps/frontend/config). When the ServiceContainer is compiled, the values from these are merged.

Next, enable this plugin at your ProjectConfiguration:

Now, your sfContext has installed Symfony's service container, it is used as following in your code:

If you use lexpress/symfony1, sfServiceContainer is replaced with plugin's service container. But it might work almost as well as framework's one:

At task

Even though you don't initialize the sfContext at task, you can initialize the service container manually like this:

Event

When container is compiled, service_container.build event is fired. You can expand container definitions if you subscribe this event.

It means you can have control your service container as you wish with your own extension, compiler pass etc...:


All versions of sf-dependency-injection-plugin with dependencies

PHP Build Version
Package Version
Requires symfony/dependency-injection Version ~2.7
symfony/config Version ~2.7
composer/installers Version ~1.0.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 issei-m/sf-dependency-injection-plugin contains the following files

Loading the files please wait ....