Overzealous subversion pre-commit hook syntax check
-
I’m submitting a plugin that has some optional functionality which requires PHP 5.5.
The plugin only loads the files that require PHP 5.5 once it’s checked the PHP version, as per the recommendations here: https://make.www.ads-software.com/plugins/2015/06/05/policy-on-php-versions/
However, it appears that the pre-commit hook in SVN does a syntax check on ALL files to ensure that they run on PHP 5.2, and does not take into account login in the plugin that doesn’t load such files on PHP < 5.5. Therefore, I receive errors as follows when trying to commit to the repository:
Transmitting file data ………………………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 ‘$client’ (T_VARIABLE) in – on line 61***********************************
PHP error in: amberlink/trunk/vendor/aws/Aws/CommandPool.php:
Errors parsing amberlink/trunk/vendor/aws/Aws/CommandPool.php
***********************************Any recommendations on how to resolve this issue? And is this the right place to raise the question?
- The topic ‘Overzealous subversion pre-commit hook syntax check’ is closed to new replies.