-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix tests to support PHP 8.1 #29
Comments
@ekes @finnlewis Just looking at fixing these test failures. The error is thrown because there's no 'Content-Type' header when the check is made here https://git.drupalcode.org/project/drupal/-/blob/9.4.x/core/lib/Drupal/Core/EventSubscriber/ActiveLinkResponseFilter.php#L82 This only effects unpublished nodes and looks to be caused by the entity access checks in the routing YAML file. Specifically:
Removing Changing the This looks like it might be an issue with how core handles custom encoder types, but I'm having trouble tracking down the cause. I'm still looking but any thoughts / insights into this would be appreciated. |
So when is the Content-Type header being added when it's json? |
Some progress, although not a solution. It appears that Drupal core Serialization module doesn't like the When trying to access the unpublished page a The
So it looks to me like we need to add the Any thoughts / fixes on this appreciated as it's turning into a time sink. Will return to it next week |
Pretty much answered it. That was all the hard work. A quick check in jsonapi, which also adds a _format, and it does indeed implement a error repsonse subscriber. It's more involved and returns one of it's response objects. We can be simpler still as there's no standard, but we set the header. So something like #32 |
…ent-type Add an error response event handler to set correct Content-Type header #29
The following tests fail when using PHP 8.1
The text was updated successfully, but these errors were encountered: