Skip to content

Conversation

joelwurtz
Copy link
Member

Proposal for a cs file see #1 and #2

We all have our habits, way of doing thing, etc... IMO having a common style for code is necessary, however choice of rules should not take forever. Then i want to propose the following workflow for choosing coding rules :

  1. Every contributor can propose a rule in a new issue / pull request
  2. Every contributor should do a vote about the rule: +1 / 0 (don't give a fuck) / -1
  3. After 1 week on the proposed rule, vote are counted, and if it's win by majority (50% + 1), rule is added / removed to the cs file

(A contributor in this case is someone who belongs to the organisation)

This is mainly to avoid useless debate for something which is highly subjective.

This cs file include all psr1 and psr2 rules as the base coding style.

If workflow is agreed by everyone, i will propose some other rules.

@dbu
Copy link
Contributor

dbu commented Dec 11, 2015 via email

@sagikazarmark
Copy link
Member

+1 from me for both the workflow and the proposal.

I was also thinking about styleci, but I am not as impressed now as I was when I found it. What can Style CI do that Scrutinizer doesn't? Also, it seems creating CIs is the hype nowadays.

https://houndci.com/

That said, if you think it worth and gives us something more than Scrutinizer, then I would happily set it up. For example I am not sure if Scrutinizer breaks the build or automatically opens a PR.

@dbu
Copy link
Contributor

dbu commented Dec 11, 2015 via email

@sagikazarmark
Copy link
Member

Ok, convinced me.

@joelwurtz
Copy link
Member Author

+1 for the short array syntax (its what we do already) and the ordered
use statements.

Sorry @dbu i have remove those rules / proposal and also the symfony one, as i don't want to introduce new rules here (2 different purposes) and just want to agree on a operation workflow for the moment.

(I will add these in another issue)

@sagikazarmark
Copy link
Member

Cool, let's go ahead then.

sagikazarmark added a commit that referenced this pull request Dec 11, 2015
@sagikazarmark sagikazarmark merged commit 678eb16 into master Dec 11, 2015
@sagikazarmark sagikazarmark deleted the feature/php_cs branch December 11, 2015 11:18
@joelwurtz joelwurtz mentioned this pull request Dec 11, 2015
@shulard
Copy link

shulard commented Dec 11, 2015

Hello !
Do you plan to add the php-cs-fixer dependency to composer or do you think it's better to require a global installation on developer computer ?

@sagikazarmark
Copy link
Member

I think it is better kept out of the composer dependencies.

@dbu
Copy link
Contributor

dbu commented Dec 11, 2015 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

4 participants