Problem/Motivation

When updating to Rabbit Hole beta8 an error is thrown when trying to run any Drush operation:

ParseError: syntax error, unexpected '|', expecting variable (T_VARIABLE) in Composer\Autoload\includeFile() (line 84 of modules/contrib/rabbit_hole/src/EventSubscriber/RabbitHoleSubscriber.php).

Steps to reproduce

  • Update Rabbit Hole to beta8
  • Try running ../vendor/bin/drush updb -y from the command line

PHP version: 7.0.33
MySQL: 5.7.26

CommentFileSizeAuthor
#4 3186213-2.patch635 bytesmatroskeen

Comments

mrcdrx created an issue. See original summary.

mrcdrx’s picture

Issue summary: View changes
mrcdrx’s picture

Issue summary: View changes
matroskeen’s picture

Title: Update to beta8 throws error » Update to beta8 throws error on PHP 7.0
Status: Active » Needs review
StatusFileSize
new635 bytes

Lol, turns out we have to support PHP 7.0 too 😅

Here is a patch with a quick fix. I discovered that PluginNotFoundException is extending PluginException, so we're safe to keep just PluginException in that catch block.

P.S. Added weekly test for PHP 7.0 here so we don't face such issues in the future: https://www.drupal.org/node/1408882/qa (I wish I did that before)

matroskeen’s picture

@mrcdrx, thanks for the report. Will you able to apply the patch and make some tests?
I'll probably have to cut a new release, once I receive some confirmation that everything's fine.

  • Matroskeen committed abf90cd on 8.x-1.x
    Issue #3186213 by Matroskeen, mrcdrx: Update to beta8 throws error on...
matroskeen’s picture

Status: Needs review » Fixed

Tests are happy about this change, so committed to 8.x-1.x.

Status: Fixed » Closed (fixed)

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