A commit from 2019-03-18 around 21:00 UTC (probably Commit 0224e42 attempting to fix Issue #2862079) introduced a syntax error in HorizontalTabs.php. This is causing my Drupal installation to fail when attempting to install/activate the Field_Group module during a profile/distribution install.

About an hour ago (20:30 UTC), downloading Field_Group via Composer worked fine and the installation showed no errors. Since the commit went live, downloading field_group:3.x-dev gave me this error:

PHP Parse error: syntax error, unexpected '?' in [DrupalRoot]/modules/contrib/field_group/src/Element/HorizontalTabs.php on line 123
PHP Stack trace:
PHP 1. {main}() [DrupalRoot]/vendor/drush/drush/drush:0
PHP 2. require() [DrupalRoot]/vendor/drush/drush/drush:4
PHP 3. Drush\Runtime\Runtime->run() [DrupalRoot]/vendor/drush/drush/drush.php:72
PHP 4. Drush\Runtime\Runtime->doRun() [DrupalRoot]/vendor/drush/drush/src/Runtime/Runtime.php:49
PHP 5. Symfony\Component\Console\Application->run() [DrupalRoot]/vendor/drush/drush/src/Runtime/Runtime.php:118
PHP 6. Symfony\Component\Console\Application->doRun() [DrupalRoot]/vendor/symfony/console/Application.php:148
PHP 7. Symfony\Component\Console\Application->doRunCommand() [DrupalRoot]/vendor/symfony/console/Application.php:255
PHP 8. Symfony\Component\Console\Command\Command->run() [DrupalRoot]/vendor/symfony/console/Application.php:978
PHP 9. Consolidation\AnnotatedCommand\AnnotatedCommand->execute() [DrupalRoot]/vendor/symfony/console/Command/Command.php:255
PHP 10. Consolidation\AnnotatedCommand\CommandProcessor->process() [DrupalRoot]/vendor/consolidation/annotated-command/src/AnnotatedCommand.php:303
PHP 11. Consolidation\AnnotatedCommand\CommandProcessor->validateRunAndAlter() [DrupalRoot]/vendor/consolidation/annotated-command/src/CommandProcessor.php:179
PHP 12. Consolidation\AnnotatedCommand\CommandProcessor->runCommandCallback() [DrupalRoot]/vendor/consolidation/annotated-command/src/CommandProcessor.php:212
PHP 13. call_user_func_array:{[DrupalRoot]/vendor/consolidation/annotated-command/src/CommandProcessor.php:257}() [DrupalRoot]/vendor/consolidation/annotated-command/src/CommandProcessor.php:257
PHP 14. Drush\Commands\core\SiteInstallCommands->install() [DrupalRoot]/vendor/consolidation/annotated-command/src/CommandProcessor.php:257
PHP 15. drush_op() [DrupalRoot]/vendor/drush/drush/src/Commands/core/SiteInstallCommands.php:143
PHP 16. drush_call_user_func_array() [DrupalRoot]/vendor/drush/drush/includes/drush.inc:214
PHP 17. install_drupal() [DrupalRoot]/vendor/drush/drush/includes/drush.inc:229
PHP 18. install_run_tasks() [DrupalRoot]/core/includes/install.core.inc:125
PHP 19. install_run_task() [DrupalRoot]/core/includes/install.core.inc:584
PHP 20. batch_process() [DrupalRoot]/core/includes/install.core.inc:666
PHP 21. _batch_process() [DrupalRoot]/core/includes/form.inc:880
PHP 22. call_user_func_array:{[DrupalRoot]/core/includes/batch.inc:294}() [DrupalRoot]/core/includes/batch.inc:294
PHP 23. _install_module_batch() [DrupalRoot]/core/includes/batch.inc:294
PHP 24. Drupal\Core\ProxyClass\Extension\ModuleInstaller->install() [DrupalRoot]/core/includes/install.core.inc:1894
PHP 25. Drupal\Core\Extension\ModuleInstaller->install() [DrupalRoot]/core/lib/Drupal/Core/ProxyClass/Extension/ModuleInstaller.php:83
PHP 26. Drupal\Core\ProxyClass\Config\ConfigInstaller->installDefaultConfig() [DrupalRoot]/core/lib/Drupal/Core/Extension/ModuleInstaller.php:268
PHP 27. Drupal\Core\Config\ConfigInstaller->installDefaultConfig() [DrupalRoot]/core/lib/Drupal/Core/ProxyClass/Config/ConfigInstaller.php:75
PHP 28. Drupal\Core\Config\ConfigInstaller->createConfiguration() [DrupalRoot]/core/lib/Drupal/Core/Config/ConfigInstaller.php:132
PHP 29. Drupal\Core\Config\Entity\ConfigEntityBase->save() [DrupalRoot]/core/lib/Drupal/Core/Config/ConfigInstaller.php:343
PHP 30. Drupal\Core\Entity\Entity->save() [DrupalRoot]/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:635
PHP 31. Drupal\webform\WebformEntityStorage->save() [DrupalRoot]/core/lib/Drupal/Core/Entity/Entity.php:390
PHP 32. Drupal\Core\Config\Entity\ConfigEntityStorage->save() [DrupalRoot]/modules/contrib/webform/src/WebformEntityStorage.php:114
PHP 33. Drupal\Core\Entity\EntityStorageBase->save() [DrupalRoot]/core/lib/Drupal/Core/Config/Entity/ConfigEntityStorage.php:263
PHP 34. Drupal\webform\WebformEntityStorage->doPostSave() [DrupalRoot]/core/lib/Drupal/Core/Entity/EntityStorageBase.php:432
PHP 35. Drupal\Core\Entity\EntityStorageBase->doPostSave() [DrupalRoot]/modules/contrib/webform/src/WebformEntityStorage.php:107
PHP 36. Drupal\webform\Entity\Webform->postSave() [DrupalRoot]/core/lib/Drupal/Core/Entity/EntityStorageBase.php:506
PHP 37. Drupal\webform\Entity\Webform->getElementsDecoded() [DrupalRoot]/modules/contrib/webform/src/Entity/Webform.php:1870
PHP 38. Drupal\webform\Entity\Webform->initElements() [DrupalRoot]/modules/contrib/webform/src/Entity/Webform.php:1065
PHP 39. Drupal\webform\Entity\Webform->initElementsRecursive() [DrupalRoot]/modules/contrib/webform/src/Entity/Webform.php:1245
PHP 40. Drupal\webform\Plugin\WebformElementManager->getElementInstance() [DrupalRoot]/modules/contrib/webform/src/Entity/Webform.php:1358
PHP 41. Drupal\webform\Plugin\WebformElementManager->getElementPluginId() [DrupalRoot]/modules/contrib/webform/src/Plugin/WebformElementManager.php:229
PHP 42. Drupal\Core\Plugin\DefaultPluginManager->hasDefinition() [DrupalRoot]/modules/contrib/webform/src/Plugin/WebformElementManager.php:215
PHP 43. Drupal\Core\Plugin\DefaultPluginManager->getDefinition() [DrupalRoot]/core/lib/Drupal/Component/Plugin/Discovery/DiscoveryTrait.php:59
PHP 44. Drupal\Core\Plugin\DefaultPluginManager->getDefinitions() [DrupalRoot]/core/lib/Drupal/Component/Plugin/Discovery/DiscoveryCachedTrait.php:22
PHP 45. Drupal\Core\Plugin\DefaultPluginManager->findDefinitions() [DrupalRoot]/core/lib/Drupal/Core/Plugin/DefaultPluginManager.php:175
PHP 46. Drupal\webform\Plugin\WebformElementManager->alterDefinitions() [DrupalRoot]/core/lib/Drupal/Core/Plugin/DefaultPluginManager.php:288
PHP 47. Drupal\Core\Render\ElementInfoManager->getInfo() [DrupalRoot]/modules/contrib/webform/src/Plugin/WebformElementManager.php:95
PHP 48. Drupal\Core\Render\ElementInfoManager->buildInfo() [DrupalRoot]/core/lib/Drupal/Core/Render/ElementInfoManager.php:76
PHP 49. Drupal\Core\Render\ElementInfoManager->createInstance() [DrupalRoot]/core/lib/Drupal/Core/Render/ElementInfoManager.php:110
PHP 50. Drupal\Component\Plugin\PluginManagerBase->createInstance() [DrupalRoot]/core/lib/Drupal/Core/Render/ElementInfoManager.php:140
PHP 51. Drupal\Core\Plugin\Factory\ContainerFactory->createInstance() [DrupalRoot]/core/lib/Drupal/Component/Plugin/PluginManagerBase.php:83
PHP 52. Drupal\Component\Plugin\Factory\DefaultFactory::getPluginClass() [DrupalRoot]/core/lib/Drupal/Core/Plugin/Factory/ContainerFactory.php:17
PHP 53. class_exists() [DrupalRoot]/core/lib/Drupal/Component/Plugin/Factory/DefaultFactory.php:96
PHP 54. spl_autoload_call() [DrupalRoot]/core/lib/Drupal/Component/Plugin/Factory/DefaultFactory.php:96
PHP 55. Composer\Autoload\ClassLoader->loadClass() [DrupalRoot]/core/lib/Drupal/Component/Plugin/Factory/DefaultFactory.php:96
PHP 56. Composer\Autoload\includeFile() [DrupalRoot]/vendor/composer/ClassLoader.php:322
[warning] Drush command terminated abnormally. Check for an exit() in your Drupal site.

Comments

hunterbuchanan created an issue. See original summary.

hunterbuchanan’s picture

Issue summary: View changes

  • zuuperman committed f387b04 on 8.x-3.x
    Issue #3041207: Syntax error in HorizontalTabs.php causes module...
nils.destoop’s picture

Status: Active » Fixed

You are probably still running drupal 8 on PHP 5.6. I removed the usage of the coalesce operator, but I recommend you to update your PHP. As in upcoming releases, the support for PHP 5.6 will be dropped: https://www.drupal.org/docs/8/system-requirements/php-requirements

hunterbuchanan’s picture

@zuuperman thank you very much. You're right, we're still on PHP 5.6 on our production web servers. Our current hope is that we'll have a new environment set up with PHP 7 in time for Drupal 8.7 to be released in May. We would roll back to Field_Group:3.0-beta1 if we had to, but with so many changes made to dev since the beta1 release in 2017, we appreciate your helping us utilize those in the meantime.

Thanks again!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.