- 🇺🇸United States jeffschuler Boulder, Colorado
+1 for this.
I want to apply the UrlLinkEnhancer to every Link field in all my entities...
- First commit to issue fork.
- last update
about 1 year ago 10 fail - last update
about 1 year ago 11 pass, 4 fail - Status changed to Needs review
about 1 year ago 8:40pm 1 March 2024 - last update
about 1 year ago 11 pass, 4 fail - 🇺🇸United States afinnarn
Adding a patch since I've seen people do this with MRs to reference...
This MR includes a "Field Types" form adjacent to the resource overrides, allowing users to select which field types a default enhancer can apply. Individual field instance enhancers still override the default field type enhancer.
Originally, I listed out all the field types so users could choose to add enhancers in one big form, but the way I was doing it I ran into `max_input_vars` issue on my work QA server. So, I switched to forcing users to declare the field types they wanted to include, which is probably better anyways since most people would only want to use this on a few field types.
I think the form and form language could be improved, but the approach of adding to FieldItemNormalizer and checking an additional config made sense to me. However, feel free to suggest whatever changes make sense...also where to add tests/what tests would be helpful for this change as I am not super experienced with PHPUnit.
I did not add the NULL enhancer, but that wouldn't be much work to add in this pattern.
Also, I have a disabled key in settings that I didn't implement, but it would disable all field type enhancers only allowing the field instance overrides. The benefit would be mainly for debugging where you can keep your settings but have a flag to turn off the whole field type enhancer feature.
From the Kernel tests, I keep seeing this failure repeated, but I don't think this code change has anything to do with something in the jsonapi module.
Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException: The service "Drupal\jsonapi\Controller\TemporaryJsonapiFileFieldUploader" has a dependency on a non-existent service "file.validator". Did you mean one of these: "form_validator", "path.validator", "email.validator"?
I also saw deprecations in the test logs, but other tests passed when I ran them.
The last submitted patch, 5: field-type-enhancer-3025283-5.patch, failed testing. View results →
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.- last update
11 months ago 10 fail - last update
11 months ago 5 pass, 8 fail - last update
11 months ago 6 pass, 6 fail - 🇺🇸United States timcosgrove
Rerolling #5 this for 3.25, though if the patch in #5 failed I expect it will fail. I will try to address the failures if they come up.
- 🇺🇸United States timcosgrove
Fixed some issues with the previous patch; removed the previous patch from display.
- First commit to issue fork.