Uploaded image for project: 'phpBB3'
  1. phpBB3
  2. PHPBB3-11630

Improvements to the PHP lint pre-commit hook

    Details

    • Type: Bug
    • Status: Unverified Fix
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 3.0.11, 3.1.0-dev
    • Fix Version/s: 3.0.12-RC1
    • Component/s: None
    • Labels:
      None

      Description

      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.

        Activity

        There are no comments yet on this issue.

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development