Skip to content

Commit 79806ac

Browse files
authored
Merge branch '2.7' into reorder-doctrine-conf-ref-sections
2 parents 996b219 + a04a412 commit 79806ac

File tree

216 files changed

+3046
-1846
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

216 files changed

+3046
-1846
lines changed

.platform.app.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,4 +57,5 @@ hooks:
5757
export PIP_USER=
5858
pip install pip==9.0.1 wheel==0.29.0
5959
pip install -r _build/.requirements.txt
60+
find .virtualenv -type f -name "*.rst" -delete
6061
make -C _build html

.travis.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ sudo: false
66
cache:
77
directories: [$HOME/.cache/pip]
88

9-
install: pip install sphinx~=1.3.0 git+https://github.com/fabpot/sphinx-php.git
9+
install: pip install -r _build/.requirements.txt
1010

11-
script: sphinx-build -nW -c _build/ -b html -d _build/doctrees . _build/html
11+
script: make -C _build SPHINXOPTS=-nW html
1212

1313
branches:
1414
except:

_build/.requirements.txt

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
1-
alabaster==0.7.9
2-
Babel==2.3.4
1+
alabaster==0.7.10
2+
Babel==2.4.0
33
docutils==0.13.1
44
imagesize==0.7.1
5-
Jinja2==2.9.4
6-
MarkupSafe==0.23
5+
Jinja2==2.9.6
6+
MarkupSafe==1.0
77
Pygments==2.2.0
8-
pytz==2016.10
8+
pytz==2017.2
99
requests==2.12.5
1010
six==1.10.0
1111
snowballstemmer==1.2.1
12-
Sphinx==1.5.2
12+
Sphinx==1.3.6
1313
git+https://github.com/fabpot/sphinx-php.git@7312eccce9465640752e51373a480da700e02345#egg_name=sphinx-php
14-

_build/redirection_map

Lines changed: 24 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -76,13 +76,20 @@
7676
/book/configuration /configuration
7777
/book/propel /propel/propel
7878
/book/performance /performance
79-
/cookbook/assetic/apply_to_option /assetic/apply_to_option
80-
/cookbook/assetic/asset_management /assetic/asset_management
81-
/cookbook/assetic/index /assetic
82-
/cookbook/assetic/jpeg_optimize /assetic/jpeg_optimize
83-
/cookbook/assetic/php /assetic/php
84-
/cookbook/assetic/uglifyjs /assetic/uglifyjs
85-
/cookbook/assetic/yuicompressor /assetic/yuicompressor
79+
/cookbook/assetic/apply_to_option /frontend/assetic/apply_to_option
80+
/cookbook/assetic/asset_management /frontend/assetic/asset_management
81+
/cookbook/assetic/index /frontend/assetic
82+
/cookbook/assetic/jpeg_optimize /frontend/assetic/jpeg_optimize
83+
/cookbook/assetic/php /frontend/assetic/php
84+
/cookbook/assetic/uglifyjs /frontend/assetic/uglifyjs
85+
/cookbook/assetic/yuicompressor /frontend/assetic/yuicompressor
86+
/assetic /frontend/assetic
87+
/assetic/apply_to_option /frontend/assetic/apply_to_option
88+
/assetic/asset_management /frontend/assetic/asset_management
89+
/assetic/jpeg_optimize /frontend/assetic/jpeg_optimize
90+
/assetic/php /frontend/assetic/php
91+
/assetic/uglifyjs /frontend/assetic/uglifyjs
92+
/assetic/yuicompressor /frontend/assetic/yuicompressor
8693
/cookbook/bundles/best_practices /bundles/best_practices
8794
/cookbook/bundles/configuration /bundles/configuration
8895
/cookbook/bundles/extension /bundles/extension
@@ -150,7 +157,8 @@
150157
/cookbook/event_dispatcher/event_listener /event_dispatcher
151158
/cookbook/event_dispatcher/index /event_dispatcher
152159
/cookbook/event_dispatcher/method_behavior /event_dispatcher/method_behavior
153-
/cookbook/expressions /expressions/expressions
160+
/cookbook/expressions /security/expressions
161+
/expressions /security/expressions
154162
/cookbook/form/create_custom_field_type /form/create_custom_field_type
155163
/cookbook/form/create_form_type_extension /form/create_form_type_extension
156164
/cookbook/form/data_transformers /form/data_transformers
@@ -162,7 +170,7 @@
162170
/cookbook/form/inherit_data_option /form/inherit_data_option
163171
/cookbook/form/unit_testing /form/unit_testing
164172
/cookbook/form/use_empty_data /form/use_empty_data
165-
/cookbook/frontend/bower /frontend/bower
173+
/cookbook/frontend/bower /frontend
166174
/cookbook/frontend/index /frontend
167175
/cookbook/install/unstable_versions /setup/unstable_versions
168176
/cookbook/install/bundles /setup/bundles
@@ -181,10 +189,10 @@
181189
/cookbook/profiler/matchers /profiler/matchers
182190
/cookbook/profiler/profiling_data /profiler/profiling_data
183191
/cookbook/profiler/storage /profiler/storage
184-
/cookbook/psr7 /request/psr7
192+
/cookbook/psr7 /components/psr7
185193
/cookbook/request/index /request
186-
/cookbook/request/load_balancer_reverse_proxy /request/load_balancer_reverse_proxy
187-
/cookbook/request/mime_type /request/mime_type
194+
/cookbook/request/load_balancer_reverse_proxy /deployment/proxies
195+
/cookbook/request/mime_type /reference/configuration/framework#formats
188196
/cookbook/routing/conditions /routing/conditions
189197
/cookbook/routing/custom_route_loader /routing/custom_route_loader
190198
/cookbook/routing/debug /routing/debug
@@ -255,7 +263,7 @@
255263
/cookbook/upgrade/minor_version /setup/upgrade_major
256264
/cookbook/upgrade/patch_version /upgrade/bundles
257265
/cookbook/validation/custom_constraint /validation/custom_constraint
258-
/cookbook/validation/group_service_resolver /validation/group_service_resolver
266+
/cookbook/validation/group_service_resolver /form/validation_group_service_resolver
259267
/cookbook/validation/index /validation
260268
/cookbook/validation/severity /validation/severity
261269
/cookbook/web_server/built_in /setup/built_in_web_server
@@ -303,6 +311,7 @@
303311
/components/form/type_guesser /form/type_guesser
304312
/components/http_foundation/index /components/http_foundation
305313
/components/http_foundation/introduction /components/http_foundation
314+
/components/http_foundation/trusting_proxies /deployment/proxies
306315
/components/http_kernel/introduction /components/http_kernel
307316
/components/http_kernel/index /components/http_kernel
308317
/components/property_access/introduction /components/property_access
@@ -326,3 +335,5 @@
326335
/install/bundles /setup/bundles
327336
/form /forms
328337
/testing/simulating_authentication /testing/http_authentication
338+
/validation/group_service_resolver /form/validation_group_service_resolver
339+
/request/load_balancer_reverse_proxy /deployment/proxies

_images/form/simple-form.png

-5.47 KB
Loading

best_practices/controllers.rst

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,7 @@ for the homepage of our app:
9595
9696
namespace AppBundle\Controller;
9797
98+
use AppBundle\Entity\Post;
9899
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
99100
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
100101
@@ -106,7 +107,7 @@ for the homepage of our app:
106107
public function indexAction()
107108
{
108109
$posts = $this->getDoctrine()
109-
->getRepository('AppBundle:Post')
110+
->getRepository(Post::class)
110111
->findLatest();
111112
112113
return $this->render('default/index.html.twig', array(
@@ -170,7 +171,7 @@ manually. In our application, we have this situation in ``CommentController``:
170171
public function newAction(Request $request, $postSlug)
171172
{
172173
$post = $this->getDoctrine()
173-
->getRepository('AppBundle:Post')
174+
->getRepository(Post::class)
174175
->findOneBy(array('slug' => $postSlug));
175176
176177
if (!$post) {

best_practices/security.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ more advanced use-case, you can always do the same security check in PHP:
226226
*/
227227
public function editAction($id)
228228
{
229-
$post = $this->getDoctrine()->getRepository('AppBundle:Post')
229+
$post = $this->getDoctrine()->getRepository(Post::class)
230230
->find($id);
231231
232232
if (!$post) {

best_practices/templates.rst

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -30,22 +30,20 @@ Template Locations
3030
Store all your application's templates in ``app/Resources/views/`` directory.
3131

3232
Traditionally, Symfony developers stored the application templates in the
33-
``Resources/views/`` directory of each bundle. Then they used the logical name
34-
to refer to them (e.g. ``AcmeDemoBundle:Default:index.html.twig``).
33+
``Resources/views/`` directory of each bundle. Then they used the Twig namespaced
34+
path to refer to them (e.g. ``@AcmeDemo/Default/index.html.twig``).
3535

3636
But for the templates used in your application, it's much more convenient
3737
to store them in the ``app/Resources/views/`` directory. For starters, this
3838
drastically simplifies their logical names:
3939

40-
================================================= ==================================
41-
Templates Stored inside Bundles Templates Stored in ``app/``
42-
================================================= ==================================
43-
``AcmeDemoBundle:Default:index.html.twig`` ``default/index.html.twig``
44-
``::layout.html.twig`` ``layout.html.twig``
45-
``AcmeDemoBundle::index.html.twig`` ``index.html.twig``
46-
``AcmeDemoBundle:Default:subdir/index.html.twig`` ``default/subdir/index.html.twig``
47-
``AcmeDemoBundle:Default/subdir:index.html.twig`` ``default/subdir/index.html.twig``
48-
================================================= ==================================
40+
============================================ ==================================
41+
Templates Stored inside Bundles Templates Stored in ``app/``
42+
============================================ ==================================
43+
``@AcmeDemo/index.html.twig`` ``index.html.twig``
44+
``@AcmeDemo/Default/index.html.twig`` ``default/index.html.twig``
45+
``@AcmeDemo/Default/subdir/index.html.twig`` ``default/subdir/index.html.twig``
46+
============================================ ==================================
4947

5048
Another advantage is that centralizing your templates simplifies the work
5149
of your designers. They don't need to look for templates in lots of directories
@@ -131,7 +129,7 @@ service in the constructor of the Twig extension:
131129
new \Twig_SimpleFilter(
132130
'md2html',
133131
array($this, 'markdownToHtml'),
134-
array('is_safe' => array('html'))
132+
array('is_safe' => array('html'), 'pre_escape' => 'html')
135133
),
136134
);
137135
}

best_practices/web-assets.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ tools like GruntJS.
4949
Use Assetic to compile, combine and minimize web assets, unless you're
5050
comfortable with frontend tools like GruntJS.
5151

52-
:doc:`Assetic </assetic/asset_management>` is an asset manager capable
52+
:doc:`Assetic </frontend/assetic/asset_management>` is an asset manager capable
5353
of compiling assets developed with a lot of different frontend technologies
5454
like LESS, Sass and CoffeeScript. Combining all your assets with Assetic is a
5555
matter of wrapping all the assets with a single Twig tag:
@@ -87,8 +87,8 @@ Learn More about Assetic
8787
------------------------
8888

8989
Assetic can also minimize CSS and JavaScript assets
90-
:doc:`using UglifyCSS/UglifyJS </assetic/uglifyjs>` to speed up your
91-
websites. You can even :doc:`compress images </assetic/jpeg_optimize>`
90+
:doc:`using UglifyCSS/UglifyJS </frontend/assetic/uglifyjs>` to speed up your
91+
websites. You can even :doc:`compress images </frontend/assetic/jpeg_optimize>`
9292
with Assetic to reduce their size before serving them to the user. Check out
9393
the `official Assetic documentation`_ to learn more about all the available
9494
features.

0 commit comments

Comments
 (0)