- Issue created by @mylocaltrades
- ๐ฎ๐นItaly apaderno Brescia, ๐ฎ๐น
Thank 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.
- If you have not done it yet, you should enable GitLab CI for the project and fix the PHP_CodeSniffer errors/warnings it reports.
- For the time this application is open, only your commits are allowed.
- The purpose of this application is giving you a new drupal.org role that allows you to opt projects into security advisory coverage, either projects you already created, or projects you will create. The project status will not be changed by this application; once this application is closed, you will be able to change the project status from Not covered to Opt into security advisory coverage. This is possible only 14 days after the project is created.
Keep in mind that once the project is opted into security advisory coverage, only Security Team members may change coverage. - Only the person who created the application will get the permission to opt projects into security advisory coverage. No other person will get the same permission from the same application; that applies also to co-maintainers/maintainers of the project used for the application.
- We only accept an application per user. If you change your mind about the project to use for this application, or it is necessary to use a different project for the application, please update the issue summary with the link to the correct project and the issue title with the project name and the branch to review.
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.
- It is preferable to wait for a project moderator before posting the first comment on newly created applications. Project moderators will do some preliminary checks that are necessary before any change on the project files is suggested.
- Reviewers should show the output of a CLI tool โ only once per application.
- It may be best to have the applicant fix things before further review.
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 โ .
- ๐ฎ๐นItaly apaderno Brescia, ๐ฎ๐น
Remember to change status, when the project is ready to be reviewed. In this queue, projects are only reviewed when the status is Needs review.
- ๐ฎ๐ณIndia vishal.kadam Mumbai
master
is a wrong name for a branch. Release branch names always end with the literal .x as described in Release branches โ . - ๐ฎ๐ณIndia rushiraval
@dev.drupal.ln Please do not change status to Needs Review for application which you have not created.
- ๐ฎ๐นItaly apaderno Brescia, ๐ฎ๐น
Since the status has not been changed from the applicant, and the status was Active, this application cannot be yet reviewed.
- Status changed to Closed: won't fix
4 months ago 8:41am 20 March 2025 - ๐ฎ๐นItaly apaderno Brescia, ๐ฎ๐น
I am closing this application because the status set by the applicant was Active, and the applicant has not posted any comment in three months.
@mylocaltrades Please re-open this issue when you fixed what reported, and you will be able to follow this application.
- ๐ฌ๐งUnited Kingdom mylocaltrades
Hi!
Thanks so much for the initial feedback and review.
I've now completed the following:
- Switched to proper semantic versioning: 1.0.x is now the default branch
- Set 1.0.2 as the latest stable release
- Updated README and project description to clearly indicate compatibility with Drupal 10 and 11
- All commits have been pushed to the correct branch
- Project follows modern Drupal best practices and includes CHANGELOG.txt, LICENSE.txt, and README.md
Could you please reopen the application and set the status to Needs review so it can proceed?
Thanks again!
โ Gary (mylocaltrades) - Status changed to Needs review
28 days ago 6:26am 16 June 2025 - ๐ฎ๐ณIndia vishal.kadam Mumbai
FILE: webform_gohighlevel.info.yml
# Information added by Drupal.org packaging script on 2025-02-08 version: '1.0.1' project: 'webform_gohighlevel' datestamp: 1739039211
Remove these lines from the info file, it will be added by drupal.org packaging automatically.
- ๐ฌ๐งUnited Kingdom mylocaltrades
Hi Vishal,
Iโve removed the packaging metadata from the .info.yml file as requested.
All changes are now pushed to the 1.0.x branch.Please let me know if anything else is needed โ thank you!
โ Gary (mylocaltrades)
- ๐ฎ๐ณIndia vishal.kadam Mumbai
Rest looks fine to me.
Please wait for a Project Moderator to take a look and if everything goes fine, you will get the role.
- ๐ฎ๐นItaly apaderno Brescia, ๐ฎ๐น
- The following points are just a start and don't necessarily encompass all of the changes that may be necessary
- A specific point may just be an example and may apply in other places
- A review is about code that does not follow the coding standards, contains possible security issue, or does not correctly use the Drupal API
- The single review points are not ordered, not even by importance
src/Plugin/WebformHandler/GoHighLevelHandler.php
catch (RequestException $e) { \Drupal::logger('webform_gohighlevel')->error('API error: @message', ['@message' => $e->getMessage()]); }
Plugins need to use dependency injection for the services they use. The
\Drupal
methods are for procedural code, or for static methods, which cannot use class properties. - ๐ฌ๐งUnited Kingdom mylocaltrades
Hi avpaderno,
Thanks again so much for the review. Iโve now updated the module to use dependency injection for the logger service as recommended. All changes are committed to the 1.0.x branch.
Please let me know if anything else needs adjusting.
Thanks again!
- ๐ฎ๐นItaly apaderno Brescia, ๐ฎ๐น
/** * Logger service. * * @var \Psr\Log\LoggerInterface */ protected $logger; /** * {@inheritdoc} */ public function __construct(array $configuration, $plugin_id, $plugin_definition, LoggerChannelFactoryInterface $logger_factory) { parent::__construct($configuration, $plugin_id, $plugin_definition); $this->logger = $logger_factory->get('webform_gohighlevel'); } /** * {@inheritdoc} */ public static function create(ContainerInterface $container, array $configuration, $plugin_id, $plugin_definition) { return new static( $configuration, $plugin_id, $plugin_definition, $container->get('logger.factory') ); }
The parent class already has a property for the logger factory.
try { \Drupal::httpClient()->post($url, [ 'headers' => [ 'Authorization' => 'Bearer ' . $api_key, 'Content-Type' => 'application/json', ], 'body' => json_encode($payload), ]); }
Dependency injection should be used also in this case.
Verify classes are not using the\Drupal
class for dependencies. - ๐ฌ๐งUnited Kingdom mylocaltrades
Hi avpaderno,
Thanks so much for the follow-up and guidance, really appreciated!
I've now updated the plugin to use proper dependency injection for both the logger and the HTTP client, following Drupal best practices. This should resolve the concerns regarding use of `\Drupal::` static access.
All changes are committed to the `1.0.x` branch. Please do let me know if anything else needs attention, always happy to make adjustments.
Thanks again for your help!