Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
This module offers to prevent unpublished entity when it reference to another entity.
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,DrupalPractice
on 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
apadernoThank you for applying! At first, the master branch needs to be removed.
Drupal.org repositories do not use that branch. In future, it will be possible to use main as branch name, but for the moment, drupal.org is not able to handle that branch correctly.
Comment #4
YogitaR CreditAttribution: YogitaR at Cyber Infrastructure (cisin) commentedOk, I have removed the master branch. Thanks for your update.
Comment #5
vishal.kadamFix phpcs issues.
Comment #6
YogitaR CreditAttribution: YogitaR at Cyber Infrastructure (cisin) commentedOK, We will check and fix.
Comment #7
YogitaR CreditAttribution: YogitaR at Cyber Infrastructure (cisin) commentedFixed all Phpcs issues
Comment #8
vishal.kadamRest looks fine to me.
Let’s wait for other reviewers to take a look and if everything goes fine, you will get the role.
Comment #9
nikral CreditAttribution: nikral as a volunteer commentedI checked and everything seems fine for me.
Comment #10
simonbaeseSome notes:
entity_reference_integrity:entity_reference_integrity
andentity_reference_integrity_enforce:entity_reference_integrity_enforce
.package: Entity
orpackage: Other
.prevent_entity_unpublish_form_validation_published_content()
callsgetformObject()
on the form state multiple times. The method isgetFormObject()
though.if (($type == 'node' || $type == 'user' || $type == 'taxonomy_term') ...
should either be simplified or split to make it more readable.$status = ($type == 'user') ? $status : $status['value'];
are not necessary.SettingsForm
the definition of$form['intro']
does not need prefix and suffix. This already is a markup element. You can use'#markup' => '<p>' . $this->t('...') . '</p>'
.SettingsForm
the tertiary operator in the default value of$form['enabled_entity_type_ids']
can be abbreviated as'#default_value' => $this->config('prevent_entity_unpublish.settings')->get('enabled_entity_type_ids') ?: []
.EntityPreupdate
maybe can be renamed. What this service does is validation.EntityPreupdate
is done in an unusual way. It probably would be better to inject and use the config factory. Then the service does not need to implement theContainerInjectionInterface
and does not need to define the methodcreate()
. Also, the first argument of the constructor should be called$dependencyManager
or betterentityReferenceDependencyManager
. Therefore, the property may needs to be renamed.renderer
to format a error message. Feels like shooting a fly with a cannon.$output
ingetEntityList()
is redundant. Justreturn $this->renderer->render($build);
.EntityPreupdate
service is not correct.EntityPreupdate
can be rewritten to match the style of the other properties.@var \Drupal\Core\Render\RendererInterface
. Notice the leading slash.In general, I think it would be nicer to generalize this module to work with any kind of entity. At the moment, only node, taxonomy and user entities are supported. But especially for entity types such as paragraphs or commerce products this could be interesting.
Comment #11
YogitaR CreditAttribution: YogitaR at Cyber Infrastructure (cisin) commentedThanks for review module.
I will check and fix this issues.
Comment #12
YogitaR CreditAttribution: YogitaR at Cyber Infrastructure (cisin) commentedI have updated some changes.
Comment #13
apadernoThank you for your contribution!
I updated your account so you can now opt into security advisory coverage for any project you created and every project you will create.
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!
Thank you 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.
I thank also the dedicated reviewers as well.
Comment #14
apaderno