New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PHP Coding Standards Fixer #1
Comments
|
Technically is change very easy, it can be done via simple regexp. Problematic are converting of pull request, merging, doing blames, reverting and other Git operations. It makes this change impossible. In addition, no one has need to do this change or adopt "foreign" standard. |
|
Thank you @dg . |
Now I understood you don't love foreign standards, but the people who use nette need to adopt the foreign standard of Nette. Good luck with your project and thanks! . |
|
Absolutely not. People who use Nette do not have to adopt Nette coding style. People who create PHP-FIG do not forces anybody to adopt they standard. Do not take this the wrong way, but its you who don't love Nette standard and forces me to use your loved standard ;-) |
|
@dg you should understand why the PSR-1, PSR-2 came. |
|
Ok. If Paul M. Jones will tell me that is good idea to change tabs to spaces in all my existing projects, I will promote this idea in Nette community. Deal? |
|
@dg : OK, here you go -- I think it is a good idea to change from tabs to spaces in all your existing projects. We can discuss at greater length if you like. :-) |
|
:-))) Ok, I'll promote it. Can you help me with converting existing pull requests and convince GitHub to enable option |
|
I have only so much time in the day, and so I cannot volunteer my services to help with your project at this time. However, I can point out that the php-cs-fixer has an option that will covert tab indentation to spaces with great ease, essentially: Apply that to your project source dirs, and tell everyone their patches have to be spaces not tabs, and voila, it's all over but the arguing. ;-) |
|
I found another tool: Voilà, all my projects use spaces! And everything works. |
|
Houston, we have a problem. PSR-2 requires, that all PHP files MUST use the Unix LF (linefeed) line ending. But I have Windows. Any ideas? |
|
The cs-fixer takes care of that too, with |
|
heh |
|
@dg LF conversion can be setup by your git client, it will expand LF to windows endings on checkout. And when commiting, it will convert them to LF. |
|
@dg I will try how I can help with. But I could not specifically mention a time frame. Hope you understand. Thank you. |
|
I agree with @harikt -- if the primary issue has been linefeeds and tabs-vs-spaces, there's no reason I can think of not to apply. |
|
I'm really wondering now, have you just converted @dg to spaces? There is few thousand people/projects that use tabs just because of him :) This is going to be funny. |
|
Whitespace is something that git can convert and converts on the fly. Unix linefeeds to windows linefeeds and vice versa. Tabs to spaces. Your editor converts them, when you press TAB, it converts it to 4 spaces. So unsignificant whitespace is something absolutely unimportant to me, under my resolution. But it is neverending theme for holy wars. Something that is invisible, something that is converted on the fly, and so many hours spent in discussing. Probably first world problem :-) |
|
BTW to force Windows users to use UNIX linefeeds is exactly the same as force owner of diesel cars to pump petrol.
|
|
@dg may be unix line feeds you can forget . I don't know whether I really know it or not . |
|
Wow, this is amazing, PEAR coding standard http://pear.php.net/manual/en/standards.file.php
I am crying… |
|
@dg I've had some fun with that before. PEAR does often seem to be the odd one out 😄 |

Hi guys,
I do believe Nette is a great project. I do have written a few posts about tracy and neon this is an old post and need edits.
So that was to show that I do love your project, there can be other posts in http://harikt.com/blog/archives/ .
I was doing a translation
and thought it is good to let you guys know about a tool called http://cs.sensiolabs.org/ when I read the below line.
I don't want to quarrel here, but should take into consideration when you have a tool to fix the big projects, your adoption will only increase .
Thank you.
The text was updated successfully, but these errors were encountered: