Skip to content

add format to Min Constraint and some minor unification of dots and quotes #2213

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1,055 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
1055 commits
Select commit Hold shift + click to select a range
6a21206
[#1962] Slight language tweak
weaverryan Nov 26, 2012
daa5950
[Stopwatch] Fixing a few standards per @WouterJ
weaverryan Nov 26, 2012
b46a025
Merge branch '2.0' into 2.1
weaverryan Nov 26, 2012
30d49c7
Merge branch '2.1'
weaverryan Nov 26, 2012
e58d132
fix copy paste mistake
Nov 26, 2012
0ac65bb
Point out what is deprecated
Nov 27, 2012
9faeb49
Sentences should end with a dot.
Nov 27, 2012
7941f8e
Added note about Service Container parameters inside routes
wouterj Nov 27, 2012
9e2363d
Merge pull request #1973 from greg0ire/document_mapped
weaverryan Nov 28, 2012
019a17f
Merge pull request #1980 from WouterJ/add_note_route_di_params
weaverryan Nov 28, 2012
56d7ff0
[#1980] Slight reword
weaverryan Nov 28, 2012
8b4919a
Changing the getVar method to get (only valid for 2.1)
Sgoettschkes Nov 28, 2012
6867e4e
Fix use statements
johnkary Nov 29, 2012
8e9d04f
Remove references to deprecated DataEvent and FilterDataEvent
johnkary Nov 29, 2012
229dd4f
Changing description of symfony installation to composer
Sgoettschkes Nov 30, 2012
31a5a62
Adding a link to composer and mentioning the installation of it.
Sgoettschkes Dec 1, 2012
9a77129
Merge pull request #1983 from Sgoettschkes/issue1906
weaverryan Dec 1, 2012
ee3dfbd
[#1983][#1906] Fixing bad prototype vars method calls on FormView
weaverryan Dec 1, 2012
7456e3e
Merge branch '2.0' into 2.1
weaverryan Dec 1, 2012
5bbc322
[#1987] Changing getEntityManager to getManager
weaverryan Dec 1, 2012
f9f0ed1
Merge pull request #1990 from johnkary/fixDeprecatedFormEvents
weaverryan Dec 1, 2012
16333e1
Bugfixing a few typos; Adding install command for composer
Sgoettschkes Dec 2, 2012
cc9d618
Remove the reqire on app/autoload from code-example
Sgoettschkes Dec 2, 2012
5986e2b
Changing text which refers to the old autoloading mechanism
Sgoettschkes Dec 2, 2012
fc3e6b9
Changing text which refers to the old app/autoload.php to mention "th…
Sgoettschkes Dec 2, 2012
e3a9757
Removing wrong mentioning of a `src/autload.php`
Sgoettschkes Dec 2, 2012
fd7a3f4
Rewriting the autoload section to include composer
Sgoettschkes Dec 2, 2012
2250f60
Reverting changes which remove mentioning of the app/autoload.php
Sgoettschkes Dec 3, 2012
e657fe2
Update components/http_foundation/introduction.rst
Cangit Dec 3, 2012
3f9a3a8
Merge pull request #1997 from Cangit/patch-1
weaverryan Dec 3, 2012
c2978e3
Partially reverting some changes and improving the original content
Sgoettschkes Dec 3, 2012
fd43e33
Fixing sysmte => system typo
Sgoettschkes Dec 4, 2012
760d20e
Fixed wrong syntax in book/performance.rst
Dec 6, 2012
a03f06f
Merge branch '2.0' into 2.1
weaverryan Dec 6, 2012
dccf123
Merge branch '2.1'
weaverryan Dec 6, 2012
ab43fd9
Added twig.loader definition to dic_tags
Dec 6, 2012
497dd7b
Typo: $app->getHelperSet() instead of $this->getHelperSet()
fabstei Dec 8, 2012
bc611fc
added docs for PrependExtensionInterface
lsmith77 Dec 7, 2012
fee85dc
Fix incorrect method name
pierredup Dec 11, 2012
a6a8d90
Merge pull request #2017 from pierredup/locale_fix
weaverryan Dec 13, 2012
44a963f
Merge branch '2.0' into 2.1
weaverryan Dec 13, 2012
ddf5c40
Merge branch '2.1'
weaverryan Dec 13, 2012
a3e41f4
[Console] Fix a typo in a method name
MattKetmo Dec 14, 2012
bd24a0a
[Form] Simplified "Dynamic Form Generation" to make use of the new al…
webmozart Dec 14, 2012
7a8b89c
Added documentation for hinclude default templates
pierredup Dec 14, 2012
4e23fee
Add missing xml reference examples. Fix MaxLength example
l3l0 Dec 15, 2012
1457519
Added convenience link
Dec 15, 2012
8b3f102
Merge pull request #1993 from Sgoettschkes/issue1951
weaverryan Dec 16, 2012
e3c71c1
[#1993] Minor syntax tweak
weaverryan Dec 16, 2012
dc40231
Merge pull request #1994 from Sgoettschkes/composer_links
weaverryan Dec 16, 2012
fe95b26
[Components] Addition of a tiny comment
weaverryan Dec 16, 2012
c6cb402
Merge pull request #1996 from Sgoettschkes/issue1176
weaverryan Dec 16, 2012
93c09e5
Merge remote-tracking branch 'origin/2.1' into 2.1
weaverryan Dec 16, 2012
da4a62a
[#1996] Fixing a few minor syntax issues
weaverryan Dec 16, 2012
1ddc3d8
Merge branch '2.0' into 2.1
weaverryan Dec 16, 2012
e360b2c
Merge branch '2.0' into 2.1
weaverryan Dec 16, 2012
4d398c1
Merge branch '2.1'
weaverryan Dec 16, 2012
61cfbfe
Merge pull request #2028 from drak/patch-5
weaverryan Dec 16, 2012
816bba8
Merge pull request #2027 from l3l0/add-some-missing-xml-constraints-r…
weaverryan Dec 16, 2012
73daebf
Merge branch '2.0' into 2.1
weaverryan Dec 16, 2012
0ce4b70
Merge branch '2.0' into 2.1
weaverryan Dec 17, 2012
1b236fb
UserPassword
franmomu Dec 15, 2012
0557c70
Merge pull request #2020 from MattKetmo/typo-console-1
weaverryan Dec 17, 2012
6396da3
Fixed example parameters with mixed INI and Yaml.
iamdto Dec 17, 2012
e68596a
Merge pull request #2021 from pierredup/hinclude
weaverryan Dec 18, 2012
a6fb752
[#2021] Breaking a line
weaverryan Dec 18, 2012
4a53877
[#2023] Adding a missing versionadded
weaverryan Dec 18, 2012
35da60d
Update cookbook/doctrine/registration_form.rst
tamirvs Dec 17, 2012
19550c8
Merge pull request #2039 from iamdto/parameters-example
weaverryan Dec 18, 2012
db71246
How to add a new package and update .lock file
gajdaw Dec 18, 2012
2c4e3f0
Fix
gajdaw Dec 18, 2012
8bd7e39
fixed typo
fabpot Dec 19, 2012
54f8557
Merge pull request #2046 from gajdaw/update-2.1
weaverryan Dec 19, 2012
67bdae4
[#2046] Minor syntax and language tweaks
weaverryan Dec 19, 2012
2c2d4ff
Merge branch '2.0' into 2.1
weaverryan Dec 19, 2012
ac44303
Added missing xml configuration examples for validation constraints
l3l0 Dec 19, 2012
bece669
Adding documentation for the CardScheme validation.
Sgoettschkes Dec 20, 2012
99da812
Improved Form Validation Docs
rdohms Dec 22, 2012
41db041
Fixing standards.
rdohms Dec 22, 2012
6878140
Merge branch '2.0' into 2.1
weaverryan Dec 23, 2012
56a0e4d
Merge branch '2.1'
weaverryan Dec 23, 2012
1cf2081
Merge remote-tracking branch 'origin/master'
weaverryan Dec 23, 2012
ef230cc
Merge branch '2.0' into 2.1
weaverryan Dec 24, 2012
eb83f8c
[#2057] Updating some syntax for the Twig render tags without the "with"
weaverryan Dec 24, 2012
b7d4d46
[#2057] Fixing another reference to the old render syntax
weaverryan Dec 24, 2012
279a6b9
Merge branch '2.1'
weaverryan Dec 24, 2012
50f8f17
Merge pull request #1862 from leevigraham/failure_path
weaverryan Dec 24, 2012
b254e35
[#1862] Fixing bad configuration for new failure_path_parameter option
weaverryan Dec 24, 2012
6cf091d
Merge branch '2.0' into 2.1
weaverryan Dec 24, 2012
a3710e1
Merge branch '2.1'
weaverryan Dec 24, 2012
6c9dc44
Merge branch '2.0' into 2.1
weaverryan Dec 26, 2012
b66cc06
Merge branch '2.1'
weaverryan Dec 26, 2012
ec46d85
Merge branch '2.0' into 2.1
weaverryan Dec 26, 2012
568392f
Merge branch '2.0' into 2.1
weaverryan Dec 26, 2012
601bb87
Merge branch '2.1'
weaverryan Dec 26, 2012
84be0e1
Merge branch '2.0' into 2.1
weaverryan Dec 26, 2012
fe86a77
Merge branch '2.1'
weaverryan Dec 26, 2012
42b698d
[#2002] Re-adding the caching information to the rendering a template…
weaverryan Dec 26, 2012
907fe4d
Merge pull request #2007 from lsmith77/extension_prepend
weaverryan Dec 26, 2012
79227c8
[#2007] Proofreading the new prepend extension docs, adding some othe…
weaverryan Dec 26, 2012
5d72b6f
Merge pull request #2005 from dantleech/twig_loader_pass
weaverryan Dec 26, 2012
be09d55
[#2005] Tweaking new docs about twig.loader
weaverryan Dec 26, 2012
5e563d3
Merge pull request #2009 from fabstei/components_console_intro_typo
weaverryan Dec 26, 2012
bb5a251
Merge pull request #2024 from bschussek/issue5806
weaverryan Dec 26, 2012
56d0081
[#2024] Added a versionadded note for the new FormInterface::add sign…
weaverryan Dec 26, 2012
9716567
Fixing syntax error
weaverryan Dec 26, 2012
7c7a8e7
Fixing code block name
rdohms Dec 27, 2012
8da7824
Changed installation chapter
wouterj Dec 29, 2012
8aeb9cf
Merge pull request #2058 from rdohms/form-validation-update
weaverryan Dec 30, 2012
bc223ac
[#2058] Tweaking constraints versus validation_constraint note per @Stof
weaverryan Dec 30, 2012
ca48e3d
[#2058] Refactoring how to add validation to a form, using the `const…
weaverryan Dec 30, 2012
d47a3c7
[#2058] Adding note about where to find the "constraints" form option…
weaverryan Dec 30, 2012
0c8840b
Merge branch '2.0' into 2.1
weaverryan Dec 30, 2012
2d23d72
[#2064] Updating the HttpKernel component documentation for Symfony 2.1
weaverryan Dec 30, 2012
6b75721
Merge branch '2.1'
weaverryan Dec 30, 2012
dc9cb77
Added data transformers types image
Dec 24, 2012
700f72d
Merge branch '2.0' into 2.1
weaverryan Dec 30, 2012
8ab5854
Merge branch '2.1'
weaverryan Dec 30, 2012
11a4e97
Merge pull request #2069 from WouterJ/patch-30
weaverryan Dec 30, 2012
64e720a
Merge pull request #2053 from l3l0/add-some-more-missing-xml-constrai…
weaverryan Dec 30, 2012
2ea1333
Merge branch '2.0' into 2.1
weaverryan Dec 30, 2012
47e72d6
Minor changes on the CardScheme validator
Sgoettschkes Dec 30, 2012
a708da8
Moving the documentation of the ProgressHelper into it's own document
Sgoettschkes Dec 30, 2012
66c94e4
Documenting the DialogHelper select method.
Sgoettschkes Dec 30, 2012
a1ed0c2
Merge pull request #2054 from Sgoettschkes/issue2023
weaverryan Dec 30, 2012
4be1ae1
Merge branch '2.0' into 2.1
weaverryan Dec 30, 2012
23c8e48
[#2054] Slight tweaks to new CardScheme document
weaverryan Dec 30, 2012
f1caeb3
Merge branch '2.1'
weaverryan Dec 30, 2012
801644d
Merge branch '2.0' into 2.1
weaverryan Dec 30, 2012
4c14ff4
[#2007] Fixing bad versionadded number - thanks to @trompette
weaverryan Dec 30, 2012
180bf50
Merge branch '2.0' into 2.1
weaverryan Dec 31, 2012
bc9b1e0
Merge branch '2.1'
weaverryan Dec 31, 2012
0d82503
Added caution about using is_granted in error pages
wouterj Dec 31, 2012
61abc95
Updating description of the DialogHelper select method
Sgoettschkes Dec 31, 2012
0f286be
Renamed warning to caution blocks
wouterj Dec 31, 2012
0e6147b
fix typos
Dec 31, 2012
0282f70
fix typos in 2.0
Dec 31, 2012
484901b
fix typos in 2.1
Dec 31, 2012
f002cea
Reworking the documentation on the DialogHelper select method
Sgoettschkes Jan 1, 2013
ec31325
[Component][Finder] Documented wildcard (glob pattern) support.
jakzal Jan 2, 2013
25382df
Merge pull request #2087 from unkind/2.1
weaverryan Jan 3, 2013
40b2858
Merge pull request #2084 from unkind/master
weaverryan Jan 3, 2013
87dda93
Merge branch '2.0' into 2.1
weaverryan Jan 3, 2013
daf9d44
Merge remote-tracking branch 'origin/master'
weaverryan Jan 3, 2013
0c00438
Merge branch '2.1'
weaverryan Jan 3, 2013
5abce65
Fixed a formatting issue in the interface name
stof Jan 3, 2013
0ffabee
Merge pull request #2095 from stof/patch-3
weaverryan Jan 3, 2013
aa4b115
Remove repeated include
andreia Dec 30, 2012
cd0e142
Merge pull request #2079 from WouterJ/issue_2078
weaverryan Jan 3, 2013
df85a35
[#2079] Tweaking language, adding "ok" example
weaverryan Jan 3, 2013
baad982
Merge pull request #2081 from WouterJ/warning_to_caution_21
weaverryan Jan 3, 2013
bd21918
Merge branch '2.0' into 2.1
weaverryan Jan 3, 2013
393e1d8
Removing some outdated references to MinLength
weaverryan Jan 3, 2013
79e7558
Merge branch '2.0' into 2.1
weaverryan Jan 3, 2013
235513a
Merge branch '2.1'
weaverryan Jan 3, 2013
2b8e09b
Added missing PHP and XML formats in new constraints
wouterj Jan 3, 2013
c9a25a5
typo fix
lsmith77 Jan 5, 2013
6bd16c2
Merge pull request #2106 from lsmith77/patch-1
weaverryan Jan 6, 2013
cf20b16
Fixed use of equals (closes #2109)
wouterj Jan 6, 2013
e721d7e
Adding versionadd for disabled and read_only form options
Sgoettschkes Jan 8, 2013
5828740
[Validation] Update CardScheme
Sgoettschkes Jan 8, 2013
5021adc
Minor changes regarding the hidden form type and form type option dis…
Sgoettschkes Jan 9, 2013
cc3ce38
Fixing minor grammer issues in CardScheme constraint
Sgoettschkes Jan 9, 2013
fe3c9dc
Adding a link to the disabled options to the read_only description
Sgoettschkes Jan 9, 2013
331001c
Merge branch '2.0' into 2.1
fabpot Jan 10, 2013
bc78096
Merge branch '2.1'
fabpot Jan 10, 2013
5065822
Merge pull request #2115 from Sgoettschkes/card_scheme
weaverryan Jan 11, 2013
6ddc50c
Merge pull request #2111 from WouterJ/patch-3
weaverryan Jan 11, 2013
6467fdc
[#2111] Minor language tweaks
weaverryan Jan 11, 2013
c2d0b99
made changes to take into account the new usage of the different cont…
fabpot Jan 12, 2013
abdcf9f
fixed markup
fabpot Jan 12, 2013
1550871
switched usage of the include tag to the include function
fabpot Jan 12, 2013
823cef3
Merge pull request #2121 from fabpot/content-renderer
weaverryan Jan 13, 2013
08a2847
[#2121] Fixing a now defunct include
weaverryan Jan 13, 2013
a8d444e
Fix UsernameNotFoundException example (take 2)
Jan 13, 2013
21178b1
[#2121] Tweaking a few things related to new render changes
weaverryan Jan 13, 2013
e6ba8e3
Merge pull request #2127 from jrobeson/patch-2
weaverryan Jan 13, 2013
d93958a
Merge branch '2.0' into 2.1
weaverryan Jan 14, 2013
6896c9b
Merge branch '2.1'
weaverryan Jan 14, 2013
9781582
Merge branch '2.0' into 2.1
weaverryan Jan 15, 2013
eed8e46
Fixed list of methods of the filesystem component
bjo3rnf Jan 4, 2013
f320634
Fixing a typo
weaverryan Jan 15, 2013
1bd5d79
Updated app_dev.php code
yosmanyga Jan 15, 2013
34dffbd
Docs for repositoryMethod option of UniqueEntity
docteurklein Jan 16, 2013
fa32729
add versionadded tag
docteurklein Jan 16, 2013
2567919
Merge branch '2.0' into 2.1
weaverryan Jan 17, 2013
2fb8acf
Merge branch '2.1'
weaverryan Jan 17, 2013
92baa85
Merge branch '2.0' into 2.1
fabpot Jan 17, 2013
9e858d0
Merge branch '2.1'
fabpot Jan 17, 2013
a758cea
Merge branch '2.0' into 2.1
weaverryan Jan 18, 2013
6ac450b
[#2148] Bringing up one of the changes made by @franmomu
weaverryan Jan 18, 2013
5e53d4c
Merge branch '2.1'
weaverryan Jan 18, 2013
ddc8747
Merge remote-tracking branch 'origin/master'
weaverryan Jan 18, 2013
f52e791
fixed filename, thanks to @rpmsk
wouterj Jan 19, 2013
c488fcc
Merge pull request #2157 from WouterJ/patch-6
weaverryan Jan 20, 2013
a9ec209
Merge branch '2.0' into 2.1
weaverryan Jan 20, 2013
df94e55
[#772] Removing unnecessary rendering of parent repeated field's erro…
weaverryan Jan 20, 2013
6fd5ffc
added a missing reference to the proxy route (refs symfony/symfony-st…
fabpot Jan 20, 2013
4191b45
Merge branch '2.0' into 2.1
weaverryan Jan 20, 2013
3a364b9
Fixing a typo, thanks to @rpmsk
weaverryan Jan 21, 2013
52713f5
Update reference/constraints/Callback.rst
sstok Jan 21, 2013
8420b02
Fixes most pattern, _scheme or _method occurences
wouterj Jan 21, 2013
38e8dad
Added use of addPrefix to define prefixes
wouterj Jan 21, 2013
75d6b4d
Addes some versionadded blocks
wouterj Jan 21, 2013
73d24f9
Grammar and syntax cleanup
johnkary Jan 21, 2013
4c48a42
Add comment on http_digest auth.
tarjei Jan 21, 2013
b784172
Update reference/configuration/security.rst
tarjei Jan 21, 2013
0de8194
Changed hostname to host
wouterj Jan 21, 2013
4e5cca2
Fixed typo, thanks to @stof
wouterj Jan 21, 2013
95bf4da
Update reference/configuration/security.rst
tarjei Jan 22, 2013
96466b9
Update reference/configuration/security.rst
tarjei Jan 22, 2013
75a4f61
Update reference/configuration/security.rst
tarjei Jan 22, 2013
240a1e2
Merge pull request #2159 from fabpot/missing-reference
weaverryan Jan 22, 2013
d35b34f
Merge pull request #2165 from WouterJ/update_routing_22
weaverryan Jan 22, 2013
6dbbb3c
[#2165] Filling in a few more changes of pattern -> path
weaverryan Jan 22, 2013
7ab8be5
replaced the proxy route with a listener
fabpot Jan 23, 2013
65494c8
Merge pull request #2169 from johnkary/stopwatchFixes-1
weaverryan Jan 23, 2013
4d23c70
merged branch fabpot/content-renderer-simplification (PR #2179)
fabpot Jan 24, 2013
bbddf52
[DI] PrependExtensionInterface sync doc with latest Sf2 changes
vicb Jan 24, 2013
854bf0e
Merge pull request #2170 from tarjei/patch-1
weaverryan Jan 25, 2013
cae9f9f
Merge branch '2.0' into 2.1
weaverryan Jan 25, 2013
c926dae
Merge branch '2.1'
weaverryan Jan 25, 2013
7679617
Update reference/constraints/UniqueEntity.rst
docteurklein Jan 25, 2013
87710a8
Merge pull request #2074 from Sgoettschkes/issue2022
weaverryan Jan 27, 2013
d318602
[#2074] Minor tweaks for DialogHelper::select method
weaverryan Jan 27, 2013
fb97719
Merge pull request #2089 from jakzal/finder-glob-support
weaverryan Jan 27, 2013
09d1d91
Merge pull request #2097 from WouterJ/ref_constraint_php
weaverryan Jan 27, 2013
7a27c7a
Merge pull request #2114 from Sgoettschkes/issue2096
weaverryan Jan 27, 2013
c959bd0
[#2114] Simplifying a few things with disabled/readonly
weaverryan Jan 27, 2013
9c4200d
Merge pull request #2141 from yosmanyga/debugging
weaverryan Jan 27, 2013
7133238
Merge pull request #2145 from docteurklein/patch-1
weaverryan Jan 27, 2013
fc1580d
[#2145] Minor tweaks for UniqueEntity repositoryMethod option
weaverryan Jan 27, 2013
9d3a9a2
sf2.2 note: _method override disabled by default
mattattui Jan 28, 2013
61ac029
Link method to docs as per @WouterJ suggestion
mattattui Jan 28, 2013
1bc10c1
Merge pull request #2164 from sstok/patch-3
weaverryan Jan 30, 2013
1b4086b
[#2164] Removing one more reference to deprecated addViolationAtSubPath
weaverryan Jan 30, 2013
a479570
Merge pull request #2181 from vicb/dic/prepext
weaverryan Jan 31, 2013
2b6c443
Merge pull request #2189 from inanimatt/patch-1
weaverryan Jan 31, 2013
8e45839
Correct parameters file name
johnkary Jan 29, 2013
ac74a8e
updated render usage
fabpot Feb 1, 2013
4adc1e3
Merge pull request #2205 from fabpot/content-renderer-simplification
weaverryan Feb 3, 2013
c5ebfd0
Merge branch '2.0' into 2.1
weaverryan Feb 3, 2013
cce310f
Update reference/configuration/framework.rst
humandb Jan 31, 2013
cf74914
Update reference/configuration/framework.rst
humandb Feb 1, 2013
153e180
[#2198] Fixing some syntax errors, long lines
weaverryan Feb 3, 2013
5743c76
Merge branch '2.0' into 2.1
weaverryan Feb 3, 2013
1c426f6
[#2199] Porting fix up to 2.1 branch
weaverryan Feb 3, 2013
f07492e
Merge branch '2.0' into 2.1
weaverryan Feb 3, 2013
b1d3daa
Merge branch '2.1'
weaverryan Feb 3, 2013
4861e95
interpuction unification
ricardclau Feb 5, 2013
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 0 additions & 9 deletions book/_security-2012-6431.rst.inc

This file was deleted.

44 changes: 23 additions & 21 deletions book/controller.rst
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ Mapping a URL to a Controller
-----------------------------

The new controller returns a simple HTML page. To actually view this page
in your browser, you need to create a route, which maps a specific URL pattern
in your browser, you need to create a route, which maps a specific URL path
to the controller:

.. configuration-block::
Expand All @@ -150,13 +150,13 @@ to the controller:

# app/config/routing.yml
hello:
pattern: /hello/{name}
defaults: { _controller: AcmeHelloBundle:Hello:index }
path: /hello/{name}
defaults: { _controller: AcmeHelloBundle:Hello:index }

.. code-block:: xml

<!-- app/config/routing.xml -->
<route id="hello" pattern="/hello/{name}">
<route id="hello" path="/hello/{name}">
<default key="_controller">AcmeHelloBundle:Hello:index</default>
</route>

Expand Down Expand Up @@ -229,13 +229,13 @@ example:

# app/config/routing.yml
hello:
pattern: /hello/{first_name}/{last_name}
defaults: { _controller: AcmeHelloBundle:Hello:index, color: green }
path: /hello/{first_name}/{last_name}
defaults: { _controller: AcmeHelloBundle:Hello:index, color: green }

.. code-block:: xml

<!-- app/config/routing.xml -->
<route id="hello" pattern="/hello/{first_name}/{last_name}">
<route id="hello" path="/hello/{first_name}/{last_name}">
<default key="_controller">AcmeHelloBundle:Hello:index</default>
<default key="color">green</default>
</route>
Expand Down Expand Up @@ -325,7 +325,7 @@ working with forms, for example::
{
$form = $this->createForm(...);

$form->bindRequest($request);
$form->bind($request);
// ...
}

Expand Down Expand Up @@ -632,8 +632,8 @@ from any controller::
// in another controller for another request
$foo = $session->get('foo');

// set the user locale
$session->setLocale('fr');
// use a default value if the key doesn't exist
$filters = $session->get('filters', array());

These attributes will remain on the user for the remainder of that user's
session.
Expand All @@ -655,14 +655,11 @@ For example, imagine you're processing a form submit::
{
$form = $this->createForm(...);

$form->bindRequest($this->getRequest());
$form->bind($this->getRequest());
if ($form->isValid()) {
// do some sort of processing

$this->get('session')->setFlash(
'notice',
'Your changes were saved!'
);
$this->get('session')->getFlashBag()->add('notice', 'Your changes were saved!');

return $this->redirect($this->generateUrl(...));
}
Expand All @@ -681,19 +678,19 @@ the ``notice`` message:

.. code-block:: html+jinja

{% if app.session.hasFlash('notice') %}
{% for flashMessage in app.session.flashbag.get('notice') %}
<div class="flash-notice">
{{ app.session.flash('notice') }}
{{ flashMessage }}
</div>
{% endif %}
{% endfor %}

.. code-block:: php

<?php if ($view['session']->hasFlash('notice')): ?>
<?php foreach ($view['session']->getFlash('notice') as $message): ?>
<div class="flash-notice">
<?php echo $view['session']->getFlash('notice') ?>
<?php echo "<div class='flash-error'>$message</div>" ?>
</div>
<?php endif; ?>
<?php endforeach; ?>

By design, flash messages are meant to live for exactly one request (they're
"gone in a flash"). They're designed to be used across redirects exactly as
Expand Down Expand Up @@ -727,6 +724,11 @@ headers and content that's sent back to the client::
header names are normalized so that using ``Content-Type`` is equivalent
to ``content-type`` or even ``content_type``.

.. tip::

There is also a special :class:`Symfony\\Component\\HttpFoundation\\JsonResponse`
class that helps return JSON responses. See :ref:`component-http-foundation-json-response`.

.. index::
single: Controller; Request object

Expand Down
59 changes: 28 additions & 31 deletions book/doctrine.rst
Original file line number Diff line number Diff line change
Expand Up @@ -44,21 +44,23 @@ Configuring the Database

Before you really begin, you'll need to configure your database connection
information. By convention, this information is usually configured in an
``app/config/parameters.ini`` file:
``app/config/parameters.yml`` file:

.. code-block:: ini
.. code-block:: yaml

; app/config/parameters.ini
[parameters]
database_driver = pdo_mysql
database_host = localhost
database_name = test_project
database_user = root
database_password = password
# app/config/parameters.yml
parameters:
database_driver: pdo_mysql
database_host: localhost
database_name: test_project
database_user: root
database_password: password

# ...

.. note::

Defining the configuration via ``parameters.ini`` is just a convention.
Defining the configuration via ``parameters.yml`` is just a convention.
The parameters defined in that file are referenced by the main configuration
file when setting up Doctrine:

Expand Down Expand Up @@ -412,7 +414,7 @@ of the bundle:
$product->setPrice('19.99');
$product->setDescription('Lorem ipsum dolor');

$em = $this->getDoctrine()->getEntityManager();
$em = $this->getDoctrine()->getManager();
$em->persist($product);
$em->flush();

Expand Down Expand Up @@ -559,7 +561,7 @@ you have a route that maps a product id to an update action in a controller::

public function updateAction($id)
{
$em = $this->getDoctrine()->getEntityManager();
$em = $this->getDoctrine()->getManager();
$product = $em->getRepository('AcmeStoreBundle:Product')->find($id);

if (!$product) {
Expand Down Expand Up @@ -625,7 +627,7 @@ Imagine that you want to query for products, but only return products that
cost more than ``19.99``, ordered from cheapest to most expensive. From inside
a controller, do the following::

$em = $this->getDoctrine()->getEntityManager();
$em = $this->getDoctrine()->getManager();
$query = $em->createQuery(
'SELECT p FROM AcmeStoreBundle:Product p WHERE p.price > :price ORDER BY p.price ASC'
)->setParameter('price', '19.99');
Expand Down Expand Up @@ -801,7 +803,7 @@ ordered alphabetically.

You can use this new method just like the default finder methods of the repository::

$em = $this->getDoctrine()->getEntityManager();
$em = $this->getDoctrine()->getManager();
$products = $em->getRepository('AcmeStoreBundle:Product')
->findAllOrderedByName();

Expand Down Expand Up @@ -994,7 +996,7 @@ Now you can see this new code in action! Imagine you're inside a controller::
// relate this product to the category
$product->setCategory($category);

$em = $this->getDoctrine()->getEntityManager();
$em = $this->getDoctrine()->getManager();
$em->persist($category);
$em->persist($product);
$em->flush();
Expand Down Expand Up @@ -1385,12 +1387,7 @@ Some notable or interesting tasks include:

.. code-block:: bash

$ php app/console doctrine:ensure-production-settings --no-debug --env=prod

.. caution::

Don't forget to add the ``--no-debug`` switch, because the debug flag is
always set to true, even if the environment is set to ``prod``.
$ php app/console doctrine:ensure-production-settings --env=prod

* ``doctrine:mapping:import`` - allows Doctrine to introspect an existing
database and create mapping information. For more information, see
Expand Down Expand Up @@ -1431,14 +1428,14 @@ For more information about Doctrine, see the *Doctrine* section of the

.. _`Doctrine`: http://www.doctrine-project.org/
.. _`MongoDB`: http://www.mongodb.org/
.. _`Basic Mapping Documentation`: http://docs.doctrine-project.org/projects/doctrine-orm/en/2.1/reference/basic-mapping.html
.. _`Query Builder`: http://docs.doctrine-project.org/projects/doctrine-orm/en/2.1/reference/query-builder.html
.. _`Doctrine Query Language`: http://docs.doctrine-project.org/projects/doctrine-orm/en/2.1/reference/dql-doctrine-query-language.html
.. _`Association Mapping Documentation`: http://docs.doctrine-project.org/projects/doctrine-orm/en/2.1/reference/association-mapping.html
.. _`Basic Mapping Documentation`: http://docs.doctrine-project.org/projects/doctrine-orm/en/latest/reference/basic-mapping.html
.. _`Query Builder`: http://docs.doctrine-project.org/projects/doctrine-orm/en/latest/reference/query-builder.html
.. _`Doctrine Query Language`: http://docs.doctrine-project.org/projects/doctrine-orm/en/latest/reference/dql-doctrine-query-language.html
.. _`Association Mapping Documentation`: http://docs.doctrine-project.org/projects/doctrine-orm/en/latest/reference/association-mapping.html
.. _`DateTime`: http://php.net/manual/en/class.datetime.php
.. _`Mapping Types Documentation`: http://docs.doctrine-project.org/projects/doctrine-orm/en/2.1/reference/basic-mapping.html#doctrine-mapping-types
.. _`Property Mapping documentation`: http://docs.doctrine-project.org/projects/doctrine-orm/en/2.1/reference/basic-mapping.html#property-mapping
.. _`Lifecycle Events documentation`: http://docs.doctrine-project.org/projects/doctrine-orm/en/2.1/reference/events.html#lifecycle-events
.. _`Reserved SQL keywords documentation`: http://docs.doctrine-project.org/projects/doctrine-orm/en/2.1/reference/basic-mapping.html#quoting-reserved-words
.. _`Persistent classes`: http://docs.doctrine-project.org/projects/doctrine-orm/en/2.1/reference/basic-mapping.html#persistent-classes
.. _`Property Mapping`: http://docs.doctrine-project.org/projects/doctrine-orm/en/2.1/reference/basic-mapping.html#property-mapping
.. _`Mapping Types Documentation`: http://docs.doctrine-project.org/projects/doctrine-orm/en/latest/reference/basic-mapping.html#doctrine-mapping-types
.. _`Property Mapping documentation`: http://docs.doctrine-project.org/projects/doctrine-orm/en/latest/reference/basic-mapping.html#property-mapping
.. _`Lifecycle Events documentation`: http://docs.doctrine-project.org/projects/doctrine-orm/en/latest/reference/events.html#lifecycle-events
.. _`Reserved SQL keywords documentation`: http://docs.doctrine-project.org/projects/doctrine-orm/en/latest/reference/basic-mapping.html#quoting-reserved-words
.. _`Persistent classes`: http://docs.doctrine-project.org/projects/doctrine-orm/en/latest/reference/basic-mapping.html#persistent-classes
.. _`Property Mapping`: http://docs.doctrine-project.org/projects/doctrine-orm/en/latest/reference/basic-mapping.html#property-mapping
Loading