http_kernel.basic doesn't register api_json format

Created on 10 March 2025, 30 days ago

Problem/Motivation

I noticed the following errors in our tests which use EntityToJsonApi

/app/docroot/core/lib/Drupal/Core/EventSubscriber/RssResponseRelativeUrlFilter.php:24
stripos(): Passing null to parameter #1 ($haystack) of type string is deprecated

/app/docroot/core/lib/Drupal/Core/EventSubscriber/ActiveLinkResponseFilter.php:85
stripos(): Passing null to parameter #1 ($haystack) of type string is deprecated

Turns out the register basic HTTP kernel doesn't call \Drupal\Core\StackMiddleware\NegotiationMiddleware which is how Drupal registers content types. So all responses from the basic kernel have null as the content type.

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

πŸ› Bug report
Status

Active

Version

3.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States mglaman WI, USA

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

Merge Requests

Comments & Activities

  • Issue created by @mglaman
  • πŸ‡ΊπŸ‡ΈUnited States mglaman WI, USA
  • Merge request !66Ensure api_json format is set β†’ (Open) created by mglaman
  • Pipeline finished with Success
    30 days ago
    Total: 220s
    #444907
  • πŸ‡ΊπŸ‡ΈUnited States mglaman WI, USA
  • Pipeline finished with Success
    30 days ago
    Total: 143s
    #445006
  • Pipeline finished with Success
    29 days ago
    Total: 186s
    #445010
  • Pipeline finished with Success
    29 days ago
    Total: 152s
    #445576
  • Pipeline finished with Success
    29 days ago
    Total: 139s
    #445578
  • Pipeline finished with Failed
    27 days ago
    Total: 351s
    #447038
  • Pipeline finished with Success
    27 days ago
    Total: 167s
    #447043
  • Pipeline finished with Canceled
    20 days ago
    Total: 106s
    #453423
  • Pipeline finished with Success
    20 days ago
    Total: 177s
    #453424
  • Pipeline finished with Success
    14 days ago
    Total: 141s
    #457810
Production build 0.71.5 2024