Skip to content

Commit

Permalink
Merge branch '2.5' into 2.6
Browse files Browse the repository at this point in the history
Conflicts:
	best_practices/security.rst
  • Loading branch information
wouterj committed Jan 2, 2015
2 parents 3eb14aa + c05e78f commit 0df1064
Show file tree
Hide file tree
Showing 10 changed files with 43 additions and 37 deletions.
7 changes: 3 additions & 4 deletions best_practices/business-logic.rst
Original file line number Diff line number Diff line change
Expand Up @@ -326,14 +326,13 @@ 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
a command-line utility that can fix the coding standards of an entire codebase
in a matter of seconds.
:doc:`the Symfony Coding standards </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.

.. _`full definition`: http://en.wikipedia.org/wiki/Business_logic
.. _`Doctrine project`: http://www.doctrine-project.org/
.. _`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
8 changes: 2 additions & 6 deletions best_practices/security.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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 </reference/configuration/security>` the
configuration in :doc:`security.yml </reference/configuration/security>`, the
:ref:`@Security annotation <best-practices-security-annotation>` and using
:ref:`isGranted <best-practices-directly-isGranted>` on the ``security.authorization_checker``
service directly.
Expand Down Expand Up @@ -315,7 +315,7 @@ Now, you can use the voter with the ``@Security`` annotation:
// ...
}
You can also use this directly with the ``security.authorization_checker`` service, or
You can also use this directly with the ``security.authorization_checker`` service or
via the even easier shortcut in a controller:

.. code-block:: php
Expand Down Expand Up @@ -354,11 +354,7 @@ If your company uses a user login method not supported by Symfony, you can
develop :doc:`your own user provider </cookbook/security/custom_provider>` and
:doc:`your own authentication provider </cookbook/security/custom_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
.. _`ParamConverter`: http://symfony.com/doc/current/bundles/SensioFrameworkExtraBundle/annotations/converters.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
.. _`expression`: http://symfony.com/doc/current/components/expression_language/introduction.html
.. _`FOSUserBundle`: https://github.com/FriendsOfSymfony/FOSUserBundle
6 changes: 3 additions & 3 deletions book/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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 </contributing/community/releases>`
to better understand why there are several Symfony versions and which one
to use for your projects.

.. _book-creating-applications-without-the-installer:

Expand Down Expand Up @@ -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/
Expand Down
16 changes: 11 additions & 5 deletions book/internals.rst
Original file line number Diff line number Diff line change
Expand Up @@ -555,7 +555,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
Expand Down Expand Up @@ -599,9 +600,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">
<!-- load the profiler -->
<framework:config>
Expand Down Expand Up @@ -661,7 +665,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();
Expand Down
32 changes: 20 additions & 12 deletions book/page_creation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ the bundle is registered with the kernel::
public function registerBundles()
{
$bundles = array(
...,
// ...
new Acme\DemoBundle\AcmeDemoBundle(),
);
// ...
Expand Down Expand Up @@ -282,7 +282,9 @@ route is matched::
{
public function indexAction($limit)
{
return new Response('<html><body>Number: '.rand(1, $limit).'</body></html>');
return new Response(
'<html><body>Number: '.rand(1, $limit).'</body></html>'
);
}
}

Expand Down Expand Up @@ -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::
Expand Down Expand Up @@ -451,7 +453,8 @@ and in the ``app`` directory:
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title><?php $view['slots']->output('title', 'Welcome!') ?></title>
<?php $view['slots']->output('stylesheets') ?>
<link rel="shortcut icon" href="<?php echo $view['assets']->getUrl('favicon.ico') ?>" />
<link rel="shortcut icon"
href="<?php echo $view['assets']->getUrl('favicon.ico') ?>" />
</head>
<body>
<?php $view['slots']->output('_content') ?>
Expand Down Expand Up @@ -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(),
);
// ...
Expand Down Expand Up @@ -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">
<imports>
<import resource="parameters.yml" />
Expand Down Expand Up @@ -1017,8 +1023,10 @@ the configuration file for the ``dev`` environment.
<container xmlns="http://symfony.com/schema/dic/services"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
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/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/symfony
http://symfony.com/schema/dic/symfony/symfony-1.0.xsd">
<imports>
<import resource="config.xml" />
Expand All @@ -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),
Expand Down
3 changes: 1 addition & 2 deletions contributing/code/bugs.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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 </index>` to see if you're not misusing the
framework;

* Ask for assistance on the `users mailing-list`_, the `forum`_, or on the
Expand All @@ -34,7 +34,6 @@ If your problem definitely looks like a bug, report it using the official bug

* *(optional)* Attach a :doc:`patch <patches>`.

.. _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
Expand Down
2 changes: 1 addition & 1 deletion contributing/code/conventions.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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:

Expand Down
2 changes: 1 addition & 1 deletion contributing/code/license.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion cookbook/workflow/new_project_git.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 1 addition & 2 deletions quick_tour/the_big_picture.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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 </book/routing>`.
This flexibility is one of the main features of Symfony, a framework that
never imposes a particular configuration format on you.

Expand Down Expand Up @@ -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

0 comments on commit 0df1064

Please sign in to comment.