Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit fcfea43

Browse filesBrowse files
committed
Merge branch '2.7'
2 parents 353995e + 0df1064 commit fcfea43
Copy full SHA for fcfea43

File tree

Expand file treeCollapse file tree

13 files changed

+55
-46
lines changed
Filter options
Expand file treeCollapse file tree

13 files changed

+55
-46
lines changed

‎best_practices/business-logic.rst

Copy file name to clipboardExpand all lines: best_practices/business-logic.rst
+3-4Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -326,14 +326,13 @@ Coding Standards
326326

327327
The Symfony source code follows the `PSR-1`_ and `PSR-2`_ coding standards that
328328
were defined by the PHP community. You can learn more about
329-
`the Symfony Code Standards`_ and even use the `PHP-CS-Fixer`_, which is
330-
a command-line utility that can fix the coding standards of an entire codebase
331-
in a matter of seconds.
329+
:doc:`the Symfony Coding standards </contributing/code/standards>` and even
330+
use the `PHP-CS-Fixer`_, which is a command-line utility that can fix the
331+
coding standards of an entire codebase in a matter of seconds.
332332

333333
.. _`full definition`: http://en.wikipedia.org/wiki/Business_logic
334334
.. _`Doctrine project`: http://www.doctrine-project.org/
335335
.. _`fixture class`: http://symfony.com/doc/current/bundles/DoctrineFixturesBundle/index.html#writing-simple-fixtures
336336
.. _`PSR-1`: http://www.php-fig.org/psr/psr-1/
337337
.. _`PSR-2`: http://www.php-fig.org/psr/psr-2/
338-
.. _`the Symfony Code Standards`: http://symfony.com/doc/current/contributing/code/standards.html
339338
.. _`PHP-CS-Fixer`: https://github.com/FriendsOfPHP/PHP-CS-Fixer

‎best_practices/security.rst

Copy file name to clipboardExpand all lines: best_practices/security.rst
+2-6Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ Authorization (i.e. Denying Access)
7373
-----------------------------------
7474

7575
Symfony gives you several ways to enforce authorization, including the ``access_control``
76-
configuration in :doc:`security.yml </reference/configuration/security>` the
76+
configuration in :doc:`security.yml </reference/configuration/security>`, the
7777
:ref:`@Security annotation <best-practices-security-annotation>` and using
7878
:ref:`isGranted <best-practices-directly-isGranted>` on the ``security.authorization_checker``
7979
service directly.
@@ -315,7 +315,7 @@ Now, you can use the voter with the ``@Security`` annotation:
315315
// ...
316316
}
317317
318-
You can also use this directly with the ``security.authorization_checker`` service, or
318+
You can also use this directly with the ``security.authorization_checker`` service or
319319
via the even easier shortcut in a controller:
320320

321321
.. code-block:: php
@@ -354,11 +354,7 @@ If your company uses a user login method not supported by Symfony, you can
354354
develop :doc:`your own user provider </cookbook/security/custom_provider>` and
355355
:doc:`your own authentication provider </cookbook/security/custom_authentication_provider>`.
356356

357-
.. _`Security Cookbook Section`: http://symfony.com/doc/current/cookbook/security/index.html
358-
.. _`security.yml`: http://symfony.com/doc/current/reference/configuration/security.html
359357
.. _`ParamConverter`: http://symfony.com/doc/current/bundles/SensioFrameworkExtraBundle/annotations/converters.html
360358
.. _`@Security annotation`: http://symfony.com/doc/current/bundles/SensioFrameworkExtraBundle/annotations/security.html
361-
.. _`security voter`: http://symfony.com/doc/current/cookbook/security/voters_data_permission.html
362-
.. _`ACL's`: http://symfony.com/doc/current/cookbook/security/acl.html
363359
.. _`expression`: http://symfony.com/doc/current/components/expression_language/introduction.html
364360
.. _`FOSUserBundle`: https://github.com/FriendsOfSymfony/FOSUserBundle

‎book/installation.rst

Copy file name to clipboardExpand all lines: book/installation.rst
+3-3Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -98,8 +98,9 @@ number as the second argument of the ``new`` command:
9898
# Windows
9999
c:\projects\> php symfony.phar new my_project_name 2.3.23
100100
101-
Read the `Symfony Release process`_ to better understand why there are several
102-
Symfony versions and which one to use for your projects.
101+
Read the :doc:`Symfony Release process </contributing/community/releases>`
102+
to better understand why there are several Symfony versions and which one
103+
to use for your projects.
103104

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

@@ -375,7 +376,6 @@ a wide variety of articles about solving specific problems with Symfony.
375376
If you want to remove the sample code from your distribution, take a look
376377
at this cookbook article: ":doc:`/cookbook/bundles/remove`"
377378

378-
.. _`Symfony Release process`: http://symfony.com/doc/current/contributing/community/releases.html
379379
.. _`explained in this post`: http://fabien.potencier.org/article/73/signing-project-releases
380380
.. _`Composer`: http://getcomposer.org/
381381
.. _`Composer download page`: https://getcomposer.org/download/

‎book/internals.rst

Copy file name to clipboardExpand all lines: book/internals.rst
+11-5Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -555,7 +555,8 @@ method to access tokens based on some criteria::
555555
$tokens = $container->get('profiler')->find('127.0.0.1', '', 10, '', '');
556556

557557
// get the latest 10 tokens for requests that happened between 2 and 4 days ago
558-
$tokens = $container->get('profiler')->find('', '', 10, '4 days ago', '2 days ago');
558+
$tokens = $container->get('profiler')
559+
->find('', '', 10, '4 days ago', '2 days ago');
559560

560561
If you want to manipulate profiling data on a different machine than the one
561562
where the information were generated, use the
@@ -599,9 +600,12 @@ the configuration for the development environment:
599600
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
600601
xmlns:webprofiler="http://symfony.com/schema/dic/webprofiler"
601602
xmlns:framework="http://symfony.com/schema/dic/symfony"
602-
xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd
603-
http://symfony.com/schema/dic/webprofiler http://symfony.com/schema/dic/webprofiler/webprofiler-1.0.xsd
604-
http://symfony.com/schema/dic/symfony http://symfony.com/schema/dic/symfony/symfony-1.0.xsd">
603+
xsi:schemaLocation="http://symfony.com/schema/dic/services
604+
http://symfony.com/schema/dic/services/services-1.0.xsd
605+
http://symfony.com/schema/dic/webprofiler
606+
http://symfony.com/schema/dic/webprofiler/webprofiler-1.0.xsd
607+
http://symfony.com/schema/dic/symfony
608+
http://symfony.com/schema/dic/symfony/symfony-1.0.xsd">
605609
606610
<!-- load the profiler -->
607611
<framework:config>
@@ -661,7 +665,9 @@ If you enable the web profiler, you also need to mount the profiler routes:
661665
662666
use Symfony\Component\Routing\RouteCollection;
663667
664-
$profiler = $loader->import('@WebProfilerBundle/Resources/config/routing/profiler.xml');
668+
$profiler = $loader->import(
669+
'@WebProfilerBundle/Resources/config/routing/profiler.xml'
670+
);
665671
$profiler->addPrefix('/_profiler');
666672
667673
$collection = new RouteCollection();

‎book/page_creation.rst

Copy file name to clipboardExpand all lines: book/page_creation.rst
+20-12Lines changed: 20 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ the bundle is registered with the kernel::
122122
public function registerBundles()
123123
{
124124
$bundles = array(
125-
...,
125+
// ...
126126
new Acme\DemoBundle\AcmeDemoBundle(),
127127
);
128128
// ...
@@ -282,7 +282,9 @@ route is matched::
282282
{
283283
public function indexAction($limit)
284284
{
285-
return new Response('<html><body>Number: '.rand(1, $limit).'</body></html>');
285+
return new Response(
286+
'<html><body>Number: '.rand(1, $limit).'</body></html>'
287+
);
286288
}
287289
}
288290

@@ -420,7 +422,7 @@ Step through the Twig template line-by-line:
420422

421423
The parent template, ``::base.html.twig``, is missing both the **BundleName**
422424
and **ControllerName** portions of its name (hence the double colon (``::``)
423-
at the beginning). This means that the template lives outside of the bundles
425+
at the beginning). This means that the template lives outside of the bundle
424426
and in the ``app`` directory:
425427

426428
.. configuration-block::
@@ -451,7 +453,8 @@ and in the ``app`` directory:
451453
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
452454
<title><?php $view['slots']->output('title', 'Welcome!') ?></title>
453455
<?php $view['slots']->output('stylesheets') ?>
454-
<link rel="shortcut icon" href="<?php echo $view['assets']->getUrl('favicon.ico') ?>" />
456+
<link rel="shortcut icon"
457+
href="<?php echo $view['assets']->getUrl('favicon.ico') ?>" />
455458
</head>
456459
<body>
457460
<?php $view['slots']->output('_content') ?>
@@ -718,8 +721,8 @@ Now that you've created the bundle, enable it via the ``AppKernel`` class::
718721
public function registerBundles()
719722
{
720723
$bundles = array(
721-
...,
722-
// register your bundles
724+
// ...
725+
// register your bundle
723726
new Acme\TestBundle\AcmeTestBundle(),
724727
);
725728
// ...
@@ -824,9 +827,12 @@ format you prefer:
824827
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
825828
xmlns:framework="http://symfony.com/schema/dic/symfony"
826829
xmlns:twig="http://symfony.com/schema/dic/twig"
827-
xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd
828-
http://symfony.com/schema/dic/symfony http://symfony.com/schema/dic/symfony/symfony-1.0.xsd
829-
http://symfony.com/schema/dic/twig http://symfony.com/schema/dic/twig/twig-1.0.xsd">
830+
xsi:schemaLocation="http://symfony.com/schema/dic/services
831+
http://symfony.com/schema/dic/services/services-1.0.xsd
832+
http://symfony.com/schema/dic/symfony
833+
http://symfony.com/schema/dic/symfony/symfony-1.0.xsd
834+
http://symfony.com/schema/dic/twig
835+
http://symfony.com/schema/dic/twig/twig-1.0.xsd">
830836
831837
<imports>
832838
<import resource="parameters.yml" />
@@ -1017,8 +1023,10 @@ the configuration file for the ``dev`` environment.
10171023
<container xmlns="http://symfony.com/schema/dic/services"
10181024
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10191025
xmlns:framework="http://symfony.com/schema/dic/symfony"
1020-
xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd
1021-
http://symfony.com/schema/dic/symfony http://symfony.com/schema/dic/symfony/symfony-1.0.xsd">
1026+
xsi:schemaLocation="http://symfony.com/schema/dic/services
1027+
http://symfony.com/schema/dic/services/services-1.0.xsd
1028+
http://symfony.com/schema/dic/symfony
1029+
http://symfony.com/schema/dic/symfony/symfony-1.0.xsd">
10221030
10231031
<imports>
10241032
<import resource="config.xml" />
@@ -1038,7 +1046,7 @@ the configuration file for the ``dev`` environment.
10381046
$loader->import('config.php');
10391047
10401048
$container->loadFromExtension('framework', array(
1041-
'router' => array(
1049+
'router' => array(
10421050
'resource' => '%kernel.root_dir%/config/routing_dev.php',
10431051
),
10441052
'profiler' => array('only-exceptions' => false),

‎book/routing.rst

Copy file name to clipboardExpand all lines: book/routing.rst
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1169,7 +1169,7 @@ Notice that Symfony adds the string ``Controller`` to the class name (``Blog``
11691169
=> ``BlogController``) and ``Action`` to the method name (``show`` => ``showAction``).
11701170

11711171
You could also refer to this controller using its fully-qualified class name
1172-
and method: ``Acme\BlogBundle\Controller\BlogController::showAction``.
1172+
and method: ``AppBundle\Controller\BlogController::showAction``.
11731173
But if you follow some simple conventions, the logical name is more concise
11741174
and allows more flexibility.
11751175

‎book/security.rst

Copy file name to clipboardExpand all lines: book/security.rst
+10-7Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ user to be logged in to access this URL:
209209
# ...
210210
firewalls:
211211
# ...
212-
212+
213213
access_control:
214214
# require ROLE_ADMIN for /admin*
215215
- { path: ^/admin, roles: ROLE_ADMIN }
@@ -676,7 +676,7 @@ URL pattern. You saw this earlier, where anything matching the regular expressio
676676
# ...
677677
firewalls:
678678
# ...
679-
679+
680680
access_control:
681681
# require ROLE_ADMIN for /admin*
682682
- { path: ^/admin, roles: ROLE_ADMIN }
@@ -870,9 +870,9 @@ in this chapter).
870870
Be careful with this in your layout or on your error pages! Because of
871871
some internal Symfony details, to avoid broken error pages in the ``prod``
872872
environment, wrap calls in these templates with a check for ``app.user``:
873-
873+
874874
.. code-block:: html+jinja
875-
875+
876876
{% if app.user and is_granted('ROLE_ADMIN') %}
877877

878878
Securing other Services
@@ -1036,7 +1036,7 @@ the User object, and use the ``isGranted`` method (or
10361036

10371037
// boo :(. Never check for the User object to see if they're logged in
10381038
if ($this->getUser()) {
1039-
1039+
10401040
}
10411041

10421042
Retrieving the User in a Template
@@ -1055,7 +1055,7 @@ key:
10551055

10561056
.. code-block:: html+php
10571057

1058-
<?php if ($view['security']->isGranted('IS_AUTHENTICATED_FULLY')): ?>
1058+
<?php if ($view['security']->isGranted('IS_AUTHENTICATED_FULLY')): ?>
10591059
<p>Username: <?php echo $app->getUser()->getUsername() ?></p>
10601060
<?php endif; ?>
10611061

@@ -1148,7 +1148,7 @@ Next, you'll need to create a route for this URL (but not a controller):
11481148
return $collection;
11491149
11501150
And that's it! By sending a user to ``/logout`` (or whatever you configure
1151-
the ``path`` to be), Symfony will un-authenticate the current user. and
1151+
the ``path`` to be), Symfony will un-authenticate the current user. and
11521152
redirect them the homepage (the value defined by ``target``).
11531153

11541154
Once the user has been logged out, they will be redirected to whatever path
@@ -1180,6 +1180,9 @@ in the following way from a controller::
11801180

11811181
$user->setPassword($encoded);
11821182

1183+
.. versionadded:: 2.6
1184+
The ``security.password_encoder`` service was introduced in Symfony 2.6.
1185+
11831186
In order for this to work, just make sure that you have the encoder for your
11841187
user class (e.g. ``AppBundle\Entity\User``) configured under the ``encoders``
11851188
key in ``app/config/security.yml``.

‎components/dependency_injection/factories.rst

Copy file name to clipboardExpand all lines: components/dependency_injection/factories.rst
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ be non-static.
9696
<service id="newsletter_manager.factory" class="NewsletterManagerFactory" />
9797
9898
<service id="newsletter_manager" class="NewsletterManager">
99-
<factory service="newsletter_manager.factry" method="createNewsletterManager" />
99+
<factory service="newsletter_manager.factory" method="createNewsletterManager" />
100100
</service>
101101
</services>
102102
</container>

‎contributing/code/bugs.rst

Copy file name to clipboardExpand all lines: contributing/code/bugs.rst
+1-2Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ us make a better Symfony.
1111

1212
Before submitting a bug:
1313

14-
* Double-check the official `documentation`_ to see if you're not misusing the
14+
* Double-check the official :doc:`documentation </index>` to see if you're not misusing the
1515
framework;
1616

1717
* 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
3434

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

37-
.. _documentation: http://symfony.com/doc/current/
3837
.. _users mailing-list: http://groups.google.com/group/symfony2
3938
.. _forum: http://forum.symfony-project.org/
4039
.. _IRC channel: irc://irc.freenode.net/symfony

‎contributing/code/conventions.rst

Copy file name to clipboardExpand all lines: contributing/code/conventions.rst
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ must be used instead (where ``XXX`` is the name of the related thing):
7575
While "setXXX" and "replaceXXX" are very similar, there is one notable
7676
difference: "setXXX" may replace, or add new elements to the relation.
7777
"replaceXXX", on the other hand, cannot add new elements. If an unrecognized
78-
key as passed to "replaceXXX" it must throw an exception.
78+
key is passed to "replaceXXX" it must throw an exception.
7979

8080
.. _contributing-code-conventions-deprecations:
8181

‎contributing/code/license.rst

Copy file name to clipboardExpand all lines: contributing/code/license.rst
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ According to `Wikipedia`_:
1616
The License
1717
-----------
1818

19-
Copyright (c) 2004-2013 Fabien Potencier
19+
Copyright (c) 2004-2015 Fabien Potencier
2020

2121
Permission is hereby granted, free of charge, to any person obtaining a copy
2222
of this software and associated documentation files (the "Software"), to deal

‎cookbook/workflow/new_project_git.rst

Copy file name to clipboardExpand all lines: cookbook/workflow/new_project_git.rst
-1Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,6 @@ manage this is `Gitolite`_.
9595

9696
.. _`Git`: http://git-scm.com/
9797
.. _`Symfony Standard Edition`: http://symfony.com/download
98-
.. _`Installing Symfony using Composer`: http://symfony.com/doc/current/book/installation.html#option-1-composer
9998
.. _`git submodules`: http://git-scm.com/book/en/Git-Tools-Submodules
10099
.. _`GitHub`: https://github.com/
101100
.. _`barebones repository`: http://git-scm.com/book/en/Git-Basics-Getting-a-Git-Repository

‎quick_tour/the_big_picture.rst

Copy file name to clipboardExpand all lines: quick_tour/the_big_picture.rst
+1-2Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ of the ``Default`` controller when the user browses the ``/`` path of the applic
237237
.. tip::
238238

239239
In addition to PHP annotations, routes can be configured in YAML, XML or
240-
PHP files, as explained in `the Routing chapter of the Symfony book`_ .
240+
PHP files, as explained in :doc:`the Routing chapter of the Symfony book </book/routing>`.
241241
This flexibility is one of the main features of Symfony, a framework that
242242
never imposes a particular configuration format on you.
243243

@@ -359,4 +359,3 @@ are eager to learn more about Symfony, dive into the next section:
359359
.. _Composer: https://getcomposer.org/
360360
.. _executable installer: http://getcomposer.org/download
361361
.. _Twig: http://twig.sensiolabs.org/
362-
.. _the Routing chapter of the Symfony book: http://symfony.com/doc/current/book/routing.html

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.