Search code examples
phpphabricator

Adding an extension to Phabricator causes PHP exceptions


I managed to configure and set up Phabricator and everything's running ok but when I try to add an external extension to it I get PHP exceptions

I followed How to modify values show in Phabricator task tile in backlog workflow mode to add the https://github.com/wikimedia/phabricator-extensions-Sprint to my instance of the app.

When i try to edit a project after adding the extension i get:

Function name must be a string
/usr/local/Sprint/src/util/SprintValidator.php:6    

And that's the content of SprintValidator.php

<?php

final class SprintValidator {

public function checkForSprint($showfields, $project_phid) {
 $show = $showfields($project_phid);
 if ($show == false) {
   return false;
 } else {
   return true;
 }
}

public function isSprint($project_phid) {
 $query = id(new SprintQuery())
     ->setPHID($project_phid);
 $issprint = $query->getIsSprint();
 return $issprint;
 }
}

PHP version installed: PHP 5.3.3-7+squeeze25 with Suhosin-Patch

Any help will be much appreciated


Solution

  • According this commit, the extension requires PHP 5.4.