You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Running on a server using PHP 5.6 there seems to be some issues with the Beta 4 version.
Composer just updated to beta4 version of DrupalComposerHelper and then failed with the following error:
PHP Fatal error: Call to undefined method Hussainweb\DrupalComposerHelper\Options::getWebPrefix() in /....../vendor/hussainweb/drupal-composer-helper/src/DrupalFiles.php on line 26
Subsequent calls to composer update give this error:
PHP Parse error: syntax error, unexpected 'const' (T_CONST), expecting variable (T_VARIABLE) in /...../vendor/hussainweb/drupal-composer-helper/src/Options.php on line 9
Line 9 is:
public const DEFAULT_WEB_PREFIX = 'web';
Thanks for reporting this. Since this change is already out, I am thinking of how to handle the multiple versions. Since Drupal is dropping PHP 5.6 support soon, this is not very important but I want to do this cleanly.
There are two problems referenced in this issue. I have created #16 to fix the problem about PHP Parse error. I am not sure how to avoid the first problem but the workaround is to just run composer install again.
Running on a server using PHP 5.6 there seems to be some issues with the Beta 4 version.
Composer just updated to beta4 version of DrupalComposerHelper and then failed with the following error:
PHP Fatal error: Call to undefined method Hussainweb\DrupalComposerHelper\Options::getWebPrefix() in /....../vendor/hussainweb/drupal-composer-helper/src/DrupalFiles.php on line 26
Subsequent calls to composer update give this error:
PHP Parse error: syntax error, unexpected 'const' (T_CONST), expecting variable (T_VARIABLE) in /...../vendor/hussainweb/drupal-composer-helper/src/Options.php on line 9
Line 9 is:
public const DEFAULT_WEB_PREFIX = 'web';
for which the syntax was added with PHP 7.1.0 according to this:
https://www.php.net/manual/en/language.oop5.constants.php
I should add this is for a Drupal 7 project.
Reverting to the beta3 version to get around the issue.
The text was updated successfully, but these errors were encountered: