Drupal crashes with this since updating to latest alpha:

exception 'Doctrine\Common\Annotations\AnnotationException' with       [error]
message '[Syntax Error] Expected
Doctrine\Common\Annotations\DocLexer::T_CLOSE_PARENTHESIS, got '(' at
position 233 in class Drupal\search_api\Entity\Index.' in vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/AnnotationException.php:42

Comments

joachim created an issue. See original summary.

joachim’s picture

Component: General code » Documentation

Ah, this is because my sire is still on 8.0.something, and this annotation was only introduced in 8.1.x: https://www.drupal.org/node/2689949

This is a wontfix then, as 8.0.x is no longer supported.

Might be worth mentioning on the project page and the current alpha release notes that 8.1.x is the minimum.

drunken monkey’s picture

Status: Active » Closed (won't fix)
drunken monkey’s picture

Status: Closed (won't fix) » Closed (works as designed)
joachim’s picture

Component: Documentation » General code
Status: Closed (works as designed) » Active

Actually, thinking about this some more, the info file here should be declaring 8.1.x as a minimum requirement.

borisson_’s picture

According to https://www.drupal.org/core/release-cycle-overview, 8.0.x is no longer supported. So I don't see the need to do that.

drunken monkey’s picture

Priority: Critical » Normal
Status: Active » Closed (works as designed)

I'm with Joris here.
We just have to make sure we stay compatible with 8.1.x, though – I'm just now noticing that the test bot uses 8.2.x already, so we might not notice it if we break something.

joachim’s picture

Status: Closed (works as designed) » Active

> According to https://www.drupal.org/core/release-cycle-overview, 8.0.x is no longer supported. So I don't see the need to do that.

Agreed, but when an alpha module breaks, your first thought isn't 'Oh it's because my core is still on 8.0.x'. Adding the version dependency saves a lot of developer time.

Also, a lot of contrib modules WILL work with older versions.

And this is coming anyway: #2313917: Core version key in module's .info.yml doesn't respect core semantic versioning. The intention there is clearly that contrib modules should indicate when they need a minimum core minor version.

Alumei’s picture

It seems core already supports defining a dependency for 8.1. And they seem to be working on being able to define concrete patch level dependencies here #2641658: Module version dependency in .info.yml is ineffective for patch releases.

The solution for a simple 8.1 dependency is putting

dependencies:
  - system (>=8.1)

into the info.yml.

joachim’s picture

Title: AnnotationException in Drupal\search_api\Entity\Index » declare dependency on core >= 8.1.x

Yup, that's exactly what I think is needed here. Updating summary so it's clearer.

drunken monkey’s picture

Status: Active » Needs review
StatusFileSize
new329 bytes

Thanks, Alumei, that does seem like a sensible suggestion. As said, it shouldn't really be necessary, in theory, since 8.0.x has reached its end of life, but if it saves debugging time for a few people, I guess that's worth this small change.

Patch attached – if it passes, I'll just commit it.

  • drunken monkey committed 84ac504 on 8.x-1.x
    Issue #2731367 by drunken monkey: Added an explicit dependency on Drupal...
drunken monkey’s picture

Status: Needs review » Fixed

Committed.

Status: Fixed » Closed (fixed)

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