The module provides a dynamic filtering for entity reference fields based on parent field values, with AJAX support. It is lightweight and focused, ideal for projects that need dynamic reference filtering without the complexity of full rules engines.
The project adheres to Drupal's coding standards, avoids known insecure practices, and is maintained transparently via the Drupal.org infrastructure.
Comments
Comment #2
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 #3
avpadernoI do not have time for a complete review, but the following code needs to be changed.
Services define their dependencies in the .services.yml file, and those are directly passed to the class constructor.
Comment #4
vishal.kadam1. FILE: src/Ajax/UpdateOptionsCommand.php
FILE: src/Util/DynamicReferenceSelectionUtil.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.
2. FILE: dynamic_reference_selection.module
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 #5
iheb.attia commentedThank you avpaderno and vishal.kadam for reviewing the module. I've addressed the previous issues in this commit.
Please let me know if there's anything else that needs to be fixed, or if you can proceed with approving my request for Security Advisory coverage.
Comment #6
iheb.attia commentedComment #7
iheb.attia commentedComment #8
avpadernoIt appears there are multiple project applications created using your account.
Since a successful completion of the project application process results in the applicant being granted the necessary role to be able to opt projects into security advisory coverage, there is no need to take multiple applications through the process. Once the first application has been successfully approved, the applicant can promote other projects without review. Because of this, posting multiple applications is not necessary, and results in additional workload for reviewers, which in turn results in longer wait times for everyone in the queue. With this in mind, your secondary applications have been marked as Closed (duplicate), with only one application left open.
If you prefer that we proceed through this review process with a different application, then feel free to close the application left open as a duplicate, and re-open one of the project applications which had been closed.
Comment #9
avpadernoComment #10
avpadernoLet's continue with this application, since it uses a project with enough Drupal code.
Comment #11
avpadernoComment #12
avpadernosrc/Plugin/EntityReferenceSelection/DynamicReferenceSelectionViewsSelection.php
That short description is for a different class.
Why does not
DynamicReferenceSelectionViewsSelection.phpextendSelectionBase?src/Util/DynamicReferenceSelectionUtil.php
The curly parenthesis needs to be on the same line containing
if, as per Drupal coding standards.Comment #13
avpadernoComment #14
iheb.attia commentedHello avpaderno,
Thank you very much for your detailed review and the time you spent on it.
The requested changes have been addressed in this commit.
Could you please take another look so that the module can move forward and become eligible for Drupal security advisory coverage?
Comment #15
iheb.attia commentedComment #16
bbu23Comment #17
bbu23Hi, here're some quick thoughts from my end:
Optional observations:
- There is no dev release for this project. While not mandatory to have one, I’d recommend it.
- The __construct() method’s description is not mandatory anymore, it can either be removed or be kept as is if preferred.
Feedback:
- For a new module that aims to be compatible with Drupal 10 and Drupal 11, I would rather implement:
--- hooks as class methods as described in Support for object oriented hook implementations using autowired services.
--- plugins as PHP Attributes instead of PHP Annotations as described in Attribute-based plugins
- There seem to be some properties defined in the Annotation class that might not be used. Is it on purpose or am I mistaken?
- In the
dynamic_reference_selection.modulefile, it’s probably not a good idea to usestdClass. Furthermore, it’s not even used, so the line becomes redundant.- Same file, line 23: the variable comment should be in one line
- Same file,
$items = $context['items'];is initialised twice, once when even not checking if context is set. This piece of code could be improved.- Line 44,
$parent_field = NULLl;not used-
src/Plugin/EntityReferenceSelection/DynamicReferenceSelectionViewsSelection.php: The messenger service is passed as argument increatemethod, but never received in the constructor. Is it used?- Same file, as described in the
web/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.phpfile, it is better to use the Trait’st()function when possible. I see no reason for using the TranslatableMarkup here, u should change to t().The above observations serve as examples, I didn't have time to go through everything.
On the other hand, the coding standards and best practices successfully validated with PHPCS.
Comment #18
vishal.kadamI am changing priority as per Issue priorities.
Comment #19
avpadernoThis thread has been idle, in the needs work state with no activity for some months.
May you confirm you are still pursuing this application? If this is the case, and you made commits basing on what previously reported, or you can answer the questions previously asked, please change the status to Needs review.
Comment #20
avpadernoThis thread has been idle, in the Needs work state with no activity for about six months or more; the application has been created about 11 months ago or more. Therefore, I marked it as Closed (won't fix).
If this is incorrect, and you are still pursuing this application, 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.