Comments

gabesullice created an issue. See original summary.

gabesullice’s picture

StatusFileSize
new1.26 KB
gabesullice’s picture

Status: Active » Needs review
gabesullice’s picture

StatusFileSize
new1.4 KB
new2.43 KB

Hrm.

wim leers’s picture

  1. +++ b/tests/src/Functional/JsonApiRegressionTest.php
    @@ -5,6 +5,7 @@ namespace Drupal\Tests\jsonapi\Functional;
    +use Drupal\Component\Serialization\Json;
    

    This was introduced in #2984647: Dangling entity references in entity reference field with multiple possible target bundles: results in exception/500 response. Why didn't it cause tests to fail back then?

  2. +++ b/tests/src/Functional/JsonApiRegressionTest.php
    @@ -458,8 +459,9 @@ class JsonApiRegressionTest extends JsonApiFunctionalTestBase {
    -    ($node_type_dog = NodeType::create(['type' => 'dog']))->save();
    -    ($node_type_cat = NodeType::create(['type' => 'cat']))->save();
    +    $node_type_dog = NodeType::create(['type' => 'dog']);
    +    $node_type_dog->save();
    +    NodeType::create(['type' => 'cat'])->save();
    

    Why all these changes?

gabesullice’s picture

StatusFileSize
new2.99 KB
new5.41 KB

1. It looks like it was removed in #2984886: Trigger route rebuild when new bundles/fields are added/removed, which also added a regression test. So, the better question is, why didn't that fail tests? I think the answer is because it doesn't fail on PHP7 and #2984886 didn't have a PHP5.5 test run against it.
2. Because the ($var = call())->save(); pattern was failing PHPLint


Constants can't be arrays on PHP 5.5...

gabesullice’s picture

Title: HEAD is failing tests because of regressions in JsonApiRegressionTest (-‸ლ) » HEAD is failing tests for various reasons
gabesullice’s picture

StatusFileSize
new952 bytes
new6.34 KB
gabesullice’s picture

All tests pass. Committing because this is critical (it's failing other patches for no good reason).

  • gabesullice committed 8a9652f on 8.x-2.x
    Issue #2998601 by gabesullice, Wim Leers: HEAD is failing tests for...
gabesullice’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

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