Readme update #20

Closed
wants to merge 67 commits into
from

Projects

None yet

6 participants

@pmjones
pmjones commented Mar 21, 2012

Updates the README with new phrasing, and lists voting members/projects.

pmjones and others added some commits Mar 6, 2012
@pmjones pmjones add a fleshed-out version of style guide proposal af71f89
@saltybeagle saltybeagle Minor Spelling corrections 69be98c
@pmjones pmjones Merge pull request #1 from saltybeagle/master
Minor spelling corrections
550dc72
@pmjones pmjones break lines at about 80 chars 0335b99
@pmjones pmjones merge spelling changes 7bb84cd
@pmjones pmjones update line length notes per Andreas Moller and Wil Moore 49b6fef
@pmjones pmjones add a note about namespace names, and change so that there is one 'us…
…e' per line, instead of one 'use' and multiple lines (per gnugat)
c36244b
@pmjones pmjones add a note about namespace names, and change so that there is one 'us…
…e' per line, instead of one 'use' and multiple lines (per gnugat) ... also remove prefix/suffix requirements, per discssion with klaussilveira
5aa80a2
@pmjones pmjones Merge branch 'master' of github.com:pmjones/fig-standards 3c5dea0
@pmjones pmjones use namespaced constants, per @KingCrunch, and only use globals const…
…ants as a fallback
aecd965
@pmjones pmjones per notes from @gnugat and Wil Moore III, discourage global vars inst…
…ead of disallowing
93e6c5b
@pmjones pmjones per notes from @KingCrunch and @klaussilveira, reducing the errors ch…
…apter to say only E_ALL
9cd5072
@pmjones pmjones add try/catch to the control structures c6a7158
@pmjones pmjones rename the chapter 336336b
@pmjones pmjones add a comma 97003b0
@pmjones pmjones minor changes c775d79
@pmjones pmjones update the 'credits' aac843f
@pmjones pmjones add note about trailing space d4b4c3d
@pmjones pmjones discourage, but allow, global functions fa5e0ba
@pmjones pmjones extract operator and expression rules to their own chapter ee14d0b
@pmjones pmjones add <?php lines e977d3e
@pmjones pmjones minor updates 41c3ae5
@pmjones pmjones break into sections, add a note about blank lines e2bb63d
@pmjones pmjones rewording 214b6a3
@pmjones pmjones rewording 9412f14
@pmjones pmjones rewording cad7314
@pmjones pmjones include a reference to &$args f51cce2
@pmjones pmjones fix a merge conflict, and some rewording 67af4d0
@pmjones pmjones Zend Framework, not just Zend c1d8758
@pmjones pmjones add a 'tl;dr' overview of bullet points b2c45c7
@pmjones pmjones change from '75-85' to just '80' b3db972
@pmjones pmjones PSR-0 requires only one namespace level; put one line between the 'us…
…e' block and the class
6e5f005
@pmjones pmjones we do 'recommendations' not 'requirements' 2d40fc8
@pmjones pmjones add a section about substitution/interpolation de44fde
@pmjones pmjones rewording a29611d
@pmjones pmjones markup change c2c4e6a
@pmjones pmjones add explicit desciription on control structures 895cabf
@pmjones pmjones consolidate phrasing 0517a8f
@pmjones pmjones rewording 569f44e
@pmjones pmjones remove, consolidate, and rename files 7d92c1c
@pmjones pmjones commit the intro 8736aa0
@pmjones pmjones change property names 0f51f36
@pmjones pmjones rewording 81f48d5
@pmjones pmjones incorporate suggestions 4395087
@pmjones pmjones consolidate all chapters into a single document 30fd257
@pmjones pmjones minor changes 3a14039
@pmjones pmjones minor edits ec34d8f
@pmjones pmjones minor edits 12e9203
@pmjones pmjones minor edits 21a4059
@marcooliveira marcooliveira Fixed two typos, "visbility" and "mamespaces". 187c010
@pmjones pmjones Merge pull request #3 from marcooliveira/patch-1
Patch-typo-visbility-mamespaces
7083e35
@pmjones pmjones minor change: 459d372
@pmjones pmjones typos 676c06f
@pmjones pmjones Merge branch 'psr-1-reduced' 40d715e
@pmjones pmjones continued minor edits da3b16a
@pmjones pmjones Merge branch 'psr-1-reduced' 7f2f61a
@leek leek Enabling markdown syntax highlighting bdbcd10
@pmjones pmjones Merge pull request #4 from leek/patch-1
Enable markdown syntax highlighting
7e4281b
@pmjones pmjones put static *after* visibility ca47794
@pmjones pmjones modify case/break indents on switch structures 0b8571e
@pmjones pmjones minor reorg of 'lines', add a bit about one statement per line d48cf7a
@pmjones pmjones soften line length langauge a little 17e7832
@pmjones pmjones remove extraneous blank lines a06ef37
@pmjones pmjones name change 3eb8d22
@pmjones pmjones change heading markup a6728fc
@pmjones pmjones argument consistency 0ea15d1
@pmjones pmjones update introductory language, add list of voting and non-voting parti…
…cipants
fc1e9f8
@ghost Unknown commented on the diff Mar 21, 2012
proposed/PSR-1.md
+commonalities among the various member projects.
+
+
+Overview
+--------
+
+Please review the remainder of this guide for details on each of the following
+points.
+
+- Use only `<?php` and `<?=` opening tags for PHP code; leave out the closing
+ `?>` tag when the file contains only PHP code.
+
+- Use 4 spaces for indenting, not tabs.
+
+- There is no hard limit on line length; the soft limit is 120 characters;
+ lines of 80 characters or less are strongly encouraged. Do not add trailing
@ghost
ghost Mar 21, 2012

Please can you drop the wording "strongly encouraged" and change it to recommend, or "where possible try to fold code at 80".

There also needs to be a note that code sniffers should only issue notices (and not errors) for code exceeding 120.

@pmjones
pmjones Mar 21, 2012

Hm, thought I caught that in the bullets; I will amend to just "encouraged" (the identical wording in the narrative portion). The narrative portion specifies 120 as a "warning, not error".

@kukulich kukulich commented on the diff Mar 21, 2012
proposed/PSR-1.md
+--------
+
+Use the long `<?php ?>` tags for PHP code. Use of short-echo `<?= ?>` tags is
+also allowed. Do not use the other tag variations.
+
+In files that contain only PHP, leave out the closing `?>` tag.
+
+
+Indenting and Lines
+-------------------
+
+### Indenting
+
+Use an indent of 4 spaces. Do not use tabs. The use of spaces helps to avoid
+problems with diffs, patches, history, and annotations, and provides
+fine-grained sub-indentation for inter-line alignment.
@kukulich
kukulich Mar 21, 2012

I still think there's no difference between tabs or spaces if the project use one of them across its whole codebase. And I don't think there's a problem with tabs in diffs, patches or whatsoever.

@pmjones
pmjones Mar 21, 2012

If one project does, it's OK-ish. But when multiple authors collaborate across projects, there needs to be a single standard. Also, the current use of spaces over tabs in the surveyed member projects is 2:1, a supermajority. Finally, using spaces allows for fine-grained sub-indentation. For extended discussion, visit http://paul-m-jones.com/archives/2312

@kukulich
kukulich Mar 22, 2012

2:1 is not supermajority :) But ok, I understand your arguments, especially the line-length argument is very good and I have never considered it myself. However I don't agree that using tabs causes problems with diff, patches, history etc. It's simply not true. So I think the part about this should be removed and replaced with the line-length argument.

@pmjones
pmjones Mar 22, 2012

@kukulich: I was thinking about that phrasing, and I agree it's unclear. It is the mixing of tabs and spaces that causes problems; I have updated the original document with language to that effect.

@pmjones
pmjones Mar 22, 2012

@kukulich Regarding supermajority, 2:1 is 2 out of 3 respondents; in the voting systems I'm familiar with, 50%+1 is a majority, and 66% is a supermajority. Not trying to nitpick. :-)

@fabpot
fabpot commented Mar 22, 2012

cherry-picked.

@fabpot fabpot closed this Mar 22, 2012
@sun sun added a commit to sun/fig-standards that referenced this pull request Aug 15, 2014
@sun sun Fix #20: Added type 'scalar'. 5955b9c
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment