Closed (fixed)
Project:
Drupal.org security advisory coverage applications
Component:
module
Priority:
Normal
Category:
Task
Assigned:
Reporter:
Created:
27 Nov 2023 at 12:01 UTC
Updated:
6 May 2026 at 11:45 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
nikral commentedRunning
phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml meta_conversions_api
Comment #4
vishal.kadamComment #5
avpadernoI am changing priority as per Issue priorities.
Comment #6
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 #7
rob230 commentedHi,
I am pretty sure those minor phpcs issues have been resolved now. Please could somebody have a look? I would love if we can get security coverage for this module.
Thanks
Comment #8
vishal.kadam1. FILE: meta_conversions_api.info.yml
core_version_requirement: ^9 | ^10 || ^11Now that Drupal 8 and Drupal 9 are no longer supported, new projects should no longer be compatible with those Drupal versions.
2. FILE: meta_conversions_api.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.
3. FILE: src/Controller/PageViewController.php
Since that class does not use any method from the parent class, it does not need to use ControllerBase as the parent class. Controllers do not need to have a parent class; as long as they implement \Drupal\Core\DependencyInjection\ContainerInjectionInterface, they are fine.
4. FILE: src/Controller/PageViewController.php
FILE: src/Logger/FacebookLogger.php
FILE: src/Services/MetaClient.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.
Comment #9
rob230 commentedI have resolved those issues on the 1.1.x branch if you can take a look.
Comment #10
rob230 commentedComment #11
vishal.kadamIt would be better not to create new branches: Reviewers could need to check again all the files, to understand which changes has been done in the new branch.
Comment #12
rob230 commentedIt's just branched off 1.x, the only changes are what you asked for. You can see the commits. I did a new dev branch since D9 support was dropped and some people may have been using the dev branch.
These changes to comments are also things which are found in every Drupal module already which has security coverage, including big modules like webform, so I don't really understand why this blocks the module getting security coverage.
Comment #13
avpadernosrc/Form/EventsForm.php
With Drupal 10 and Drupal 11, there is no longer need to use
#default_valuefor each form element, when the parent class isConfigFormBase: It is sufficient to use#config_target, as in the following code.Using that code, it is no longer needed to save the configuration values in the form submission handler: The parent class will take care of that.
The parameters for
ConfigFormBase::__construct()changed in Drupal 10.2; the project cannot be compatible with all the Drupal 10 releases and Drupal 11; it needs to require at least Drupal 10.2.With the PHP version required by Drupal 10, it is possible to use property promotion.
src/Services/MetaClient.php
The
$messageparameter passed to theLoggerInterfacemethods must be a literal string that uses placeholders. It's not a translatable string, a string concatenation, a value returned from a function/method, nor a variable containing an exception object.meta_conversions_api.module
For a new module that aims to be compatible with Drupal 10/11, it is expected it implements hooks as class methods as described in Support for object oriented hook implementations using autowired services.
It requires increasing the minimum required Drupal 10 version, but that is not an issue, since not all the Drupal 10 releases are currently supported.
Comment #14
rob230 commentedThanks for that. I have changed to use
config_target, and required minimum Drupal 10.2 in the 1.1.x branch.I have also begun work on supporting object oriented hooks in a service. That's in this ticket, with a merge request: #3556713: Support D11 object oriented hook implementations using autowired services.
I couldn't find any other contrib modules that were doing this out of hundreds of big ones, so was flying a bit blind. I tested it in Drupal 10.5 and it does appear to work, although PHPStan complains about
Drupal\Core\Hook\Attribute\Hooknot existing, which is true - but I don't think it matters because it's just being called as a normal service. I believe the attribute is ignored until D11.I'm gonna test in Drupal 10.2 as well just to be sure.
Comment #15
avpadernoRemember to change status, when you applied the suggested changes. Otherwise, it is not clear whether you made all the suggested changes.
Comment #16
rob230 commentedThanks, I was testing it, but then forgot to update. It does work fine, so I've merged that.
Comment #17
rushikesh raval commentedI am changing priority as per Issue priorities.
Comment #18
avpadernosrc/Hook/MetaConversionsApiHooks.php
Code compatible with latest Drupal releases should use property promotion.
Comment #19
avpadernoThank you for your contribution and for your patience with the review process!
I am going to update your account so you can opt into security advisory coverage any project you create, including the projects you already created.
These are some recommended readings to help you with maintainership:
You can find more contributors chatting on Slack or IRC in #drupal-contribute. So, come hang out and stay involved!
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 also all the reviewers for helping with these applications.
Comment #20
avpaderno