Adds more features to twig:lint command
merged branch marcw/feat-twig-lint (PR #3804)

Commits
-------

8726ade Adds more features to twig:lint command
1d7e9d9 Adds a linter command for templates

Discussion
----------

Adds a linter command for templates

Let's this PR be stoffed. ;)

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

by Tobion at 2012-04-06T15:48:18Z

Checking a single file is very limited. Checking a whole directory would be more useful, wouldn't it?

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

by willdurand at 2012-04-06T17:56:57Z

I think you should provide a way to validate all templates for a given bundle, something like:

    php app/console twig:lint @MySuperBundle

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

by henrikbjorn at 2012-04-06T18:03:45Z

Wouldnt it be better to throw some kind of exception if the lint is erroneous?

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

by marcw at 2012-04-07T11:22:34Z

@Tobion @willdurand  You can do that by combining unix tools.
@henrikbjorn Why ?

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

by marcw at 2012-04-07T11:27:11Z

Updated.

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

by dlsniper at 2012-04-07T13:15:53Z

@marcw it would be indeed nice to have support for a bundle/directory out of the box as some of the Symfony2 users might not be running unix or know the right commands to make this work.

I could help you with a PR in your repo if you want.

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

by henrikbjorn at 2012-04-07T18:55:34Z

@marcw as the console component will catch them and convert them into the right error code, also will display what went wrong instead of just dieing.

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

by marcw at 2012-04-08T09:15:37Z

Updated with all comments and requested features.
[TwigBundle] tweaked previous merge
[TwigBundle] added correct file name in twig:lint exception reporting
[TwigBundle] simplified code
[Process] Fix a mistake triggering stream_select errors
[Process] Removing useless code (this is already done in updateStatus)
[Process] Close pipes before calling proc_close to avoid deadlocks as advised on the proc_close php.net documentation
[Process] Skip test that is still getting stuck on windows
[Process] Skip signal assertion on windows
merged branch Seldaek/process_fix (PR #3838)

Commits
-------

6dca141 [Process] Skip signal assertion on windows
4cd0fb4 [Process] Skip test that is still getting stuck on windows
e82a05d [Process] Close pipes before calling proc_close to avoid deadlocks as advised on the proc_close php.net documentation
f4227b5 [Process] Removing useless code (this is already done in updateStatus)
2d586d2 [Process] Fix a mistake triggering stream_select errors

Discussion
----------

Process fixes

A few fixes, including making the tests pass on windows and fixing composer/composer#543. Given the sensitivity of this code I did a bunch of very granular commits explaining everything.