diff --git a/components/dependency_injection/parameters.rst b/components/dependency_injection/parameters.rst index ecf83c853b9..98194076885 100644 --- a/components/dependency_injection/parameters.rst +++ b/components/dependency_injection/parameters.rst @@ -25,6 +25,13 @@ and set a parameter in the container with:: $container->setParameter('mailer.transport', 'sendmail'); +.. caution:: + + The used ``.`` notation is just a + :ref:`Symfony convention ` to make parameters + easier to read. Parameters are just flat key-value elements, they can't be + organized into a nested array + .. note:: You can only set a parameter before the container is compiled. To learn @@ -190,9 +197,9 @@ making the class of a service a parameter: Array Parameters ---------------- -Parameters do not need to be flat strings, they can also be arrays. For the XML -format, you need to use the ``type="collection"`` attribute for all parameters that are -arrays. +Parameters do not need to be flat strings, they can also contain array values. +For the XML format, you need to use the ``type="collection"`` attribute for +all parameters that are arrays. .. configuration-block:: diff --git a/components/event_dispatcher/generic_event.rst b/components/event_dispatcher/generic_event.rst index 9018c145577..3be0b9bb876 100644 --- a/components/event_dispatcher/generic_event.rst +++ b/components/event_dispatcher/generic_event.rst @@ -93,7 +93,7 @@ Filtering data:: use Symfony\Component\EventDispatcher\GenericEvent; - $event = new GenericEvent($subject, array('data' => 'foo')); + $event = new GenericEvent($subject, array('data' => 'Foo')); $dispatcher->dispatch('foo', $event); echo $event['data']; @@ -102,6 +102,6 @@ Filtering data:: { public function filter(GenericEvent $event) { - strtolower($event['data']); + $event['data'] = strtolower($event['data']); } } diff --git a/contributing/code/standards.rst b/contributing/code/standards.rst index 1d512b3855e..aadcb34ef90 100644 --- a/contributing/code/standards.rst +++ b/contributing/code/standards.rst @@ -133,6 +133,8 @@ Naming Conventions * Don't forget to look at the more verbose :doc:`conventions` document for more subjective naming considerations. +.. _service-naming-conventions: + Service Naming Conventions ~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/cookbook/bundles/remove.rst b/cookbook/bundles/remove.rst index af1dfd774b8..ce36fae32ab 100644 --- a/cookbook/bundles/remove.rst +++ b/cookbook/bundles/remove.rst @@ -95,9 +95,9 @@ rely on the bundle you are about to remove. .. tip:: - If one bundle relies on another, in most it means that it uses some services - from the bundle. Searching for the bundle alias string may help you spot - them (e.g. ``acme_demo`` for bundles depending on AcmeDemoBundle). + If one bundle relies on another, in most cases it means that it uses + some services from the bundle. Searching for the bundle alias string may + help you spot them (e.g. ``acme_demo`` for bundles depending on AcmeDemoBundle). .. tip:: diff --git a/cookbook/testing/simulating_authentication.rst b/cookbook/testing/simulating_authentication.rst index b67365398b3..56168f09552 100644 --- a/cookbook/testing/simulating_authentication.rst +++ b/cookbook/testing/simulating_authentication.rst @@ -35,7 +35,7 @@ with a request. The following example demonstrates this technique:: { $this->logIn(); - $this->client->request('GET', '/demo/secured/hello/Fabien'); + $crawler = $this->client->request('GET', '/demo/secured/hello/Fabien'); $this->assertTrue($this->client->getResponse()->isSuccessful()); $this->assertGreaterThan(0, $crawler->filter('html:contains("Hello Fabien")')->count()); diff --git a/reference/forms/types/checkbox.rst b/reference/forms/types/checkbox.rst index aeefb915ccf..e39c393dae7 100644 --- a/reference/forms/types/checkbox.rst +++ b/reference/forms/types/checkbox.rst @@ -60,8 +60,6 @@ These options inherit from the :doc:`form ` type: .. include:: /reference/forms/types/options/data.rst.inc -.. include:: /reference/forms/types/options/empty_data.rst.inc - .. include:: /reference/forms/types/options/required.rst.inc .. include:: /reference/forms/types/options/label.rst.inc diff --git a/reference/forms/types/collection.rst b/reference/forms/types/collection.rst index 1dfcc037f35..9f442d2fda8 100644 --- a/reference/forms/types/collection.rst +++ b/reference/forms/types/collection.rst @@ -365,4 +365,4 @@ error_bubbling .. include:: /reference/forms/types/options/mapped.rst.inc -.. include:: /reference/forms/type/options/cascade_validation.rst.inc +.. include:: /reference/forms/types/options/cascade_validation.rst.inc diff --git a/reference/forms/types/options/checkbox_empty_data.rst.inc b/reference/forms/types/options/checkbox_empty_data.rst.inc index 8143ad364ce..d7a09ba3b7b 100644 --- a/reference/forms/types/options/checkbox_empty_data.rst.inc +++ b/reference/forms/types/options/checkbox_empty_data.rst.inc @@ -6,4 +6,4 @@ empty_data This option determines what value the field will return when the ``empty_value`` choice is selected. In checkbox, the value of ``empty_data`` is overriden by the value returned by -the data transformer (see :doc:`/cookbook/form/data_transformers.rst`). +the data transformer (see :doc:`/cookbook/form/data_transformers`). diff --git a/reference/forms/types/timezone.rst b/reference/forms/types/timezone.rst index ef4769e1cff..6867e89a8e0 100644 --- a/reference/forms/types/timezone.rst +++ b/reference/forms/types/timezone.rst @@ -12,7 +12,7 @@ or ``Europe/Istanbul``. Unlike the ``choice`` type, you don't need to specify a ``choices`` or ``choice_list`` option as the field type automatically uses a large list -of locales. You *can* specify either of these options manually, but then +of timezones. You *can* specify either of these options manually, but then you should just use the ``choice`` type directly. +-------------+------------------------------------------------------------------------+