New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PHP 5.3.3 broken under precise #8639

Closed
jonathangreen opened this Issue Oct 25, 2017 · 6 comments

Comments

Projects
None yet
3 participants
@jonathangreen

jonathangreen commented Oct 25, 2017

Based on the advise given in this ticket #2963 we switched all of our builds using PHP 5.3 to run on precise.

Starting yesterday we started seeing our builds using 5.3 on precise failing with the following during the bootstrap phase:

Writing /home/travis/.pearrc
PHP Parse error: syntax error, unexpected '[', expecting ')' in - on line 2
The command "echo '<?php error_reporting(0); echo serialize(
 [
 'preferred_state' => "stable",
 'temp_dir' => "/tmp/pear/install",
 'download_dir' => "/tmp/pear/install",
 'bin_dir' => "/home/travis/.phpenv/versions/5.3.3/bin",
 'php_dir' => "/home/travis/.phpenv/versions/5.3.3/share/pear",
 'doc_dir' => "/home/travis/.phpenv/versions/5.3.3/docs",
 'data_dir' => "/home/travis/.phpenv/versions/5.3.3/data",
 'cfg_dir' => "/home/travis/.phpenv/versions/5.3.3/cfg",
 'www_dir' => "/home/travis/.phpenv/versions/5.3.3/www",
 'man_dir' => "/home/travis/.phpenv/versions/5.3.3/man",
 'test_dir' => "/home/travis/.phpenv/versions/5.3.3/tests",
 '__channels' => [
 '__uri' => [],
 'doc.php.net' => [],
 'pecl.php.net' => []
 ],
 'auto_discover' => 1
 ]
 ) ?>' | php > $HOME/.pearrc" failed and exited with 255 during .

full log here: https://travis-ci.org/Islandora/islandora_premis/jobs/292739002#L1

I think its the square bracket array syntax used here (travis-ci/travis-build#1201) that is causing the issue.

@BanzaiMan

This comment has been minimized.

Show comment
Hide comment
@BanzaiMan

BanzaiMan Oct 25, 2017

Member

It is 5.3.3 that is broken. 5.3 (which points to 5.3.29) should be OK. https://travis-ci.org/BanzaiMan/travis_production_test/jobs/292710836

Member

BanzaiMan commented Oct 25, 2017

It is 5.3.3 that is broken. 5.3 (which points to 5.3.29) should be OK. https://travis-ci.org/BanzaiMan/travis_production_test/jobs/292710836

@BanzaiMan

This comment has been minimized.

Show comment
Hide comment
@BanzaiMan

BanzaiMan Oct 25, 2017

Member

The syntax error does not appear to happen on PHP 5.2.

Member

BanzaiMan commented Oct 25, 2017

The syntax error does not appear to happen on PHP 5.2.

@BanzaiMan BanzaiMan added the php label Oct 25, 2017

@jonathangreen jonathangreen changed the title from PHP 5.3 broken under precise to PHP 5.3.3 broken under precise Oct 25, 2017

@DiegoPino

This comment has been minimized.

Show comment
Hide comment
@DiegoPino

DiegoPino Oct 25, 2017

@BanzaiMan thanks. This Seems to be an issue with square bracket notation for arrays and it is new for us. We have 50+ repos and we just update all of them to keep on testing 5.3.3 after the ubuntu change. PHP 5.3 actually does not support the short notion, as stated in php docs

As of PHP 5.4 you can also use the short array syntax, which replaces array() with [].

Is there something in that pear generating script that is wrongly checking for the actually compatible PHP version when deciding (matching only 5.3 but not 5.3.3) how to generate the array? Thanks a lot

DiegoPino commented Oct 25, 2017

@BanzaiMan thanks. This Seems to be an issue with square bracket notation for arrays and it is new for us. We have 50+ repos and we just update all of them to keep on testing 5.3.3 after the ubuntu change. PHP 5.3 actually does not support the short notion, as stated in php docs

As of PHP 5.4 you can also use the short array syntax, which replaces array() with [].

Is there something in that pear generating script that is wrongly checking for the actually compatible PHP version when deciding (matching only 5.3 but not 5.3.3) how to generate the array? Thanks a lot

@jonathangreen

This comment has been minimized.

Show comment
Hide comment
@jonathangreen

jonathangreen Oct 25, 2017

Thank you so much for the quick response! I updated the title to match that its 5.3.3 that is broken, not 5.3. I didn't realize that it was only 5.3.3.

Any idea if we will see a fix for 5.3.3 for this issue or if its too old to bother?

jonathangreen commented Oct 25, 2017

Thank you so much for the quick response! I updated the title to match that its 5.3.3 that is broken, not 5.3. I didn't realize that it was only 5.3.3.

Any idea if we will see a fix for 5.3.3 for this issue or if its too old to bother?

@BanzaiMan

This comment has been minimized.

Show comment
Hide comment
@BanzaiMan
Member

BanzaiMan commented Oct 25, 2017

We need to test travis-ci/travis-build#1236.

@DiegoPino

This comment has been minimized.

Show comment
Hide comment
@DiegoPino

DiegoPino Oct 25, 2017

DiegoPino commented Oct 25, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment