Custom configuration management for a single site, Multi-domain & Multilingual.
This is a new module in Drupal 8/9/10. This module is more helpful where you want to save multiple configurations like Facebook, Twitter, Google Auth key and etc.
This module also works with multi-domain, multi-website and multilingual. This module provides the following functionality.
- Create an unlimited number of configurations
- Easy to use and understand
- Access saved configuration by machine name
- Set configuration as Active or Inactive, in case of inactive if you try to access the configuration it will return null
- Provides service to access configuration value by machine name
- If you are trying to access any non-exists machine name value, it will return null
Comments
Comment #2
jitesh_1Thank you for applying! Reviewers will review the project files, describing what needs to be changed.
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 smother review.
To reviewers: Please read How to review security advisory coverage applications, What to cover in an application review, and Drupal.org security advisory coverage application workflow.
While this application is open, only the user who opened the application can make commits to the project used for the application.
Reviewers only describe what needs to be changed; they don't provide patches to fix what reported in a review.
Comment #3
vishal.kadam@jeetmail72 It seems you have missed working on the coding standards. You can use the PHPCS tool for checking and resolving issues.
phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml custom_configuration/
FILE: custom_configuration/custom_configuration.info.yml
----------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
----------------------------------------------------------------------------------------
1 | WARNING | "core_version_requirement" property is missing in the info.yml file
----------------------------------------------------------------------------------------
FILE: custom_configuration/src/Form/ConfigurationSetting.php
--------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
--------------------------------------------------------------------------------------------
18 | ERROR | Missing member variable doc comment
--------------------------------------------------------------------------------------------
FILE: custom_configuration/src/Form/CustomConfigurationList.php
-----------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
-----------------------------------------------------------------------------------------------------------------
15 | WARNING | The class short comment should describe what the class does and not simply repeat the class name
-----------------------------------------------------------------------------------------------------------------
FILE: custom_configuration/src/Form/DeleteConfiguration.php
-------------------------------------------------------------------------------------------
FOUND 3 ERRORS AFFECTING 3 LINES
-------------------------------------------------------------------------------------------
20 | ERROR | Missing member variable doc comment
21 | ERROR | Missing member variable doc comment
22 | ERROR | Missing member variable doc comment
-------------------------------------------------------------------------------------------
FILE: custom_configuration/src/Form/EditConfiguration.php
-------------------------------------------------------------------------------------------------------------------------------------------
FOUND 4 ERRORS AFFECTING 4 LINES
-------------------------------------------------------------------------------------------------------------------------------------------
21 | ERROR | Missing member variable doc comment
22 | ERROR | Missing member variable doc comment
23 | ERROR | Missing member variable doc comment
73 | ERROR | unserialize() is insecure unless allowed classes are limited. Use a safe format like JSON or use the allowed_classes option.
-------------------------------------------------------------------------------------------------------------------------------------------
FILE: custom_configuration/src/Helper/ConfigurationHelper.php
--------------------------------------------------------------------------------------------------------------------------------------------
FOUND 13 ERRORS AFFECTING 13 LINES
--------------------------------------------------------------------------------------------------------------------------------------------
159 | ERROR | The array declaration extends to column 119 (the limit is 80). The array content should be split up over multiple lines
185 | ERROR | The array declaration extends to column 102 (the limit is 80). The array content should be split up over multiple lines
199 | ERROR | The array declaration extends to column 119 (the limit is 80). The array content should be split up over multiple lines
202 | ERROR | The array declaration extends to column 101 (the limit is 80). The array content should be split up over multiple lines
227 | ERROR | The array declaration extends to column 119 (the limit is 80). The array content should be split up over multiple lines
243 | ERROR | The array declaration extends to column 112 (the limit is 80). The array content should be split up over multiple lines
246 | ERROR | The array declaration extends to column 108 (the limit is 80). The array content should be split up over multiple lines
251 | ERROR | The array declaration extends to column 125 (the limit is 80). The array content should be split up over multiple lines
254 | ERROR | The array declaration extends to column 107 (the limit is 80). The array content should be split up over multiple lines
259 | ERROR | The array declaration extends to column 102 (the limit is 80). The array content should be split up over multiple lines
369 | ERROR | The array declaration extends to column 105 (the limit is 80). The array content should be split up over multiple lines
372 | ERROR | The array declaration extends to column 101 (the limit is 80). The array content should be split up over multiple lines
497 | ERROR | unserialize() is insecure unless allowed classes are limited. Use a safe format like JSON or use the allowed_classes option.
--------------------------------------------------------------------------------------------------------------------------------------------
Comment #4
vishal.kadamSee https://www.drupal.org/docs/develop/git/git-for-drupal-project-maintainers/release-naming-conventions#release-branches
Comment #7
avpadernoI am crediting users from the other applications.
Comment #8
avpadernoComment #9
avpadernoComment #10
avpadernoNeither drupal-10.0.0 nor drupal10 are correct branch names.
The 10.0.1 branch the title suggest to review does not exist. Which branch should be reviewed?
I am changing priority as per Issue priorities.
Comment #11
avpadernoI am closing this application, since the person who created it does not seem to follow it.
I also asked which branch should be reviewed, but I did not get replies.
Comment #12
jeetmail72Hi apaderno,
Sorry for the delayed reply.
Please find the branch name: 10.0.x
Comment #13
jeetmail72Please review and grant the security advisory policy.
Comment #14
avpadernoComment #15
avpadernosrc/Form/ConfigurationForm.php
{@inheritdoc}is not used in documentation comments for constructors, for which the description must start withConstructs a newfollowed by the class name (including its namespace), and end withobject.Documentation comments for constructors must also describe the accepted parameters.The placeholder to render the string in
<em>tags is@name.HTML markup should be avoided as much as possible in strings passed to
t()or$this->t().A string that contains only a placeholder is not translated. The output of
$this->t('@message', ['@message' => 'Hello'])is not'Ciao'when Italian is the selected language for the site; it is'Hello'for every language.src/Helper/ConfigurationHelper.php
Method declarations are written on a single line.
Verbs used in the description must be declined to the third person singular. A definite article is missing before machine name.
Return value description must not starts with It will return, Returns, nor Return.
The description for the return value is missing.
The method does not return a Boolean value; it returns
NULL. The description should say whenNULLis returned.Why is a custom database table used for configuration values, when Drupal has an API to store configuration values?
Comment #16
jeetmail72@apaderno I am looking the points raised by you.
Comment #17
jeetmail72Comment #18
vinaymahale commented@jeetmail72, Also please make the 10.0.x branch as default branch. So it will be easy to review. Other reviewers will be confused about which branch needs to be reviewed.
Comment #19
vinaymahale commentedComment #20
jeetmail72@vinaymahale I set the latest as the default branch.
@apaderno I fixed the issues as you mentioned in the comments. I used the custom table to keep the configuration independent but in the future, I will use Config Entity instead of the custom table.
Please find the latest code here git clone --branch '10.0.x' git@git.drupal.org:project/custom_configuration.git
Comment #21
vinaymahale commentedLooks good now! Let's wait for other reviewers!
Comment #22
vinaymahale commentedComment #23
hemangi.gokhaleAutomated Review
Manual Review
there's no such thing called
\Connectionin Drupal, should be\Drupal\Core\Database\Connectioninstead.db_field_existsis used in custom_configuration.install, it is deprecated in drupal:8.0.0 and is removed from drupal:9.0.0. Instead, get a database connection injected into your service from the container, get its schema driver, and call fieldExists() on it. For example, $injected_database->schema()->fieldExists($table, $field);hook_helpdoesn't contain much info.This review uses the Project Application Review Template.
Comment #24
avpadernoI am changing priority as per Issue priorities.
Comment #25
jeetmail72I removed the deprecated function db_field_exists and fixed Drupal coding issues
Comment #26
avpadernoComment #27
avpadernoComment #28
avpadernoThank you for your contribution! I am going to update your account.
These are some recommended readings to help with excellent maintainership:
You can find more contributors chatting on the Slack #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 reviewers.
Comment #29
avpadernoComment #30
jeetmail72Thank you so much @apaderno
Comment #31
avpadernoWe do not close issues, since they are automatically closed after 14 days.