The report recommends that a services.yml file be created as a best practice, but is that really a best practice? It seems like what it really does is create an area where things can go wrong, that one should only have a services.yml file if you are actively overwriting what is in core.services.yml or otherwise you have to manually update the services.yml file for each new Drupal version that changes something... or you'll overwrite that, as other conversations have discussed. It seems to me that it could be argued that not having a services.yml is a better default practice, that indeed this is why it is optional.
Comment | File | Size | Author |
---|---|---|---|
#5 | services_yml_3x_5_2954632.patch | 3 KB | hey_germano |
#4 | services_yml_4_2954632.patch | 3.01 KB | socketwench |
Comments
Comment #2
socketwench CreditAttribution: socketwench at TEN7 commentedHm. Yeah, that strikes me as kind of out of date. The check should be updated accordingly.
Comment #3
socketwench CreditAttribution: socketwench at TEN7 commentedReading over the link (thank you for that!) it seems less that Site Audit should stop reporting on services.yml entirely, but do the complete opposite:
If a site-specific services.yml *is* defined, we should mark it as a warning. "Use of a site-specific services.yml is unnecessary for most sites, and can cause issues as it overrides core.services.yml."
Comment #4
socketwench CreditAttribution: socketwench at TEN7 commentedInverts the check and references the above core isssue.
Comment #5
hey_germanoInverting this check makes sense to me. Here's a re-roll of socketwench's patch in #4 for the 3.x branch.
Comment #7
jrglasgow CreditAttribution: jrglasgow commentedthis has been committed to the 8.x-3.x branch
Comment #8
hey_germano