Commit 1c86d1a8 authored by Fabien Potencier's avatar Fabien Potencier

use https whenever possible

parent c24aab49
...@@ -2,7 +2,7 @@ Silex, a simple Web Framework ...@@ -2,7 +2,7 @@ Silex, a simple Web Framework
============================= =============================
**WARNING**: Silex is in maintenance mode only. Ends of life is set to June **WARNING**: Silex is in maintenance mode only. Ends of life is set to June
2018. Read more on `Symfony's blog <http://symfony.com/blog/the-end-of-silex>`_. 2018. Read more on `Symfony's blog <https://symfony.com/blog/the-end-of-silex>`_.
Silex is a PHP micro-framework to develop websites based on `Symfony Silex is a PHP micro-framework to develop websites based on `Symfony
components`_: components`_:
...@@ -62,8 +62,8 @@ License ...@@ -62,8 +62,8 @@ License
Silex is licensed under the MIT license. Silex is licensed under the MIT license.
.. _Symfony components: http://symfony.com .. _Symfony components: https://symfony.com
.. _Composer: http://getcomposer.org .. _Composer: https://getcomposer.org
.. _PHPUnit: https://phpunit.de .. _PHPUnit: https://phpunit.de
.. _silex.zip: https://silex.symfony.com/download .. _silex.zip: https://silex.symfony.com/download
.. _documentation: https://silex.symfony.com/documentation .. _documentation: https://silex.symfony.com/documentation
......
...@@ -10,7 +10,7 @@ intend to submit. ...@@ -10,7 +10,7 @@ intend to submit.
You can find more details about CSRF Protection and CSRF token in the You can find more details about CSRF Protection and CSRF token in the
`Symfony Book `Symfony Book
<http://symfony.com/doc/current/book/forms.html#csrf-protection>`_. <https://symfony.com/doc/current/book/forms.html#csrf-protection>`_.
In some cases (for example, when embedding a form in an html email) you might In some cases (for example, when embedding a form in an html email) you might
want not to use this protection. The easiest way to avoid this is to want not to use this protection. The easiest way to avoid this is to
...@@ -33,4 +33,4 @@ This specific example showed how to change the ``csrf_protection`` in the ...@@ -33,4 +33,4 @@ This specific example showed how to change the ``csrf_protection`` in the
``$options`` parameter of the ``createBuilder()`` function. More of them could ``$options`` parameter of the ``createBuilder()`` function. More of them could
be passed through this parameter, it is as simple as using the Symfony be passed through this parameter, it is as simple as using the Symfony
``getDefaultOptions()`` method in your form classes. `See more here ``getDefaultOptions()`` method in your form classes. `See more here
<http://symfony.com/doc/current/book/forms.html#book-form-creating-form-classes>`_. <https://symfony.com/doc/current/book/forms.html#book-form-creating-form-classes>`_.
...@@ -181,4 +181,4 @@ under different conditions: ...@@ -181,4 +181,4 @@ under different conditions:
# the homepage controller is executed: the page loads normally # the homepage controller is executed: the page loads normally
For more details read the Symfony cookbook entry on For more details read the Symfony cookbook entry on
`How to Create a Custom Authentication System with Guard <http://symfony.com/doc/current/cookbook/security/guard-authentication.html>`_. `How to Create a Custom Authentication System with Guard <https://symfony.com/doc/current/cookbook/security/guard-authentication.html>`_.
...@@ -7,10 +7,10 @@ medium to large websites use a database to store sessions instead of files, ...@@ -7,10 +7,10 @@ medium to large websites use a database to store sessions instead of files,
because databases are easier to use and scale in a multi-webserver environment. because databases are easier to use and scale in a multi-webserver environment.
Symfony's `NativeSessionStorage Symfony's `NativeSessionStorage
<http://api.symfony.com/master/Symfony/Component/HttpFoundation/Session/Storage/NativeSessionStorage.html>`_ <https://api.symfony.com/master/Symfony/Component/HttpFoundation/Session/Storage/NativeSessionStorage.html>`_
has multiple storage handlers and one of them uses PDO to store sessions, has multiple storage handlers and one of them uses PDO to store sessions,
`PdoSessionHandler `PdoSessionHandler
<http://api.symfony.com/master/Symfony/Component/HttpFoundation/Session/Storage/Handler/PdoSessionHandler.html>`_. <https://api.symfony.com/master/Symfony/Component/HttpFoundation/Session/Storage/Handler/PdoSessionHandler.html>`_.
To use it, replace the ``session.storage.handler`` service in your application To use it, replace the ``session.storage.handler`` service in your application
like explained below. like explained below.
...@@ -86,4 +86,4 @@ PdoSessionStorage needs a database table with 3 columns: ...@@ -86,4 +86,4 @@ PdoSessionStorage needs a database table with 3 columns:
You can find examples of SQL statements to create the session table in the You can find examples of SQL statements to create the session table in the
`Symfony cookbook `Symfony cookbook
<http://symfony.com/doc/current/cookbook/configuration/pdo_session_storage.html#example-sql-statements>`_ <https://symfony.com/doc/current/cookbook/configuration/pdo_session_storage.html#example-sql-statements>`_
...@@ -11,20 +11,20 @@ Application ...@@ -11,20 +11,20 @@ Application
The application is the main interface to Silex. It implements Symfony's The application is the main interface to Silex. It implements Symfony's
`HttpKernelInterface `HttpKernelInterface
<http://api.symfony.com/master/Symfony/Component/HttpKernel/HttpKernelInterface.html>`_, <https://api.symfony.com/master/Symfony/Component/HttpKernel/HttpKernelInterface.html>`_,
so you can pass a `Request so you can pass a `Request
<http://api.symfony.com/master/Symfony/Component/HttpFoundation/Request.html>`_ <https://api.symfony.com/master/Symfony/Component/HttpFoundation/Request.html>`_
to the ``handle`` method and it will return a `Response to the ``handle`` method and it will return a `Response
<http://api.symfony.com/master/Symfony/Component/HttpFoundation/Response.html>`_. <https://api.symfony.com/master/Symfony/Component/HttpFoundation/Response.html>`_.
It extends the ``Pimple`` service container, allowing for flexibility on the It extends the ``Pimple`` service container, allowing for flexibility on the
outside as well as the inside. You could replace any service, and you are also outside as well as the inside. You could replace any service, and you are also
able to read them. able to read them.
The application makes strong use of the `EventDispatcher The application makes strong use of the `EventDispatcher
<http://api.symfony.com/master/Symfony/Component/EventDispatcher/EventDispatcher <https://api.symfony.com/master/Symfony/Component/EventDispatcher/EventDispatcher
.html>`_ to hook into the Symfony `HttpKernel .html>`_ to hook into the Symfony `HttpKernel
<http://api.symfony.com/master/Symfony/Component/HttpKernel/HttpKernel.html>`_ <https://api.symfony.com/master/Symfony/Component/HttpKernel/HttpKernel.html>`_
events. This allows fetching the ``Request``, converting string responses into events. This allows fetching the ``Request``, converting string responses into
``Response`` objects and handling Exceptions. We also use it to dispatch some ``Response`` objects and handling Exceptions. We also use it to dispatch some
custom events like before/after middlewares and errors. custom events like before/after middlewares and errors.
...@@ -33,7 +33,7 @@ Controller ...@@ -33,7 +33,7 @@ Controller
~~~~~~~~~~ ~~~~~~~~~~
The Symfony `Route The Symfony `Route
<http://api.symfony.com/master/Symfony/Component/Routing/Route.html>`_ is <https://api.symfony.com/master/Symfony/Component/Routing/Route.html>`_ is
actually quite powerful. Routes can be named, which allows for URL generation. actually quite powerful. Routes can be named, which allows for URL generation.
They can also have requirements for the variable parts. In order to allow They can also have requirements for the variable parts. In order to allow
setting these through a nice interface, the ``match`` method (which is used by setting these through a nice interface, the ``match`` method (which is used by
...@@ -44,7 +44,7 @@ ControllerCollection ...@@ -44,7 +44,7 @@ ControllerCollection
~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~
One of the goals of exposing the `RouteCollection One of the goals of exposing the `RouteCollection
<http://api.symfony.com/master/Symfony/Component/Routing/RouteCollection.html>`_ <https://api.symfony.com/master/Symfony/Component/Routing/RouteCollection.html>`_
was to make it mutable, so providers could add stuff to it. The challenge here was to make it mutable, so providers could add stuff to it. The challenge here
is the fact that routes know nothing about their name. The name only has is the fact that routes know nothing about their name. The name only has
meaning in context of the ``RouteCollection`` and cannot be changed. meaning in context of the ``RouteCollection`` and cannot be changed.
...@@ -81,4 +81,4 @@ Following Symfony components are used by Silex: ...@@ -81,4 +81,4 @@ Following Symfony components are used by Silex:
* **EventDispatcher**: For hooking into the HttpKernel. * **EventDispatcher**: For hooking into the HttpKernel.
For more information, `check out the Symfony website <http://symfony.com/>`_. For more information, `check out the Symfony website <https://symfony.com/>`_.
...@@ -45,6 +45,6 @@ is sent back to the client. ...@@ -45,6 +45,6 @@ is sent back to the client.
Finally, the app is run. Visit ``/hello/world`` to see the result. It's really Finally, the app is run. Visit ``/hello/world`` to see the result. It's really
that easy! that easy!
.. _Symfony: http://symfony.com/ .. _Symfony: https://symfony.com/
.. _Pimple: https://pimple.symfony.com/ .. _Pimple: https://pimple.symfony.com/
.. _Sinatra: http://www.sinatrarb.com/ .. _Sinatra: http://www.sinatrarb.com/
...@@ -15,7 +15,7 @@ Services ...@@ -15,7 +15,7 @@ Services
* **csrf.token_manager**: An instance of an implementation of the * **csrf.token_manager**: An instance of an implementation of the
`CsrfTokenManagerInterface `CsrfTokenManagerInterface
<http://api.symfony.com/master/Symfony/Component/Security/Csrf/CsrfTokenManagerInterface.html>`_, <https://api.symfony.com/master/Symfony/Component/Security/Csrf/CsrfTokenManagerInterface.html>`_,
Registering Registering
----------- -----------
...@@ -29,7 +29,7 @@ Registering ...@@ -29,7 +29,7 @@ Registering
.. note:: .. note::
Add the Symfony's `Security CSRF Component Add the Symfony's `Security CSRF Component
<http://symfony.com/doc/current/components/security/index.html>`_ as a <https://symfony.com/doc/current/components/security/index.html>`_ as a
dependency: dependency:
.. code-block:: bash .. code-block:: bash
......
...@@ -2,7 +2,7 @@ Doctrine ...@@ -2,7 +2,7 @@ Doctrine
======== ========
The *DoctrineServiceProvider* provides integration with the `Doctrine DBAL The *DoctrineServiceProvider* provides integration with the `Doctrine DBAL
<http://www.doctrine-project.org/projects/dbal>`_ for easy database access <https://www.doctrine-project.org/projects/dbal>`_ for easy database access
(Doctrine ORM integration is **not** supplied). (Doctrine ORM integration is **not** supplied).
Parameters Parameters
...@@ -36,7 +36,7 @@ Parameters ...@@ -36,7 +36,7 @@ Parameters
specifies the port of the database to connect to. specifies the port of the database to connect to.
These and additional options are described in detail in the `Doctrine DBAL These and additional options are described in detail in the `Doctrine DBAL
configuration documentation <http://docs.doctrine-project.org/projects/doctrine-dbal/en/latest/reference/configuration.html>`_. configuration documentation <https://docs.doctrine-project.org/projects/doctrine-dbal/en/latest/reference/configuration.html>`_.
Services Services
-------- --------
...@@ -134,4 +134,4 @@ Using multiple connections:: ...@@ -134,4 +134,4 @@ Using multiple connections::
}); });
For more information, consult the `Doctrine DBAL documentation For more information, consult the `Doctrine DBAL documentation
<http://docs.doctrine-project.org/projects/doctrine-dbal/en/latest/>`_. <https://docs.doctrine-project.org/projects/doctrine-dbal/en/latest/>`_.
...@@ -13,7 +13,7 @@ Services ...@@ -13,7 +13,7 @@ Services
-------- --------
* **form.factory**: An instance of `FormFactory * **form.factory**: An instance of `FormFactory
<http://api.symfony.com/master/Symfony/Component/Form/FormFactory.html>`_, <https://api.symfony.com/master/Symfony/Component/Form/FormFactory.html>`_,
that is used to build a form. that is used to build a form.
Registering Registering
...@@ -213,4 +213,4 @@ Traits ...@@ -213,4 +213,4 @@ Traits
$app->namedForm($name, $data, $options, $type); $app->namedForm($name, $data, $options, $type);
For more information, consult the `Symfony Forms documentation For more information, consult the `Symfony Forms documentation
<http://symfony.com/doc/current/forms.html>`_. <https://symfony.com/doc/current/forms.html>`_.
...@@ -10,21 +10,21 @@ Parameters ...@@ -10,21 +10,21 @@ Parameters
* **http_cache.cache_dir**: The cache directory to store the HTTP cache data. * **http_cache.cache_dir**: The cache directory to store the HTTP cache data.
* **http_cache.options** (optional): An array of options for the `HttpCache * **http_cache.options** (optional): An array of options for the `HttpCache
<http://api.symfony.com/master/Symfony/Component/HttpKernel/HttpCache/HttpCache.html>`_ <https://api.symfony.com/master/Symfony/Component/HttpKernel/HttpCache/HttpCache.html>`_
constructor. constructor.
Services Services
-------- --------
* **http_cache**: An instance of `HttpCache * **http_cache**: An instance of `HttpCache
<http://api.symfony.com/master/Symfony/Component/HttpKernel/HttpCache/HttpCache.html>`_. <https://api.symfony.com/master/Symfony/Component/HttpKernel/HttpCache/HttpCache.html>`_.
* **http_cache.esi**: An instance of `Esi * **http_cache.esi**: An instance of `Esi
<http://api.symfony.com/master/Symfony/Component/HttpKernel/HttpCache/Esi.html>`_, <https://api.symfony.com/master/Symfony/Component/HttpKernel/HttpCache/Esi.html>`_,
that implements the ESI capabilities to Request and Response instances. that implements the ESI capabilities to Request and Response instances.
* **http_cache.store**: An instance of `Store * **http_cache.store**: An instance of `Store
<http://api.symfony.com/master/Symfony/Component/HttpKernel/HttpCache/Store.html>`_, <https://api.symfony.com/master/Symfony/Component/HttpKernel/HttpCache/Store.html>`_,
that implements all the logic for storing cache metadata (Request and Response that implements all the logic for storing cache metadata (Request and Response
headers). headers).
...@@ -56,7 +56,7 @@ setting Response HTTP cache headers:: ...@@ -56,7 +56,7 @@ setting Response HTTP cache headers::
If you want Silex to trust the ``X-Forwarded-For*`` headers from your If you want Silex to trust the ``X-Forwarded-For*`` headers from your
reverse proxy at address $ip, you will need to whitelist it as documented reverse proxy at address $ip, you will need to whitelist it as documented
in `Trusting Proxies in `Trusting Proxies
<http://symfony.com/doc/current/components/http_foundation/trusting_proxies.html>`_. <https://symfony.com/doc/current/components/http_foundation/trusting_proxies.html>`_.
If you would be running Varnish in front of your application on the same machine:: If you would be running Varnish in front of your application on the same machine::
...@@ -125,4 +125,4 @@ overall performance:: ...@@ -125,4 +125,4 @@ overall performance::
Finally, check that your Web server does not override your caching strategy. Finally, check that your Web server does not override your caching strategy.
For more information, consult the `Symfony HTTP Cache documentation For more information, consult the `Symfony HTTP Cache documentation
<http://symfony.com/doc/current/book/http_cache.html>`_. <https://symfony.com/doc/current/book/http_cache.html>`_.
...@@ -20,7 +20,7 @@ Services ...@@ -20,7 +20,7 @@ Services
-------- --------
* **fragment.handler**: An instance of `FragmentHandler * **fragment.handler**: An instance of `FragmentHandler
<http://api.symfony.com/master/Symfony/Component/HttpKernel/Fragment/FragmentHandler.html>`_. <https://api.symfony.com/master/Symfony/Component/HttpKernel/Fragment/FragmentHandler.html>`_.
* **fragment.renderers**: An array of fragment renderers (by default, the * **fragment.renderers**: An array of fragment renderers (by default, the
inline, ESI, and HInclude renderers are pre-configured). inline, ESI, and HInclude renderers are pre-configured).
......
...@@ -65,5 +65,5 @@ Options ...@@ -65,5 +65,5 @@ Options
* **remember_me_parameter**: Name of the request parameter enabling remember_me * **remember_me_parameter**: Name of the request parameter enabling remember_me
on login. To add the checkbox to the login form. You can find more on login. To add the checkbox to the login form. You can find more
information in the `Symfony cookbook information in the `Symfony cookbook
<http://symfony.com/doc/current/cookbook/security/remember_me.html>`_ <https://symfony.com/doc/current/cookbook/security/remember_me.html>`_
(default: ``_remember_me``). (default: ``_remember_me``).
...@@ -14,9 +14,9 @@ Services ...@@ -14,9 +14,9 @@ Services
-------- --------
* **url_generator**: An instance of `UrlGenerator * **url_generator**: An instance of `UrlGenerator
<http://api.symfony.com/master/Symfony/Component/Routing/Generator/UrlGenerator.html>`_, <https://api.symfony.com/master/Symfony/Component/Routing/Generator/UrlGenerator.html>`_,
using the `RouteCollection using the `RouteCollection
<http://api.symfony.com/master/Symfony/Component/Routing/RouteCollection.html>`_ <https://api.symfony.com/master/Symfony/Component/Routing/RouteCollection.html>`_
that is provided through the ``routes`` service. It has a ``generate`` that is provided through the ``routes`` service. It has a ``generate``
method, which takes the route name as an argument, followed by an array of method, which takes the route name as an argument, followed by an array of
route parameters. route parameters.
......
...@@ -27,11 +27,11 @@ Services ...@@ -27,11 +27,11 @@ Services
* **security.authentication_manager**: An instance of * **security.authentication_manager**: An instance of
`AuthenticationProviderManager `AuthenticationProviderManager
<http://api.symfony.com/master/Symfony/Component/Security/Core/Authentication/AuthenticationProviderManager.html>`_, <https://api.symfony.com/master/Symfony/Component/Security/Core/Authentication/AuthenticationProviderManager.html>`_,
responsible for authentication. responsible for authentication.
* **security.access_manager**: An instance of `AccessDecisionManager * **security.access_manager**: An instance of `AccessDecisionManager
<http://api.symfony.com/master/Symfony/Component/Security/Core/Authorization/AccessDecisionManager.html>`_, <https://api.symfony.com/master/Symfony/Component/Security/Core/Authorization/AccessDecisionManager.html>`_,
responsible for authorization. responsible for authorization.
* **security.session_strategy**: Define the session strategy used for * **security.session_strategy**: Define the session strategy used for
...@@ -98,7 +98,7 @@ Usage ...@@ -98,7 +98,7 @@ Usage
The Symfony Security component is powerful. To learn more about it, read the The Symfony Security component is powerful. To learn more about it, read the
`Symfony Security documentation `Symfony Security documentation
<http://symfony.com/doc/current/security.html>`_. <https://symfony.com/doc/current/security.html>`_.
.. tip:: .. tip::
...@@ -125,7 +125,7 @@ is known, you can get it with a call to ``getUser()``:: ...@@ -125,7 +125,7 @@ is known, you can get it with a call to ``getUser()``::
The user can be a string, an object with a ``__toString()`` method, or an The user can be a string, an object with a ``__toString()`` method, or an
instance of `UserInterface instance of `UserInterface
<http://api.symfony.com/master/Symfony/Component/Security/Core/User/UserInterface.html>`_. <https://api.symfony.com/master/Symfony/Component/Security/Core/User/UserInterface.html>`_.
Securing a Path with HTTP Authentication Securing a Path with HTTP Authentication
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
...@@ -151,7 +151,7 @@ entry defines valid users. ...@@ -151,7 +151,7 @@ entry defines valid users.
If you want to restrict the firewall by more than the URL pattern (like the If you want to restrict the firewall by more than the URL pattern (like the
HTTP method, the client IP, the hostname, or any Request attributes), use an HTTP method, the client IP, the hostname, or any Request attributes), use an
instance of a `RequestMatcher instance of a `RequestMatcher
<http://api.symfony.com/master/Symfony/Component/HttpFoundation/RequestMatcher.html>`_ <https://api.symfony.com/master/Symfony/Component/HttpFoundation/RequestMatcher.html>`_
for the ``pattern`` option:: for the ``pattern`` option::
use Symfony\Component\HttpFoundation\RequestMatcher; use Symfony\Component\HttpFoundation\RequestMatcher;
...@@ -186,7 +186,7 @@ generate a valid encoded password from a raw password, use the ...@@ -186,7 +186,7 @@ generate a valid encoded password from a raw password, use the
When the user is authenticated, the user stored in the token is an instance of When the user is authenticated, the user stored in the token is an instance of
`User `User
<http://api.symfony.com/master/Symfony/Component/Security/Core/User/User.html>`_ <https://api.symfony.com/master/Symfony/Component/Security/Core/User/User.html>`_
.. caution:: .. caution::
...@@ -500,7 +500,7 @@ the case, the user will be automatically redirected). ...@@ -500,7 +500,7 @@ the case, the user will be automatically redirected).
.. note:: .. note::
The first argument can also be a `RequestMatcher The first argument can also be a `RequestMatcher
<http://api.symfony.com/master/Symfony/Component/HttpFoundation/RequestMatcher.html>`_ <https://api.symfony.com/master/Symfony/Component/HttpFoundation/RequestMatcher.html>`_
instance. instance.
Defining a custom User Provider Defining a custom User Provider
...@@ -511,7 +511,7 @@ a personal website, but you can override this default mechanism with you own. ...@@ -511,7 +511,7 @@ a personal website, but you can override this default mechanism with you own.
The ``users`` setting can be defined as a service or a service id that returns The ``users`` setting can be defined as a service or a service id that returns
an instance of `UserProviderInterface an instance of `UserProviderInterface
<http://api.symfony.com/master/Symfony/Component/Security/Core/User/UserProviderInterface.html>`_:: <https://api.symfony.com/master/Symfony/Component/Security/Core/User/UserProviderInterface.html>`_::
'users' => function () use ($app) { 'users' => function () use ($app) {
return new UserProvider($app['db']); return new UserProvider($app['db']);
...@@ -565,7 +565,7 @@ store the users:: ...@@ -565,7 +565,7 @@ store the users::
In this example, instances of the default ``User`` class are created for the In this example, instances of the default ``User`` class are created for the
users, but you can define your own class; the only requirement is that the users, but you can define your own class; the only requirement is that the
class must implement `UserInterface class must implement `UserInterface
<http://api.symfony.com/master/Symfony/Component/Security/Core/User/UserInterface.html>`_ <https://api.symfony.com/master/Symfony/Component/Security/Core/User/UserInterface.html>`_
And here is the code that you can use to create the database schema and some And here is the code that you can use to create the database schema and some
sample users:: sample users::
...@@ -752,4 +752,4 @@ Traits ...@@ -752,4 +752,4 @@ Traits
$app['route_class'] = 'MyRoute'; $app['route_class'] = 'MyRoute';
.. _cookbook: http://symfony.com/doc/current/cookbook/security/custom_authentication_provider.html .. _cookbook: https://symfony.com/doc/current/cookbook/security/custom_authentication_provider.html
...@@ -12,17 +12,17 @@ Services ...@@ -12,17 +12,17 @@ Services
-------- --------
* **serializer**: An instance of `Symfony\\Component\\Serializer\\Serializer * **serializer**: An instance of `Symfony\\Component\\Serializer\\Serializer
<http://api.symfony.com/master/Symfony/Component/Serializer/Serializer.html>`_. <https://api.symfony.com/master/Symfony/Component/Serializer/Serializer.html>`_.
* **serializer.encoders**: `Symfony\\Component\\Serializer\\Encoder\\JsonEncoder * **serializer.encoders**: `Symfony\\Component\\Serializer\\Encoder\\JsonEncoder
<http://api.symfony.com/master/Symfony/Component/Serializer/Encoder/JsonEncoder.html>`_ <https://api.symfony.com/master/Symfony/Component/Serializer/Encoder/JsonEncoder.html>`_
and `Symfony\\Component\\Serializer\\Encoder\\XmlEncoder and `Symfony\\Component\\Serializer\\Encoder\\XmlEncoder
<http://api.symfony.com/master/Symfony/Component/Serializer/Encoder/XmlEncoder.html>`_. <https://api.symfony.com/master/Symfony/Component/Serializer/Encoder/XmlEncoder.html>`_.
* **serializer.normalizers**: `Symfony\\Component\\Serializer\\Normalizer\\CustomNormalizer * **serializer.normalizers**: `Symfony\\Component\\Serializer\\Normalizer\\CustomNormalizer
<http://api.symfony.com/master/Symfony/Component/Serializer/Normalizer/CustomNormalizer.html>`_ <https://api.symfony.com/master/Symfony/Component/Serializer/Normalizer/CustomNormalizer.html>`_
and `Symfony\\Component\\Serializer\\Normalizer\\GetSetMethodNormalizer and `Symfony\\Component\\Serializer\\Normalizer\\GetSetMethodNormalizer
<http://api.symfony.com/master/Symfony/Component/Serializer/Normalizer/GetSetMethodNormalizer.html>`_. <https://api.symfony.com/master/Symfony/Component/Serializer/Normalizer/GetSetMethodNormalizer.html>`_.
Registering Registering
----------- -----------
...@@ -34,7 +34,7 @@ Registering ...@@ -34,7 +34,7 @@ Registering
.. note:: .. note::
Add the Symfony's `Serializer Component Add the Symfony's `Serializer Component
<http://symfony.com/doc/current/components/serializer.html>`_ as a <https://symfony.com/doc/current/components/serializer.html>`_ as a
dependency: dependency:
.. code-block:: bash .. code-block:: bash
......
...@@ -78,7 +78,7 @@ tested/specced. You may also notice that the only external dependency is on ...@@ -78,7 +78,7 @@ tested/specced. You may also notice that the only external dependency is on
``Symfony\Component\HttpFoundation\JsonResponse``, meaning this controller could ``Symfony\Component\HttpFoundation\JsonResponse``, meaning this controller could
easily be used in a Symfony (full stack) application, or potentially with other easily be used in a Symfony (full stack) application, or potentially with other
applications or frameworks that know how to handle a `Symfony/HttpFoundation applications or frameworks that know how to handle a `Symfony/HttpFoundation
<http://symfony.com/doc/master/components/http_foundation/introduction.html>`_ <https://symfony.com/doc/master/components/http_foundation/introduction.html>`_
``Response`` object. ``Response`` object.
.. code-block:: php .. code-block:: php
......
...@@ -15,7 +15,7 @@ Parameters ...@@ -15,7 +15,7 @@ Parameters
constructor of the ``session.storage`` service. constructor of the ``session.storage`` service.
In case of the default `NativeSessionStorage In case of the default `NativeSessionStorage
<http://api.symfony.com/master/Symfony/Component/HttpFoundation/Session/Storage/NativeSessionStorage.html>`_, <https://api.symfony.com/master/Symfony/Component/HttpFoundation/Session/Storage/NativeSessionStorage.html>`_,
the most useful options are: the most useful options are:
* **name**: The cookie name (_SESS by default) * **name**: The cookie name (_SESS by default)
...@@ -30,7 +30,7 @@ Parameters ...@@ -30,7 +30,7 @@ Parameters
seconds (30 minutes). To override this, set the ``lifetime`` option. seconds (30 minutes). To override this, set the ``lifetime`` option.
For a full list of available options, read the `PHP For a full list of available options, read the `PHP
<http://php.net/session.configuration>`_ official documentation. <https://secure.php.net/session.configuration>`_ official documentation.
* **session.test**: Whether to simulate sessions or not (useful when writing * **session.test**: Whether to simulate sessions or not (useful when writing
functional tests). functional tests).
...@@ -45,14 +45,14 @@ Services ...@@ -45,14 +45,14 @@ Services
-------- --------
* **session**: An instance of Symfony's `Session * **session**: An instance of Symfony's `Session
<http://api.symfony.com/master/Symfony/Component/HttpFoundation/Session/Session.html>`_. <https://api.symfony.com/master/Symfony/Component/HttpFoundation/Session/Session.html>`_.
* **session.storage**: A service that is used for persistence of the session * **session.storage**: A service that is used for persistence of the session
data. data.
* **session.storage.handler**: A service that is used by the * **session.storage.handler**: A service that is used by the
``session.storage`` for data access. Defaults to a `NativeFileSessionHandler ``session.storage`` for data access. Defaults to a `NativeFileSessionHandler
<http://api.symfony.com/master/Symfony/Component/HttpFoundation/Session/Storage/Handler/NativeFileSessionHandler.html>`_ <https://api.symfony.com/master/Symfony/Component/HttpFoundation/Session/Storage/Handler/NativeFileSessionHandler.html>`_
storage handler. storage handler.
Registering Registering
...@@ -69,15 +69,15 @@ The default session handler is ``NativeFileSessionHandler``. However, there are ...@@ -69,15 +69,15 @@ The default session handler is ``NativeFileSessionHandler``. However, there are
multiple handlers available for use by setting ``session.storage.handler`` to multiple handlers available for use by setting ``session.storage.handler`` to
an instance of one of the following handler objects: an instance of one of the following handler objects:
* `LegacyPdoSessionHandler <http://api.symfony.com/master/Symfony/Component/HttpFoundation/Session/Storage/Handler/LegacyPdoSessionHandler.html>`_ * `LegacyPdoSessionHandler <https://api.symfony.com/master/Symfony/Component/HttpFoundation/Session/Storage/Handler/LegacyPdoSessionHandler.html>`_
* `MemcacheSessionHandler <http://api.symfony.com/master/Symfony/Component/HttpFoundation/Session/Storage/Handler/MemcacheSessionHandler.html>`_ * `MemcacheSessionHandler <https://api.symfony.com/master/Symfony/Component/HttpFoundation/Session/Storage/Handler/MemcacheSessionHandler.html>`_
* `MemcachedSessionHandler <http://api.symfony.com/master/Symfony/Component/HttpFoundation/Session/Storage/Handler/MemcachedSessionHandler.html>`_ * `MemcachedSessionHandler <https://api.symfony.com/master/Symfony/Component/HttpFoundation/Session/Storage/Handler/MemcachedSessionHandler.html>`_
* `MongoDbSessionHandler <http://api.symfony.com/master/Symfony/Component/HttpFoundation/Session/Storage/Handler/MongoDbSessionHandler.html>`_ * `MongoDbSessionHandler <https://api.symfony.com/master/Symfony/Component/HttpFoundation/Session/Storage/Handler/MongoDbSessionHandler.html>`_
* `NativeFileSessionHandler <http://api.symfony.com/master/Symfony/Component/HttpFoundation/Session/Storage/Handler/NativeFileSessionHandler.html>`_ * `NativeFileSessionHandler <https://api.symfony.com/master/Symfony/Component/HttpFoundation/Session/Storage/Handler/NativeFileSessionHandler.html>`_
* `NativeSessionHandler <http://api.symfony.com/master/Symfony/Component/HttpFoundation/Session/Storage/Handler/NativeSessionHandler.html>`_ * `NativeSessionHandler <https://api.symfony.com/master/Symfony/Component/HttpFoundation/Session/Storage/Handler/NativeSessionHandler.html>`_
* `NullSessionHandler <http://api.symfony.com/master/Symfony/Component/HttpFoundation/Session/Storage/Handler/NullSessionHandler.html>`_ * `NullSessionHandler <https://api.symfony.com/master/Symfony/Component/HttpFoundation/Session/Storage/Handler/NullSessionHandler.html>`_
* `PdoSessionHandler <http://api.symfony.com/master/Symfony/Component/HttpFoundation/Session/Storage/Handler/PdoSessionHandler.html>`_ * `PdoSessionHandler <https://api.symfony.com/master/Symfony/Component/HttpFoundation/Session/Storage/Handler/PdoSessionHandler.html>`_
* `WriteCheckSessionHandler <http://api.symfony.com/master/Symfony/Component/HttpFoundation/Session/Storage/Handler/WriteCheckSessionHandler.html>`_ * `WriteCheckSessionHandler <https://api.symfony.com/master/Symfony/Component/HttpFoundation/Session/Storage/Handler/WriteCheckSessionHandler.html>`_
Usage Usage
----- -----
......
...@@ -2,7 +2,7 @@ Swiftmailer ...@@ -2,7 +2,7 @@ Swiftmailer
=========== ===========
The *SwiftmailerServiceProvider* provides a service for sending email through The *SwiftmailerServiceProvider* provides a service for sending email through
the `Swift Mailer <http://swiftmailer.org>`_ library. the `Swift Mailer <https://swiftmailer.symfony.com>`_ library.
You can use the ``mailer`` service to send messages easily. By default, it You can use the ``mailer`` service to send messages easily. By default, it
will attempt to send emails through SMTP. will attempt to send emails through SMTP.
...@@ -153,4 +153,4 @@ Traits ...@@ -153,4 +153,4 @@ Traits
->setBody($request->get('message'))); ->setBody($request->get('message')));
For more information, check out the `Swift Mailer documentation For more information, check out the `Swift Mailer documentation
<http://swiftmailer.org>`_. <https://swiftmailer.symfony.com>`_.
...@@ -23,17 +23,17 @@ Services ...@@ -23,17 +23,17 @@ Services
-------- --------
* **translator**: An instance of `Translator * **translator**: An instance of `Translator
<http://api.symfony.com/master/Symfony/Component/Translation/Translator.html>`_, <https://api.symfony.com/master/Symfony/Component/Translation/Translator.html>`_,
that is used for translation. that is used for translation.
* **translator.loader**: An instance of an implementation of the translation * **translator.loader**: An instance of an implementation of the translation
`LoaderInterface `LoaderInterface
<http://api.symfony.com/master/Symfony/Component/Translation/Loader/LoaderInterface.html>`_, <https://api.symfony.com/master/Symfony/Component/Translation/Loader/LoaderInterface.html>`_,
defaults to an `ArrayLoader defaults to an `ArrayLoader
<http://api.symfony.com/master/Symfony/Component/Translation/Loader/ArrayLoader.html>`_. <https://api.symfony.com/master/Symfony/Component/Translation/Loader/ArrayLoader.html>`_.
* **translator.message_selector**: An instance of `MessageSelector * **translator.message_selector**: An instance of `MessageSelector
<http://api.symfony.com/master/Symfony/Component/Translation/MessageSelector.html>`_. <https://api.symfony.com/master/Symfony/Component/Translation/MessageSelector.html>`_.
Registering Registering
----------- -----------
......
...@@ -26,15 +26,15 @@ Parameters ...@@ -26,15 +26,15 @@ Parameters
* **twig.date.format** (optional): Default format used by the ``date`` * **twig.date.format** (optional): Default format used by the ``date``
filter. The format string must conform to the format accepted by filter. The format string must conform to the format accepted by
`date() <http://www.php.net/date>`_. `date() <https://secure.php.net/date>`_.
* **twig.date.interval_format** (optional): Default format used by the * **twig.date.interval_format** (optional): Default format used by the
``date`` filter when the filtered data is of type `DateInterval <http://www.php.net/DateInterval>`_. ``date`` filter when the filtered data is of type `DateInterval <https://secure.php.net/DateInterval>`_.
The format string must conform to the format accepted by The format string must conform to the format accepted by
`DateInterval::format() <http://www.php.net/DateInterval.format>`_. `DateInterval::format() <https://secure.php.net/DateInterval.format>`_.
* **twig.date.timezone** (optional): Default timezone used when formatting * **twig.date.timezone** (optional): Default timezone used when formatting
dates. If set to ``null`` the timezone returned by `date_default_timezone_get() <http://www.php.net/date_default_timezone_get>`_ dates. If set to ``null`` the timezone returned by `date_default_timezone_get() <https://secure.php.net/date_default_timezone_get>`_
is used. is used.
* **twig.number_format.decimals** (optional): Default number of decimals * **twig.number_format.decimals** (optional): Default number of decimals
...@@ -99,7 +99,7 @@ additional capabilities. ...@@ -99,7 +99,7 @@ additional capabilities.
* Access to the ``path()`` and ``url()`` functions. You can find more * Access to the ``path()`` and ``url()`` functions. You can find more
information in the `Symfony Routing documentation information in the `Symfony Routing documentation
<http://symfony.com/doc/current/book/routing.html#generating-urls-from-a-template>`_: <https://symfony.com/doc/current/book/routing.html#generating-urls-from-a-template>`_:
.. code-block:: jinja .. code-block:: jinja
...@@ -116,7 +116,7 @@ Translations Support ...@@ -116,7 +116,7 @@ Translations Support
If you are using the ``TranslationServiceProvider``, you will get the If you are using the ``TranslationServiceProvider``, you will get the
``trans()`` and ``transchoice()`` functions for translation in Twig templates. ``trans()`` and ``transchoice()`` functions for translation in Twig templates.
You can find more information in the `Symfony Translation documentation You can find more information in the `Symfony Translation documentation
<http://symfony.com/doc/current/book/translation.html#twig-templates>`_. <https://symfony.com/doc/current/book/translation.html#twig-templates>`_.
Form Support Form Support
~~~~~~~~~~~~ ~~~~~~~~~~~~
...@@ -124,7 +124,7 @@ Form Support ...@@ -124,7 +124,7 @@ Form Support
If you are using the ``FormServiceProvider``, you will get a set of helpers for If you are using the ``FormServiceProvider``, you will get a set of helpers for
working with forms in templates. You can find more information in the `Symfony working with forms in templates. You can find more information in the `Symfony
Forms reference Forms reference
<http://symfony.com/doc/current/reference/forms/twig_reference.html>`_. <https://symfony.com/doc/current/reference/forms/twig_reference.html>`_.
Security Support Security Support
~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~
...@@ -132,7 +132,7 @@ Security Support ...@@ -132,7 +132,7 @@ Security Support
If you are using the ``SecurityServiceProvider``, you will have access to the If you are using the ``SecurityServiceProvider``, you will have access to the
``is_granted()`` function in templates. You can find more information in the ``is_granted()`` function in templates. You can find more information in the
`Symfony Security documentation `Symfony Security documentation
<http://symfony.com/doc/current/book/security.html#access-control-in-templates>`_. <https://symfony.com/doc/current/book/security.html#access-control-in-templates>`_.
Web Link Support Web Link Support
~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~
...@@ -147,7 +147,7 @@ Global Variable ...@@ -147,7 +147,7 @@ Global Variable
~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~
When the Twig bridge is available, the ``global`` variable refers to an When the Twig bridge is available, the ``global`` variable refers to an
instance of `AppVariable <http://api.symfony.com/master/Symfony/Bridge/Twig/AppVariable.html>`_. instance of `AppVariable <https://api.symfony.com/master/Symfony/Bridge/Twig/AppVariable.html>`_.
It gives access to the following methods: It gives access to the following methods:
.. code-block:: jinja .. code-block:: jinja
......
...@@ -16,13 +16,13 @@ Parameters ...@@ -16,13 +16,13 @@ Parameters
* **validator.object_initializers** (optional): An array of object initializers. * **validator.object_initializers** (optional): An array of object initializers.
See `the relevant Validation documentation See `the relevant Validation documentation
<http://symfony.com/doc/current/reference/dic_tags.html#validator-initializer>`_. <https://symfony.com/doc/current/reference/dic_tags.html#validator-initializer>`_.
Services Services
-------- --------
* **validator**: An instance of `Validator * **validator**: An instance of `Validator
<http://api.symfony.com/master/Symfony/Component/Validator/ValidatorInterface.html>`_. <https://api.symfony.com/master/Symfony/Component/Validator/ValidatorInterface.html>`_.
* **validator.mapping.class_metadata_factory**: Factory for metadata loaders, * **validator.mapping.class_metadata_factory**: Factory for metadata loaders,
which can read validation constraint information from classes. Defaults to which can read validation constraint information from classes. Defaults to
...@@ -221,4 +221,4 @@ provider and register the messages under the ``validators`` domain:: ...@@ -221,4 +221,4 @@ provider and register the messages under the ``validators`` domain::
); );
For more information, consult the `Symfony Validation documentation For more information, consult the `Symfony Validation documentation
<http://symfony.com/doc/master/book/validation.html>`_. <https://symfony.com/doc/master/book/validation.html>`_.
...@@ -197,7 +197,7 @@ Core services ...@@ -197,7 +197,7 @@ Core services
Silex defines a range of services. Silex defines a range of services.
* **request_stack**: Controls the lifecycle of requests, an instance of * **request_stack**: Controls the lifecycle of requests, an instance of
`RequestStack <http://api.symfony.com/master/Symfony/Component/HttpFoundation/RequestStack.html>`_. `RequestStack <https://api.symfony.com/master/Symfony/Component/HttpFoundation/RequestStack.html>`_.
It gives you access to ``GET``, ``POST`` parameters and lots more! It gives you access to ``GET``, ``POST`` parameters and lots more!
Example usage:: Example usage::
...@@ -209,13 +209,13 @@ Silex defines a range of services. ...@@ -209,13 +209,13 @@ Silex defines a range of services.
or an error handler. or an error handler.
* **routes**: The `RouteCollection * **routes**: The `RouteCollection
<http://api.symfony.com/master/Symfony/Component/Routing/RouteCollection.html>`_ <https://api.symfony.com/master/Symfony/Component/Routing/RouteCollection.html>`_
that is used internally. You can add, modify, read routes. that is used internally. You can add, modify, read routes.
* **url_generator**: An instance of `UrlGenerator * **url_generator**: An instance of `UrlGenerator
<http://api.symfony.com/master/Symfony/Component/Routing/Generator/UrlGenerator.html>`_, <https://api.symfony.com/master/Symfony/Component/Routing/Generator/UrlGenerator.html>`_,
using the `RouteCollection using the `RouteCollection
<http://api.symfony.com/master/Symfony/Component/Routing/RouteCollection.html>`_ <https://api.symfony.com/master/Symfony/Component/Routing/RouteCollection.html>`_
that is provided through the ``routes`` service. It has a ``generate`` that is provided through the ``routes`` service. It has a ``generate``
method, which takes the route name as an argument, followed by an array of method, which takes the route name as an argument, followed by an array of
route parameters. route parameters.
...@@ -224,17 +224,17 @@ Silex defines a range of services. ...@@ -224,17 +224,17 @@ Silex defines a range of services.
Check the :doc:`Internals chapter <internals>` for more information. Check the :doc:`Internals chapter <internals>` for more information.
* **dispatcher**: The `EventDispatcher * **dispatcher**: The `EventDispatcher
<http://api.symfony.com/master/Symfony/Component/EventDispatcher/EventDispatcher.html>`_ <https://api.symfony.com/master/Symfony/Component/EventDispatcher/EventDispatcher.html>`_
that is used internally. It is the core of the Symfony system and is used that is used internally. It is the core of the Symfony system and is used
quite a bit by Silex. quite a bit by Silex.
* **resolver**: The `ControllerResolver * **resolver**: The `ControllerResolver
<http://api.symfony.com/master/Symfony/Component/HttpKernel/Controller/ControllerResolver.html>`_ <https://api.symfony.com/master/Symfony/Component/HttpKernel/Controller/ControllerResolver.html>`_
that is used internally. It takes care of executing the controller with the that is used internally. It takes care of executing the controller with the
right arguments. right arguments.
* **kernel**: The `HttpKernel * **kernel**: The `HttpKernel
<http://api.symfony.com/master/Symfony/Component/HttpKernel/HttpKernel.html>`_ <https://api.symfony.com/master/Symfony/Component/HttpKernel/HttpKernel.html>`_
that is used internally. The HttpKernel is the heart of Symfony, it takes a that is used internally. The HttpKernel is the heart of Symfony, it takes a
Request as input and returns a Response as output. Request as input and returns a Response as output.
......
...@@ -18,7 +18,7 @@ test your application in usually under a second by running a single command. ...@@ -18,7 +18,7 @@ test your application in usually under a second by running a single command.
For more information on functional testing, unit testing, and automated For more information on functional testing, unit testing, and automated
software tests in general, check out `PHPUnit software tests in general, check out `PHPUnit
<https://github.com/sebastianbergmann/phpunit>`_ and `Bulat Shakirzyanov's talk <https://github.com/sebastianbergmann/phpunit>`_ and `Bulat Shakirzyanov's talk
on Clean Code <http://www.slideshare.net/avalanche123/clean-code-5609451>`_. on Clean Code <https://www.slideshare.net/avalanche123/clean-code-5609451>`_.
PHPUnit PHPUnit
------- -------
...@@ -159,7 +159,7 @@ application. ...@@ -159,7 +159,7 @@ application.
You can find some documentation for it in `the client section of the You can find some documentation for it in `the client section of the
testing chapter of the Symfony documentation testing chapter of the Symfony documentation
<http://symfony.com/doc/current/book/testing.html#the-test-client>`_. <https://symfony.com/doc/current/book/testing.html#the-test-client>`_.
Crawler Crawler
~~~~~~~ ~~~~~~~
...@@ -171,7 +171,7 @@ using CSS expressions and lots more. ...@@ -171,7 +171,7 @@ using CSS expressions and lots more.
You can find some documentation for it in `the crawler section of the testing You can find some documentation for it in `the crawler section of the testing
chapter of the Symfony documentation chapter of the Symfony documentation
<http://symfony.com/doc/current/book/testing.html#the-test-client>`_. <https://symfony.com/doc/current/book/testing.html#the-test-client>`_.
Configuration Configuration
------------- -------------
......
...@@ -732,7 +732,7 @@ will create a ``BinaryFileResponse`` response for you:: ...@@ -732,7 +732,7 @@ will create a ``BinaryFileResponse`` response for you::
To further customize the response before returning it, check the API doc for To further customize the response before returning it, check the API doc for
`Symfony\Component\HttpFoundation\BinaryFileResponse `Symfony\Component\HttpFoundation\BinaryFileResponse
<http://api.symfony.com/master/Symfony/Component/HttpFoundation/BinaryFileResponse.html>`_:: <https://api.symfony.com/master/Symfony/Component/HttpFoundation/BinaryFileResponse.html>`_::
return $app return $app
->sendFile('/base/path/' . $path) ->sendFile('/base/path/' . $path)
...@@ -812,9 +812,9 @@ Cross-Site-Scripting attacks. ...@@ -812,9 +812,9 @@ Cross-Site-Scripting attacks.
return $app->json(array('name' => $name)); return $app->json(array('name' => $name));
}); });
.. _Silex Skeleton: http://github.com/silexphp/Silex-Skeleton .. _Silex Skeleton: https://github.com/silexphp/Silex-Skeleton
.. _Composer: http://getcomposer.org/ .. _Composer: https://getcomposer.org/
.. _Request: http://api.symfony.com/master/Symfony/Component/HttpFoundation/Request.html .. _Request: https://api.symfony.com/master/Symfony/Component/HttpFoundation/Request.html
.. _Response: http://api.symfony.com/master/Symfony/Component/HttpFoundation/Response.html .. _Response: https://api.symfony.com/master/Symfony/Component/HttpFoundation/Response.html
.. _Monolog: https://github.com/Seldaek/monolog .. _Monolog: https://github.com/Seldaek/monolog
.. _Expression: https://symfony.com/doc/current/book/routing.html#completely-customized-route-matching-with-conditions .. _Expression: https://symfony.com/doc/current/book/routing.html#completely-customized-route-matching-with-conditions
...@@ -149,7 +149,7 @@ point: ...@@ -149,7 +149,7 @@ point:
"^(/[^\?]*)(\?.*)?" => "/index.php$1$2" "^(/[^\?]*)(\?.*)?" => "/index.php$1$2"
) )
.. _FallbackResource directive: http://www.adayinthelifeof.nl/2012/01/21/apaches-fallbackresource-your-new-htaccess-command/ .. _FallbackResource directive: https://www.adayinthelifeof.nl/2012/01/21/apaches-fallbackresource-your-new-htaccess-command/
PHP PHP
--- ---
......
...@@ -30,7 +30,7 @@ class SerializerServiceProvider implements ServiceProviderInterface ...@@ -30,7 +30,7 @@ class SerializerServiceProvider implements ServiceProviderInterface
/** /**
* {@inheritdoc} * {@inheritdoc}
* *
* This method registers a serializer service. {@link http://api.symfony.com/master/Symfony/Component/Serializer/Serializer.html * This method registers a serializer service. {@link https://api.symfony.com/master/Symfony/Component/Serializer/Serializer.html
* The service is provided by the Symfony Serializer component}. * The service is provided by the Symfony Serializer component}.
*/ */
public function register(Container $app) public function register(Container $app)
......
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