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

Improvements to the PHP lint pre-commit hook

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Minor
    • Resolution: Fixed
    • 3.0.11, 3.1.0-dev
    • 3.0.12-RC1
    • None
    • 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.

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: