Because the syntax check is based on PHP 5.3, it will choke on certain PHP 5.4 constructs. However, modules can define a requirement for PHP 5.4 today ... currently, any module which does so (and uses certain PHP 5.4 constructs) can not be supported by the testbot.

Comments

jthorson’s picture

boombatower’s picture

Any chance we can install php 5.4 on workers which should solve this right?

jthorson’s picture

That would cause the PHP syntax check to use PHP 5.4 syntax rules on all code (D6 and D7 included), thus affecting the linting ... background is in #1565094: Remove "vendor" directory from PHP syntax check to avoid PHP 5.4 errors.

This is just a followup on that issue to track that even some D7 modules could explicitly specify a PHP 5.4 requirement; but the current testbot doesn't have any way of detecting this requirement; and/or changing the syntax checking operation based on whether a project expects PHP 5.3 or 5.4 syntax.

jthorson’s picture

I think the first step would be to get two different versions of PHP-CLI running concurrently on the same server.

I attempted to compile 5.4.6 from source on an Ubuntu box (in a custom directory), and get it running in parallel with the default 5.3.5 install:

Download source files to /usr/src
# sudo tar -xvf php-5.4.6.tar.bz2
# cd /usr/src/php-5.4.6
# sudo apt-get install libxml2-dev
# sudo ./configure --prefix=/usr/local/php54 --with-config-file-path=/usr/local/php54 --with-mysql
# sudo make
# sudo make install
$ php -v
PHP 5.3.5-1ubuntu7.10 with Suhosin-Patch (cli)
$ /usr/local/php54/bin/php -v
PHP 5.4.6 (cli)

Once we have two versions of PHP-CLI running, we can add logic to chose which php executable is used when executing the run-tests.sh script; and thus start considering the use of 5.4 for D8 tests, and still using 5.3 for D7 tests. (Probably need to tweak the configure arguments; the above was just a proof of concept.)

Crell’s picture

Issue summary: View changes
Status: Active » Closed (duplicate)