From c66ee9f7155141c05294297772e1b41c8048be0c Mon Sep 17 00:00:00 2001 From: "Andrew (Andrius) Marcinkevicius" Date: Thu, 1 Jan 2015 17:27:49 +0200 Subject: [PATCH 1/7] Remove horizontal scrollbar | Q | A | ------------- | --- | Doc fix? | yes | New docs? | no | Applies to | 2.3 | Fixed tickets | --- book/internals.rst | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/book/internals.rst b/book/internals.rst index 87bae69895d..0aebef69362 100644 --- a/book/internals.rst +++ b/book/internals.rst @@ -532,7 +532,8 @@ method to access tokens based on some criteria:: $tokens = $container->get('profiler')->find('127.0.0.1', '', 10, '', ''); // get the latest 10 tokens for requests that happened between 2 and 4 days ago - $tokens = $container->get('profiler')->find('', '', 10, '4 days ago', '2 days ago'); + $tokens = $container->get('profiler') + ->find('', '', 10, '4 days ago', '2 days ago'); If you want to manipulate profiling data on a different machine than the one where the information were generated, use the @@ -576,9 +577,12 @@ the configuration for the development environment: xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:webprofiler="http://symfony.com/schema/dic/webprofiler" xmlns:framework="http://symfony.com/schema/dic/symfony" - xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd - http://symfony.com/schema/dic/webprofiler http://symfony.com/schema/dic/webprofiler/webprofiler-1.0.xsd - http://symfony.com/schema/dic/symfony http://symfony.com/schema/dic/symfony/symfony-1.0.xsd"> + xsi:schemaLocation="http://symfony.com/schema/dic/services + http://symfony.com/schema/dic/services/services-1.0.xsd + http://symfony.com/schema/dic/webprofiler + http://symfony.com/schema/dic/webprofiler/webprofiler-1.0.xsd + http://symfony.com/schema/dic/symfony + http://symfony.com/schema/dic/symfony/symfony-1.0.xsd"> @@ -638,7 +642,9 @@ If you enable the web profiler, you also need to mount the profiler routes: use Symfony\Component\Routing\RouteCollection; - $profiler = $loader->import('@WebProfilerBundle/Resources/config/routing/profiler.xml'); + $profiler = $loader->import( + '@WebProfilerBundle/Resources/config/routing/profiler.xml' + ); $profiler->addPrefix('/_profiler'); $collection = new RouteCollection(); From 09626311ddaf51b3b7ad090466a8368ac5f73ce7 Mon Sep 17 00:00:00 2001 From: "Andrew (Andrius) Marcinkevicius" Date: Fri, 2 Jan 2015 12:31:22 +0200 Subject: [PATCH 2/7] Fix typo: as => is | Q | A | ------------- | --- | Doc fix? | yes | New docs? | no | Applies to | 2.3 | Fixed tickets | --- contributing/code/conventions.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contributing/code/conventions.rst b/contributing/code/conventions.rst index 6f102e8f6a2..e48eebd414e 100644 --- a/contributing/code/conventions.rst +++ b/contributing/code/conventions.rst @@ -75,7 +75,7 @@ must be used instead (where ``XXX`` is the name of the related thing): While "setXXX" and "replaceXXX" are very similar, there is one notable difference: "setXXX" may replace, or add new elements to the relation. "replaceXXX", on the other hand, cannot add new elements. If an unrecognized - key as passed to "replaceXXX" it must throw an exception. + key is passed to "replaceXXX" it must throw an exception. .. _contributing-code-conventions-deprecations: From 46647c126286b79de0d92c53a7f5564370757cdf Mon Sep 17 00:00:00 2001 From: Christian Flothmann Date: Fri, 2 Jan 2015 15:34:42 +0100 Subject: [PATCH 3/7] add missing comma and remove a serial comma --- best_practices/security.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/best_practices/security.rst b/best_practices/security.rst index 0519b917edf..19ce6574c14 100644 --- a/best_practices/security.rst +++ b/best_practices/security.rst @@ -73,7 +73,7 @@ Authorization (i.e. Denying Access) ----------------------------------- Symfony gives you several ways to enforce authorization, including the ``access_control`` -configuration in :doc:`security.yml ` the +configuration in :doc:`security.yml `, the :ref:`@Security annotation ` and using :ref:`isGranted ` on the ``security.context`` service directly. @@ -232,8 +232,8 @@ Now, you can use the voter with the ``@Security`` annotation: // ... } -You can also use this directly with the ``security.context`` service, or -via the even easier shortcut in a controller: +You can also use this directly with the ``security.context`` service or via +the even easier shortcut in a controller: .. code-block:: php From f1345b2ea6faa4b526d9534794ff76a96b27325c Mon Sep 17 00:00:00 2001 From: Christian Flothmann Date: Fri, 2 Jan 2015 16:37:33 +0100 Subject: [PATCH 4/7] [Contributing][Code] update year in license --- contributing/code/license.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contributing/code/license.rst b/contributing/code/license.rst index aff6b6666d4..9f06e5b67c9 100644 --- a/contributing/code/license.rst +++ b/contributing/code/license.rst @@ -16,7 +16,7 @@ According to `Wikipedia`_: The License ----------- -Copyright (c) 2004-2013 Fabien Potencier +Copyright (c) 2004-2015 Fabien Potencier Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal From 7ffd5b93a3a825a702888bf7ba6ed6c678813cc5 Mon Sep 17 00:00:00 2001 From: jms85 Date: Sat, 29 Nov 2014 11:23:08 +0100 Subject: [PATCH 5/7] Update standard link to remove absolute URL --- best_practices/business-logic.rst | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/best_practices/business-logic.rst b/best_practices/business-logic.rst index 8a23dca6b49..053a8d2922a 100644 --- a/best_practices/business-logic.rst +++ b/best_practices/business-logic.rst @@ -326,7 +326,7 @@ Coding Standards The Symfony source code follows the `PSR-1`_ and `PSR-2`_ coding standards that were defined by the PHP community. You can learn more about -`the Symfony Code Standards`_ and even use the `PHP-CS-Fixer`_, which is +:doc:`/contributing/code/standards` and even use the `PHP-CS-Fixer`_, which is a command-line utility that can fix the coding standards of an entire codebase in a matter of seconds. @@ -335,5 +335,4 @@ in a matter of seconds. .. _`fixture class`: http://symfony.com/doc/current/bundles/DoctrineFixturesBundle/index.html#writing-simple-fixtures .. _`PSR-1`: http://www.php-fig.org/psr/psr-1/ .. _`PSR-2`: http://www.php-fig.org/psr/psr-2/ -.. _`the Symfony Code Standards`: http://symfony.com/doc/current/contributing/code/standards.html .. _`PHP-CS-Fixer`: https://github.com/FriendsOfPHP/PHP-CS-Fixer From a654c9cfafc5894e47729f8a67b99d64151fd530 Mon Sep 17 00:00:00 2001 From: Christian Flothmann Date: Fri, 2 Jan 2015 19:04:45 +0100 Subject: [PATCH 6/7] use the doc role for internal links --- best_practices/business-logic.rst | 6 +++--- best_practices/security.rst | 4 ---- book/installation.rst | 6 +++--- contributing/code/bugs.rst | 3 +-- cookbook/workflow/new_project_git.rst | 1 - quick_tour/the_big_picture.rst | 3 +-- 6 files changed, 8 insertions(+), 15 deletions(-) diff --git a/best_practices/business-logic.rst b/best_practices/business-logic.rst index 053a8d2922a..3799e7c0f83 100644 --- a/best_practices/business-logic.rst +++ b/best_practices/business-logic.rst @@ -326,9 +326,9 @@ Coding Standards The Symfony source code follows the `PSR-1`_ and `PSR-2`_ coding standards that were defined by the PHP community. You can learn more about -:doc:`/contributing/code/standards` and even use the `PHP-CS-Fixer`_, which is -a command-line utility that can fix the coding standards of an entire codebase -in a matter of seconds. +:doc:`the Symfony Coding standards ` and even +use the `PHP-CS-Fixer`_, which is a command-line utility that can fix the +coding standards of an entire codebase in a matter of seconds. .. _`full definition`: http://en.wikipedia.org/wiki/Business_logic .. _`Doctrine project`: http://www.doctrine-project.org/ diff --git a/best_practices/security.rst b/best_practices/security.rst index 0519b917edf..f4d1558a90b 100644 --- a/best_practices/security.rst +++ b/best_practices/security.rst @@ -267,9 +267,5 @@ If your company uses a user login method not supported by Symfony, you can develop :doc:`your own user provider ` and :doc:`your own authentication provider `. -.. _`Security Cookbook Section`: http://symfony.com/doc/current/cookbook/security/index.html -.. _`security.yml`: http://symfony.com/doc/current/reference/configuration/security.html .. _`@Security annotation`: http://symfony.com/doc/current/bundles/SensioFrameworkExtraBundle/annotations/security.html -.. _`security voter`: http://symfony.com/doc/current/cookbook/security/voters_data_permission.html -.. _`ACL's`: http://symfony.com/doc/current/cookbook/security/acl.html .. _`FOSUserBundle`: https://github.com/FriendsOfSymfony/FOSUserBundle diff --git a/book/installation.rst b/book/installation.rst index 9df75b0786c..e270eb87815 100644 --- a/book/installation.rst +++ b/book/installation.rst @@ -98,8 +98,9 @@ number as the second argument of the ``new`` command: # Windows c:\projects\> php symfony.phar new my_project_name 2.3.23 -Read the `Symfony Release process`_ to better understand why there are several -Symfony versions and which one to use for your projects. +Read the :doc:`Symfony Release process ` +to better understand why there are several Symfony versions and which one +to use for your projects. .. _book-creating-applications-without-the-installer: @@ -375,7 +376,6 @@ a wide variety of articles about solving specific problems with Symfony. If you want to remove the sample code from your distribution, take a look at this cookbook article: ":doc:`/cookbook/bundles/remove`" -.. _`Symfony Release process`: http://symfony.com/doc/current/contributing/community/releases.html .. _`explained in this post`: http://fabien.potencier.org/article/73/signing-project-releases .. _`Composer`: http://getcomposer.org/ .. _`Composer download page`: https://getcomposer.org/download/ diff --git a/contributing/code/bugs.rst b/contributing/code/bugs.rst index 58d1396e54a..869b830491d 100644 --- a/contributing/code/bugs.rst +++ b/contributing/code/bugs.rst @@ -11,7 +11,7 @@ us make a better Symfony. Before submitting a bug: -* Double-check the official `documentation`_ to see if you're not misusing the +* Double-check the official :doc:`documentation ` to see if you're not misusing the framework; * Ask for assistance on the `users mailing-list`_, the `forum`_, or on the @@ -34,7 +34,6 @@ If your problem definitely looks like a bug, report it using the official bug * *(optional)* Attach a :doc:`patch `. -.. _documentation: http://symfony.com/doc/current/ .. _users mailing-list: http://groups.google.com/group/symfony2 .. _forum: http://forum.symfony-project.org/ .. _IRC channel: irc://irc.freenode.net/symfony diff --git a/cookbook/workflow/new_project_git.rst b/cookbook/workflow/new_project_git.rst index f74ae969f35..66a5a251761 100644 --- a/cookbook/workflow/new_project_git.rst +++ b/cookbook/workflow/new_project_git.rst @@ -95,7 +95,6 @@ manage this is `Gitolite`_. .. _`Git`: http://git-scm.com/ .. _`Symfony Standard Edition`: http://symfony.com/download -.. _`Installing Symfony using Composer`: http://symfony.com/doc/current/book/installation.html#option-1-composer .. _`git submodules`: http://git-scm.com/book/en/Git-Tools-Submodules .. _`GitHub`: https://github.com/ .. _`barebones repository`: http://git-scm.com/book/en/Git-Basics-Getting-a-Git-Repository diff --git a/quick_tour/the_big_picture.rst b/quick_tour/the_big_picture.rst index 361bfb1b84a..1dd9e8fa48a 100644 --- a/quick_tour/the_big_picture.rst +++ b/quick_tour/the_big_picture.rst @@ -237,7 +237,7 @@ of the ``Default`` controller when the user browses the ``/`` path of the applic .. tip:: In addition to PHP annotations, routes can be configured in YAML, XML or - PHP files, as explained in `the Routing chapter of the Symfony book`_ . + PHP files, as explained in :doc:`the Routing chapter of the Symfony book `. This flexibility is one of the main features of Symfony, a framework that never imposes a particular configuration format on you. @@ -359,4 +359,3 @@ are eager to learn more about Symfony, dive into the next section: .. _Composer: https://getcomposer.org/ .. _executable installer: http://getcomposer.org/download .. _Twig: http://twig.sensiolabs.org/ -.. _the Routing chapter of the Symfony book: http://symfony.com/doc/current/book/routing.html From 6cd1a1d9a668e820aa3bd9a5d6d7ebd340f75422 Mon Sep 17 00:00:00 2001 From: "Andrew (Andrius) Marcinkevicius" Date: Wed, 31 Dec 2014 14:58:48 +0200 Subject: [PATCH 7/7] Improve readability --- book/page_creation.rst | 32 ++++++++++++++++++++------------ 1 file changed, 20 insertions(+), 12 deletions(-) diff --git a/book/page_creation.rst b/book/page_creation.rst index 32fd6cf5154..ac23536b46c 100644 --- a/book/page_creation.rst +++ b/book/page_creation.rst @@ -122,7 +122,7 @@ the bundle is registered with the kernel:: public function registerBundles() { $bundles = array( - ..., + // ... new Acme\DemoBundle\AcmeDemoBundle(), ); // ... @@ -282,7 +282,9 @@ route is matched:: { public function indexAction($limit) { - return new Response('Number: '.rand(1, $limit).''); + return new Response( + 'Number: '.rand(1, $limit).'' + ); } } @@ -420,7 +422,7 @@ Step through the Twig template line-by-line: The parent template, ``::base.html.twig``, is missing both the **BundleName** and **ControllerName** portions of its name (hence the double colon (``::``) -at the beginning). This means that the template lives outside of the bundles +at the beginning). This means that the template lives outside of the bundle and in the ``app`` directory: .. configuration-block:: @@ -451,7 +453,8 @@ and in the ``app`` directory: <?php $view['slots']->output('title', 'Welcome!') ?> output('stylesheets') ?> - + output('_content') ?> @@ -718,8 +721,8 @@ Now that you've created the bundle, enable it via the ``AppKernel`` class:: public function registerBundles() { $bundles = array( - ..., - // register your bundles + // ... + // register your bundle new Acme\TestBundle\AcmeTestBundle(), ); // ... @@ -824,9 +827,12 @@ format you prefer: xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:framework="http://symfony.com/schema/dic/symfony" xmlns:twig="http://symfony.com/schema/dic/twig" - xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd - http://symfony.com/schema/dic/symfony http://symfony.com/schema/dic/symfony/symfony-1.0.xsd - http://symfony.com/schema/dic/twig http://symfony.com/schema/dic/twig/twig-1.0.xsd"> + xsi:schemaLocation="http://symfony.com/schema/dic/services + http://symfony.com/schema/dic/services/services-1.0.xsd + http://symfony.com/schema/dic/symfony + http://symfony.com/schema/dic/symfony/symfony-1.0.xsd + http://symfony.com/schema/dic/twig + http://symfony.com/schema/dic/twig/twig-1.0.xsd"> @@ -1017,8 +1023,10 @@ the configuration file for the ``dev`` environment. + xsi:schemaLocation="http://symfony.com/schema/dic/services + http://symfony.com/schema/dic/services/services-1.0.xsd + http://symfony.com/schema/dic/symfony + http://symfony.com/schema/dic/symfony/symfony-1.0.xsd"> @@ -1038,7 +1046,7 @@ the configuration file for the ``dev`` environment. $loader->import('config.php'); $container->loadFromExtension('framework', array( - 'router' => array( + 'router' => array( 'resource' => '%kernel.root_dir%/config/routing_dev.php', ), 'profiler' => array('only-exceptions' => false),