Download the PHP package mnapoli/fluent-symfony without Composer

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

Fluent configuration for Symfony

Build Status

This package offers an alternative configuration syntax for Symfony's container, inspired by PHP-DI's configuration.

Why?

The main goal is to benefit from stricter analysis from the PHP engine and IDEs. If you are interested you can also read why YAML was replaced by a similar syntax in PHP-DI 5.

Comparison with existing formats

Currently, in Symfony, you can configure the container using:

With this package, you can now use a 4th alternative:

Installation

To enable the new format in a Symfony fullstack application, simply import the EnableFluentConfig trait in app/AppKernel.php, for example:

You can now either:

Be advised that PHP config files in the "traditional" form (see the documentation) are still supported and will continue to work.

Syntax

A configuration file must return a PHP array. In that array, parameters, services and imports are defined altogether:

Parameters

Parameters are declared as simple values:

This is the same as:

Parameters and services can be mixed in the same array.

Services

Services can be declared simply using the create() function helper:

When calling $container->get('mailer') an instance of the Mailer class will be created and returned.

This is the same as:

Using the class name as the entry ID

If the container entry ID is a class name, you can skip it when calling create().

Autowiring

Services can also be automatically wired using the autowire() function helper in place of create():

This is the same as:

Constructor arguments

This is the same as:

Dependencies

Parameters can be injected using the '%foo%' syntax:

This is the same as:

Services can be injected using the get() function helper:

This is the same as:

Setter injection

This is the same as:

Property injection

This is the same as:

Optional service references

Services can have optional dependencies, so that the dependency is not required for it to work.

Setting missing dependencies to null

This is the same as :

Ignore missing dependencies

When used with setter injection, it's possible to remove the method call using ignoreIfMissing() :

This is the same as :

Private Services

This is the same as:

Decorated services

Services can be decorated with the decorate() method

This is the same as:

If you want to apply more than one decorator to a service, you can change the inner service name (IE the decorated service) and configure the priority of decoration :

This is the same as:

Non shared services

All services are shared by default. You can force the container to always create a new instance using the unshared() function helper:

This is the same as:

yaml

services: app.phpmailer: class: AppBundle\Mail\PhpMailer synthetic: true yaml services: newsletter_manager: factory: ['AppBundle\Email\NewsletterManager', 'create'] class: 'AppBundle\Email\NewsletterManager' arguments: ['foo', 'bar'] yaml services: app.phpmailer: class: AppBundle\Mail\PhpMailer app.mailer: alias: app.phpmailer yaml

services: app.phpmailer: class: AppBundle\Mail\PhpMailer app.mailer: alias: app.phpmailer public: false yaml services: mailer: class: Mailer tags:


All versions of fluent-symfony with dependencies

PHP Build Version
Package Version
Requires php Version >=7.0
symfony/dependency-injection Version ^3.2
symfony/config Version ^3.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 mnapoli/fluent-symfony contains the following files

Loading the files please wait ....