- @mstenta opened merge request.
- πΊπΈUnited States m.stenta
I added general tests for this module in π Add basic test coverage Active , which allowed me to test this. I opened a MR that demonstrates the issue.
In testing this, I found that I had to remove the
ResourceType
type hint from both line 120 and 159. The automated tests caught both of them.The GitLab CI test results show the same error:
There was 1 error: 1) Drupal\Tests\jsonapi_schema\Kernel\JsonApiSchemaTest::testJsonApiSchemaRelated PHPUnit\Framework\Exception: Uncaught PHP Exception TypeError: "Drupal\jsonapi_schema\Controller\JsonApiSchemaController::Drupal\jsonapi_schema\Controller\{closure}(): Argument #1 ($type) must be of type Drupal\jsonapi\ResourceType\ResourceType, string given" at /builds/project/jsonapi_schema/src/Controller/JsonApiSchemaController.php line 159
https://git.drupalcode.org/project/jsonapi_schema/-/jobs/5260475
Now I will push a fix commit, so we can see tests pass.
-
m.stenta β
committed 494c3baf on 8.x-1.x
Issue #3189930: TypeError: Argument 1 passed to Drupal\jsonapi_schema\...
-
m.stenta β
committed 494c3baf on 8.x-1.x