-
Bug
-
Resolution: Fixed
-
Minor
-
3.0.11, 3.1.0-dev
-
None
-
None
The PHP lint pre-commit hook fails to display any output when an error
other than a parse error is detected. A simple script to reproduce this
behavior is the following:
<?php
use Foo\Bar;
class Bar {}
$ php -l foo.php
Fatal error: Cannot declare class Bar because the name is already in use in foo.php on line 3
Errors parsing foo.php
Additionally, there are quite a few comments in the hook about issues that may arise based on php.ini settings. These can be eliminated by passing the -n option to php (do not load php.ini), then manually specifying values for php.ini error settings using -d. These changes should allow the hook to work in all cases.