Add a PSR-0 level
Add a Psr0Fixer for class / file names matching
merged branch Seldaek/psr0 (PR #88)

Commits
-------

45a56ae Add a Psr0Fixer for class / file names matching
f57888f Add a PSR-0 level

Discussion
----------

PSR-0 fixer for mistakes in class names

It fixes bad case, but for the rest it just throws an exception to notify the user, because it's impossible to fix automatically. I don't know if this is ok with the philosophy of tool or not.

---------------------------------------------------------------------------

by stof at 2012-06-20T17:44:20Z

Changing the class name is a bad idea IMO. What if the other parts of the code use the same case than the class name ? They will still trigger it with this case, and so failing on case-sensitive filesystems. the definition of the class is the place where the case could be different without breaking the autoloading.
so a PSR-0 fixer would need to analyze the whole codebase, not only a file.

---------------------------------------------------------------------------

by Seldaek at 2012-06-20T17:47:53Z

Well if they use the wrong case in other parts of the code, the code should already be failing. The point of this anyway is to highlight an error, this is pretty rare that it goes unnoticed, but it happens that it sneaks into some rarely used parts of a library.

---------------------------------------------------------------------------

by stof at 2012-06-20T17:51:58Z

@Seldaek the code would be failing only if the developer is on a case-sensitive filesystem. A common case for such errors is developign on MacOS or Windows, which are case insensitive and breaking things when deploying on Linux.

---------------------------------------------------------------------------

by Seldaek at 2012-06-20T17:54:31Z

Yeah my point is that this will show you that you have an error (I'd hope people check the diff before committing..). Instead of fixing I can also always throw an exception, so you notice it better, and you can go and fix it in other places yourself if you messed up, or rename the file if the filename is incorrect.

I can also change it to just output a warning if the exception is too violent. Up to @fabpot.
fixed README
updated vendors
fixed typo
Ignore tests/stubs/fixtures for PSR0 checks
Stricter matching to avoid false positives
Turn exceptions into warnings
Handle checking of partially formed namespaces (target-dir style)
Extract code to avoid repetition of fixer selection
Make EOF LineFeed run last
merged branch Seldaek/psr0tweaks (PR #89)

Commits
-------

47c3d55 Extract code to avoid repetition of fixer selection
5ec86c9 Handle checking of partially formed namespaces (target-dir style)
9db2a15 Turn exceptions into warnings
7915674 Stricter matching to avoid false positives
f7569f3 Ignore tests/stubs/fixtures for PSR0 checks

Discussion
----------

PSR0 Fixer tweaks

It only prints warnings now, and it ignores directories that are above the fix target, so if you make it fix a bundle like `php-cs-fixer fix someBundleDir` it will only compare the namespace below someBundleDir, to avoid false positives on those incomplete paths /cc @mheleniak

---------------------------------------------------------------------------

by Seldaek at 2012-06-21T11:49:30Z

I also ignored tests stubs and fixtures. It's a bit unfortunate, but there was too much noise in there. Now it runs fine on symfony without any warnings.
merged branch Seldaek/patch-1 (PR #90)

Commits
-------

703f0e7 Make EOF LineFeed run last

Discussion
----------

Make EOF LineFeed run last

In some occurences with the current code you have to run the fixer twice to get rid of all errors, I think because of the deleted ?> or something along those lines. Anyway this fixes it.