From ce2aeb294d112c99ece1486ad19a2062dff24eee Mon Sep 17 00:00:00 2001 From: Drak Date: Wed, 4 Dec 2013 16:51:20 +0000 Subject: [PATCH 01/27] Clarify settings Update notes about Symfony Standard --- cookbook/session/sessions_directory.rst | 28 +++++++++++++++++++++---- 1 file changed, 24 insertions(+), 4 deletions(-) diff --git a/cookbook/session/sessions_directory.rst b/cookbook/session/sessions_directory.rst index 98353e75066..adebb7c985c 100644 --- a/cookbook/session/sessions_directory.rst +++ b/cookbook/session/sessions_directory.rst @@ -4,9 +4,23 @@ Configuring the Directory where Sessions Files are Saved ======================================================== -By default, Symfony stores the session data in the cache directory. This -means that when you clear the cache, any current sessions will also be -deleted. +By default, Symfony stores the session data in files in the cache +directory `"%kernel.cach_dir%/sessions"`. This means that when you clear +the cache, any current sessions will also be deleted. + +.. note:: + + If the ``session`` configuration key is set to ``~``, Symfony will use the + global PHP ini values for ``session.save_handler``and associated + ``session.save_path`` from ``php.ini``. + +.. note:: + + While the Symfony Full Stack Framework defaults to using the + ``session.handler.native_file``, the Symfony Standard Edition is + configured to use PHP's global session settings by default and therefor + sessions will be stored according to the `session.save_path` location + and will not be deleted when clearing the cache. Using a different directory to save session data is one method to ensure that your current sessions aren't lost when you clear Symfony's cache. @@ -30,12 +44,14 @@ session directory to ``app/sessions``: # app/config/config.yml framework: session: + handler_id: session.handler.native_file save_path: "%kernel.root_dir%/sessions" .. code-block:: xml + @@ -43,5 +59,9 @@ session directory to ``app/sessions``: // app/config/config.php $container->loadFromExtension('framework', array( - 'session' => array('save-path' => "%kernel.root_dir%/sessions"), + 'session' => array( + 'handler-id' => "session.handler.native_file"), + 'save-path' => "%kernel.root_dir%/sessions"), + ), )); + From 13a3c66875f126a96e46174afdef9b8bdc789ebf Mon Sep 17 00:00:00 2001 From: Drak Date: Sun, 15 Dec 2013 12:25:26 +0000 Subject: [PATCH 02/27] corrections --- cookbook/session/sessions_directory.rst | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/cookbook/session/sessions_directory.rst b/cookbook/session/sessions_directory.rst index adebb7c985c..928e190ac9f 100644 --- a/cookbook/session/sessions_directory.rst +++ b/cookbook/session/sessions_directory.rst @@ -1,11 +1,11 @@ .. index:: single: Sessions, sessions directory -Configuring the Directory where Sessions Files are Saved +Configuring the Directory Where Sessions Files are Saved ======================================================== By default, Symfony stores the session data in files in the cache -directory `"%kernel.cach_dir%/sessions"`. This means that when you clear +directory ``%kernel.cach_dir%/sessions``. This means that when you clear the cache, any current sessions will also be deleted. .. note:: @@ -60,8 +60,8 @@ session directory to ``app/sessions``: // app/config/config.php $container->loadFromExtension('framework', array( 'session' => array( - 'handler-id' => "session.handler.native_file"), - 'save-path' => "%kernel.root_dir%/sessions"), + 'handler-id' => 'session.handler.native_file', + 'save-path' => '%kernel.root_dir%/sessions', ), )); From 6187059fa1425ab6926fa530a28feafbae4d9a0f Mon Sep 17 00:00:00 2001 From: Christian Flothmann Date: Wed, 18 Dec 2013 19:06:15 +0100 Subject: [PATCH 03/27] fix code block indentation --- components/form/introduction.rst | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/components/form/introduction.rst b/components/form/introduction.rst index d28e68e51b3..0e6b06ed826 100644 --- a/components/form/introduction.rst +++ b/components/form/introduction.rst @@ -84,12 +84,12 @@ object to read data off of the correct PHP superglobals (i.e. ``$_POST`` or :class:`Symfony\\Component\\Form\\Extension\\HttpFoundation\\HttpFoundationExtension` to your form factory:: - use Symfony\Component\Form\Forms; - use Symfony\Component\Form\Extension\HttpFoundation\HttpFoundationExtension; + use Symfony\Component\Form\Forms; + use Symfony\Component\Form\Extension\HttpFoundation\HttpFoundationExtension; - $formFactory = Forms::createFormFactoryBuilder() - ->addExtension(new HttpFoundationExtension()) - ->getFormFactory(); + $formFactory = Forms::createFormFactoryBuilder() + ->addExtension(new HttpFoundationExtension()) + ->getFormFactory(); Now, when you process a form, you can pass the :class:`Symfony\\Component\\HttpFoundation\\Request` object to :method:`Symfony\\Component\\Form\\Form::handleRequest`:: From abc3a188005090c48ef8e2bb3392566cd70e73e1 Mon Sep 17 00:00:00 2001 From: "I. Fournier" Date: Thu, 19 Dec 2013 11:47:06 +0100 Subject: [PATCH 04/27] Update process.rst This method was initially named flush but was changed to clear --- components/process.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/components/process.rst b/components/process.rst index bb8ad25df54..7680dc7adfa 100644 --- a/components/process.rst +++ b/components/process.rst @@ -46,11 +46,11 @@ and :method:`Symfony\\Component\\Process\\Process::getIncrementalErrorOutput` methods returns the new outputs since the last call. .. versionadded:: 2.4 - The ``flushOutput()`` and ``flushErrorOutput()`` methods were added in Symfony 2.4. + The ``clearOutput()`` and ``clearErrorOutput()`` methods were added in Symfony 2.4. -The :method:`Symfony\\Component\\Process\\Process::flushOutput` method flushes +The :method:`Symfony\\Component\\Process\\Process::clearOutput` method clears the contents of the output and -:method:`Symfony\\Component\\Process\\Process::flushErrorOutput` flushes +:method:`Symfony\\Component\\Process\\Process::clearErrorOutput` clears the contents of the error output. Getting real-time Process Output From 06b82448add0a5bac55a0ac6737f92b715a53fbb Mon Sep 17 00:00:00 2001 From: Andrew M Date: Wed, 25 Dec 2013 13:20:15 +0200 Subject: [PATCH 05/27] Add additional example for routing integer requirement This might help for people who are not very good with regular expressions. --- book/routing.rst | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/book/routing.rst b/book/routing.rst index b280bec1303..d55d39a6a4a 100644 --- a/book/routing.rst +++ b/book/routing.rst @@ -561,13 +561,15 @@ is *not* a number). As a result, a URL like ``/blog/my-blog-post`` will now properly match the ``blog_show`` route. -+--------------------+-----------+-----------------------+ -| URL | route | parameters | -+====================+===========+=======================+ -| /blog/2 | blog | {page} = 2 | -+--------------------+-----------+-----------------------+ -| /blog/my-blog-post | blog_show | {slug} = my-blog-post | -+--------------------+-----------+-----------------------+ ++----------------------+-----------+-------------------------+ +| URL | route | parameters | ++======================+===========+=========================+ +| /blog/2 | blog | {page} = 2 | ++----------------------+-----------+-------------------------+ +| /blog/my-blog-post | blog_show | {slug} = my-blog-post | ++----------------------+-----------+-------------------------+ +| /blog/2-my-blog-post | blog_show | {slug} = 2-my-blog-post | ++----------------------+-----------+-------------------------+ .. sidebar:: Earlier Routes always Win From b87292f952d7052d70365b112a5aff29595ad945 Mon Sep 17 00:00:00 2001 From: Andrew M Date: Wed, 25 Dec 2013 13:33:51 +0200 Subject: [PATCH 06/27] Fix getMessage method highlighting --- book/validation.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/book/validation.rst b/book/validation.rst index 95002c90285..60673360bbf 100644 --- a/book/validation.rst +++ b/book/validation.rst @@ -1148,7 +1148,7 @@ section . The ``validateValue`` method returns a :class:`Symfony\\Component\\Validator\\ConstraintViolationList` object, which acts just like an array of errors. Each error in the collection is a :class:`Symfony\\Component\\Validator\\ConstraintViolation` object, -which holds the error message on its `getMessage` method. +which holds the error message on its ``getMessage`` method. Final Thoughts -------------- From 449da34585de6bef91ad956fcda6019711706a51 Mon Sep 17 00:00:00 2001 From: Andrew M Date: Wed, 25 Dec 2013 13:44:49 +0200 Subject: [PATCH 07/27] Reformat code block This will make it more coincide with other code blocks & improve readability. --- book/forms.rst | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/book/forms.rst b/book/forms.rst index 76632884df6..a3faf122591 100644 --- a/book/forms.rst +++ b/book/forms.rst @@ -1011,7 +1011,8 @@ that will house the logic for building the task form:: { public function buildForm(FormBuilderInterface $builder, array $options) { - $builder->add('task') + $builder + ->add('task') ->add('dueDate', null, array('widget' => 'single_text')) ->add('save', 'submit'); } From bd5835e5c0fb4920c460fc2725320915bef1856f Mon Sep 17 00:00:00 2001 From: Andrew M Date: Wed, 25 Dec 2013 14:04:30 +0200 Subject: [PATCH 08/27] Fix typo in class name: Appkernel => AppKernel --- cookbook/bundles/remove.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cookbook/bundles/remove.rst b/cookbook/bundles/remove.rst index 5607a0dbbb5..69ba500f2b6 100644 --- a/cookbook/bundles/remove.rst +++ b/cookbook/bundles/remove.rst @@ -17,7 +17,7 @@ starting a project, but you'll probably want to eventually remove it. --------------------------------------------- To disconnect the bundle from the framework, you should remove the bundle from -the ``Appkernel::registerBundles()`` method. The bundle is normally found in +the ``AppKernel::registerBundles()`` method. The bundle is normally found in the ``$bundles`` array but the AcmeDemoBundle is only registered in a development environment and you can find him in the if statement after:: From b94a06dbb8b71d7e05ae03b6e829aec240928899 Mon Sep 17 00:00:00 2001 From: Philipp Rieber Date: Wed, 25 Dec 2013 18:31:42 +0100 Subject: [PATCH 09/27] Fix broken reference link --- cookbook/form/dynamic_form_modification.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cookbook/form/dynamic_form_modification.rst b/cookbook/form/dynamic_form_modification.rst index c03f451a786..86c07f24c0e 100644 --- a/cookbook/form/dynamic_form_modification.rst +++ b/cookbook/form/dynamic_form_modification.rst @@ -168,7 +168,7 @@ Adding an Event Subscriber to a Form Class For better reusability or if there is some heavy logic in your event listener, you can also move the logic for creating the ``name`` field to an -:ref:`event subscriber `:: +:ref:`event subscriber `:: // src/Acme/DemoBundle/Form/Type/ProductType.php namespace Acme\DemoBundle\Form\Type; From 1eb93ecc37b3957e9b1cfbe4a559bccd3a105d92 Mon Sep 17 00:00:00 2001 From: Christian Flothmann Date: Thu, 26 Dec 2013 23:12:29 +0100 Subject: [PATCH 10/27] tweaks to label_attr description --- reference/forms/types/options/label_attr.rst.inc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/reference/forms/types/options/label_attr.rst.inc b/reference/forms/types/options/label_attr.rst.inc index de834c4ae1b..d642b891ca2 100644 --- a/reference/forms/types/options/label_attr.rst.inc +++ b/reference/forms/types/options/label_attr.rst.inc @@ -1,9 +1,9 @@ label_attr -~~~~~ +~~~~~~~~~~ **type**: ``array`` **default**: ``array()`` -Sets the html attributes for the ``