Syntax error while updating SVN repository
-
I’m trying to upload an updated version of one of my plugins, and the commit fails due to a “syntax error”:
Commit blocked by pre-commit hook (exit code 1) with output: PHP Parse error: syntax error, unexpected '.', expecting ')' in - on line 10
The code is generated by Composer, and it works fine in PHP 5.3 and later. I reckon that the error is due to a rule that applies to PHP 5.2 and earlier.
Affected code
<?php // autoload_static.php @generated by Composer namespace Composer\Autoload; class ComposerStaticInit9b09a05c4e06ffb39df7e3d597db9ef6 { public static $files = array ( // This the affected line. The error is probably caused by the // fact that in older versions of PHP it was not possible to // use concatenation in variable and property declarations '1d1b89d124cc9cb8219922c9d5569199' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest.php', ); // Other code... }
The plugin is designed to check for PHP 5.3 or later, and it won’t run without it, therefore the syntax is valid. Is there a way to skip this pre-commit hook?
Viewing 10 replies - 1 through 10 (of 10 total)
Viewing 10 replies - 1 through 10 (of 10 total)
- The topic ‘Syntax error while updating SVN repository’ is closed to new replies.