Permalink
Browse files

minor #4874 Remove trailing whitespace (WouterJ)

This PR was merged into the 2.3 branch.

Discussion
----------

Remove trailing whitespace

| Q   | A
| --- | ---
| Doc fix? | yes
| New docs? | no
| Applies to | all
| Fixed tickets | -

Commits
-------

98bd7ba Remove trailing whitespace
  • Loading branch information...
wouterj committed Jan 23, 2015
2 parents 80bef5a + 98bd7ba commit 6a150771e0679088ebc6c67bb22c9f99b63b109e
@@ -556,7 +556,7 @@ Symfony will automatically return a 500 HTTP response code.
throw new \Exception('Something went wrong!');
In every case, an error page is shown to the end user and a full debug
error page is shown to the developer (i.e. when you're using ``app_dev.php`` -
error page is shown to the developer (i.e. when you're using ``app_dev.php`` -
see :ref:`page-creation-environments`).
You'll want to customize the error page your user sees. To do that, see the
@@ -244,7 +244,7 @@ the layout:
<?php include 'layout.php' ?>
You now have a setup that will allow you to reuse the layout.
You now have a setup that will allow you to reuse the layout.
Unfortunately, to accomplish this, you're forced to use a few ugly
PHP functions (``ob_start()``, ``ob_get_clean()``) in the template. Symfony
uses a Templating component that allows this to be accomplished cleanly
@@ -538,8 +538,8 @@ won't be asked to return the updated response until the cache finally becomes
stale.
The validation model addresses this issue. Under this model, the cache continues
to store responses. The difference is that, for each request, the cache asks the
application if the cached response is still valid or if it needs to be regenerated.
to store responses. The difference is that, for each request, the cache asks the
application if the cached response is still valid or if it needs to be regenerated.
If the cache *is* still valid, your application should return a 304 status code
and no content. This tells the cache that it's ok to return the cached response.
@@ -611,7 +611,7 @@ the service container gives you a much more appealing option:
services:
my_mailer:
# ...
newsletter_manager:
class: Acme\HelloBundle\Newsletter\NewsletterManager
arguments: ["@my_mailer"]
@@ -696,7 +696,7 @@ Injecting the dependency by the setter method just needs a change of syntax:
services:
my_mailer:
# ...
newsletter_manager:
class: Acme\HelloBundle\Newsletter\NewsletterManager
calls:
@@ -731,7 +731,7 @@ Injecting the dependency by the setter method just needs a change of syntax:
use Symfony\Component\DependencyInjection\Reference;
$container->setDefinition('my_mailer', ...);
$container->setDefinition('newsletter_manager', new Definition(
'Acme\HelloBundle\Newsletter\NewsletterManager'
))->addMethodCall('setMailer', array(
@@ -777,7 +777,7 @@ it exists and do nothing if it doesn't:
<service id="my_mailer">
<!-- ... -->
</service>
<service id="newsletter_manager" class="Acme\HelloBundle\Newsletter\NewsletterManager">
<argument type="service" id="my_mailer" on-invalid="ignore" />
</service>
@@ -792,7 +792,7 @@ it exists and do nothing if it doesn't:
use Symfony\Component\DependencyInjection\ContainerInterface;
$container->setDefinition('my_mailer', ...);
$container->setDefinition('newsletter_manager', new Definition(
'Acme\HelloBundle\Newsletter\NewsletterManager',
array(
@@ -4,7 +4,7 @@
single: ClassLoader; Cache
single: ClassLoader; XcacheClassLoader
single: XCache; XcacheClassLoader
Cache a Class Loader
====================
@@ -33,16 +33,16 @@ ApcClassLoader
``findFile()`` method using `APC`_::
require_once '/path/to/src/Symfony/Component/ClassLoader/ApcClassLoader.php';
// instance of a class that implements a findFile() method, like the ClassLoader
$loader = ...;
// sha1(__FILE__) generates an APC namespace prefix
$cachedLoader = new ApcClassLoader(sha1(__FILE__), $loader);
// register the cached class loader
$cachedLoader->register();
// deactivate the original, non-cached loader if it was registered previously
$loader->unregister();
@@ -56,16 +56,16 @@ XcacheClassLoader
it is straightforward::
require_once '/path/to/src/Symfony/Component/ClassLoader/XcacheClassLoader.php';
// instance of a class that implements a findFile() method, like the ClassLoader
$loader = ...;
// sha1(__FILE__) generates an XCache namespace prefix
$cachedLoader = new XcacheClassLoader(sha1(__FILE__), $loader);
// register the cached class loader
$cachedLoader->register();
// deactivate the original, non-cached loader if it was registered previously
$loader->unregister();
@@ -1,6 +1,6 @@
.. index::
single: ClassLoader; DebugClassLoader
Debugging a Class Loader
========================
@@ -16,5 +16,5 @@ Using the ``DebugClassLoader`` is as easy as calling its static
:method:`Symfony\\Component\\ClassLoader\\DebugClassLoader::enable` method::
use Symfony\Component\ClassLoader\DebugClassLoader;
DebugClassLoader::enable();
@@ -1,6 +1,6 @@
.. index::
single: ClassLoader; MapClassLoader
MapClassLoader
==============
@@ -26,14 +26,14 @@ Using it is as easy as passing your mapping to its constructor when creating
an instance of the ``MapClassLoader`` class::
require_once '/path/to/src/Symfony/Component/ClassLoader/MapClassLoader';
$mapping = array(
'Foo' => '/path/to/Foo',
'Bar' => '/path/to/Bar',
);
$loader = new MapClassLoader($mapping);
$loader->register();
.. _PSR-0: http://www.php-fig.org/psr/psr-0/
@@ -76,7 +76,7 @@ web-browser.
* link-state selectors: ``:link``, ``:visited``, ``:target``
* selectors based on user action: ``:hover``, ``:focus``, ``:active``
* UI-state selectors: ``:invalid``, ``:indeterminate`` (however, ``:enabled``,
* UI-state selectors: ``:invalid``, ``:indeterminate`` (however, ``:enabled``,
``:disabled``, ``:checked`` and ``:unchecked`` are available)
Pseudo-elements (``:before``, ``:after``, ``:first-line``,
@@ -17,7 +17,7 @@ using the ``get()`` method::
In some cases, a service *only* exists to be injected into another service
and is *not* intended to be fetched directly from the container as shown
above.
above.
.. _inlined-private-services:
@@ -257,7 +257,7 @@ in) is correct, you can use::
// fetch the Acme\Entity\LegacyUser
$user = ...;
// the submitted password, e.g. from the login form
$plainPassword = ...;
@@ -75,7 +75,7 @@ Asset path generation is handled internally by packages. The component provides
You can also use multiple packages::
use Symfony\Component\Templating\Asset\PathPackage;
// ...
$templateEngine->set(new AssetsHelper());
@@ -135,7 +135,7 @@ escaper using the
Helpers
-------
The Templating component can be easily extended via helpers. Helpers are PHP objects that
The Templating component can be easily extended via helpers. Helpers are PHP objects that
provide features useful in a template context. The component has
2 built-in helpers:
@@ -79,7 +79,7 @@ example containing most features described below:
throw new \RuntimeException(sprintf('Unrecognized dummy option "%s"', $dummy));
}
private function reverseBoolean($value = null, $theSwitch = false)
{
if (!$theSwitch) {
@@ -95,7 +95,7 @@ Structure
* Add a single space after each comma delimiter;
* Add a single space around binary operators (``==``, ``&&``, ...), with
* Add a single space around binary operators (``==``, ``&&``, ...), with
the exception of the concatenation (``.``) operator;
* Place unary operators (``!``, ``--``, ...) adjacent to the affected variable;
@@ -14,12 +14,12 @@ Environment Variables
---------------------
Symfony will grab any environment variable prefixed with ``SYMFONY__`` and
set it as a parameter in the service container. Some transformations are
set it as a parameter in the service container. Some transformations are
applied to the resulting parameter name:
* ``SYMFONY__`` prefix is removed;
* Parameter name is lowercased;
* Double underscores are replaced with a period, as a period is not
* Double underscores are replaced with a period, as a period is not
a valid character in an environment variable name.
For example, if you're using Apache, environment variables can be set using
@@ -151,7 +151,7 @@ the ``extra.symfony-web-dir`` option in the ``composer.json`` file:
work:
.. code-block:: bash
$ php app/console cache:clear --env=prod
$ php app/console assetic:dump --env=prod --no-debug
@@ -4,8 +4,8 @@
Deploying to Platform.sh
========================
This step-by-step cookbook describes how to deploy a Symfony web application to
`Platform.sh`_. You can read more about using Symfony with Platform.sh on the
This step-by-step cookbook describes how to deploy a Symfony web application to
`Platform.sh`_. You can read more about using Symfony with Platform.sh on the
official `Platform.sh documentation`_.
Deploy an Existing Site
@@ -15,23 +15,23 @@ In this guide, it is assumed your codebase is already versioned with Git.
Get a Project on Platform.sh
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
You need to subscribe to a `Platform.sh project`_. Choose the development plan
and go through the checkout process. Once your project is ready, give it a name
and go through the checkout process. Once your project is ready, give it a name
and choose: **Import an existing site**.
Prepare Your Application
~~~~~~~~~~~~~~~~~~~~~~~~
To deploy your Symfony application on Platform.sh, you simply need to add a
To deploy your Symfony application on Platform.sh, you simply need to add a
``.platform.app.yaml`` at the root of your Git repository which will tell
Platform.sh how to deploy your application (read more about
Platform.sh how to deploy your application (read more about
`Platform.sh configuration files`_).
.. code-block:: yaml
# .platform.app.yaml
# This file describes an application. You can have multiple applications
# in the same project.
@@ -96,7 +96,7 @@ Configure Database Access
Platform.sh overrides your database specific configuration via importing the
following file::
// app/config/parameters_platform.php
<?php
$relationships = getenv("PLATFORM_RELATIONSHIPS");
@@ -134,7 +134,7 @@ Make sure this file is listed in your *imports*:
Deploy your Application
~~~~~~~~~~~~~~~~~~~~~~~
Now you need to add a remote to Platform.sh in your Git repository (copy the
Now you need to add a remote to Platform.sh in your Git repository (copy the
command that you see on the Platform.sh web UI):
.. code-block:: bash
@@ -150,7 +150,7 @@ Commit the Platform.sh specific files created in the previous section:
.. code-block:: bash
$ git add .platform.app.yaml .platform/*
$ git add .platform.app.yaml .platform/*
$ git add app/config/config.yml app/config/parameters_platform.php
$ git commit -m "Adding Platform.sh configuration files."
@@ -163,22 +163,22 @@ Push your code base to the newly added remote:
That's it! Your application is being deployed on Platform.sh and you'll soon be
able to access it in your browser.
Every code change that you do from now on will be pushed to Git in order to
Every code change that you do from now on will be pushed to Git in order to
redeploy your environment on Platform.sh.
More information about `migrating your database and files <migrate-existing-site>`_ can be found on the
More information about `migrating your database and files <migrate-existing-site>`_ can be found on the
Platform.sh documentation.
Deploy a new Site
-----------------
You can start a new `Platform.sh project`_. Choose the development plan and go
You can start a new `Platform.sh project`_. Choose the development plan and go
through the checkout process.
Once your project is ready, give it a name and choose: **Create a new site**.
Choose the *Symfony* stack and a starting point such as *Standard*.
That's it! Your Symfony application will be bootstrapped and deployed. You'll
That's it! Your Symfony application will be bootstrapped and deployed. You'll
soon be able to see it in your browser.
.. _`Platform.sh`: https://platform.sh
@@ -463,8 +463,8 @@ we talk about next!).
.. caution::
You have to create **both** ``addTag`` and ``removeTag`` methods,
otherwise the form will still use ``setTag`` even if ``by_reference`` is ``false``.
You have to create **both** ``addTag`` and ``removeTag`` methods,
otherwise the form will still use ``setTag`` even if ``by_reference`` is ``false``.
You'll learn more about the ``removeTag`` method later in this article.
.. sidebar:: Doctrine: Cascading Relations and saving the "Inverse" side
@@ -184,7 +184,7 @@ on other extensions. You need add those extensions to the factory object::
protected function setUp()
{
parent::setUp();
$validator = $this->getMock('\Symfony\Component\Validator\ValidatorInterface');
$validator->method('validate')->will($this->returnValue(new ConstraintViolationList()));
@@ -177,7 +177,7 @@ pattern so that it is only accessible by requests from the local server itself:
security:
# ...
access_control:
#
#
- { path: ^/internal, roles: IS_AUTHENTICATED_ANONYMOUSLY, ips: [127.0.0.1, ::1] }
- { path: ^/internal, roles: ROLE_NO_ACCESS }
@@ -71,8 +71,8 @@ in the x509 firewall configuration respectively.
An authentication provider will only inform the user provider of the username
that made the request. You will need to create (or use) a "user provider" that
is referenced by the ``provider`` configuration parameter (``your_user_provider``
in the configuration example). This provider will turn the username into a User
object of your choice. For more information on creating or configuring a user
in the configuration example). This provider will turn the username into a User
object of your choice. For more information on creating or configuring a user
provider, see:
* :doc:`/cookbook/security/custom_provider`
Oops, something went wrong.

0 comments on commit 6a15077

Please sign in to comment.