Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why does CakePHP still use tabs for indent? [closed]

Tags:

cakephp

http://book.cakephp.org/2.0/en/contributing/cakephp-coding-conventions.html

I assume this was old, but the v3 branch still uses tabs also. Does anyone know why the newer version doesn't ahere to something like PSR-2?

like image 483
David Yell Avatar asked Jan 15 '13 17:01

David Yell


1 Answers

PSR-2 is not a standard

PSR-2 is a style guide it is not a standard - and even if it were, it's voluntary.

Why not follow PSR-2

Leaving aside any tab-v-spaces war, changing whitespace project wide for CakePHP has the following advantages:

  • Match PSR-2

It brings with it the following disadvantages:

  • Zero performance or functional benefit
  • Inconvenience merging branches
  • Merge conflicts and general pain building releases

The last two points are significant - CakePHP has already gone though various automated formatting-related changes, and each time it has lead to time spent/lost coping with merge conflicts whilst building release, or attempting to backport a fix from one version to another.

These are some of the reasons why following this particular rule of PSR-2 isn't likely to occur any time soon.

like image 74
AD7six Avatar answered Oct 01 '22 08:10

AD7six