Uploaded image for project: 'phpBB'
  1. phpBB
  2. PHPBB-11630

Improvements to the PHP lint pre-commit hook

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • 3.0.12-RC1
    • 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.

            bantu Andreas Fischer [X] (Inactive)
            EXreaction EXreaction [X] (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: