Closed (duplicate)
Project:
Drupal core
Version:
9.3.x-dev
Component:
other
Priority:
Normal
Category:
Task
Assigned:
Issue tags:
Reporter:
Created:
21 Oct 2013 at 15:35 UTC
Updated:
10 Nov 2021 at 08:29 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
dawehner.
Comment #3
anavarreOh that's unfortunate. #2095943: Core modules and themes missing the version attribute in info.yml was committed yesterday and it broke this patch. Here's an updated patch that I applied successfully against HEAD just now.
Comment #6
anavarreSome data:
So it'd seem that in Core we'd prefer the
nameanddescriptionvalue to be set without single quotes.Comment #9
MaskyS commentedI think that this is a good idea, but first we need to set this to 8.3.x dev. I'm going to assign this to myself and start working on it. The data is quite outdated though. Here is a new set:
Comment #10
MaskyS commentedHere is the patch for removing quotes from names and for adding them to description as suggested by reporter. If ever its decided to remove quotes for description as well, then I'd be happy to make another patch :)
Comment #11
MaskyS commentedComment #12
MaskyS commentedHere's the interdiff :)
Comment #13
tstoecklerI personally do it this way: As soon as a string contains a space then I enclose the string in single quotes. That is what the Symfoner YAML encoder does, so this makes various handcrafted YAMLs nicely consistent with exported configuration.
Comment #14
anavarreMakes sense. Also, I found the PECL YAML extension is way stricter than the Symfony YAML parser so it's likely going to help bring consistency and better formatting altogether.
Comment #15
dawehnerI'm wondering whether we could/should integrate this into a phpcs rule, so for example contrib modules don't have to think about it, but rather just check the rules.
Comment #16
MaskyS commented@dawehner I don't think we should force this on them as it might render some modules unusable. I'd rather that we adopt this as a standard...
Comment #17
gvsoThere are descriptions which were not enclosed in single quotes. Plus, some of them don't have a period (.) at the end.
It won't. Adding it into a phpcs rule will only let developers know they are not following the standards if they check their code.
Comment #18
MaskyS commented@gvso thanks for the review! Here is a patch and its interdiff for fixing the few decriptions that were not edited. If phpcs won't break anything(forgive my noob knowledge), then sure, somebody please implement it!
Comment #19
gvso@Kifah Meeran, I guess we need to decide which convention we are going to follow first before working on a patch.
Comment #20
gvsoComment #28
quietone commentedClosing this as a duplicate of #2994928: Quote consistency in .info.yml files for Core modules
Comment #31
quietone commentedLooks like I forgot to change the status here. I did move credit.