Thanks to visit codestin.com
Credit goes to github.com

Skip to content

send the right type expected instead of a string #10506

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 236 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
236 commits
Select commit Hold shift + click to select a range
c8ad296
Update dotenv.rst
fmata Apr 8, 2018
afa5e54
Document setDeprecated method from OptionsResolver component
yceruto May 31, 2018
b0ac3a4
document ServiceSubscriberTrait
kbond May 23, 2018
9f8f97f
minor #9809 [DependencyInjection] Document ServiceSubscriberTrait (kb…
javiereguiluz Jun 11, 2018
8831d88
Merge branch '4.1'
javiereguiluz Jun 11, 2018
b89c46e
Merge branch '4.1'
xabbuh Jun 11, 2018
3235d06
Merge branch '4.1'
javiereguiluz Jun 11, 2018
d4143f1
[Form] Ability to clear form errors
colinodell Jun 11, 2018
7a4465d
Clarify that clearing errors makes the form valid
colinodell Jun 18, 2018
5e6031b
use is_granted() instead of deprecated has_role()
OskarStark Jun 12, 2018
d161cf3
minor #9919 use is_granted() instead of deprecated has_role() (OskarS…
javiereguiluz Jun 19, 2018
65d100e
[HttpFoundation] Add info for getAcceptableFormats() method
Jun 7, 2018
fbca6db
minor #9898 [HttpFoundation] Add info for getAcceptableFormats() meth…
javiereguiluz Jun 19, 2018
88e979b
minor #9859 [OptionsResolver] Document setDeprecated method (yceruto)
javiereguiluz Jun 20, 2018
b50c5ad
Added the versionadded directive
javiereguiluz Jun 20, 2018
88ff52b
Merge branch '4.1'
javiereguiluz Jun 20, 2018
daf655a
Merge branch '4.1'
weaverryan Jun 21, 2018
8620580
Merge branch '4.1'
weaverryan Jun 21, 2018
fd08410
Merge branch '4.1'
javiereguiluz Jun 22, 2018
afeeec6
Merge branch '4.1'
javiereguiluz Jun 25, 2018
f07f536
Wrap long lines and add the versionadded directive
javiereguiluz Jun 25, 2018
53b6a51
minor #9916 [Form] Ability to clear form errors (colinodell, javiereg…
javiereguiluz Jun 25, 2018
e0d96cf
Merge branch '4.1'
javiereguiluz Jun 26, 2018
df42618
Merge branch '4.1'
javiereguiluz Jun 27, 2018
601450e
Update event_listeners_subscribers.rst
dmaicher Jun 27, 2018
f5e8ac9
Merge branch '4.1'
javiereguiluz Jun 28, 2018
d8bb849
Reworded and added the versionadded directive
javiereguiluz Jun 28, 2018
b56ef9e
Update event_listeners_subscribers.rst
javiereguiluz Jun 28, 2018
4409fd6
Explain that lazy listeners are mandatory, not default
javiereguiluz Jun 29, 2018
b8a7564
minor #9973 [DoctrineBridge] update doctrine event listeners doc for …
javiereguiluz Jun 29, 2018
c27c0cf
Merge branch '4.1'
javiereguiluz Jun 29, 2018
80ead70
Added some missing link references
javiereguiluz Jun 29, 2018
8fee20b
Merge branch '4.1'
javiereguiluz Jun 29, 2018
4ea4efe
Merge branch '4.1'
javiereguiluz Jun 29, 2018
0c9c90f
Tell about ProcessorInterface in logging/processors
nicolas-grekas Jul 3, 2018
59db8d8
Merge branch '4.1'
javiereguiluz Jul 3, 2018
2a3a68a
Merge branch '4.1'
javiereguiluz Jul 3, 2018
266020c
[Cache] add Redis options compression and tcp_keepalive
nicolas-grekas Jul 1, 2018
e1be138
Merge branch '4.1'
javiereguiluz Jul 3, 2018
93f9686
Merge branch '4.1'
javiereguiluz Jul 3, 2018
2dc7cd1
Merge branch '4.1'
javiereguiluz Jul 3, 2018
9f55230
Merge branch '4.1'
javiereguiluz Jul 3, 2018
d89b5ca
Merge branch '4.1'
javiereguiluz Jul 3, 2018
254a72e
Merge branch '4.1'
javiereguiluz Jul 3, 2018
1d72bc2
Added key env processor to docs
bobvandevijver Jul 3, 2018
9c91cf1
Reworded and added other config formats
javiereguiluz Jul 4, 2018
e22943b
minor #10009 Added key env processor to docs (bobvandevijver, javiere…
javiereguiluz Jul 4, 2018
3ade0c8
Merge branch '4.1'
javiereguiluz Jul 5, 2018
eaf0664
Merge branch '4.1'
javiereguiluz Jul 5, 2018
9fefa94
Merge branch '4.1'
javiereguiluz Jul 5, 2018
655488c
Merge branch '4.1'
javiereguiluz Jul 5, 2018
ad2bad9
Minor reword
javiereguiluz Jul 6, 2018
3b0b8f6
minor #9996 Tell about ProcessorInterface in logging/processors (nico…
javiereguiluz Jul 6, 2018
2b9fb32
minor #9985 [Cache] add Redis options compression and tcp_keepalive (…
javiereguiluz Jul 6, 2018
fc7e155
Added the missing link
javiereguiluz Jul 6, 2018
de28118
json-login-ldap
Jul 1, 2018
a1ce990
minor #9987 json-login-ldap (Rudy Onfroy)
javiereguiluz Jul 9, 2018
b30d16b
Added the missing "versionadded" directive
javiereguiluz Jul 9, 2018
6325759
Update dotenv.rst
fmata Jul 9, 2018
e50c89b
Merge branch '4.1'
javiereguiluz Jul 9, 2018
080d3f2
Merge branch '4.1'
xabbuh Jul 9, 2018
361dde5
[Finder] Add documentation and code on array as method parameter
jfredon Jul 9, 2018
2cf4eb1
Merge branch '4.1'
javiereguiluz Jul 11, 2018
d75daac
Merge branch '4.1'
javiereguiluz Jul 12, 2018
3927279
Merge branch '4.1'
javiereguiluz Jul 12, 2018
28a1d93
Merge branch '4.1'
javiereguiluz Jul 13, 2018
25075f7
Merge branch '4.1'
javiereguiluz Jul 13, 2018
eefa182
[Security] Remember me: samesite cookie
dunglas Jul 17, 2018
9e6955c
Merge branch '4.1'
javiereguiluz Jul 17, 2018
cceb6de
minor #10077 [Security] Remember me: samesite cookie (dunglas)
javiereguiluz Jul 18, 2018
0668ccc
Added docs for clickLink() and submitForm()
javiereguiluz Jul 15, 2018
8f5f8f4
minor #10071 Added docs for clickLink() and submitForm() (javiereguiluz)
javiereguiluz Jul 18, 2018
8e411a8
Merge branch '4.1'
javiereguiluz Jul 18, 2018
90c2b72
Fix typo in remember_me chapter
chalasr Jul 18, 2018
022acf7
Merge branch '4.1'
javiereguiluz Jul 18, 2018
c8ba00e
minor #10083 Fix typo in remember_me chapter (chalasr)
javiereguiluz Jul 18, 2018
5ae6670
Merge branch '4.1'
javiereguiluz Jul 19, 2018
de0f01a
Merge branch '4.1'
javiereguiluz Jul 20, 2018
96d3023
Merge branch '4.1'
javiereguiluz Jul 20, 2018
c15df9d
[Routing] Add locale fallback to internationalized routes
Jul 21, 2018
187300a
[Cache] tell about PDO configuration and table autocreation
nicolas-grekas Jul 22, 2018
ff651b6
minor #10111 [Cache] tell about PDO configuration and table autocreat…
javiereguiluz Jul 23, 2018
c88ca04
Fixed a minor RST issue
javiereguiluz Jul 23, 2018
3eec2ce
Document file_relative Twig function
yceruto Jul 24, 2018
f8da309
Merge branch '4.1'
javiereguiluz Jul 24, 2018
67460dc
Reword and added the versionadded directive
javiereguiluz Jul 25, 2018
540817e
Final reword
javiereguiluz Jul 25, 2018
364534b
minor #10115 Add file_relative function to the Twig reference (ycerut…
javiereguiluz Jul 25, 2018
fe573a3
Added the missing versionadded version
javiereguiluz Jul 25, 2018
4bf5789
minor #10038 [Finder] Add documentation and code on array as method p…
javiereguiluz Jul 25, 2018
16483a0
Minor reword
javiereguiluz Jul 25, 2018
b202e64
Merge branch '4.1'
javiereguiluz Jul 25, 2018
54631df
Update translator fallback example to include ICU parents
thewilkybarkid Jul 27, 2018
380ae47
Merge branch '4.1'
javiereguiluz Jul 30, 2018
ac496a5
Merge branch '4.1'
weaverryan Aug 4, 2018
9e5ceb2
Merge branch '4.1'
weaverryan Aug 6, 2018
e8400b2
[#10038] fix minor typos
xabbuh Aug 6, 2018
3ccb68c
[#10038] minor versionadded wording tweaks
xabbuh Aug 6, 2018
dc2bda4
add XML and PHP config examples
xabbuh Aug 7, 2018
c7901b7
minor #10155 add XML and PHP config examples (xabbuh)
xabbuh Aug 7, 2018
bddcf31
Merge branch '4.1'
javiereguiluz Aug 8, 2018
7bfbf58
Merge branch '4.1'
javiereguiluz Aug 10, 2018
3f1a810
Merge branch '4.1'
weaverryan Aug 18, 2018
1bbaa64
Merge branch '4.1'
weaverryan Aug 18, 2018
34e2cd2
Merge branch '4.1'
weaverryan Aug 28, 2018
4eefc0b
Merge branch '4.1'
xabbuh Aug 30, 2018
1468994
Merge branch '4.1'
javiereguiluz Sep 4, 2018
7ccf603
Reworded and added the versionadded directive
javiereguiluz Sep 4, 2018
f09780d
minor #10122 Update translator fallback example to include ICU parent…
javiereguiluz Sep 4, 2018
02cc739
Minor reword
javiereguiluz Sep 4, 2018
2a21457
minor #10108 [Routing] Add locale fallback to internationalized route…
javiereguiluz Sep 4, 2018
f8a3c0d
Update dotenv.rst
fmata Sep 4, 2018
38e4f08
Reword
javiereguiluz Sep 4, 2018
302206a
minor #9568 Document the DotEnv::overload() method (fmata, javieregui…
javiereguiluz Sep 4, 2018
3270cca
Document the DivisibleBy constraint
colinodell Jul 26, 2018
4763b7b
Added docs for cookie_samesite option
javiereguiluz Sep 5, 2018
5e3eb41
minor #10258 Added docs for cookie_samesite option (javiereguiluz)
javiereguiluz Sep 5, 2018
bb5ab52
Fixed the default value of cookie_samesite
javiereguiluz Sep 5, 2018
9e00412
minor #10260 Fixed the default value of cookie_samesite (javiereguiluz)
javiereguiluz Sep 5, 2018
1026020
Documenting debug:twig command
yceruto Aug 28, 2018
3800041
minor #10232 Documenting debug:twig command (yceruto)
javiereguiluz Sep 6, 2018
40f1961
Minor reword
javiereguiluz Sep 6, 2018
acca007
minor #10121 [Validator] Document the DivisibleBy constraint (colinod…
javiereguiluz Sep 6, 2018
3e215a9
Merge branch '4.1'
javiereguiluz Sep 7, 2018
25607ad
Merge branch '4.1'
javiereguiluz Sep 7, 2018
20511e8
Add Lock's PdoStore documentation
jderusse Jun 4, 2018
58e4446
minor #9875 Add Lock's PdoStore documentation (jderusse)
javiereguiluz Sep 7, 2018
984c3ef
Minor fixes
javiereguiluz Sep 7, 2018
3924e18
Added docs for VAR_DUMPER_FORMAT
javiereguiluz Sep 7, 2018
af62658
Documented the "auto" mode of "cookie_secure"
javiereguiluz Sep 7, 2018
f3e8f0e
[WCM][Console] Remove mentions about the deprecated ContainerAwareCom…
chalasr Sep 9, 2018
a6b0c60
minor #10284 Documented the "auto" mode of "cookie_secure" (javieregu…
javiereguiluz Sep 10, 2018
5b152cf
minor #10275 Added docs for VAR_DUMPER_FORMAT (javiereguiluz)
javiereguiluz Sep 10, 2018
0e8b06a
Added a missing reference to fix doc build
javiereguiluz Sep 10, 2018
4143835
Maintained a note about ContainerAwareCommand being deprecated
javiereguiluz Sep 10, 2018
b89bbca
minor #10307 [Console] Remove mentions about the deprecated Container…
javiereguiluz Sep 10, 2018
8a88478
Added another missing reference to fix doc build
javiereguiluz Sep 10, 2018
1f87e0c
[PropertyInfo] Inject the entity manager instead of the class metadat…
dunglas Sep 10, 2018
5e0a91e
[Serializer] Allow to pass a single value for the groups opt
dunglas Sep 10, 2018
fb3b7bd
Merge branch '4.1'
javiereguiluz Sep 10, 2018
ca5e2e0
[Serializer] Allow to access extra infos in name converters
dunglas Sep 10, 2018
a4dad43
[Serializer] Allow to access to the context and various other infos i…
dunglas Sep 10, 2018
7c3e620
Fix, and document setCircularReferenceHandler's new parameters
dunglas Sep 10, 2018
ae63f8a
Add a note block
dunglas Sep 10, 2018
f7ed144
[PropertyInfo] Add an extractor to guess if a property is initializable
dunglas Sep 10, 2018
eebca4a
RST
dunglas Sep 10, 2018
8415f96
Minor tweaks
javiereguiluz Sep 11, 2018
5bc7ac0
minor #10319 [PropertyInfo] Add an extractor to guess if a property i…
javiereguiluz Sep 11, 2018
672b374
Minor reword
javiereguiluz Sep 11, 2018
97c4e68
minor #10318 [Serializer] Allow to access to the context and various …
javiereguiluz Sep 11, 2018
71afdca
Minor reword
javiereguiluz Sep 11, 2018
0907554
minor #10317 [Serializer] Allow to access extra infos in name convert…
javiereguiluz Sep 11, 2018
e4eae25
Replaced a "note" by a "tip"
javiereguiluz Sep 11, 2018
ae558f4
Added the missing versionadded directive
javiereguiluz Sep 11, 2018
fd0ce36
minor #10312 [Serializer] Allow to pass a single value for the groups…
javiereguiluz Sep 11, 2018
44df1a7
Added the missing versionadded directive
javiereguiluz Sep 11, 2018
09db304
minor #10311 [PropertyInfo] Inject the entity manager instead of the …
javiereguiluz Sep 11, 2018
cbb057f
Add documentation about children method in DomCrawelr
Einenlum Sep 10, 2018
2539e24
minor #10310 Add documentation about children method in DomCrawelr (E…
javiereguiluz Sep 11, 2018
e08cac0
Merge branch '4.1'
javiereguiluz Sep 11, 2018
2ba70f0
Add docs for Zookeeper Data Store.
GaneshChandrasekaran-zz Jul 8, 2018
16c0ee7
Merge branch '4.1'
javiereguiluz Sep 17, 2018
1513f22
Added support for multiple files or directories
yceruto Sep 19, 2018
a5546a6
adding missing "or"
yceruto Sep 19, 2018
5657303
Added support for multiple files or directories
yceruto Sep 19, 2018
e68d242
typo
yceruto Sep 20, 2018
6cf8bef
typo
yceruto Sep 20, 2018
e4494bd
Added the versionadded directive
javiereguiluz Sep 21, 2018
c63cd6c
minor #10368 [Translation] Added support for multiple files or direct…
javiereguiluz Sep 21, 2018
23f6465
Added the versionadded directive
javiereguiluz Sep 21, 2018
aec2882
minor #10367 [Yaml] Documenting support for multiple files or directo…
javiereguiluz Sep 21, 2018
6218472
minor #10043 Add documentation for using Zookeeper data store for loc…
javiereguiluz Sep 21, 2018
ae20f9d
Minor tweaks
javiereguiluz Sep 21, 2018
79a29c8
Fix typo
IndraGunawan Sep 21, 2018
bc0c51a
minor #10375 [Lock] Fix typo (IndraGunawan)
javiereguiluz Sep 24, 2018
9f39fd7
Merge branch '4.1'
javiereguiluz Sep 24, 2018
b0a1878
Merge branch '4.1'
javiereguiluz Sep 24, 2018
d4310d9
Merge branch '4.1'
javiereguiluz Sep 24, 2018
d70a0a6
Deprecated not passing the root node name to config tree builders
javiereguiluz Sep 24, 2018
eea8c4c
Documented the binding of arguments by name and type
javiereguiluz Sep 24, 2018
00db5a3
Documented the setColumnMaxWidth() method
javiereguiluz Sep 24, 2018
2617a7a
minor #10388 Deprecated not passing the root node name to config tree…
javiereguiluz Sep 25, 2018
75a1fd8
minor #10391 Documented the binding of arguments by name and type (ja…
javiereguiluz Sep 25, 2018
04cc519
minor #10394 Documented the setColumnMaxWidth() method (javiereguiluz)
javiereguiluz Sep 25, 2018
e29c5b1
Documented the setHeaderTitle() and setFooterTitle() methods
javiereguiluz Sep 24, 2018
b911d15
minor #10392 Documented the setHeaderTitle() and setFooterTitle() met…
javiereguiluz Sep 25, 2018
ac2ea07
[Form] Deprecate searchAndRenderBlock returning empty string
javiereguiluz Sep 24, 2018
a3db105
minor #10387 [Form] Deprecate searchAndRenderBlock returning empty st…
javiereguiluz Sep 25, 2018
eee1eaa
Documented the new date_label and time_label options
javiereguiluz Sep 24, 2018
a7c30bb
minor #10389 Documented the new date_label and time_label options (ja…
javiereguiluz Sep 25, 2018
d4b2c99
Merge branch '4.1'
javiereguiluz Sep 27, 2018
06dbeb5
Merge branch '4.1'
javiereguiluz Sep 28, 2018
95494c5
Merge branch '4.1'
javiereguiluz Sep 29, 2018
0fdbdbb
Update framework.rst
lexcast Oct 2, 2018
cd0a4df
Merge branch '4.1'
xabbuh Oct 2, 2018
94924b7
Merge branch '4.1'
xabbuh Oct 2, 2018
8213714
minor #10424 Mention vscode on IDE config (lexcast)
javiereguiluz Oct 2, 2018
6349bd3
[Serializer] Add an option to skip null values
dunglas Oct 2, 2018
9e6cab0
minor #10427 [Serializer] Add an option to skip null values (dunglas)
javiereguiluz Oct 3, 2018
d2907db
Merge branch '4.1'
javiereguiluz Oct 3, 2018
b142f57
Document the port in access_control
Sep 18, 2018
77e3522
Add deprecation notice for --env and --no-debug
hiddewie Oct 7, 2018
47b5917
Remove \DateTimeInterface reference from constraint validators
ro0NL Sep 8, 2018
dcdef65
minor #10302 Remove \DateTimeInterface reference from constraint vali…
javiereguiluz Oct 8, 2018
f324a71
Wrapped some long lines
javiereguiluz Oct 8, 2018
a22bfc4
Merge branch '4.1'
javiereguiluz Oct 8, 2018
71f96f1
Merge branch '4.1'
javiereguiluz Oct 8, 2018
d156bfc
Merge branch '4.1'
javiereguiluz Oct 10, 2018
21baaa5
Updated the form type extension article
javiereguiluz Oct 10, 2018
fbe9b73
minor #10468 Updated the form type extension article (javiereguiluz)
javiereguiluz Oct 10, 2018
48e8872
Merge branch '4.1'
javiereguiluz Oct 10, 2018
b313c78
Merge branch '4.1'
javiereguiluz Oct 10, 2018
abb5189
Documenting Options argument for closure deprecation func
yceruto Oct 5, 2018
a243b64
Merge branch '4.1'
javiereguiluz Oct 11, 2018
8dd19fa
minor #10359 [Security] - Document the port in access_control (roukmo…
javiereguiluz Oct 11, 2018
8531ef7
Minor reword
javiereguiluz Oct 11, 2018
82980e1
minor #10439 [OptionsResolver] Documenting Options argument for closu…
javiereguiluz Oct 12, 2018
de957f7
minor #10445 Add deprecation notice for --env and --no-debug (hiddewie)
javiereguiluz Oct 12, 2018
8299066
Minor reword
javiereguiluz Oct 12, 2018
7f19b26
Merge branch '4.1'
javiereguiluz Oct 12, 2018
e56793b
Merge branch '4.1'
javiereguiluz Oct 15, 2018
2814fea
Add some lines of doc for waitUntil() (Process)
Nek- Oct 15, 2018
d93c515
minor #10492 Add some lines of doc for waitUntil() (Process) (Nek-)
javiereguiluz Oct 16, 2018
28958d5
Minor reword
javiereguiluz Oct 16, 2018
c19e78d
Added docs for LDAP user provider with default (null) values
hiddewie Oct 7, 2018
f70d243
minor #10443 Added docs for LDAP user provider with default (null) va…
javiereguiluz Oct 16, 2018
69cb1d4
Minor reword
javiereguiluz Oct 16, 2018
5d5da2f
Merge branch '4.1'
javiereguiluz Oct 16, 2018
d3c31d7
Merge branch '4.1'
weaverryan Oct 18, 2018
f6162bc
[FormType] Add help_attr documentation
mpiot Oct 18, 2018
da5aa3b
minor #10511 [FormType] Add help_attr documentation (mpiot)
javiereguiluz Oct 18, 2018
fb22cef
Minor reword
javiereguiluz Oct 18, 2018
a97dc74
Fixed a minor code issue
javiereguiluz Oct 19, 2018
707956b
Merge branch '4.1'
javiereguiluz Oct 19, 2018
d8f2433
Merge branch '4.1'
javiereguiluz Oct 19, 2018
b43a26f
Merge branch '4.1'
javiereguiluz Oct 19, 2018
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
2 changes: 1 addition & 1 deletion best_practices/security.rst
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ Using ``@Security``, this looks like:
* Displays a form to create a new Post entity.
*
* @Route("/new", name="admin_post_new")
* @Security("has_role('ROLE_ADMIN')")
* @Security("is_granted('ROLE_ADMIN')")
*/
public function new()
{
Expand Down
8 changes: 5 additions & 3 deletions bundles/configuration.rst
Original file line number Diff line number Diff line change
Expand Up @@ -180,10 +180,9 @@ The ``Configuration`` class to handle the sample configuration looks like::
{
public function getConfigTreeBuilder()
{
$treeBuilder = new TreeBuilder();
$rootNode = $treeBuilder->root('acme_social');
$treeBuilder = new TreeBuilder('acme_social');

$rootNode
$treeBuilder->getRootNode()
->children()
->arrayNode('twitter')
->children()
Expand All @@ -198,6 +197,9 @@ The ``Configuration`` class to handle the sample configuration looks like::
}
}

.. versionadded:: 4.2
Not passing the root node name to ``TreeBuilder`` was deprecated in Symfony 4.2.

.. seealso::

The ``Configuration`` class can be much more complicated than shown here,
Expand Down
63 changes: 49 additions & 14 deletions components/browser_kit.rst
Original file line number Diff line number Diff line change
Expand Up @@ -97,42 +97,77 @@ make AJAX requests::
Clicking Links
~~~~~~~~~~~~~~

The ``Crawler`` object is capable of simulating link clicks. First, pass the
text content of the link to the ``selectLink()`` method, which returns a
``Link`` object. Then, pass this object to the ``click()`` method, which
performs the needed HTTP GET request to simulate the link click::
The ``Client`` object is capable of simulating link clicks. Pass the text
content of the link and the client will perform the needed HTTP GET request to
simulate the link click::

use Acme\Client;

$client = new Client();
$client->request('GET', '/product/123');

$crawler = $client->clickLink('Go elsewhere...');

.. versionadded:: 4.2
The ``clickLink()`` method was introduced in Symfony 4.2.

If you need the :class:`Symfony\\Component\\DomCrawler\\Link` object that
provides access to the link properties (e.g. ``$link->getMethod()``,
``$link->getUri()``), use this other method:

// ...
$crawler = $client->request('GET', '/product/123');
$link = $crawler->selectLink('Go elsewhere...')->link();
$client->click($link);

Submitting Forms
~~~~~~~~~~~~~~~~

The ``Crawler`` object is also capable of selecting forms. First, select any of
the form's buttons with the ``selectButton()`` method. Then, use the ``form()``
method to select the form which the button belongs to.

After selecting the form, fill in its data and send it using the ``submit()``
method (which makes the needed HTTP POST request to submit the form contents)::
The ``Client`` object is also capable of submitting forms. First, select the
form using any of its buttons and then override any of its properties (method,
field values, etc.) before submitting it::

use Acme\Client;

// make a real request to an external site
$client = new Client();
$crawler = $client->request('GET', 'https://github.com/login');

// find the form with the 'Log in' button and submit it
// 'Log in' can be the text content, id, value or name of a <button> or <input type="submit">
$client->submitForm('Log in');

// the second optional argument lets you override the default form field values
$client->submitForm('Log in', array(
'login' => 'my_user',
'password' => 'my_pass',
// to upload a file, the value must be the absolute file path
'file' => __FILE__,
));

// you can override other form options too
$client->submitForm(
'Log in',
array('login' => 'my_user', 'password' => 'my_pass'),
// override the default form HTTP method
'PUT',
// override some $_SERVER parameters (e.g. HTTP headers)
array('HTTP_ACCEPT_LANGUAGE' => 'es')
);

.. versionadded:: 4.2
The ``submitForm()`` method was introduced in Symfony 4.2.

If you need the :class:`Symfony\\Component\\DomCrawler\\Form` object that
provides access to the form properties (e.g. ``$form->getUri()``,
``$form->getValues()``, ``$form->getFields()``), use this other method::

// ...

// select the form and fill in some values
$form = $crawler->selectButton('Log in')->form();
$form['login'] = 'symfonyfan';
$form['password'] = 'anypass';

// To upload a file, the value should be the absolute file path
$form['file'] = __FILE__;

// submit that form
$crawler = $client->submit($form);

Expand Down
9 changes: 9 additions & 0 deletions components/cache/adapters/pdo_doctrine_dbal_adapter.rst
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,15 @@ third, and forth parameters::
$options = array()
);

.. versionadded:: 4.2
Automatic table creation was introduced in Symfony 4.2.

The table where values are stored is created automatically on the first call to
the :method:`Symfony\\Component\\Cache\\Adapter\\PdoAdapter::save` method.
You can also create this table explicitly by calling the
:method:`Symfony\\Component\\Cache\\Adapter\\PdoAdapter::createTable` method in
your code.

.. tip::

When passed a `Data Source Name (DSN)`_ string (instead of a database connection
Expand Down
11 changes: 11 additions & 0 deletions components/cache/adapters/redis_adapter.rst
Original file line number Diff line number Diff line change
Expand Up @@ -96,9 +96,11 @@ array of ``key => value`` pairs representing option names and their respective v

// associative array of configuration options
array(
'compression' => true,
'lazy' => false,
'persistent' => 0,
'persistent_id' => null,
'tcp_keepalive' => 0,
'timeout' => 30,
'read_timeout' => 0,
'retry_interval' => 0,
Expand All @@ -114,6 +116,10 @@ Available Options
If none is specified, it will return ``\Redis`` if the ``redis`` extension is
available, and ``\Predis\Client`` otherwise.

``compression`` (type: ``bool``, default: ``true``)
Enables or disables compression of items. This requires phpredis v4 or higher with
LZF support enabled.

``lazy`` (type: ``bool``, default: ``false``)
Enables or disables lazy connections to the backend. It's ``false`` by
default when using this as a stand-alone component and ``true`` by default
Expand All @@ -134,6 +140,10 @@ Available Options
Specifies the delay (in milliseconds) between reconnection attempts in case the client
loses connection with the server.

``tcp_keepalive`` (type: ``int``, default: ``0``)
Specifies the `TCP-keepalive`_ timeout (in seconds) of the connection. This
requires phpredis v4 or higher and a TCP-keepalive enabled server.

``timeout`` (type: ``int``, default: ``30``)
Specifies the time (in seconds) used to connect to a Redis server before the
connection attempt times out.
Expand All @@ -149,3 +159,4 @@ Available Options
.. _`RedisCluster`: https://github.com/phpredis/phpredis/blob/master/cluster.markdown#readme
.. _`Predis`: https://packagist.org/packages/predis/predis
.. _`Predis Connection Parameters`: https://github.com/nrk/predis/wiki/Connection-Parameters#list-of-connection-parameters
.. _`TCP-keepalive`: https://redis.io/topics/clients#tcp-keepalive
22 changes: 11 additions & 11 deletions components/config/definition.rst
Original file line number Diff line number Diff line change
Expand Up @@ -59,15 +59,18 @@ implements the :class:`Symfony\\Component\\Config\\Definition\\ConfigurationInte
{
public function getConfigTreeBuilder()
{
$treeBuilder = new TreeBuilder();
$rootNode = $treeBuilder->root('database');
$treeBuilder = new TreeBuilder('database');

// ... add node definitions to the root of the tree
// $treeBuilder->getRootNode()->...

return $treeBuilder;
}
}

.. versionadded:: 4.2
Not passing the root node name to ``TreeBuilder`` was deprecated in Symfony 4.2.

Adding Node Definitions to the Tree
-----------------------------------

Expand Down Expand Up @@ -534,10 +537,9 @@ tree with ``append()``::

public function getConfigTreeBuilder()
{
$treeBuilder = new TreeBuilder();
$rootNode = $treeBuilder->root('database');
$treeBuilder = new TreeBuilder('database');

$rootNode
$treeBuilder->getRootNode()
->children()
->arrayNode('connection')
->children()
Expand All @@ -564,10 +566,9 @@ tree with ``append()``::

public function addParametersNode()
{
$treeBuilder = new TreeBuilder();
$node = $treeBuilder->root('parameters');
$treeBuilder = new TreeBuilder('parameters');

$node
$treeBuilder->getRootNode()
->isRequired()
->requiresAtLeastOneElement()
->useAttributeAsKey('name')
Expand Down Expand Up @@ -795,10 +796,9 @@ Configuring the Node Path Separator

Consider the following config builder example::

$treeBuilder = new TreeBuilder();
$rootNode = $treeBuilder->root('database');
$treeBuilder = new TreeBuilder('database');

$rootNode
$treeBuilder->getRootNode()
->children()
->arrayNode('connection')
->children()
Expand Down
63 changes: 56 additions & 7 deletions components/console/helpers/table.rst
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,29 @@ You can add a table separator anywhere in the output by passing an instance of
| 80-902734-1-6 | And Then There Were None | Agatha Christie |
+---------------+--------------------------+------------------+

You can optionally display titles at the top and the bottom of the table::

// ...
$table->setHeaderTitle('Books')
$table->setFooterTitle('Page 1/2')
$table->render();

.. code-block:: terminal

+---------------+----------- Books --------+------------------+
| ISBN | Title | Author |
+---------------+--------------------------+------------------+
| 99921-58-10-7 | Divine Comedy | Dante Alighieri |
| 9971-5-0210-0 | A Tale of Two Cities | Charles Dickens |
+---------------+--------------------------+------------------+
| 960-425-059-0 | The Lord of the Rings | J. R. R. Tolkien |
| 80-902734-1-6 | And Then There Were None | Agatha Christie |
+---------------+--------- Page 1/2 -------+------------------+

.. versionadded:: 4.2
The ``setHeaderTitle()`` and ``setFooterTitle()`` methods were introduced
in Symfony 4.2.

By default the width of the columns is calculated automatically based on their
contents. Use the :method:`Symfony\\Component\\Console\\Helper\\Table::setColumnWidths`
method to set the column widths explicitly::
Expand All @@ -76,7 +99,19 @@ method to set the column widths explicitly::

In this example, the first column width will be ``10``, the last column width
will be ``30`` and the second column width will be calculated automatically
because of the ``0`` value. The output of this command will be:
because of the ``0`` value.

You can also set the width individually for each column with the
:method:`Symfony\\Component\\Console\\Helper\\Table::setColumnWidth` method.
Its first argument is the column index (starting from ``0``) and the second
argument is the column width::

// ...
$table->setColumnWidth(0, 10);
$table->setColumnWidth(2, 30);
$table->render();

The output of this command will be:

.. code-block:: terminal

Expand All @@ -95,16 +130,30 @@ widths. If the contents don't fit, the given column width is increased up to the
longest content length. That's why in the previous example the first column has
a ``13`` character length although the user defined ``10`` as its width.

You can also set the width individually for each column with the
:method:`Symfony\\Component\\Console\\Helper\\Table::setColumnWidth` method.
Its first argument is the column index (starting from ``0``) and the second
argument is the column width::
If you prefer to wrap long contents in multiple rows, use the
:method:`Symfony\\Component\\Console\\Helper\\Table::setColumnMaxWidth` method::

// ...
$table->setColumnWidth(0, 10);
$table->setColumnWidth(2, 30);
$table->setColumnMaxWidth(0, 5);
$table->setColumnMaxWidth(1, 10);
$table->render();

The output of this command will be:

.. code-block:: terminal

+-------+------------+--------------------------------+
| ISBN | Title | Author |
+-------+------------+--------------------------------+
| 99921 | Divine Com | Dante Alighieri |
| -58-1 | edy | |
| 0-7 | | |
| (the rest of rows...) |
+-------+------------+--------------------------------+

.. versionadded:: 4.2
The ``setColumnMaxWidth()`` method was introduced in Symfony 4.2.

The table style can be changed to any built-in styles via
:method:`Symfony\\Component\\Console\\Helper\\Table::setStyle`::

Expand Down
7 changes: 7 additions & 0 deletions components/dom_crawler.rst
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,13 @@ Get all the child or parent nodes::
$crawler->filter('body')->children();
$crawler->filter('body > p')->parents();

Get all the direct child nodes matching a CSS selector::

$crawler->filter('body')->children('p.lorem');

.. versionadded:: 4.2
The optional selector in ``children($selector)`` method was introduced in Symfony 4.2.

.. note::

All the traversal methods return a new :class:`Symfony\\Component\\DomCrawler\\Crawler`
Expand Down
9 changes: 7 additions & 2 deletions components/dotenv.rst
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,14 @@ Access the value with ``getenv()`` in your code::
$dbUser = getenv('DB_USER');
// you can also use ``$_ENV`` or ``$_SERVER``

.. note::
The ``load()`` method never overwrites existing environment variables. Use the
``overload()`` method if you need to overwrite them::

// ...
$dotenv->overload(__DIR__.'/.env');

Symfony Dotenv never overwrites existing environment variables.
.. versionadded:: 4.2
The ``Dotenv::overload()`` method was introduced in Symfony 4.2.

You should never store a ``.env`` file in your code repository as it might
contain sensitive information; create a ``.env.dist`` file with sensible
Expand Down
Loading