Closed (fixed)
Project:
Drupal.org security advisory coverage applications
Component:
module
Priority:
Minor
Category:
Task
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
13 Mar 2024 at 11:23 UTC
Updated:
8 Feb 2025 at 13:29 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 didn't have time to check all the project files, but there is a change that is necessary.
Projects hosted on drupal.org are licensed under the same license used from Drupal core: GPLv2+. Any other license, including GPLv3, are not allowed.
Comment #4
vishal.kadamFix phpcs issues.
Comment #5
osab commentedThank you @apaderno and @vishal.kadam for help!
I've removed Lisence file and add phpcs fixes (looks like I have some options and resctrictions in phpcs CLI command before )) ).
As for cache_review/src/Render/RenderCacheReview.php I need your advices how it can be made better.
The point is I wanted to make my module work on Drupal 10 and Drupal 11. That's why I can't set 'cache_factory' (for Drupal 10) or 'variation_cache_factory' (Drupal 11) as arguments in servise file directly.
So, I've found the same approach in core/lib/Drupal/Core/Render/PlaceholderingRenderCache.php:
Maybe it will be Ok to implements ContainerFactoryPluginInterface and add this condition in create() method, but I'm not sure that is correct approach.
Thanks in advance!
Comment #6
osab commentedComment #7
avpadernoYou cannot have code that works with Drupal 10.0 and Drupal 11, when Drupal 11 implements a different service Drupal 10.0 does not have.
The following code will not work on Drupal 10.0, since it would request a service that does not exist in Drupal 10.
If the module requires Drupal 10.1 or higher version, it would work, since the variation_cache_factory service would be defined.
Comment #8
osab commentedThank you, @apaderno! So, if I understood correctly, the better way is to remove version_compare in code, like
version_compare(\Drupal::VERSION, '10.2', '<'), add 'variation_cache_factory' service only and restrict module to core version 10.1 and higher?Comment #9
avpadernoThat's correct.
The alternative would make a branch for Drupal 10.0, and one for Drupal 10.1 and Drupal 11. I would follow this path only in the case you are writing the module for a site you know cannot use Drupal 10.1 or Drupal 11, though.
Comment #10
osab commentedComment #11
osab commentedupdated.
- Set >10.1 version and variation_cache_factory only.
Please, review whenever you will have time. Thanks a lot!
Comment #12
osab commentedComment #13
osab commentedhi @apaderno! Could you help once more and review the module after my changes? Thank you in advance!
Comment #14
andypostVariation cache API added in 10.2 https://www.drupal.org/node/3365546
so it needs changes to
^10.2https://git.drupalcode.org/project/cache_review/-/commit/c6374867771ce83...Comment #15
andypostComment #16
osab commentedThank you, @andypost!
Here is fix for 1.1.x
https://git.drupalcode.org/project/cache_review/-/commit/94dfc4eef0a9085...
I also updated 1.0.x
https://git.drupalcode.org/project/cache_review/-/commit/e09bc2cc9d0c58b...
Comment #17
osab commentedComment #18
andypostThank you, makes sense to add some test and setup CI
Comment #19
osab commentedComment #20
osab commentedfixing https://www.drupal.org/project/cache_review/issues/3446118 is in progress...
Comment #21
osab commentedadded basic test and CI setup. Please review.
Comment #22
osab commentedComment #23
avpadernosrc/Controller/CacheReviewController.php
Since that class is not using any of the methods implemented from the parent class (
ControllerBase), it does not need to use it as parent class. Controllers do not need a parent class; as long as they implement\Drupal\Core\DependencyInjection\ContainerInjectionInterface, they are fine.Messages shown in the user interface must be translatable.
Comment #24
rushikesh raval commentedI am changing priority as per Issue priorities.
Comment #25
osab commented@avpaderno Thank you! I've added fixes in issue https://www.drupal.org/project/cache_review/issues/3494073#comment-15902344. (needs review) After review I can merge them to 1.1x branch.
Unfortunately, I have practically no time left to work on the module, so I will be glad for any help if cache?review is really useful for the community.
Comment #26
vishal.kadam@osab These applications do not require you to create new issues in your project after reviews. Simply push the changes addressing the review comments to the review branch i.e. 1.1.x.
Comment #27
vishal.kadamFILE: cache_review.module
The description for this hook should also say for which theme hook it is implemented.
The usual description for a .module file is Hook implementations for the [module name] module. where [module name] is the module name given in the .info.yml file.
Comment #28
osab commentedOk, thanks @vishal.kadam!
I've updated 1.1.x branch with fixes, including #27.
Comment #29
vishal.kadamRemember to change status, when the project is ready to be reviewed. In this queue, projects are only reviewed when the status is Needs review.
Comment #30
osab commentedComment #31
vishal.kadamRest 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 #32
klausimanual review:
Looks good to me otherwise.
Thanks for your contribution, Oleg!
I updated your account so you can opt into security advisory coverage now.
Here are some recommended readings to help with excellent maintainership:
You can find lots more contributors chatting on Slack or IRC in #drupal-contribute. So, come hang out and stay involved!
Thanks, 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.
Thanks to the dedicated reviewer(s) as well.