Closed (fixed)
Project:
Drupal.org security advisory coverage applications
Component:
module
Priority:
Normal
Category:
Task
Assigned:
Reporter:
Created:
24 Sep 2023 at 07:58 UTC
Updated:
23 Dec 2023 at 16:34 UTC
Jump to comment: Most recent
Comments
Comment #2
kksandr commentedComment #3
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 #4
vinaymahale commentedComment #5
avpadernocore_version_requirement: ^9 || ^10Since the module declares to need any Drupal 9 version, it cannot use features implemented by PHP 7.4, as Drupal 9.0 does not require PHP 7.4. Either the minimum Drupal version is increased to Drupal 9.4 or the module explicitly requires PHP 7.4.
Comment #6
kksandr commentedI have specified a clear requirement for PHP 7.4 in the module.
Comment #7
avpadernosrc/Plugin/views/area/Library.php
The purpose of
create()is to pass the dependencies to the class constructor. It does not initialize the class properties directly.That method must call the parent method, which is what
AreaPluginBasedoes too.The purpose of that method is adding dependencies; if those dependencies are not found, an exception is already thrown by Drupal core. Eventually, the code should only add the found dependencies, as
Role::calculateDependencies()does.If the added dependencies are not found, Drupal core already throws an exception or an error message.
See also
QueryPluginBase::calculateDependencies().Comment #8
kksandr commentedCan you explain the advantage of this approach? I've always believed that the purpose of the "create()" factory method is to reduce boilerplate code for dependency injection without overriding the constructor.
There is at least 1 case of this approach in the core. Also, for many popular modules such as Group, Webform, the same approach is used.
Core has view plugins that completely override the behavior of the options form without calling the parent method. Why is this prohibited here? I did this on purpose to simplify the form as much as possible.
The architectural solution to "force" calling a parent method is impossible, if there is a part that is required for the plugin options form, the "views" module itself must add it after calling buildOptionsForm from the plugin.
It's fixed.
Comment #9
kksandr commentedComment #10
yogitar commentedI do PHPCS and found following issues.
Comment #11
avpadernoIs there anything that needs to be changed? Two properties that are not documented are not sufficient to hold the application.
Comment #12
andrei.vesterliHi @kksandr
Thx a lot for your contribution to the Drupal community. A great respect from me. I did a smoke testing and a review of your module and here are a few comments:
composer.jsonfile looks a bit uncompleted. Here is how to configure it https://www.drupal.org/docs/develop/using-composer/add-a-composerjson-fileREADME.mdfile. Here is an example on how to write it properly: https://www.drupal.org/docs/develop/managing-a-drupalorg-theme-module-or...Again, great job!
Comment #13
andrei.vesterliComment #14
kksandr commented@YogitaR Which version of
drupal/coderare you using? The module repository has gitlab-ci configured, which includes phpcs checking, and it does not find these errors.@andrei.vesterli
1.
composer.jsonis completed as much as possible.2.
README.mdupdated to fit the template3. The view is deleted along with the module, since it is listed in its dependencies, there are no errors or warnings.
Comment #15
andrei.vesterliHi @kksandr
Thx a lot for your feedback. Looks great. No comments from my side.
Kind regards
Andrei
Comment #16
kksandr commentedComment #17
avpadernoLet's keep reviewing the same branch.
Comment #18
avpadernoThank you for your contribution! I am going to update your account.
These are some recommended readings to help with excellent maintainership:
You can find more contributors chatting on the Slack #contribute channel. So, come hang out and stay involved.
Thank you, also, for your patience with the review process.
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 all the reviewers.
Comment #19
avpaderno