WordPress.org

Making WordPress.org

#1646 closed defect (fixed)

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

Reported by: leewillis77 Owned by:
Milestone: Priority: normal
Component: Plugin Directory Keywords:
Cc:

Description

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.

https://twitter.com/soulseekah/status/702227207767330816
https://twitter.com/leewillis77/status/707694122677698560

Change History (6)

#2 @leewillis77
15 months ago

Thanks for the super-quick feedback.

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

#3 @leewillis77
15 months ago

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

#4 @dd32
15 months 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
14 months ago

Hi all - any progress on this?

#6 @dd32
12 months 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.