Closed (fixed)
Project:
Drupal.org security advisory coverage applications
Component:
module
Priority:
Minor
Category:
Task
Assigned:
Reporter:
Created:
29 Dec 2023 at 09:41 UTC
Updated:
22 Apr 2025 at 18:19 UTC
Jump to comment: Most recent
Comments
Comment #2
vishal.kadamThank you for applying!
Please read Review process for security advisory coverage: What to expect for more details and Security advisory coverage application checklist to understand what reviewers look for. Tips for ensuring a smooth review gives some hints for a smoother review.
The important notes are the following.
phpcs --standard=Drupal,DrupalPracticeon the project, which alone fixes most of what reviewers would report.To the reviewers
Please read How to review security advisory coverage applications, Application workflow, What to cover in an application review, and Tools to use for reviews.
The important notes are the following.
For new reviewers, I would also suggest to first read In which way the issue queue for coverage applications is different from other project queues.
Comment #3
avpadernoI do not have time to make a deeper review. I just wanted to point out that the following lines (in the src/Form/DarkmodeConfigurationForm.php file) must be changed.
An expression like
$config->get('right') ?? $config->get('right')is exactly equivalent to$config->get('right').When the null coalescing operator is used, the two expressions must be different.
Comment #4
avpadernoComment #5
bobi-mel commentedI have checked the code of the module and fixed it. Please check one more time.
https://git.drupalcode.org/project/darkmode
Comment #6
vishal.kadamFILE: darkmode.info.yml
core_version_requirement: ^8 || ^9 || ^10The Drupal Core versions before 8.7.7 do not recognize the core_version_requirement: key.
The minimum core version requirement should be 9.2.0 since the core/once library is used, which was introduced in version 9.2.0.
Comment #7
bobi-mel commentedFixed. Please check one more time.
Comment #8
bobi-mel commentedHi @vishal.kadam @apaderno
I fixed your remarks. Could you check them one more time?
Comment #9
rushikesh raval commentedI am changing the issue priority as per issue priorities.
Comment #10
bobi-mel commentedComment #11
rushikesh raval commentedFindings in comment #3 and #6 are fixed. Rest looks fine to me.
Let’s wait for a Code Review Administrator to take a look and if everything goes fine, you will get the role.
Comment #12
vishal.kadamComment #13
solideogloria commentedThis is a minor nuance, but there's a newer version of the .gitlab-ci.yml template available.
There are some coding standards issues. There should be a space before the return type declarations. There are more occurrences that need fixing, but here are some examples:
I'm not sure why the GitLab CI pipeline didn't catch them...
Comment #14
solideogloria commentedComment #15
avpadernoTo make the previous comment clearer, there should be a space after the colon and before the return type hinting, like in the following example.
Is there anything more to be changed? Updating the .gitlab-ci-yml file to latest version from the template file does not change what the GitLab CI jobs do.
Comment #16
solideogloria commentedThat's all that I saw. Did anyone run PAReview.sh against the codebase?
Overall, the code is well-written.
Comment #17
avpadernodarkmode.module
Sentences to translated are not split in two or more phrases. The full sentence must be used in a translatable string, or translators will lose any context to provide a better translation.
src/Form/DarkmodeConfigurationForm.php
The class does not configure any forum settings. They are settings for the DarkmodeJS library integration.
That property is already defined from the parent class, via the trait it uses. There is no need to define it again.
It is sufficient to call the constructor for the parent class.
There should be a space after the colons and before
static,string, orarray(as already reported from the previous review).If the purpose of this class is just to provide settings for the block, there is no need to use a new class. A block form is returned by
buildConfigurationForm().src/Plugin/Block/DarkmodeSwitcherBlock.php
A block configuration is contained in
$this->configuration.Comment #18
vishal.kadamI am changing priority as per Issue priorities.
Comment #19
vishal.kadamThis thread has been idle, in the Needs work state with no activity for several months. Therefore, I am assuming that you are no longer pursuing this application, and I marked it as Closed (won't fix).
If this is incorrect, and you are still pursuing this application, then please feel free to re-open it and set the issue status to Needs work or Needs review, depending on the current status of your code.
Comment #20
avpadernoComment #21
bobi-mel commentedHi.
I fixed remarks, please check one more time.
Comment #22
avpadernoThank you for your contribution and for your patience with the review process!
I am going to update your account so you can opt into security advisory coverage any project you create, including the projects you already created.
These are some recommended readings to help you with maintainership:
You can find more contributors chatting on Slack or IRC in #drupal-contribute. So, come hang out and stay involved!
Anyone is welcome to participate in the review process. Please consider reviewing other projects that are pending review. I encourage you to learn more about that process and join the group of reviewers.
I thank the dedicated reviewers as well.
Comment #23
avpadernoComment #24
avpaderno