Skip to content

Commit 8fbcd31

Browse files
committed
Merge remote-tracking branch 'upstream/master'
2 parents 20d3a3f + e166d69 commit 8fbcd31

Some content is hidden

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

56 files changed

+1278
-829
lines changed

.platform.app.yaml

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
# This file describes an application. You can have multiple applications
2+
# in the same project.
3+
4+
# The name of this app. Must be unique within a project.
5+
name: symfonydocs
6+
7+
# The toolstack used to build the application.
8+
type: "php"
9+
10+
build:
11+
flavor: "composer"
12+
13+
# The configuration of app when it is exposed to the web.
14+
web:
15+
# The public directory of the app, relative to its root.
16+
document_root: "/_build/html"
17+
index_files:
18+
- index.html
19+
whitelist:
20+
- \.html$
21+
- \.txt$
22+
23+
# CSS and Javascript.
24+
- \.css$
25+
- \.js$
26+
- \.hbs$
27+
28+
# image/* types.
29+
- \.gif$
30+
- \.png$
31+
- \.ico$
32+
- \.svgz?$
33+
34+
# fonts types.
35+
- \.ttf$
36+
- \.eot$
37+
- \.woff$
38+
- \.otf$
39+
40+
# robots.txt.
41+
- /robots\.txt$
42+
43+
# The size of the persistent disk of the application (in MB).
44+
disk: 512
45+
46+
# Build time dependencies.
47+
dependencies:
48+
python:
49+
sphinx: ">=1"
50+
51+
# The hooks that will be performed when the package is deployed.
52+
hooks:
53+
build: |
54+
pip install git+https://github.com/fabpot/sphinx-php.git
55+
make html

.platform/routes.yaml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
http://www.{default}/:
2+
to: http://{default}/
3+
type: redirect
4+
http://{default}/:
5+
cache:
6+
cookies:
7+
- '*'
8+
default_ttl: 0
9+
enabled: true
10+
headers:
11+
- Accept
12+
- Accept-Language
13+
ssi:
14+
enabled: false
15+
type: upstream
16+
upstream: symfonydocs:php

.platform/services.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# Keeping this file empty to not deploy unused services.

.travis.yml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,18 @@
11
language: python
22

3-
python:
4-
- "2.7"
3+
python: "2.7"
54

65
sudo: false
76

8-
install:
9-
- "pip install -q -r requirements.txt --use-mirrors"
7+
cache:
8+
directories:
9+
- $HOME/.cache/pip
10+
- _build
11+
12+
install: pip install sphinx==1.1.3
1013

1114
script: sphinx-build -nW -b html -d _build/doctrees . _build/html
1215

1316
branches:
1417
except:
1518
- github-comments
16-

README.markdown

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,8 @@ Contributing
1414
We love contributors! For more information on how you can contribute to the
1515
Symfony documentation, please read
1616
[Contributing to the Documentation](https://symfony.com/doc/current/contributing/documentation/overview.html)
17+
18+
Platform.sh
19+
-----------
20+
21+
Pull requests are automatically built by [Platform.sh](https://platform.sh).

book/forms.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1145,6 +1145,8 @@ the choice is ultimately up to you.
11451145

11461146
$form->get('dueDate')->setData(new \DateTime());
11471147

1148+
.. _form-as-services:
1149+
11481150
Defining your Forms as Services
11491151
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
11501152

book/http_fundamentals.rst

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -96,9 +96,11 @@ delete a specific blog entry, for example:
9696
9797
.. note::
9898

99-
There are actually nine HTTP methods defined by the HTTP specification,
100-
but many of them are not widely used or supported. In reality, many modern
101-
browsers don't even support the ``PUT`` and ``DELETE`` methods.
99+
There are actually nine HTTP methods (also known as verbs) defined by
100+
the HTTP specification, but many of them are not widely used or supported.
101+
In reality, many modern browsers only support ``POST`` and ``GET`` in
102+
HTML forms. Various others are however supported in XMLHttpRequests,
103+
as well as by Symfony's router.
102104

103105
In addition to the first line, an HTTP request invariably contains other
104106
lines of information called request headers. The headers can supply a wide

book/installation.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ based on `Composer`_.
127127

128128
Composer is the dependency manager used by modern PHP applications and it can
129129
also be used to create new applications based on the Symfony Framework. If you
130-
don't have installed it globally, start by reading the next section.
130+
don't have it installed globally, start by reading the next section.
131131

132132
Installing Composer Globally
133133
~~~~~~~~~~~~~~~~~~~~~~~~~~~~

book/routing.rst

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -830,36 +830,36 @@ be accomplished with the following route configuration:
830830
class MainController extends Controller
831831
{
832832
/**
833-
* @Route("/contact")
833+
* @Route("/news")
834834
* @Method("GET")
835835
*/
836-
public function contactAction()
836+
public function newsAction()
837837
{
838-
// ... display contact form
838+
// ... display your news
839839
}
840840
841841
/**
842842
* @Route("/contact")
843-
* @Method("POST")
843+
* @Method({"GET", "POST"})
844844
*/
845-
public function processContactAction()
845+
public function contactFormAction()
846846
{
847-
// ... process contact form
847+
// ... display and process a contact form
848848
}
849849
}
850850
851851
.. code-block:: yaml
852852
853853
# app/config/routing.yml
854-
contact:
855-
path: /contact
856-
defaults: { _controller: AppBundle:Main:contact }
854+
news:
855+
path: /news
856+
defaults: { _controller: AppBundle:Main:news }
857857
methods: [GET]
858858
859-
contact_process:
859+
contact_form:
860860
path: /contact
861-
defaults: { _controller: AppBundle:Main:processContact }
862-
methods: [POST]
861+
defaults: { _controller: AppBundle:Main:contactForm }
862+
methods: [GET, POST]
863863
864864
.. code-block:: xml
865865
@@ -870,12 +870,12 @@ be accomplished with the following route configuration:
870870
xsi:schemaLocation="http://symfony.com/schema/routing
871871
http://symfony.com/schema/routing/routing-1.0.xsd">
872872
873-
<route id="contact" path="/contact" methods="GET">
874-
<default key="_controller">AppBundle:Main:contact</default>
873+
<route id="news" path="/news" methods="GET">
874+
<default key="_controller">AppBundle:Main:news</default>
875875
</route>
876876
877-
<route id="contact_process" path="/contact" methods="POST">
878-
<default key="_controller">AppBundle:Main:processContact</default>
877+
<route id="contact_form" path="/contact" methods="GET|POST">
878+
<default key="_controller">AppBundle:Main:contactForm</default>
879879
</route>
880880
</routes>
881881
@@ -886,13 +886,13 @@ be accomplished with the following route configuration:
886886
use Symfony\Component\Routing\Route;
887887
888888
$collection = new RouteCollection();
889-
$collection->add('contact', new Route('/contact', array(
889+
$collection->add('news', new Route('/news', array(
890890
'_controller' => 'AppBundle:Main:contact',
891891
), array(), array(), '', array(), array('GET')));
892892
893-
$collection->add('contact_process', new Route('/contact', array(
894-
'_controller' => 'AppBundle:Main:processContact',
895-
), array(), array(), '', array(), array('POST')));
893+
$collection->add('contact_form', new Route('/contact', array(
894+
'_controller' => 'AppBundle:Main:contactForm',
895+
), array(), array(), '', array(), array('GET', 'POST')));
896896
897897
return $collection;
898898

book/security.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -994,10 +994,10 @@ other users. Also, as the admin user, you yourself want to be able to edit
994994

995995
To accomplish this you have 2 options:
996996

997-
* :doc:`Voters </cookbook/security/voters_data_permission>` allow you to
998-
use business logic (e.g. the user can edit this post because they were
999-
the creator) to determine access. You'll probably want this option - it's
1000-
flexible enough to solve the above situation.
997+
* :doc:`Voters </cookbook/security/voters>` allow you to write own business logic
998+
(e.g. the user can edit this post because they were the creator) to determine
999+
access. You'll probably want this option - it's flexible enough to solve the
1000+
above situation.
10011001

10021002
* :doc:`ACLs </cookbook/security/acl>` allow you to create a database structure
10031003
where you can assign *any* arbitrary user *any* access (e.g. EDIT, VIEW)
@@ -1378,7 +1378,7 @@ Learn More from the Cookbook
13781378

13791379
* :doc:`Forcing HTTP/HTTPS </cookbook/security/force_https>`
13801380
* :doc:`Impersonating a User </cookbook/security/impersonating_user>`
1381-
* :doc:`/cookbook/security/voters_data_permission`
1381+
* :doc:`/cookbook/security/voters`
13821382
* :doc:`Access Control Lists (ACLs) </cookbook/security/acl>`
13831383
* :doc:`/cookbook/security/remember_me`
13841384
* :doc:`/cookbook/security/multiple_user_providers`

0 commit comments

Comments
 (0)