Skip to content

Commit

Permalink
Merge branch '3.4' into 4.0
Browse files Browse the repository at this point in the history
* 3.4:
  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
  (feat): Item key call for deletion
  [Form] Fixed ChoiceType trim option
  • Loading branch information
javiereguiluz committed May 9, 2018
2 parents c08f5ef + c2a12fa commit 5a3cd73
Show file tree
Hide file tree
Showing 18 changed files with 113 additions and 53 deletions.
12 changes: 12 additions & 0 deletions .github/CODE_OF_CONDUCT.md
@@ -0,0 +1,12 @@
Code of Conduct
===============

This project follows a [Code of Conduct][code_of_conduct] in order to ensure an
open and welcoming environment. Please read the full text for understanding the
accepted and unaccepted behavior.

Please read also the [reporting guidelines][guidelines], in case you encountered
or witnessed any misbehavior.

[code_of_conduct]: https://symfony.com/doc/current/contributing/code_of_conduct/code_of_conduct.html
[guidelines]: https://symfony.com/doc/current/contributing/code_of_conduct/reporting_guidelines.html
3 changes: 3 additions & 0 deletions components/cache/cache_invalidation.rst
Expand Up @@ -45,6 +45,9 @@ you can invalidate the cached items by calling
// if you know the cache key, you can also delete the item directly
$cache->deleteItem('cache_key');

// If you don't remember the item key, you can use the getKey() method
$cache->deleteItem($item->getKey());

Using tags invalidation is very useful when tracking cache keys becomes difficult.

Tag Aware Adapters
Expand Down
2 changes: 1 addition & 1 deletion components/console/logger.rst
Expand Up @@ -77,7 +77,7 @@ instance.
By default, the console logger behaves like the
:doc:`Monolog's Console Handler </logging/monolog_console>`.
The association between the log level and the verbosity can be configured
through the second parameter of the :class:`Symfony\\Component\\Console\\ConsoleLogger`
through the second parameter of the :class:`Symfony\\Component\\Console\\Logger\\ConsoleLogger`
constructor::

use Psr\Log\LogLevel;
Expand Down
5 changes: 3 additions & 2 deletions components/filesystem.rst
Expand Up @@ -78,10 +78,11 @@ exists
presence of one or more files or directories and returns ``false`` if any of
them is missing::

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

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

.. note::
Expand Down
@@ -1,30 +1,30 @@
Enforcement Team
================
CARE Team
=========

Our Pledge
----------

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

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

Members
-------

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

About the Enforcement Team
--------------------------
About the CARE Team
-------------------

The :doc:`Symfony project leader </contributing/code/core_team>` appoints enforcement
team with candidates they see fit. The enforcement team will consist of at least
The :doc:`Symfony project leader </contributing/code/core_team>` appoints the CARE
team with candidates they see fit. The CARE team will consist of at least
3 people. The team should be representing as many demographics as possible,
ideally from different employers.
14 changes: 7 additions & 7 deletions contributing/code_of_conduct/code_of_conduct.rst
Expand Up @@ -37,12 +37,12 @@ Examples of unacceptable behavior by participants include:
Our Responsibilities
--------------------

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

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

Enforcement
-----------

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

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

Expand All @@ -86,7 +86,7 @@ Related Documents
:maxdepth: 1

reporting_guidelines
enforcement_team
care_team
concrete_example_document

.. _Contributor Covenant: https://www.contributor-covenant.org
2 changes: 1 addition & 1 deletion contributing/code_of_conduct/index.rst
Expand Up @@ -6,5 +6,5 @@ Code of Conduct

code_of_conduct
reporting_guidelines
enforcement_team
care_team
concrete_example_document
60 changes: 30 additions & 30 deletions contributing/code_of_conduct/reporting_guidelines.rst
Expand Up @@ -2,7 +2,7 @@ Reporting Guidelines
====================

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

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

In your report please include:

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

What happens after you file a report?
-------------------------------------

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

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

* What happened.
* Whether this event constitutes a Code of Conduct violation.
* What kind of response is appropriate.
* What happened.
* Whether this event constitutes a Code of Conduct violation.
* What kind of response is appropriate.

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

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

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

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

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

Appealing the response
----------------------

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

Document origin
Expand Down
2 changes: 1 addition & 1 deletion contributing/map.rst.inc
Expand Up @@ -2,7 +2,7 @@

* :doc:`/contributing/code_of_conduct/code_of_conduct`
* :doc:`/contributing/code_of_conduct/reporting_guidelines`
* :doc:`/contributing/code_of_conduct/enforcement_team`
* :doc:`/contributing/code_of_conduct/care_team`
* :doc:`/contributing/code_of_conduct/concrete_example_document`

* **Code**
Expand Down
18 changes: 17 additions & 1 deletion doctrine/registration_form.rst
Expand Up @@ -93,6 +93,15 @@ With some validation added, your class may look something like this::
* @ORM\Column(type="string", length=64)
*/
private $password;
/**
* @ORM\Column(type="array")
*/
private $roles;

public function __construct() {
$this->roles = array('ROLE_USER');
}

// other properties and methods

Expand Down Expand Up @@ -142,8 +151,15 @@ With some validation added, your class may look something like this::
// You *may* need a real salt if you choose a different encoder.
return null;
}
public function getRoles()
{
return $this->roles;
}

// other methods, including security methods like getRoles()
public function eraseCredentials()
{
}
}

The :class:`Symfony\\Component\\Security\\Core\\User\\UserInterface` requires
Expand Down
5 changes: 4 additions & 1 deletion reference/forms/types/choice.rst
Expand Up @@ -28,6 +28,7 @@ To use this field, you must specify *either* ``choices`` or ``choice_loader`` op
| Overridden | - `compound`_ |
| options | - `empty_data`_ |
| | - `error_bubbling`_ |
| | - `trim`_ |
+-------------+------------------------------------------------------------------------------+
| Inherited | - `attr`_ |
| options | - `by_reference`_ |
Expand Down Expand Up @@ -99,7 +100,7 @@ method::
'choice_attr' => function($category, $key, $index) {
return ['class' => 'category_'.strtolower($category->getName())];
},

'group_by' => function($category, $key, $index) {
// randomly assign things into 2 groups
return rand(0, 1) == 1 ? 'Group A' : 'Group B';
Expand Down Expand Up @@ -249,6 +250,8 @@ error_bubbling
Set that error on this field must be attached to the field instead of
the parent field (the form in most cases).

.. include:: /reference/forms/types/options/choice_type_trim.rst.inc

Inherited Options
-----------------

Expand Down
3 changes: 3 additions & 0 deletions reference/forms/types/country.rst
Expand Up @@ -32,6 +32,7 @@ the option manually, but then you should just use the ``ChoiceType`` directly.
| | - `multiple`_ |
| | - `placeholder`_ |
| | - `preferred_choices`_ |
| | - `trim`_ |
| | |
| | from the :doc:`FormType </reference/forms/types/form>` |
| | |
Expand Down Expand Up @@ -82,6 +83,8 @@ These options inherit from the :doc:`ChoiceType </reference/forms/types/choice>`

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

.. include:: /reference/forms/types/options/choice_type_trim.rst.inc

These options inherit from the :doc:`FormType </reference/forms/types/form>`:

.. include:: /reference/forms/types/options/data.rst.inc
Expand Down
3 changes: 3 additions & 0 deletions reference/forms/types/currency.rst
Expand Up @@ -24,6 +24,7 @@ manually, but then you should just use the ``ChoiceType`` directly.
| | - `multiple`_ |
| | - `placeholder`_ |
| | - `preferred_choices`_ |
| | - `trim`_ |
| | |
| | from the :doc:`FormType </reference/forms/types/form>` type |
| | |
Expand Down Expand Up @@ -71,6 +72,8 @@ These options inherit from the :doc:`ChoiceType </reference/forms/types/choice>`

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

.. include:: /reference/forms/types/options/choice_type_trim.rst.inc

These options inherit from the :doc:`FormType </reference/forms/types/form>`:

.. include:: /reference/forms/types/options/data.rst.inc
Expand Down
3 changes: 3 additions & 0 deletions reference/forms/types/entity.rst
Expand Up @@ -32,6 +32,7 @@ objects from the database.
| | - `placeholder`_ |
| | - `preferred_choices`_ |
| | - `translation_domain`_ |
| | - `trim`_ |
| | |
| | from the :doc:`FormType </reference/forms/types/form>`: |
| | |
Expand Down Expand Up @@ -280,6 +281,8 @@ These options inherit from the :doc:`ChoiceType </reference/forms/types/choice>`

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

.. include:: /reference/forms/types/options/choice_type_trim.rst.inc

These options inherit from the :doc:`form </reference/forms/types/form>`
type:

Expand Down
3 changes: 3 additions & 0 deletions reference/forms/types/language.rst
Expand Up @@ -34,6 +34,7 @@ manually, but then you should just use the ``ChoiceType`` directly.
| | - `multiple`_ |
| | - `placeholder`_ |
| | - `preferred_choices`_ |
| | - `trim`_ |
| | |
| | from the :doc:`FormType </reference/forms/types/form>` |
| | |
Expand Down Expand Up @@ -84,6 +85,8 @@ These options inherit from the :doc:`ChoiceType </reference/forms/types/choice>`

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

.. include:: /reference/forms/types/options/choice_type_trim.rst.inc

These options inherit from the :doc:`FormType </reference/forms/types/form>`:

.. include:: /reference/forms/types/options/data.rst.inc
Expand Down
3 changes: 3 additions & 0 deletions reference/forms/types/locale.rst
Expand Up @@ -35,6 +35,7 @@ manually, but then you should just use the ``ChoiceType`` directly.
| | - `multiple`_ |
| | - `placeholder`_ |
| | - `preferred_choices`_ |
| | - `trim`_ |
| | |
| | from the :doc:`FormType </reference/forms/types/form>` |
| | |
Expand Down Expand Up @@ -85,6 +86,8 @@ These options inherit from the :doc:`ChoiceType </reference/forms/types/choice>`

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

.. include:: /reference/forms/types/options/choice_type_trim.rst.inc

These options inherit from the :doc:`FormType </reference/forms/types/form>`:

.. include:: /reference/forms/types/options/data.rst.inc
Expand Down

0 comments on commit 5a3cd73

Please sign in to comment.