From 05492b277df8298d98ea5b6a2f95fe43bedb58dd Mon Sep 17 00:00:00 2001 From: WouterJ Date: Fri, 31 Jan 2014 16:30:35 +0100 Subject: [PATCH 1/8] Clarify parameters conventions --- components/dependency_injection/parameters.rst | 13 ++++++++++--- contributing/code/standards.rst | 2 ++ 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/components/dependency_injection/parameters.rst b/components/dependency_injection/parameters.rst index 4265fae224c..fc78b36ad37 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 + inherited. + .. 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/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 ~~~~~~~~~~~~~~~~~~~~~~~~~~ From ef4014d39840f55bd4c353613de5f2d6534e08f5 Mon Sep 17 00:00:00 2001 From: yositani Date: Tue, 4 Feb 2014 01:57:56 +0900 Subject: [PATCH 2/8] fix form type. --- reference/forms/types/timezone.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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. +-------------+------------------------------------------------------------------------+ From efaad48422235654078f8151a6a7add16830f90d Mon Sep 17 00:00:00 2001 From: Ryan Weaver Date: Sun, 19 Jan 2014 21:58:53 -0600 Subject: [PATCH 3/8] Fixing typo - thanks to @xabbuh --- cookbook/bundles/remove.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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:: From 443677343f445c6754ee17b854409c5153a1db88 Mon Sep 17 00:00:00 2001 From: Colin O'Dell Date: Mon, 3 Feb 2014 13:12:26 -0500 Subject: [PATCH 4/8] Add missing variable assignment Line 41 made use of $crawler which wasn't defined. --- cookbook/testing/simulating_authentication.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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()); From aaddfcd97a9918d5570c59fe59fecda2ddc72a59 Mon Sep 17 00:00:00 2001 From: Wouter J Date: Tue, 11 Feb 2014 07:57:39 +0100 Subject: [PATCH 5/8] Applied comment --- components/dependency_injection/parameters.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/dependency_injection/parameters.rst b/components/dependency_injection/parameters.rst index fc78b36ad37..939991adb7e 100644 --- a/components/dependency_injection/parameters.rst +++ b/components/dependency_injection/parameters.rst @@ -30,7 +30,7 @@ and set a parameter in the container with:: 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 - inherited. + organized into a nested array .. note:: From b8e1e99c136d6fba493cb9743b619bc1f7626ca7 Mon Sep 17 00:00:00 2001 From: Roger Llopart Pla Date: Wed, 5 Feb 2014 12:06:56 +0100 Subject: [PATCH 6/8] Update generic_event.rst The $event['data'] field was not set, thus it wouldn't be modified. Also, the example already had a lowercase string. Uppercased 1 letter. --- components/event_dispatcher/generic_event.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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']); } } From e702b346b470ab795162c0344f45470e42b524ca Mon Sep 17 00:00:00 2001 From: Christian Flothmann Date: Wed, 5 Feb 2014 17:26:24 +0100 Subject: [PATCH 7/8] fix referenced documents names --- reference/forms/types/collection.rst | 2 +- reference/forms/types/options/checkbox_empty_data.rst.inc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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`). From 3e0d1f48989a19c9bf6249756afacfd05aa691c2 Mon Sep 17 00:00:00 2001 From: Christian Flothmann Date: Thu, 13 Feb 2014 18:20:04 +0100 Subject: [PATCH 8/8] remove empty_data from the list of inherited options, it's documented in the overriden options section --- reference/forms/types/checkbox.rst | 2 -- 1 file changed, 2 deletions(-) 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