Skip to content

Commit

Permalink
Skip PHP-5.6-only composer autoloader.
Browse files Browse the repository at this point in the history
  • Loading branch information
yunosh committed Jun 27, 2016
1 parent 1204764 commit da8a07c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion git-hooks/pre-receive.d/php-syntax-check
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,9 @@ function parseDiff($oldrev, $newrev, $diffcmd, $regex)
function syntaxCheckFile($blob, $filename)
{
$needle = '/(\.php)$/';
if (preg_match($needle, $filename)) {
if (preg_match($needle, $filename) &&
// @todo Skip until updated to PHP 5.6.
$filename != 'autoload_static.php') {
$dummy = array();
exec("git show $blob | /usr/bin/env php -l", $output, $returnCode);
if ($returnCode != 0) {
Expand Down

0 comments on commit da8a07c

Please sign in to comment.