Skip to content

Commit c2a12fa

Browse files
committed
Merge branch '2.8' into 3.4
* 2.8: Rename enforcement team to CARE team Fix ConsoleLogger URL Add mandatory method and attribute Added the Code of Conduct to Symfony Docs repo fixup option links Note about relative file paths fixup @xabbuh's comment proper choice type trim file Fixed the RST syntax of some lists of elements [Form] Fixed ChoiceType trim option
2 parents 0813be0 + 6b5b1b2 commit c2a12fa

17 files changed

+110
-53
lines changed

.github/CODE_OF_CONDUCT.md

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
Code of Conduct
2+
===============
3+
4+
This project follows a [Code of Conduct][code_of_conduct] in order to ensure an
5+
open and welcoming environment. Please read the full text for understanding the
6+
accepted and unaccepted behavior.
7+
8+
Please read also the [reporting guidelines][guidelines], in case you encountered
9+
or witnessed any misbehavior.
10+
11+
[code_of_conduct]: https://symfony.com/doc/current/contributing/code_of_conduct/code_of_conduct.html
12+
[guidelines]: https://symfony.com/doc/current/contributing/code_of_conduct/reporting_guidelines.html

components/console/logger.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ instance.
7777
By default, the console logger behaves like the
7878
:doc:`Monolog's Console Handler </logging/monolog_console>`.
7979
The association between the log level and the verbosity can be configured
80-
through the second parameter of the :class:`Symfony\\Component\\Console\\ConsoleLogger`
80+
through the second parameter of the :class:`Symfony\\Component\\Console\\Logger\\ConsoleLogger`
8181
constructor::
8282

8383
use Psr\Log\LogLevel;

components/filesystem.rst

+3-2
Original file line numberDiff line numberDiff line change
@@ -78,10 +78,11 @@ exists
7878
presence of one or more files or directories and returns ``false`` if any of
7979
them is missing::
8080

81-
// this directory exists, return true
81+
// if this absolute directory exists, returns true
8282
$fileSystem->exists('/tmp/photos');
8383

84-
// rabbit.jpg exists, bottle.png does not exist, return false
84+
// if rabbit.jpg exists and bottle.png does not exist, returns false
85+
// non-absolute paths are relative to the directory where the running PHP script is stored
8586
$fileSystem->exists(array('rabbit.jpg', 'bottle.png'));
8687

8788
.. note::
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,30 @@
1-
Enforcement Team
2-
================
1+
CARE Team
2+
=========
33

44
Our Pledge
55
----------
66

7-
In the interest of fostering an open and welcoming environment, the enforcement team
7+
In the interest of fostering an open and welcoming environment, the CoC Active Response Ensurers, or CARE,
88
pledge to ensure that the spirit of the :doc:`Code of Conduct </contributing/code_of_conduct/index>`
99
is respected. Our main priority is to ensure the safety of our community members.
1010
The second goal is to help educate the community as a whole to be aware of the CoC
1111
and how to help implement its spirit throughout the community. In case these goals
1212
conflict, we will prioritize safety of community members over all other goals.
1313

1414
If you think there is or has been a violation to the code of conduct please contact
15-
enforcement team or if you prefer contact only individual members of the enforcement team.
15+
the CARE team or if you prefer contact only individual members of the CARE team.
1616

1717
Members
1818
-------
1919

20-
Here are all the members of the Code of Conduct enforcement team. You can contact
20+
Here are all the members of the Code of Conduct CARE team. You can contact
2121
any of them directly using the contact details below or you can also contact all of
2222
them at once by emailing **coc@symfony.com**.
2323

24-
About the Enforcement Team
25-
--------------------------
24+
About the CARE Team
25+
-------------------
2626

27-
The :doc:`Symfony project leader </contributing/code/core_team>` appoints enforcement
28-
team with candidates they see fit. The enforcement team will consist of at least
27+
The :doc:`Symfony project leader </contributing/code/core_team>` appoints the CARE
28+
team with candidates they see fit. The CARE team will consist of at least
2929
3 people. The team should be representing as many demographics as possible,
3030
ideally from different employers.

contributing/code_of_conduct/code_of_conduct.rst

+7-7
Original file line numberDiff line numberDiff line change
@@ -37,12 +37,12 @@ Examples of unacceptable behavior by participants include:
3737
Our Responsibilities
3838
--------------------
3939

40-
:doc:`Enforcement team members </contributing/code_of_conduct/enforcement_team>`
40+
:doc:`CoC Active Response Ensurers, or CARE</contributing/code_of_conduct/care_team>`,
4141
are responsible for clarifying the standards of acceptable
4242
behavior and are expected to take appropriate and fair corrective action in
4343
response to any instances of unacceptable behavior.
4444

45-
Enforcement team members have the right and responsibility to remove, edit, or
45+
CARE team members have the right and responsibility to remove, edit, or
4646
reject comments, commits, code, wiki edits, issues, and other contributions
4747
that are not aligned to this Code of Conduct, or to ban temporarily or
4848
permanently any contributor for other behaviors that they deem inappropriate,
@@ -56,20 +56,20 @@ when an individual is representing the project or its community. Examples of
5656
representing a project or community include using an official project e-mail
5757
address, posting via an official social media account, or acting as an appointed
5858
representative at an online or offline event. Representation of a project may be
59-
further defined and clarified by enforcement team members.
59+
further defined and clarified by CARE team members.
6060

6161
Enforcement
6262
-----------
6363

6464
Instances of abusive, harassing, or otherwise unacceptable behavior
6565
:doc:`may be reported </contributing/code_of_conduct/reporting_guidelines>`
66-
by contacting the :doc:`enforcement team members </contributing/code_of_conduct/enforcement_team>`.
66+
by contacting the :doc:`CARE team members </contributing/code_of_conduct/care_team>`.
6767
All complaints will be reviewed and investigated and will result in a response that
68-
is deemed necessary and appropriate to the circumstances. The enforcement team is
68+
is deemed necessary and appropriate to the circumstances. The CARE team is
6969
obligated to maintain confidentiality with regard to the reporter of an incident.
7070
Further details of specific enforcement policies may be posted separately.
7171

72-
Enforcement team members who do not follow or enforce the Code of Conduct in good
72+
CARE team members who do not follow or enforce the Code of Conduct in good
7373
faith may face temporary or permanent repercussions as determined by the
7474
:doc:`core team </contributing/code/core_team>`.
7575

@@ -86,7 +86,7 @@ Related Documents
8686
:maxdepth: 1
8787

8888
reporting_guidelines
89-
enforcement_team
89+
care_team
9090
concrete_example_document
9191

9292
.. _Contributor Covenant: https://www.contributor-covenant.org

contributing/code_of_conduct/index.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,5 @@ Code of Conduct
66

77
code_of_conduct
88
reporting_guidelines
9-
enforcement_team
9+
care_team
1010
concrete_example_document

contributing/code_of_conduct/reporting_guidelines.rst

+30-30
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ Reporting Guidelines
22
====================
33

44
If you believe someone is violating the Code of Conduct we ask that you report
5-
it to the :doc:`enforcement team </contributing/code_of_conduct/enforcement_team>`
5+
it to the :doc:`CARE team </contributing/code_of_conduct/care_team>`
66
by emailing, Twitter, in person or any way you see fit.
77

88
**All reports will be kept confidential.** The privacy of everyone included in
@@ -19,28 +19,28 @@ contact, include this in your report and we will attempt to notify them.
1919

2020
In your report please include:
2121

22-
* Your contact info for follow-up contact.
23-
* Names (legal, nicknames, or pseudonyms) of any individuals involved.
24-
* If there were other witnesses besides you, please try to include them as well.
25-
* When and where the incident occurred. Please be as specific as possible.
26-
* Your description of what occurred.
27-
* If there is a publicly available record (e.g. a mailing list archive or a
28-
public IRC or Slack log), please include a link and a screenshot.
29-
* If you believe this incident is ongoing.
30-
* Any other information you believe we should have.
22+
* Your contact info for follow-up contact.
23+
* Names (legal, nicknames, or pseudonyms) of any individuals involved.
24+
* If there were other witnesses besides you, please try to include them as well.
25+
* When and where the incident occurred. Please be as specific as possible.
26+
* Your description of what occurred.
27+
* If there is a publicly available record (e.g. a mailing list archive or a
28+
public IRC or Slack log), please include a link and a screenshot.
29+
* If you believe this incident is ongoing.
30+
* Any other information you believe we should have.
3131

3232
What happens after you file a report?
3333
-------------------------------------
3434

35-
You will receive a reply from the :doc:`enforcement team </contributing/code_of_conduct/enforcement_team>`
35+
You will receive a reply from the :doc:`CARE team </contributing/code_of_conduct/care_team>`
3636
acknowledging receipt as soon as possible, but within 24 hours.
3737

3838
The team member receiving the report will immediately contact all or some other
39-
enforcement team members to review the incident and determine:
39+
CARE team members to review the incident and determine:
4040

41-
* What happened.
42-
* Whether this event constitutes a Code of Conduct violation.
43-
* What kind of response is appropriate.
41+
* What happened.
42+
* Whether this event constitutes a Code of Conduct violation.
43+
* What kind of response is appropriate.
4444

4545
If this is determined to be an ongoing incident or a threat to physical safety,
4646
the team's immediate priority will be to protect everyone involved. This means
@@ -50,16 +50,16 @@ and that everyone is physically safe.
5050
Once the team has a complete account of the events, they will make a decision as
5151
to how to respond. Responses may include:
5252

53-
* Nothing (if we determine no Code of Conduct violation occurred).
54-
* A private reprimand from the Code of Conduct response team to the individual(s)
55-
involved.
56-
* An imposed vacation (i.e. asking someone to "take a week off" from a mailing
57-
list or Slack).
58-
* A permanent or temporary ban from some or all Symfony conference/community
59-
spaces (events, meetings, mailing lists, IRC, Slack, etc.)
60-
* A request to engage in mediation and/or an accountability plan.
61-
* On a case by case basis, other actions may be possible but will usually be
62-
coordinated with the core team and the Symfony company.
53+
* Nothing (if we determine no Code of Conduct violation occurred).
54+
* A private reprimand from the Code of Conduct response team to the individual(s)
55+
involved.
56+
* An imposed vacation (i.e. asking someone to "take a week off" from a mailing
57+
list or Slack).
58+
* A permanent or temporary ban from some or all Symfony conference/community
59+
spaces (events, meetings, mailing lists, IRC, Slack, etc.)
60+
* A request to engage in mediation and/or an accountability plan.
61+
* On a case by case basis, other actions may be possible but will usually be
62+
coordinated with the core team and the Symfony company.
6363

6464
We'll respond within one week to the person who filed the report with either a
6565
resolution or an explanation of why the situation is not yet resolved.
@@ -69,20 +69,20 @@ let them know what action (if any) we'll be taking. We'll take into account feed
6969
from the reporter on the appropriateness of our response, but our response will be
7070
determined by what will be best for community safety.
7171

72-
The enforcement team keeps a private record of all incidents. By default all reports
73-
are shared with the entire enforcement team unless the reporter specifically asks
74-
to exclude specific enforcement team members, in which case these enforcement team
72+
The CARE team keeps a private record of all incidents. By default all reports
73+
are shared with the entire CARE team unless the reporter specifically asks
74+
to exclude specific CARE team members, in which case these CARE team
7575
members will not be included in any communication on the incidents as well as records
7676
created related to the incidents.
7777

78-
Enforcement team members are expected to inform the enforcement team and the reporters
78+
CARE team members are expected to inform the CARE team and the reporters
7979
in case of conflicts on interest and recuse themselves if this is deemed a problem.
8080

8181
Appealing the response
8282
----------------------
8383

8484
Only permanent resolutions (such as bans) may be appealed. To appeal a decision
85-
of the working group, contact the :doc:`enforcement team </contributing/code_of_conduct/enforcement_team>`
85+
of the working group, contact the :doc:`CARE team </contributing/code_of_conduct/care_team>`
8686
with your appeal and they will review the case.
8787

8888
Document origin

contributing/map.rst.inc

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
* :doc:`/contributing/code_of_conduct/code_of_conduct`
44
* :doc:`/contributing/code_of_conduct/reporting_guidelines`
5-
* :doc:`/contributing/code_of_conduct/enforcement_team`
5+
* :doc:`/contributing/code_of_conduct/care_team`
66
* :doc:`/contributing/code_of_conduct/concrete_example_document`
77

88
* **Code**

doctrine/registration_form.rst

+17-1
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,15 @@ With some validation added, your class may look something like this::
8787
* @ORM\Column(type="string", length=64)
8888
*/
8989
private $password;
90+
91+
/**
92+
* @ORM\Column(type="array")
93+
*/
94+
private $roles;
95+
96+
public function __construct() {
97+
$this->roles = array('ROLE_USER');
98+
}
9099

91100
// other properties and methods
92101

@@ -136,8 +145,15 @@ With some validation added, your class may look something like this::
136145
// You *may* need a real salt if you choose a different encoder.
137146
return null;
138147
}
148+
149+
public function getRoles()
150+
{
151+
return $this->roles;
152+
}
139153

140-
// other methods, including security methods like getRoles()
154+
public function eraseCredentials()
155+
{
156+
}
141157
}
142158

143159
The :class:`Symfony\\Component\\Security\\Core\\User\\UserInterface` requires

reference/forms/types/choice.rst

+4-1
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ To use this field, you must specify *either* ``choices`` or ``choice_loader`` op
2929
| Overridden | - `compound`_ |
3030
| options | - `empty_data`_ |
3131
| | - `error_bubbling`_ |
32+
| | - `trim`_ |
3233
+-------------+------------------------------------------------------------------------------+
3334
| Inherited | - `attr`_ |
3435
| options | - `by_reference`_ |
@@ -100,7 +101,7 @@ method::
100101
'choice_attr' => function($category, $key, $index) {
101102
return ['class' => 'category_'.strtolower($category->getName())];
102103
},
103-
104+
104105
'group_by' => function($category, $key, $index) {
105106
// randomly assign things into 2 groups
106107
return rand(0, 1) == 1 ? 'Group A' : 'Group B';
@@ -260,6 +261,8 @@ error_bubbling
260261
Set that error on this field must be attached to the field instead of
261262
the parent field (the form in most cases).
262263

264+
.. include:: /reference/forms/types/options/choice_type_trim.rst.inc
265+
263266
Inherited Options
264267
-----------------
265268

reference/forms/types/country.rst

+3
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ the option manually, but then you should just use the ``ChoiceType`` directly.
3232
| | - `multiple`_ |
3333
| | - `placeholder`_ |
3434
| | - `preferred_choices`_ |
35+
| | - `trim`_ |
3536
| | |
3637
| | from the :doc:`FormType </reference/forms/types/form>` |
3738
| | |
@@ -83,6 +84,8 @@ These options inherit from the :doc:`ChoiceType </reference/forms/types/choice>`
8384

8485
.. include:: /reference/forms/types/options/preferred_choices.rst.inc
8586

87+
.. include:: /reference/forms/types/options/choice_type_trim.rst.inc
88+
8689
These options inherit from the :doc:`FormType </reference/forms/types/form>`:
8790

8891
.. include:: /reference/forms/types/options/data.rst.inc

reference/forms/types/currency.rst

+3
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ manually, but then you should just use the ``ChoiceType`` directly.
2424
| | - `multiple`_ |
2525
| | - `placeholder`_ |
2626
| | - `preferred_choices`_ |
27+
| | - `trim`_ |
2728
| | |
2829
| | from the :doc:`FormType </reference/forms/types/form>` type |
2930
| | |
@@ -72,6 +73,8 @@ These options inherit from the :doc:`ChoiceType </reference/forms/types/choice>`
7273

7374
.. include:: /reference/forms/types/options/preferred_choices.rst.inc
7475

76+
.. include:: /reference/forms/types/options/choice_type_trim.rst.inc
77+
7578
These options inherit from the :doc:`FormType </reference/forms/types/form>`:
7679

7780
.. include:: /reference/forms/types/options/data.rst.inc

reference/forms/types/entity.rst

+3
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ objects from the database.
3232
| | - `placeholder`_ |
3333
| | - `preferred_choices`_ |
3434
| | - `translation_domain`_ |
35+
| | - `trim`_ |
3536
| | |
3637
| | from the :doc:`FormType </reference/forms/types/form>`: |
3738
| | |
@@ -275,6 +276,8 @@ These options inherit from the :doc:`ChoiceType </reference/forms/types/choice>`
275276

276277
.. include:: /reference/forms/types/options/choice_type_translation_domain.rst.inc
277278

279+
.. include:: /reference/forms/types/options/choice_type_trim.rst.inc
280+
278281
These options inherit from the :doc:`form </reference/forms/types/form>`
279282
type:
280283

reference/forms/types/language.rst

+3
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ manually, but then you should just use the ``ChoiceType`` directly.
3434
| | - `multiple`_ |
3535
| | - `placeholder`_ |
3636
| | - `preferred_choices`_ |
37+
| | - `trim`_ |
3738
| | |
3839
| | from the :doc:`FormType </reference/forms/types/form>` |
3940
| | |
@@ -85,6 +86,8 @@ These options inherit from the :doc:`ChoiceType </reference/forms/types/choice>`
8586

8687
.. include:: /reference/forms/types/options/preferred_choices.rst.inc
8788

89+
.. include:: /reference/forms/types/options/choice_type_trim.rst.inc
90+
8891
These options inherit from the :doc:`FormType </reference/forms/types/form>`:
8992

9093
.. include:: /reference/forms/types/options/data.rst.inc

reference/forms/types/locale.rst

+3
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ manually, but then you should just use the ``ChoiceType`` directly.
3535
| | - `multiple`_ |
3636
| | - `placeholder`_ |
3737
| | - `preferred_choices`_ |
38+
| | - `trim`_ |
3839
| | |
3940
| | from the :doc:`FormType </reference/forms/types/form>` |
4041
| | |
@@ -86,6 +87,8 @@ These options inherit from the :doc:`ChoiceType </reference/forms/types/choice>`
8687

8788
.. include:: /reference/forms/types/options/preferred_choices.rst.inc
8889

90+
.. include:: /reference/forms/types/options/choice_type_trim.rst.inc
91+
8992
These options inherit from the :doc:`FormType </reference/forms/types/form>`:
9093

9194
.. include:: /reference/forms/types/options/data.rst.inc
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
trim
2+
~~~~
3+
4+
**type**: ``boolean`` **default**: ``false``
5+
6+
Trimming is disabled by default because the selected value or values must match
7+
the given choice values exactly (and they could contain whitespaces).

0 commit comments

Comments
 (0)