Nov 06 2018
Nov 06

The TWG coding standards committee is announcing two issues for final discussion. Feedback will be reviewed on 11/13/2018.

New issues for discussion:

Needs love

Interested in helping out?

You can get started quickly by helping us to update an issue summary or two or dive in and check out the full list of open proposals and see if there's anything you'd like to champion!

Nov 06 2018
Nov 06

The TWG coding standards committee is announcing two issues for final discussion. Feedback will be reviewed on 11/13/2018.

New issues for discussion:

Needs love

Interested in helping out?

You can get started quickly by helping us to update an issue summary or two or dive in and check out the full list of open proposals and see if there's anything you'd like to champion!

Oct 17 2017
Oct 17

The TWG coding standards committee is announcing two issues for final discussion. Feedback will be reviewed on 10/31/2017.

New issues for discussion:

Pending ratification

Provisionally approved issues

Interested in helping out?

You can get started quickly by helping us to update an issue summary or two or dive in and check out the full list of open proposals and see if there's anything you'd like to champion!

Oct 17 2017
Oct 17

The TWG coding standards committee is announcing two issues for final discussion. Feedback will be reviewed on 10/31/2017.

New issues for discussion:

Pending ratification

Provisionally approved issues

Interested in helping out?

You can get started quickly by helping us to update an issue summary or two or dive in and check out the full list of open proposals and see if there's anything you'd like to champion!

Sep 03 2017
Sep 03

The TWG coding standards committee is announcing two issues for final discussion. Feedback will be reviewed on 9/19/2017.

New issues for discussion:

Interested in helping out?

You can get started quickly by helping us to update an issue summary or two or dive in and check out the full list of open proposals and see if there's anything you'd like to champion!

Sep 03 2017
Sep 03

The TWG coding standards committee is announcing two issues for final discussion. Feedback will be reviewed on 9/19/2017.

New issues for discussion:

Interested in helping out?

You can get started quickly by helping us to update an issue summary or two or dive in and check out the full list of open proposals and see if there's anything you'd like to champion!

Dec 20 2016
Dec 20

The TWG coding standards committee has provisionally approved 3 coding standards change proposals. These will need to be finally approved and implemented by core before being fully ratified.

The process for proposing and ratifying changes is documented on the coding standards project page. Please note, a change to this process is being proposed to streamline the interaction between the coding standards body, Drupal Core, and the Coder project, please provide any feedback on that issue.

Provisionally approved proposals awaiting core approval and implementation:

Interested in helping out?

You can get started quickly by helping us to update an issue summary or two or dive in and check out the full list of open proposals and see if there's anything you'd like to champion?

These proposals will be re-evaluated during the next coding standards meeting currently scheduled for December 20th. At that point the discussion may be extended, or if clear consensus has been reached one or more policies may be dismissed or ratified and moved to the next step in the process.

Dec 20 2016
Dec 20

The TWG coding standards committee has provisionally approved 3 coding standards change proposals. These will need to be finally approved and implemented by core before being fully ratified.

The process for proposing and ratifying changes is documented on the coding standards project page. Please note, a change to this process is being proposed to streamline the interaction between the coding standards body, Drupal Core, and the Coder project, please provide any feedback on that issue.

Provisionally approved proposals awaiting core approval and implementation:

Interested in helping out?

You can get started quickly by helping us to update an issue summary or two or dive in and check out the full list of open proposals and see if there's anything you'd like to champion?

These proposals will be re-evaluated during the next coding standards meeting currently scheduled for December 20th. At that point the discussion may be extended, or if clear consensus has been reached one or more policies may be dismissed or ratified and moved to the next step in the process.

Dec 06 2016
Dec 06

The TWG coding standards committee is announcing three coding standards changes for final discussion. These appear to have reached a point close enough to consensus for final completion. The process for proposing and ratifying changes is documented on the coding standards project page. A change to this process is being proposed to streamline the interaction between the coding standards body, Drupal Core, and the Coder project, please provide any feedback on that issue.

Announced for final discussion:

Official coding standards updates now ratified:

Formerly announced issues that need an issue summary update

These issues have a lot of support but need an update to formalize the proposal so that they can be ratified and applied.

- [Agree on a property naming pattern](https://www.drupal.org/node/1233394) 
- [Coding standards for breaking function calls, function declarations, and language constructs across lines](https://www.drupal.org/node/1539712)
- [Add type hinting to function declaration coding standards](https://www.drupal.org/node/1158720)

These proposals will be re-evaluated during the next coding standards meeting currently scheduled for December 20th. At that point the discussion may be extended, or if clear consensus has been reached one or more policies may be dismissed or ratified and moved to the next step in the process.

Dec 06 2016
Dec 06

The TWG coding standards committee is announcing three coding standards changes for final discussion. These appear to have reached a point close enough to consensus for final completion. The process for proposing and ratifying changes is documented on the coding standards project page. A change to this process is being proposed to streamline the interaction between the coding standards body, Drupal Core, and the Coder project, please provide any feedback on that issue.

Announced for final discussion:

Official coding standards updates now ratified:

Formerly announced issues that need an issue summary update

These issues have a lot of support but need an update to formalize the proposal so that they can be ratified and applied.

These proposals will be re-evaluated during the next coding standards meeting currently scheduled for December 20th. At that point the discussion may be extended, or if clear consensus has been reached one or more policies may be dismissed or ratified and moved to the next step in the process.

Aug 24 2016
Aug 24

The TWG coding standards committee is announcing two coding standards changes for final discussion. These appear to have reached a point close enough to consensus for final completion. The new process for proposing and ratifying changes is documented on the coding standards project page.

Official coding standards updates now ratified:

Issues awaiting core approval:

Issues that just need a little TLC (you can help!):

These proposals will be re-evaluated during the next coding standards meeting currently scheduled for August 30th. At that point the discussion may be extended, or if clear consensus has been reached one or more policies may be dismissed or ratified and moved to the next step in the process.

Aug 24 2016
Aug 24

The TWG coding standards committee is announcing two coding standards changes for final discussion. These appear to have reached a point close enough to consensus for final completion. The new process for proposing and ratifying changes is documented on the coding standards project page.

Official coding standards updates now ratified:

Issues awaiting core approval:

Issues that just need a little TLC (you can help!):

These proposals will be re-evaluated during the next coding standards meeting currently scheduled for August 30th. At that point the discussion may be extended, or if clear consensus has been reached one or more policies may be dismissed or ratified and moved to the next step in the process.

Jul 04 2016
Jul 04

The TWG coding standards committee is announcing two coding standards changes for final discussion. These appear to have reached a point close enough to consensus for final completion. The new process for proposing and ratifying changes is documented on the coding standards project page.

New issues for discussion:

Updates on existing issues:

These proposals will be re-evaluated during the next coding standards meeting currently scheduled for July 12. At that point the discussion will likely be extended, or if clear consensus has been reached one or more policies may be dismissed or ratified and moved to the next step in the process.

Jul 04 2016
Jul 04
klausi's picture

Hm, some items on this list appear twice, can you delete the outdated lines? (camelCase issue, PHP 5.4. array issue)

Jons's picture

I'm sure this has been argued over but I just think the format:

if (condition1 || condition2) {
action1;
}
elseif (...)

does not scan well to me, and is contrary to years of use in C, Java, PHP of
} elseif () { style

Also seems a waste of good screen real-estate!

tizzo's picture

The process for proposing coding standards standards changes is documented on the coding standards project page. As per that description, please create an issue there and build support if you have suggestions for changes.

fgm's picture

I added a note about result type hinting on the param type hinting because it is pretty much the same issue. Can't we have it mentioned for code requiring PHP7, just like for scalar param hints ?

greg.1.anderson's picture

This should be obvious enough, but on any issue addressed by PSR-1 or PSR-2, the Drupal conventions should either:

a) Stay as they are
or
b) Adopt the PSR standards (preferred)

For example, the indentation change recommended above for else / elseif is in alignment with PSR-2, and therefore should be adopted.

yurii_2016's picture

change spaces to tabs

in what age are we now? in stone or iron?

tizzo's picture

The process for proposing coding standards standards changes is documented on the coding standards project page. As per that description, please create an issue there and build support if you have suggestions for changes.

Jons's picture

The more picky we are the less people are likely to contribute to Open Source.
Why are we even discussing use of '!=' or '<>' !!

For one thing it means we're focussing on the wrong things, which machines (our compilers) don't care about, so why should we? The general drive of IT is to make machines work the way we like - i.e. make them even more flexible to accommodate different human (creative) approaches, so we don’t want to work in the opposite direction.

The only real need for code standards is in the area or source code control - where we want to see just the changes. So the perspective must be to respect the layout of the author (as we do with written language) within some simple guidelines, rather than insist it's all converted into our way of doing things, in minute detail, before we accept it.

So!

tizzo's picture

The reason we should care about coding standards is that we want humans to be able to effectively parse the code. When we share a set of standards the consistency makes the code easier to read at a glance than when it is varied.

The general Drupal approach has been to push in the direction of consistency to the point where it's as if all Drupal code were written by one hand.

yurii_2016's picture

really, remove this stuff, it is useless and doesn't make sense, it doesnt add and meaning etc

the best way is, you don't force me to add that dot. i want to be able decide - do i need that dot or not

tizzo's picture

The process for proposing coding standards standards changes is documented on the coding standards project page. As per that description, please create an issue there and build support if you have suggestions for changes.

Apr 26 2016
Apr 26
droplet's picture

These proposals will be re-evaluated during the next coding standards meeting

Why Drupal making code style in Private talk? We have 3000 contributors in CORE. Can't allow us to vote on the final proposal. (Let's say Top 100 ? Top 500 to vote ?)

For example:
https://wiki.php.net/rfc/shortsyntaxforarrays

diff group of developers has diff views.

These standards aren't about Security & Code Performance. It need not experts to make a right decision.

jthorson's picture

Coding standards was flagged to the TWG as an area where conversations would happen, then fizzle out, and no actual change would be made ... either due to a lack of understanding over how to make the consensus 'official', or due to an inability for the community to come to a consensus.

The role of the coding standards committee is to facilitate the discussion, and ensure that these conversations are followed through to a conclusion instead of stalling 'ad infinitum'. This does not mean that the coding standards committee is making the decision ... all issues are still debated in open issues, and any and all community members are encouraged to provide their input.

What this announcement means is that the issues either appear to be approaching consensus (and will soon be either marked 'fixed' and ratified into our standards, or closed), or the conversation has stalled on a key issue that the committee would like to see resolved. Consider it a 'heads up' for anyone who might want to contribute to the discussion, but hasn't discovered the existence of the various issues/proposals on their own accord.

droplet's picture

Thanks.

But who and how made the final decision? It's unclear. Can the TWG discuss it in next meeting?

I believed Public discussion only helped us to kick out impossible options. For example:

PHP array [] can't backport to D7. Or some code style bad for GIT history.

After than that

["a", "b" => ["A", "B", "C"], "c"]

OR

[
"a",
"b" => ["A", "B", "C"]
"c"
]

OR

array(
"a",
"b" => ["A", "B", "C"],
"c"
)

it's Apple & Orange.

jthorson's picture

"Announced for final discussion" means that we want to wrap this one up. The process indicates that, after an initial two weeks discussion period, the coding standards committee will review the issue to determine whether i) there is a clear consensus or overwhelming preference, ii) more discussion is needed to resolve the issue, or iii) the discussion has reached an unresolvable impasse, requiring escalation or intervention.

In the case of iii), then the coding standards committee would generate a recommendation; though I wouldn't consider this issue as falling under that category. Otherwise, the "final decision" was made as it always is ... by the community through a process of open discussion in the issue queue ... and the job of the coding standards committee is to ensure that the change/proposal is published and communicated.

droplet's picture

Thanks.

But who and how made the final decision? It's unclear. Can the TWG discuss it in next meeting?

I believed Public discussion only helped us to kick out impossible options. For example:

PHP array [] can't backport to D7. Or some code style bad for GIT history.

After than that

["a", "b" => ["A", "B", "C"], "c"]

OR

[
"a",
"b" => ["A", "B", "C"],
"c"
]

OR

array(
"a",
"b" => ["A", "B", "C"],
"c"
)

it's Apple & Orange.

cosmicdreams's picture

I know that I commented on one of your previous status updates about whether we should move Drupal's coding standards closer to PSR2 by accepting the "open bracket on the next line" rule. See:

Drupal's standard: https://www.drupal.org/node/608152

VS

PSR2: http://www.php-fig.org/psr/psr-2/#4-1-extends-and-implements

Perhaps this was discussed about elsewhere and I'm not able to discover that conversation? Perhaps I'm being ignored and we'll make no progress this year on evolving our code standards to comply with PSR2?

Please let me know how I can be a positive force in this effort

jthorson's picture

I don't recall this particular issue being reviewed at any of the coding standards meetings as of yet ... the first step would be to open a dedicated issue with the proposed change in the 'coding standards' project on drupal.org, so that other community members can have an opportunity to provide their input.

Apr 26 2016
Apr 26
droplet's picture

These proposals will be re-evaluated during the next coding standards meeting

Why Drupal making code style in Private talk? We have 3000 contributors in CORE. Can't allow us to vote on the final proposal. (Let's say Top 100 ? Top 500 to vote ?)

For example:
https://wiki.php.net/rfc/shortsyntaxforarrays

diff group of developers has diff views.

These standards aren't about Security & Code Performance. It need not experts to make a right decision.

jthorson's picture

Coding standards was flagged to the TWG as an area where conversations would happen, then fizzle out, and no actual change would be made ... either due to a lack of understanding over how to make the consensus 'official', or due to an inability for the community to come to a consensus.

The role of the coding standards committee is to facilitate the discussion, and ensure that these conversations are followed through to a conclusion instead of stalling 'ad infinitum'. This does not mean that the coding standards committee is making the decision ... all issues are still debated in open issues, and any and all community members are encouraged to provide their input.

What this announcement means is that the issues either appear to be approaching consensus (and will soon be either marked 'fixed' and ratified into our standards, or closed), or the conversation has stalled on a key issue that the committee would like to see resolved. Consider it a 'heads up' for anyone who might want to contribute to the discussion, but hasn't discovered the existence of the various issues/proposals on their own accord.

droplet's picture

Thanks.

But who and how made the final decision? It's unclear. Can the TWG discuss it in next meeting?

I believed Public discussion only helped us to kick out impossible options. For example:

PHP array [] can't backport to D7. Or some code style bad for GIT history.

After than that

["a", "b" => ["A", "B", "C"], "c"]

OR

[
"a",
"b" => ["A", "B", "C"]
"c"
]

OR

array(
"a",
"b" => ["A", "B", "C"],
"c"
)

it's Apple & Orange.

jthorson's picture

"Announced for final discussion" means that we want to wrap this one up. The process indicates that, after an initial two weeks discussion period, the coding standards committee will review the issue to determine whether i) there is a clear consensus or overwhelming preference, ii) more discussion is needed to resolve the issue, or iii) the discussion has reached an unresolvable impasse, requiring escalation or intervention.

In the case of iii), then the coding standards committee would generate a recommendation; though I wouldn't consider this issue as falling under that category. Otherwise, the "final decision" was made as it always is ... by the community through a process of open discussion in the issue queue ... and the job of the coding standards committee is to ensure that the change/proposal is published and communicated.

droplet's picture

Thanks.

But who and how made the final decision? It's unclear. Can the TWG discuss it in next meeting?

I believed Public discussion only helped us to kick out impossible options. For example:

PHP array [] can't backport to D7. Or some code style bad for GIT history.

After than that

["a", "b" => ["A", "B", "C"], "c"]

OR

[
"a",
"b" => ["A", "B", "C"],
"c"
]

OR

array(
"a",
"b" => ["A", "B", "C"],
"c"
)

it's Apple & Orange.

cosmicdreams's picture

I know that I commented on one of your previous status updates about whether we should move Drupal's coding standards closer to PSR2 by accepting the "open bracket on the next line" rule. See:

Drupal's standard: https://www.drupal.org/node/608152

VS

PSR2: http://www.php-fig.org/psr/psr-2/#4-1-extends-and-implements

Perhaps this was discussed about elsewhere and I'm not able to discover that conversation? Perhaps I'm being ignored and we'll make no progress this year on evolving our code standards to comply with PSR2?

Please let me know how I can be a positive force in this effort

jthorson's picture

I don't recall this particular issue being reviewed at any of the coding standards meetings as of yet ... the first step would be to open a dedicated issue with the proposed change in the 'coding standards' project on drupal.org, so that other community members can have an opportunity to provide their input.

Mar 20 2016
Mar 20

The TWG coding standards committee is announcing two coding standards changes for final discussion. These appear to have reached a point close enough to consensus for final completion. The new process for proposing and ratifying changes is documented on the coding standards project page.

The two issues being proposed are:

As a follow up on the preceding set of issues now concluded:

These proposals will be re-evaluated during the next coding standards meeting currently scheduled for March . At that point the discussion may be extended, or the policy may be dismissed or ratified and moved to the ‘update documentation’ step.

Mar 20 2016
Mar 20

The TWG coding standards committee is announcing two coding standards changes for final discussion. These appear to have reached a point close enough to consensus for final completion. The new process for proposing and ratifying changes is documented on the coding standards project page.

The two issues being proposed are:

As a follow up on the preceding set of issues now concluded:

These proposals will be re-evaluated during the next coding standards meeting currently scheduled for March . At that point the discussion may be extended, or the policy may be dismissed or ratified and moved to the ‘update documentation’ step.

Jan 22 2016
Jan 22

The TWG coding standards committee is announcing two coding standards changes for final discussion. These appear to have reached a point close enough to consensus for final completion. The new process for proposing and ratifying changes is documented on the coding standards project page.

The two issues being proposed are:

These proposals will be re-evaluated during the next coding standards meeting currently scheduled for February 5th. At that point the discussion may be extended, or the policy may be dismissed or ratified and moved to the ‘update documentation’ step.

Jan 09 2016
Jan 09

The Technical Working Group was rebooted about a year ago and has been working to clarify and close issues related to the technical aspect and ramping up to take on our biggest assignment: vetting, clarifying, accepting, and announcing all coding standards changes.

Historically there has been no official process for coding standards changes and these issues and the nature of them are notoriously difficult to get developers to agree on leading to endless bike-shedding and difficulty in finding complete consensus. To this end we have worked with interested community members to draft and approve a new policy for reviewing, deciding, and announcing new coding standards changes. To that end we have created a new Drupal TWG twitter account to announce the list of issues for consideration, this list will be posted on the Core groups.drupal.org group and linked from the twitter account.

All coding standards issues have been moved from the Technical Working Group issue queue to the new Coding Standards project, the maintainers of which will be the Coding Standards Committee. The Committee will be composed of members appointed by the Technical Working Group and any documentation maintainers (listed in Drupal Core’s maintainers.txt) will be automatically invited to join.

Meetings are held every two weeks where new issues can be identified for inclusion. The first meeting to review and include issues for the first round of updates to coding standards has been scheduled for January 22nd, at which time the committee will review coding standards issues tagged “Needs announcement for final discussion". Issues that are deemed ready by the committee will be included in the announcement following that meeting, at which time a final round of community feedback on the proposed changes will be appreciated. At a subsequent meeting the final discussion will be evaluated and issues may be ratified as official changes.

About Drupal Sun

Drupal Sun is an Evolving Web project. It allows you to:

  • Do full-text search on all the articles in Drupal Planet (thanks to Apache Solr)
  • Facet based on tags, author, or feed
  • Flip through articles quickly (with j/k or arrow keys) to find what you're interested in
  • View the entire article text inline, or in the context of the site where it was created

See the blog post at Evolving Web

Evolving Web