Closed (won't fix)
Project:
Drupal.org security advisory coverage applications
Component:
module
Priority:
Minor
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
28 Dec 2023 at 12:52 UTC
Updated:
4 Sep 2025 at 22:59 UTC
Jump to comment: Most recent
Comments
Comment #2
abhishek.sa commentedComment #3
abhishek.sa commentedComment #4
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 #5
vishal.kadamComment #6
avpadernosrc/Controller/AIFieldController.php
The description in that comment is not for that controller class, which is not just an example controller.
$open_ai_key = \Drupal::config('ai_field.settings')->get('openai_api_key');Any dependency a controller has must be injected using the dependency injection container.
Controller instances are never created that way.
In this case, it is not even necessary, since that code is executed by a non-static method of that controller.
src/Form/AIFieldConfigurationForm.php
There is no need to implement an empty method.
The parent class already shows a message about the settings being saved. I am not sure there is the need to add a specific message.
ai_field.module
That is code for a validation handler.
Comment #7
vishal.kadamFix phpcs issues.
Comment #8
abhishek.sa commentedUpdated the code as per suggestions mentioned in #6.
Also fix phpcs issues mentioned in #7.
Comment #9
rushikesh raval commentedI am changing the issue priority as per Issue priorities.
Comment #10
rushikesh raval commentedI am changing the issue priority as per issue priorities.
Comment #11
solideogloria commentedThere are some functions that have a blank line after the function signature. There doesn't need to be blank lines after a function's opening brace. One is in the tokens include file.
ai_field.services.yml has an entry for a controller. Controls shouldn't have entries in the services YAML, since they aren't injected.
For readability, I recommend that instead of using a class name like
AIFieldConfigurationForm, you useAiFieldConfigurationForm, with "Ai", and do likewise for similar classes. There isn't a 100% required way to do it for acronyms, but Drupal does useStackedHttpKernelinstead ofStackedHTTPKernel, and I think that's good.This is pretty minor, but there are typos in the module description in composer.json:
Comment #12
avpadernoComment #13
vishal.kadamI am changing priority as per Issue priorities.
Comment #14
avpadernoActually, a page controller can also be a service method, but in that case the service does not extends
ControllerBase.Structure of routes gives more details.
Comment #15
avpadernoThat said, the ai_field.ai_field_services service is not used for a page controller. The only route defined in ai_field.routing.yml shows a form.
Comment #16
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 #17
avpadernoThis application waited four months for a review. Let's keep this application open for longer.
Comment #18
avpadernoThis thread has been idle, in the Needs work state with no activity for more than eight months; the application has been created more than 11 months ago. 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.