Opened 8 years ago

Closed 8 years ago

#1646 closed defect (bug) (fixed)

Pre-commit hooks on plugin repo block code beyond PHP 5.4

Reported by: leewillis77's profile leewillis77 Owned by:
Milestone: Priority: normal
Component: Plugin Directory Keywords:


The plugin repo blocks the committing of any code that uses syntax specific to modern versions of PHP (anecdotally > 5.4, although I haven't checked to confirm).

I understand that this is an attempt to avoid WSOD, but the hooks trigger failures even if the plugin checks for, and deals gracefully with the issue - it looks like all files are linted even if they wouldn't be included in practice.

svn: E165001: Commit failed (details follow):
svn: E165001: Commit blocked by pre-commit hook (exit code 1) with output:
PHP Parse error: syntax error, unexpected '.', expecting ',' or ';' in - on line 38

This seems (see twitter threads below) to be a known issue, but I couldn't find a ticket to follow, so logging this so there is some transparency about the efforts to resolve it.

Change History (6)

#2 @leewillis77
8 years ago

Thanks for the super-quick feedback.

So - should people be following discussion here? or there?

#3 @leewillis77
8 years ago

That is. Happy to close this in favour of just having "one place"...

#4 @dd32
8 years ago

Best to keep discussion here, however, at this point in time there's no discussion needed.

We're going to remove the block, and lower it to simply a PHP Warning after commit, or possibly instead upgrade the linting to the latest PHP version.

#5 @katzwebdesign
8 years ago

Hi all - any progress on this?

#6 @dd32
8 years ago

  • Resolution set to fixed
  • Status changed from new to closed

We now do syntax checking against PHP 7.x.

Let us know if there's any issues.

Note: See TracTickets for help on using tickets.