Skip to content
Closed
Changes from all commits
Commits
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
12 changes: 12 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,18 @@ This repository follows the [PSR-2 standard](http://www.php-fig.org/psr/psr-2/)
you must follow these rules.


## Coding style
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i would make this a sub-title of "Coding Standards" and call it "Additional Coding Style"

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good idea 👍


Apart from the standards above, we have a few more rules which we think makes programming more logical:

1. Don't align key value pairs: it messes up diff (this applies to code, config, even docblocks)
2. Use trailing commas after last array elements

See these articles for reference:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the reference is only one article...

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually I had more ideas in my mind with more reference, but I couldn't recall.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we only specify PSR2 for the moment and remove these rules ? (To be in appliance with the .php_cs file)

After that everyone can do a pull request with a change to the .php_cs file and the documentation

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually I want to close this PR without merging.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

May be worth to have the deciding worklfow for new rules in the documentation WDYT ?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't think so. I don't expect too much contribution from the community on this front.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good for me then.


- http://mnapoli.fr/approaching-coding-style-rationally/


## Semver

We are trying to follow [semver](http://semver.org/). When you are making BC breaking changes,
Expand Down