JSON API does not support array callable route controllers

Created on 11 January 2021, almost 4 years ago
Updated 28 March 2024, 9 months ago

Problem/Motivation

Warning: strpos() expects parameter 1 to be string, array given in Drupal\jsonapi\Routing\Routes::isJsonApiRequest() (line 268 of core/modules/jsonapi/src/Routing/Routes.php).

Steps to reproduce

Implement a route subscriber and provide a controller callable in array form (e.g., [MyClass::class, 'method'] or [$object, 'method`]).

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

πŸ› Bug report
Status

Postponed: needs info

Version

11.0 πŸ”₯

Component
JSON APIΒ  β†’

Last updated 3 days ago

Created by

πŸ‡ΊπŸ‡ΈUnited States hawkeye.twolf α™αŽ©α―αα— Unalatogiyasdi, Tsalaguwetiyi (Cherokee country)

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • πŸ‡¦πŸ‡ΊAustralia pameeela

    Moving to postponed because it has been a few years and it seems like more info is required in order to address this? Specific steps to reproduce would be a good step, otherwise this may be closed if no further info is provided.

  • Status changed to Closed: cannot reproduce 21 days ago
  • πŸ‡¦πŸ‡ΊAustralia griffynh Sydney

    Hola, this came up in the #bugsmash channel as the PMNMI daily triage target.

    As there has been no update in over three months, I will close this issue.

    Please reopen if anyone has any more information.

Production build 0.71.5 2024