Reported by @effulgentsia at #2843147-102: Add JSON:API to core as a stable module.

This went unnoticed due to Drupal.org's QA configuration being utterly broken: I had configured PHP 5.6 + Drupal 8.5 to be one of the configurations to test, but it keeps overwriting/changing it…

Comments

Wim Leers created an issue. See original summary.

wim leers’s picture

Status: Active » Needs review
StatusFileSize
new824 bytes
wim leers’s picture

StatusFileSize
new944 bytes

Same problem reproduced. Great.

Now let's fix it.

wim leers’s picture

Title: JSON:API 2.x has a syntax error in PHP 5.6 » [regression] JSON:API 2.x has a syntax error in PHP 5.6
Related issues: +#2995960: Add a Link and LinkCollection class to support RFC8288 web linking.
wim leers’s picture

Title: [regression] JSON:API 2.x has a syntax error in PHP 5.6 » [regression] Follow-up for #2995960: syntax error in PHP 5.6
wim leers’s picture

Status: Needs review » Reviewed & tested by the community

Green on 5.6! Now also queueing a PHP 5.5 test, just to make sure.

wim leers’s picture

Title: [regression] Follow-up for #2995960: syntax error in PHP 5.6 » [regression] Follow-up for #2995960 and #2992833: syntax errors in PHP 5.5 & 5.6
Status: Reviewed & tested by the community » Needs review
Related issues: +#2992833: Add a version negotiation to revisionable resource types
StatusFileSize
new1.31 KB
new2.2 KB

Hah. #2992833: Add a version negotiation to revisionable resource types introduced a regression too. One caused by the nicer PHP syntax that \Drupal\jsonapi\JsonApiSpec::isValidMemberName() refrained from using precisely because PHP 5.6 is not yet a requirement.

wim leers’s picture

Status: Needs review » Reviewed & tested by the community

✅ on 5.5, 5.6, 7.0. Let's do this.

Just one nit:

+++ b/src/Revisions/ResourceVersionRouteEnhancer.php
@@ -44,19 +44,19 @@ final class ResourceVersionRouteEnhancer implements EnhancerInterface {
+   * @todo When D8 requires PHP >=5.6, convert tot expression using the VersionNegotiator::SEPARATOR constant.

s/tot/to/

wim leers’s picture

Status: Reviewed & tested by the community » Fixed
StatusFileSize
new800 bytes

  • Wim Leers committed ea06332 on 8.x-2.x
    Issue #3027501 by Wim Leers: [regression] Follow-up for #2995960 and #...
wim leers’s picture

Status: Reviewed & tested by the community » Fixed

d.o, you're drunk.

Status: Fixed » Closed (fixed)

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