Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 294464

Remove ContentNegotiation and embed functionality in the middleware

$
0
0

Problem/Motivation

The ContentNegotiation class is only used in the NegotiationMiddleware class. It is trivial in size and is not useful anywhere else. Let's simplify by just moving its functionality into the middleware.

Proposed resolution

* Move the getContentType() method from the ContentNegotiation class to NegotiationMiddleware and make it protected.
* Adapt NegotiationMiddleware to call the method on itself instead of on ContentNegotiation.
* Remove the dependency of NegotiationMiddleware on ContentNegotiation.
* Remove ContentNegotiation entirely (including from services.yml)
* Dance.

Remaining tasks

Do it.

User interface changes

none

API changes

nothing significant.

Beta phase evaluation

Reference: https://www.drupal.org/core/beta-changes
Issue categoryTask because it's just general cleanup
Issue priorityNormal because nothing's actual broken. This is mostly just tidiness, with maybe a micro-optimization benefit

Viewing all articles
Browse latest Browse all 294464

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>