JSON API does not support array callable route controllers

Created on 11 January 2021, over 3 years ago
Updated 28 March 2024, 3 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 1 day ago

Created by

πŸ‡ΊπŸ‡ΈUnited States hawkeye.twolf Chattanooga, TN, USA

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.

Production build 0.69.0 2024