Closed (fixed)
Project:
Drupal.org security advisory coverage applications
Component:
module
Priority:
Normal
Category:
Task
Assigned:
Reporter:
Created:
27 Apr 2025 at 14:33 UTC
Updated:
14 Sep 2025 at 13:18 UTC
Jump to comment: Most recent
Comments
Comment #2
vishal.kadamComment #3
avpadernoThank 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.
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 #4
avpadernoThere is a module without code. Projects used for these applications need to be complete; that does not mean the code must be bug-free, but it does mean there cannot be .info.yml files without PHP code.
Comment #5
avpadernoComment #6
avpadernobackstop_generator.module
Text shown to users must be translatable. The content read from a file cannot be translatable.
Projects used for these applications cannot have commented out functions or methods. The code development must be at the point that the public API is already defined.
src/Controller/BackstopGeneratorController.php
Since that class does not use methods/properties from the parent class, it does not need to use
ControllerBaseas parent class. Controllers do not need to have a parent class; as long as they implement\Drupal\Core\DependencyInjection\ContainerInjectionInterface, they are fine.src/Entity/BackstopProfile.php
The
$messageparameter passed to theLoggerInterfacemethods must be a literal string that uses placeholders. It's not a translatable string returned fromt()or$this->t(), a string concatenation, nor a value returned from a function/method.src/Form/BackstopProfileForm.php
Classes should not use
t().src/Form/SettingsForm.php
Drupal core has a method for messages that depends on a value (plural or singular).
backstop_generator.info.yml
core: 8.xcannot be used togethercore_version_requirement: ^8 || ^9 || ^10 || ^11; Drupal core throws an error.A new project should not declare itself compatible with a Drupal release that is no longer supported. No site should be using Drupal 8 nor Drupal 9, and people should not be encouraged to use those Drupal releases.
modules/backstop_generator_advanced_settings/backstop_generator_advanced_settings.info.yml
Projects used for these applications are expected to be complete. They should not contain modules without code.
Custom is a package name that is not used for modules hosted on drupal.org.
Comment #7
vishal.kadam1.
2.0.x-1,8.x-1.x-dev,2.0, and240829are wrong names for a branch and should be removed. Release branch names always end with the literal .x as described in Release branches.2. FILE: README.md
README.md file should follow the content and formatting described in README.md template. It is missing the required sections - Requirements and Installation.
3. FILE: backstop_generator.libraries.yml
FILE: backstop_generator.links.menu.yml
FILE: backstop_generator.links.task.yml
Remove commented code.
4. FILE: backstop_generator.module
Drupal does not have primary and secondary hooks. Instead of that, it is preferable to use the usual description: “Hook implementations for the [module name] module”, where [module name] is the name of the module given in its .info.yml file.
5. FILE: src/BackstopJsonTemplate.php
FILE: src/Controller/BackstopGeneratorController.php
FILE: src/Form/SettingsForm.php
The documentation comment for constructors is not mandatory anymore, If it is given, the description must be “Constructs a new [class name] object”, where [class name] includes the class namespace.
Comment #8
jumpsuitgreen commentedThanks to both of you for reviewing this project!
@avpaderno a couple of notes/questions:
#markupkey only returns translated text if the file doesn't exist.$this->t()in the build() method; Line 93 calls$this->configwhich comes from the parent class.@vishal.kadam I have removed the disallowed branches and edited the constructor comments. I left the descriptions of the parameters, though. Should those be removed so that the comment only consists of: Constructs a new [class name] object
Comment #9
avpadernoText shown to users should always be translatable, not just when the text is an error/warning message.
Yet, that class is not using the parent class's properties. In fact, it redefines the same properties already defined from the parent class.
Since that module does not contain code, it does not show any setting in forms.
Comment #10
vishal.kadam@jumpsuitgreen There's no need to remove the parameter descriptions.
Comment #11
jumpsuitgreen commentedThanks, @vishal.kadam!
@avpaderno,
backstop_generator.module
I think I understand what I need to do regarding the translation. The content of the HTML file that is referenced needs to be translatable which, as you point out, currently isn't. So I need to figure that out.
BackstopGeneratorController.php
I now see what you're referring to and will make those fixes.
backstop_generator_advanced_settings module
I should have provided a more complete explanation of what's happening. Here's what is going on:
There are form elements (such as scenarioDefaults) that appear in 3 different places and all three need to be identical—SettingsForm.php, BackstopProfileForm.php, and BackstopScenarioForm.php. Keeping all three forms in sync with each other was difficult during development so I consolidated all of the repetitive form elements in a Service class called BackstopFormBuilder.php. The construction of both Basic and Advanced settings can be found in this class. Advanced Settings are present in the form but are hidden from view if the Advanced Settings module is not enabled:
In summary, all the form code is consolidated in the BackstopFormBuilder class for the sake of long-term maintenance, and the Advanced Settings module is basically a switch. There was concern about the UI being too complicated for new users. So we chose to hide the Advanced Settings to keep things as clean as possible, using the Advanced Settings module as a way to make them available.
I'm not completely convinced this is the best way to handle the issue. It's operational, but I understand the potential for confusion. Probably, I need to document why that sub-module doesn't contain any code. Let me know if you have any insight or recommendations.
Comment #12
jumpsuitgreen commentedOkay! Busy week.
I have moved help documentation for the module to Drupal.org (https://www.drupal.org/docs/extending-drupal/contributed-modules/contrib...) and provided a translatable paragraph via the hook_help() function that links to the documentation.
I removed the advanced settings module completely since all advanced settings were already tucked away in a collapsed form field group.
I removed the properties from BackstopGeneratorController class that were redefining the parent class properties.
I will work next on addressing the few items noted in the pipelines tests. Let me know if there is anything esle.
Thanks!
Comment #13
avpadernoThe Help module allows to use template files for providing translatable help files. See the content of the core/modules/contact/help_topics directory, for example.
Comment #14
jumpsuitgreen commented@avpaderno Thanks for pointing me to the help topics example. That's really helpful. I'll use those to provide some simplified documentation on the module.
The latest commit (7d43f0c1) has all the phpcs errors fixed.
Comment #15
jumpsuitgreen commentedThe latest commit (b09afca3) now includes help topics and some minor fixes to a couple bugs.
Comment #16
jumpsuitgreen commentedComment #17
bbu23Updating priority according to issue priorities.
Comment #18
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 also all the reviewers for helping with these applications.
Comment #19
avpadernoComment #21
jumpsuitgreen commented@avpaderno and @vishal.kadam
It's been a busy month. I missed the notification that this issue had moved forward.
I appreciate your time and that of anyone else who helped out.
Thanks!