Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Problem/Motivation
Adhere to the automated coding standards.
Comment | File | Size | Author |
---|---|---|---|
#18 | combined-2801919-18.patch | 53.7 KB | martin107 |
| |||
#18 | nudges-2801919-18-DO_NOT_COMMIT.patch.txt | 1.93 KB | martin107 |
Comments
Comment #2
e0ipsoMerging if green.
Comment #5
e0ipsoMoar fixes.
Comment #8
e0ipso:weary:
Comment #11
e0ipsoBump.
Comment #12
martin107 CreditAttribution: martin107 as a volunteer commentedrunning phpcbf on todays code base, here is the result.
Comment #13
martin107 CreditAttribution: martin107 as a volunteer commentedThere are lots of cases of
But this patch is already large and difficult to review.
I suggest we populate the comment blocks in another issue.
Comment #14
e0ipsoThis looks good. However, I'd rather get rid of the empty comment blocks in this issue. I believe that if we don't do it now we'll get stuck with those for a while.
Ideally we could disable the need for method comments for testing methods. Do you know if that is possible with
phpcs
?Comment #15
martin107 CreditAttribution: martin107 as a volunteer commentedI have no idea
My preference is that is is easier mentally to fix 101 small, trivial to inspect issues rather than one monster patch.
Sorry if others find it annoying.
When I do it this way things like the object chaining issue pop out --- when normally my brain would have skipped over it.
Comment #16
e0ipsoAs a module maintainer, however, I much rather to review, manage and keep in mind a single patch than 101. Otherwise it becomes an unmaintainable burden for me that never gets committed.
Besides, IMO all the work here should go out as a single commit.
Thanks for understanding!
Comment #17
dawehnerOne thing I really like in contrib modules: Ship with the
phpcs.xml.dist
file your code is actually compatible with.This allows people to easily check their changes etc. When you have a phpcs.xml.dist file you can also simply use phpcbf and automate your fixes.Comment #18
martin107 CreditAttribution: martin107 as a volunteer commentedWhile I don't doubt there goodness of having a phpcs.xml.dist
I think that is a conversation for a separate issue - unless you want to blindly accept the perfectly good phpcs.xml.dist file from core.
There are two patches here
1) nudges-2801919-18-DO_NOT_COMMIT.patch.txt
Has all the changes/nudges from the other split off issues.
2) combined-2801919-18.patch
The combined result of applying the nudges and running phpcbf
I have done this so that if this issue is delayed until after Drupalcon Baltimore [ where I anticipate lots of commits.] - we can then easily reapply that patch and run phpcbf again.
Comment #19
martin107 CreditAttribution: martin107 as a volunteer commentedSorry I forgot to respond to https://www.drupal.org/node/2870130#comment-12041496
+++ b/src/Normalizer/Value/NullFieldNormalizerValue.php
@@ -11,33 +11,59 @@ class NullFieldNormalizerValue implements FieldNormalizerValueInterface {
+ /**
+ * The property type.
+ *
+ * @var mixed
+ */
protected $propertyType;
I was influenced by the annonation for FieldNormalizerValueInterface::setPropertyType() - which implies mixed - am I being too mechanical?
Comment #21
e0ipsoI'll fix this on commit.
Comment #22
e0ipsoComment #23
e0ipsoThanks for this fix @martin107!!!