Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
functions.php in react/promise is failing lint test:
$ php -l core/vendor/react/promise/src/functions.php
PHP Parse error: parse error, expecting `')'' in core/vendor/react/promise/src/functions.php on line 62
Errors parsing core/vendor/react/promise/src/functions.php
However, looking at the file in question, I'm not seeing the error.
This is breaking drush.
Comments
Comment #1
dawehnerIts basically the same problem as #2353509: Parse error into guzzlehttp which is using php 5.4 syntax, but you use 5.3
Comment #2
larowlanMin php for Drupal 8 is 5.4
Comment #3
forestmars CreditAttribution: forestmars commentedGood call, my CLI invoked php version was lagging behind. thx.
Comment #4
forestmars CreditAttribution: forestmars commentedHmm, when I use php 5.4.38, drush 6 can no longer connect to the database:
Drush was not able to start (bootstrap) the Drupal database. [error]
Switching back to 5.3.26 confirms that drush can connect to database when php = 5.3.26, but not when php = 5.4.38.
Additonally, trying to use drush 7 with php 5.4.38 returns multiple exceptions:
<h1>Additional uncaught exception thrown while handling exception.</h1><h2>Original</h2><p>PDOException: SQLSTATE[HY000] [2002] No such file or directory in drupal_is_denied() (line 1933 of drupal-7.34/includes/bootstrap.inc).</p><h2>Additional</h2><p>PDOException: SQLSTATE[HY000] [2002] No such file or directory in _registry_check_code() (line 3165 of drupal-7.34/includes/bootstrap.inc).</p><hr />Drush command terminated abnormally due to an unrecoverable error. [error]
Drush 7 running on php 5.3.26 returns no such exceptions, and but does have the
expecting `T_STRING' or `'(''
error.So on the face of it, this doesn't seem like it's just question of using specific recommended php & drush versions for Drupal 7.34.
Comment #5
idebr CreditAttribution: idebr commentedThis seems an issue with Drush rather than Drupal. Drush is maintained on github: https://github.com/drush-ops/drush