Closed (fixed)
Project:
Drupal.org security advisory coverage applications
Component:
module
Priority:
Normal
Category:
Task
Assigned:
Issue tags:
Reporter:
Created:
4 Nov 2019 at 09:03 UTC
Updated:
11 Dec 2019 at 17:09 UTC
Jump to comment: Most recent
Comments
Comment #2
maheshkp92Thank you for applying! I added the Git instructions for non-maintainer users and the PAReview checklist link. Reviewers will check the project and post comments to list what should be changed.
If you haven't done it, yet, please check the PAReview report and fix what needs to be fixed. There could be some false positives; verify that what reported is correct, before making any change.
Comment #3
maheshkp92Please remove the invalid branch called "@branch".
Comment #4
maheshkp92Comment #5
avpadernoComment #6
pavel ruban commentedComment #7
pavel ruban commentedThank you for review,
- I've fixed PARreview points, sorry forgot to run sniffer.
- Removed @branch, wasn't able before as it was default gitlab branch, found setting on project edit page.
- I added new release with all those fixes & adjusted default branch to 8.x-1.x one.
If it still requires any further amends please me know,
Thanks in advance.
Comment #8
pavel ruban commentedComment #9
batkori think better get session from request instead global variable
$_COOKIEExample:
Up:
Use
DependencyInjection?Comment #10
chi commentedNitpick:
This could be written in a single line.
Comment #11
pavel ruban commentedFixed, I ended with this solution:
https://git.drupalcode.org/project/cookie_condition/commit/cc2b867
Comment #12
chi commentedif (empty($this->configuration['cookie_name']) && !$this->isNegated()) {Since you defined
$cookie_nameit makes sense to use in this line as well. Also consider using dependency injections for request as suggested in #9.Comment #13
pavel ruban commentedpushed
>> Also consider using dependency injections
Sorry I already implemented that & updated the comment above with the latest code, we just did it simultaneously
Comment #14
chi commentedWhy is the 'core' key commented out?
https://git.drupalcode.org/project/cookie_condition/blob/8.x-1.x/cookie_...
Comment #15
chi commentedBy the way. Have you does this plugin work well with cache?
If no, you probably can fix it by implementing
::getCacheContexts()method like this.Note I haven't checked this code myself.
Comment #16
chi commentedNitpick:
I think it should be written in more formal way. Meaning 'and' is preferable over '&'. Though I am not aware if there is a coding standard on this.
Also "it's" needs to be "its".
Comment #17
pavel ruban commentedThanks Chi, cache remark is really good, thanks for input.
pushed
#core usually is added to info files & then gets cached by packaging module script on DO & comments the initial defined field out, I went through all modules I have & all of them have this commented key.
I think that I haven't to add core tag at all (apart of implementing a custom module case) & it will be automatically added during deploy, so I deleted it completely & tested with relase, after that it works right I guess
Comment #18
pavel ruban commentedFixed:
Comment #19
chi commentedIt will be hard for translators to understand this phrase because it has more placeholders than translatable words. Consider using a separate message when the condition is negated. Also
$this->tcan be used instead oft.Comment #20
chi commentedNow it is not possible to install the module from git.
Also consider specifying
core_version_requirement.https://www.drupal.org/node/3070687
Comment #21
pavel ruban commentedpushed:
Comment #22
chi commentedLooks good to me now.
Though it would be nice to have an automated test for the plugin.
Comment #23
avpadernoThank you for your contribution! I am going to update the project to opt it into security coverage.
These are some recommended readings to help with excellent maintainership:
You can find more contributors chatting on the IRC #drupal-contribute channel. So, come hang out and stay involved.
Thank you, also, 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 all the dedicated reviewers as well.