Commit fc44ff24 authored by Fabien Potencier's avatar Fabien Potencier

added instructions on how to install dependencies need by each provider via composer

parent 1a23e6c9
......@@ -49,8 +49,7 @@ Services
Registering
-----------
Make sure you place a copy of *Doctrine DBAL* in ``vendor/doctrine-dbal``
and *Doctrine Common* in ``vendor/doctrine-common``::
.. code-block:: php
$app->register(new Silex\Provider\DoctrineServiceProvider(), array(
'db.options' => array(
......@@ -59,6 +58,17 @@ and *Doctrine Common* in ``vendor/doctrine-common``::
),
));
.. note::
Doctrine does not come with the ``silex.zip`, so you need to add Doctrine
DBAL as a dependency to your ``composer.json`` file:
.. code-block:: json
"require": {
"doctrine/dbal": "2.2.*",
}
Usage
-----
......
......@@ -21,7 +21,7 @@ Services
Registering
-----------
::
.. code-block:: php
$app->register(new Silex\Provider\HttpCacheServiceProvider(), array(
'http_cache.cache_dir' => __DIR__.'/cache/',
......
......@@ -40,8 +40,7 @@ Services
Registering
-----------
Make sure you place a copy of *Monolog* in the ``vendor/monolog``
directory::
.. code-block:: php
$app->register(new Silex\Provider\MonologServiceProvider(), array(
'monolog.logfile' => __DIR__.'/development.log',
......@@ -49,8 +48,14 @@ directory::
.. note::
Monolog is not compiled into the ``silex.phar`` file. You have to
add your own copy of Monolog to your application.
Monolog does not come with the ``silex.zip`, so you need to add it as a
dependency to your ``composer.json`` file:
.. code-block:: json
"require": {
"monolog/monolog": ">=1.0.0",
}
Usage
-----
......
......@@ -42,7 +42,7 @@ Services
Registering
-----------
::
.. code-block:: php
$app->register(new Silex\Provider\SessionServiceProvider());
......
......@@ -52,17 +52,20 @@ Services
Registering
-----------
Make sure you place a copy of *Swift Mailer* in the ``vendor/swiftmailer``
directory. Make sure you point the class path to ``/lib/classes``.
::
.. code-block:: php
$app->register(new Silex\Provider\SwiftmailerServiceProvider());
.. note::
Swift Mailer is not compiled into the ``silex.phar`` file. You have to
add your own copy of Swift Mailer to your application.
SwiftMailer does not come with the ``silex.zip`, so you need to add it as
a dependency to your ``composer.json`` file:
.. code-block:: json
"require": {
"swiftmailer/swiftmailer": ">=4.1.2,<4.2-dev"
}
Usage
-----
......
......@@ -33,11 +33,17 @@ provide you with the following additional capabilities:
Registering
-----------
Make sure you place a copy of the Symfony2 Bridges in either
``vendor/symfony/src`` by cloning `Symfony2 <https://github.com/symfony/symfony>`_ or
``vendor/symfony/src/Symfony/Bridge/Twig`` by cloning `TwigBridge <https://github.com/symfony/TwigBridge>`_
(the latter having a smaller footprint).
Then, register the provider via::
.. code-block:: php
$app->register(new Silex\Provider\SymfonyBridgesServiceProvider());
.. note::
The Symfony bridges do not come with the ``silex.zip`, so you need to add
them as a dependency to your ``composer.json`` file:
.. code-block:: json
"require": {
"symfony/twig-bridge": "2.1.*",
}
......@@ -34,13 +34,23 @@ Services
Registering
-----------
Make sure you place a copy of the Symfony2 Translation component in
``vendor/symfony/src``. You can simply clone the whole Symfony2 into vendor::
.. code-block:: php
$app->register(new Silex\Provider\TranslationServiceProvider(), array(
'locale_fallback' => 'en',
));
.. note::
The Symfony Translation component does not come with the ``silex.zip`, so
you need to add it as a dependency to your ``composer.json`` file:
.. code-block:: json
"require": {
"symfony/translation": "2.1.*"
}
Usage
-----
......
......@@ -36,8 +36,7 @@ Services
Registering
-----------
Make sure you place a copy of *Twig* in the ``vendor/twig``
directory::
.. code-block:: php
$app->register(new Silex\Provider\TwigServiceProvider(), array(
'twig.path' => __DIR__.'/views',
......@@ -45,8 +44,14 @@ directory::
.. note::
Twig is not compiled into the ``silex.phar`` file. You have to
add your own copy of Twig to your application.
Twig does not come with the ``silex.zip`, so you need to add it as a
dependency to your ``composer.json`` file:
.. code-block:: json
"require": {
"twig/twig": ">=1.8,<2.0-dev"
}
Usage
-----
......
......@@ -23,7 +23,7 @@ Services
Registering
-----------
::
.. code-block:: php
$app->register(new Silex\Provider\UrlGeneratorServiceProvider());
......
......@@ -31,11 +31,21 @@ Services
Registering
-----------
Make sure you place a copy of the Symfony2 Validator component in
``vendor/symfony/src``. You can simply clone the whole Symfony2 into vendor::
.. code-block:: php
$app->register(new Silex\Provider\ValidatorServiceProvider());
.. note::
The Symfony Validator component does not come with the ``silex.zip`, so
you need to add it as a dependency to your ``composer.json`` file:
.. code-block:: json
"require": {
"symfony/validator": "2.1.*"
}
Usage
-----
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment