bdd - Need help in overcoming the incompatibility of a certain behat dependencies set with a PHP 5.3 -


i having behat configuration specific dependencies set worked php 5.5. later i've had transfer configuration server jenkins. trouble server has php 5.3 installed no possibility updated.

despite dependencies refused installed via composer in normal way, i've forced them installed anyway using "--ignore-platform-reqs" parameter.

having installed dependencies, i've faced issue not had overcome easily. displays error while attempting execute "bin/behat" command:

 php parse error:  syntax error, unexpected '[' in .../workspace/automated-tests/vendor/guzzlehttp/psr7/src/functions.php on line 77 php stack trace: php   1. {main}() .../workspace/automated-tests/vendor/behat/behat/bin/behat:0 php   2. includeifexists() .../workspace/automated-tests/vendor/behat/behat/bin/behat:21 php   3. include() .../automated-tests/vendor/behat/behat/bin/behat:17 php   4. composerautoloaderinit617eef80953ba1e8b93feeaeccb52bc0::getloader() .../workspace/automated-tests/vendor/autoload.php:7 php   5. composerrequire617eef80953ba1e8b93feeaeccb52bc0() .../workspace/automated-tests/vendor/composer/autoload_real.php:49 php   6. require() .../workspace/automated-tests/vendor/composer/autoload_real.php:59 parse error: syntax error, unexpected '[' in .../workspace/automated-tests/vendor/guzzlehttp/psr7/src/functions.php on line 77 call stack: 0.0006 645368 1. {main}() .../workspace/automated-tests/vendor/behat/behat/bin/behat:0 0.0008 645976 2. includeifexists() .../workspace/automated-tests/vendor/behat/behat/bin/behat:21 0.0016 649328 3. include('.../workspace/automated-tests/vendor/autoload.php') .../workspace/automated-tests/vendor/behat/behat/bin/behat:17 0.0021 680968 4. composerautoloaderinit617eef80953ba1e8b93feeaeccb52bc0::getloader() .../workspace/automated-tests/vendor/autoload.php:7 0.0082 1106296 5. composerrequire617eef80953ba1e8b93feeaeccb52bc0() .../workspace/automated-tests/vendor/composer/autoload_real.php:49 0.0089 1109928 6. require('.../workspace/automated-tests/vendor/guzzlehttp/psr7/src/functions_include.php') .../automated-tests/vendor/composer/autoload_real.php:59 

here's list of dependencies in composer.json:

{   "require": {     "behat/gherkin": "~4.4",     "drupal/drupal-extension": "~3.1",     "emuse/behat-html-formatter": "dev-master"   },   "require-dev": {     "bossa/phpspec2-expect": "~1.0",     "ocramius/proxy-manager": "~0.5",     "phpunit/phpunit": "~4.5",     "jakoch/phantomjs-installer": "1.9.8"   },   "autoload": {     "psr-0": {       "behat\\behat":    "src/",       "behat\\testwork": "src/"     }   },   "config": {     "bin-dir": "bin/"   } } 

short array syntax [] added in php 5.4, guess you're running older version of php on shared server. replacing [] array() help, here external vendor package it's not advised modify code changes overwritten when vendor package updated. other way fix issue use newer version of php.

from related question


Comments

Popular posts from this blog

php - Wordpress website dashboard page or post editor content is not showing but front end data is showing properly -

How to get the ip address of VM and use it to configure SSH connection dynamically in Ansible -

javascript - Get parameter of GET request -