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 ...@@ -49,8 +49,7 @@ Services
Registering Registering
----------- -----------
Make sure you place a copy of *Doctrine DBAL* in ``vendor/doctrine-dbal`` .. code-block:: php
and *Doctrine Common* in ``vendor/doctrine-common``::
$app->register(new Silex\Provider\DoctrineServiceProvider(), array( $app->register(new Silex\Provider\DoctrineServiceProvider(), array(
'db.options' => array( 'db.options' => array(
...@@ -59,6 +58,17 @@ and *Doctrine Common* in ``vendor/doctrine-common``:: ...@@ -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 Usage
----- -----
......
...@@ -21,7 +21,7 @@ Services ...@@ -21,7 +21,7 @@ Services
Registering Registering
----------- -----------
:: .. code-block:: php
$app->register(new Silex\Provider\HttpCacheServiceProvider(), array( $app->register(new Silex\Provider\HttpCacheServiceProvider(), array(
'http_cache.cache_dir' => __DIR__.'/cache/', 'http_cache.cache_dir' => __DIR__.'/cache/',
......
...@@ -40,8 +40,7 @@ Services ...@@ -40,8 +40,7 @@ Services
Registering Registering
----------- -----------
Make sure you place a copy of *Monolog* in the ``vendor/monolog`` .. code-block:: php
directory::
$app->register(new Silex\Provider\MonologServiceProvider(), array( $app->register(new Silex\Provider\MonologServiceProvider(), array(
'monolog.logfile' => __DIR__.'/development.log', 'monolog.logfile' => __DIR__.'/development.log',
...@@ -49,8 +48,14 @@ directory:: ...@@ -49,8 +48,14 @@ directory::
.. note:: .. note::
Monolog is not compiled into the ``silex.phar`` file. You have to Monolog does not come with the ``silex.zip`, so you need to add it as a
add your own copy of Monolog to your application. dependency to your ``composer.json`` file:
.. code-block:: json
"require": {
"monolog/monolog": ">=1.0.0",
}
Usage Usage
----- -----
......
...@@ -42,7 +42,7 @@ Services ...@@ -42,7 +42,7 @@ Services
Registering Registering
----------- -----------
:: .. code-block:: php
$app->register(new Silex\Provider\SessionServiceProvider()); $app->register(new Silex\Provider\SessionServiceProvider());
......
...@@ -52,17 +52,20 @@ Services ...@@ -52,17 +52,20 @@ Services
Registering Registering
----------- -----------
Make sure you place a copy of *Swift Mailer* in the ``vendor/swiftmailer`` .. code-block:: php
directory. Make sure you point the class path to ``/lib/classes``.
::
$app->register(new Silex\Provider\SwiftmailerServiceProvider()); $app->register(new Silex\Provider\SwiftmailerServiceProvider());
.. note:: .. note::
Swift Mailer is not compiled into the ``silex.phar`` file. You have to SwiftMailer does not come with the ``silex.zip`, so you need to add it as
add your own copy of Swift Mailer to your application. a dependency to your ``composer.json`` file:
.. code-block:: json
"require": {
"swiftmailer/swiftmailer": ">=4.1.2,<4.2-dev"
}
Usage Usage
----- -----
......
...@@ -33,11 +33,17 @@ provide you with the following additional capabilities: ...@@ -33,11 +33,17 @@ provide you with the following additional capabilities:
Registering Registering
----------- -----------
Make sure you place a copy of the Symfony2 Bridges in either .. code-block:: php
``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::
$app->register(new Silex\Provider\SymfonyBridgesServiceProvider()); $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 ...@@ -34,13 +34,23 @@ Services
Registering Registering
----------- -----------
Make sure you place a copy of the Symfony2 Translation component in .. code-block:: php
``vendor/symfony/src``. You can simply clone the whole Symfony2 into vendor::
$app->register(new Silex\Provider\TranslationServiceProvider(), array( $app->register(new Silex\Provider\TranslationServiceProvider(), array(
'locale_fallback' => 'en', '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 Usage
----- -----
......
...@@ -36,8 +36,7 @@ Services ...@@ -36,8 +36,7 @@ Services
Registering Registering
----------- -----------
Make sure you place a copy of *Twig* in the ``vendor/twig`` .. code-block:: php
directory::
$app->register(new Silex\Provider\TwigServiceProvider(), array( $app->register(new Silex\Provider\TwigServiceProvider(), array(
'twig.path' => __DIR__.'/views', 'twig.path' => __DIR__.'/views',
...@@ -45,8 +44,14 @@ directory:: ...@@ -45,8 +44,14 @@ directory::
.. note:: .. note::
Twig is not compiled into the ``silex.phar`` file. You have to Twig does not come with the ``silex.zip`, so you need to add it as a
add your own copy of Twig to your application. dependency to your ``composer.json`` file:
.. code-block:: json
"require": {
"twig/twig": ">=1.8,<2.0-dev"
}
Usage Usage
----- -----
......
...@@ -23,7 +23,7 @@ Services ...@@ -23,7 +23,7 @@ Services
Registering Registering
----------- -----------
:: .. code-block:: php
$app->register(new Silex\Provider\UrlGeneratorServiceProvider()); $app->register(new Silex\Provider\UrlGeneratorServiceProvider());
......
...@@ -31,11 +31,21 @@ Services ...@@ -31,11 +31,21 @@ Services
Registering Registering
----------- -----------
Make sure you place a copy of the Symfony2 Validator component in .. code-block:: php
``vendor/symfony/src``. You can simply clone the whole Symfony2 into vendor::
$app->register(new Silex\Provider\ValidatorServiceProvider()); $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 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