Testbot should report the exact PHP version, not just "5.4".
Ideally it should run php --version from the commandline, to make sure this is the same as intended in the config array.

Background

Coming from #2363523: Docblock / cleanup in \Drupal, this test run: https://qa.drupal.org/pifr/test/932893

It says

                    [phpversion] => 5.4
                    [test.php.version] => 5.4

but then

Command [cd sites/default/files/checkout && drush si -y --db-url=mysql://drupaltestbot-my:fvblsizfI1z8@localhost/drupaltestbotmysql  --account-name=admin --account-pass=drupal --account-mail=admin@example.com 2>&1] failed
  Duration 0 seconds
  Directory [/var/lib/drupaltestbot]
  Status [255]
 Output: [PHP Parse error:  syntax error, unexpected '[', expecting ')' in /var/lib/drupaltestbot/sites/default/files/checkout/core/vendor/react/promise/src/functions.php on line 62

for the following PHP code:

function some($promisesOrValues, $howMany)
{
    return resolve($promisesOrValues)
        ->then(function ($array) use ($howMany) {
            if (!is_array($array) || !$array || $howMany < 1) {
                return resolve([]);
            }

Line 62 is the return resolve([]);.
So, it's a thing with the short array syntax.
This error would typically occur in PHP 5.3, but not in PHP 5.4.
Maybe there are also very early snapshots of 5.4 where it would fail..

Knowing the exact PHP version that is active here would make things more clear.

Comments

yesct’s picture