FILE: src/Service/RncMatcher.php
$this->messenger->addError('Not enough participants to generate matches.');
$this->messenger->addError('Could not generate a valid matching. Check entries for spouse conflicts.');
The first argument passed to MessengerInterface::addError()
, MessengerInterface::addMessage()
, MessengerInterface::addStatus()
, and MessengerInterface::addWarning()
must be a translatable string which uses placeholders.
It 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.
1. FILE: meta_conversions_api.info.yml
core_version_requirement: ^9 | ^10 || ^11
Now 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
/**
* @file
* Provides integration with Meta Conversions API.
*/
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
/**
* Constructor for the controller.
*
* @param \Drupal\meta_conversions_api\Services\MetaClient $client
* Meta client.
*/
public function __construct(MetaClient $client) {
FILE: src/Logger/FacebookLogger.php
/**
* Constructor.
*
* @param \Psr\Log\LoggerInterface $logger
* The Drupal logger.
*/
public function __construct(LoggerInterface $logger) {
FILE: src/Services/MetaClient.php
/**
* MetaClient constructor.
*
* @param \Drupal\Core\Config\ConfigFactory $config_factory
* An instance of Config Factory.
* @param \Drupal\Core\Extension\ModuleHandlerInterface $module_handler
* Drupal module handler.
* @param \Drupal\Core\Cache\CacheBackendInterface $cache
* Cache backend.
* @param \Symfony\Component\HttpFoundation\RequestStack $request_stack
* Request stack.
* @param \Psr\Log\LoggerInterface $logger
* An instance of Logger Channel Factory.
* @param \Drupal\meta_conversions_api\Logger\FacebookLogger $facebook_logger
* Facebook logger.
*/
public function __construct(
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.
I have reviewed your posts and confirmed the account.
I have confirmed the account based on module project contribution.
1. FILE: README.md
The README file is missing the required sections → - Project introduction and Configuration.
2. FILE: src/Plugin/Filter/NodeFilterToken.php
/**
* VideoEmbedWysiwyg constructor.
*
* @param array $configuration
* Plugin configuration.
* @param string $plugin_id
* Plugin ID.
* @param mixed $plugin_definition
* Plugin definition.
* @param \Drupal\Core\Routing\RouteMatchInterface $route_match
* The route match.
* @param \Drupal\Core\Routing\RouteMatchInterface $module_handler
* The module handler.
* @param \Drupal\Core\Utility\Token $token
* The token service.
*/
public function __construct(array $configuration, $plugin_id, $plugin_definition, RouteMatchInterface $route_match, ModuleHandlerInterface $module_handler, Token $token) {
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.
Rest looks good to me.
Please wait for a Project Moderator to take a look and if everything goes fine, you will get the role.
No, it is not mandatory. Since Drupal 9 is already end-of-life, people should not be encouraged to use those releases.
FILE: drupal_metrics.info.yml
core_version_requirement: ^9 || ^10 || ^11
Now that Drupal 8 and Drupal 9 are no longer supported, new projects should no longer be compatible with those Drupal versions.
1. FILE: drupal_metrics.info.yml
package: Custom
This line is used by custom modules created for specific sites. It is not a package name used for projects hosted on drupal.org.
dependencies: []
This can be removed since there are no dependencies.
2. FILE: src/Controller/MetricsController.php
protected $entityTypeManager;
The parent class already has properties and methods for the entity type manager object. There is no need to redefine properties for the same purpose; instead, the parent class methods should be used.
3. Fix phpcs issues.
Note: I would suggest enabling GitLab CI for the project, follow the Drupal Association .gitlab-ci.yml template and fix the PHP_CodeSniffer errors/warnings it reports.
phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,info,txt,md,yml drupal_metrics/
FILE: drupal_metrics/README.md
----------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
----------------------------------------------------------------------
3 | WARNING | Line exceeds 80 characters; contains 160 characters
----------------------------------------------------------------------
FILE: drupal_metrics/src/Controller/MetricsController.php
--------------------------------------------------------------------------------
FOUND 9 ERRORS AFFECTING 9 LINES
--------------------------------------------------------------------------------
13 | ERROR | [x] Missing class doc comment
15 | ERROR | [ ] Missing member variable doc comment
16 | ERROR | [ ] Missing member variable doc comment
17 | ERROR | [ ] Missing member variable doc comment
25 | ERROR | [x] Missing function doc comment
70 | ERROR | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or closing parentheses
114 | ERROR | [x] Namespaced classes/interfaces/traits should be referenced with use statements
161 | ERROR | [x] Expected newline after closing brace
168 | ERROR | [x] Namespaced classes/interfaces/traits should be referenced with use statements
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 6 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------
Could you please share what exactly you’re seeing when trying to create an issue?
1. main
is a wrong name for a branch and should be removed. Release branch names always end with the literal .x as described in
Release branches →
.
main is acceptable as branch name, but it is not yet fully supported on drupal.org. For the moment, it is better to avoid it.
2. FILE: README.txt
The README file is missing the required sections → - Requirements, Installation, and Configuration.
3. FILE: menu_cleanup.module
For a new module that aims to be compatible with Drupal 10 and Drupal 11, I would rather implement hooks as class methods as described in
Support for object oriented hook implementations using autowired services →
.
It would require increasing the minimum Drupal 10 version supported, but Drupal 10.1 is no longer supported.
4. FILE: src/Form/MenuCleanupSettingsForm.php
With Drupal 10 and Drupal 11, there is no longer need to use #default_value
for each form element, when the parent class is ConfigFormBase: It is sufficient to use #config_target, as in the following code.
$form['image_toolkit'] = [
'#type' => 'radios',
'#title' => $this->t('Select an image processing toolkit'),
'#config_target' => 'system.image:toolkit',
'#options' => [],
];
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.
5. Fix phpcs errors.
Note: I would suggest enabling GitLab CI for the project, follow the Drupal Association .gitlab-ci.yml template and fix the PHP_CodeSniffer errors/warnings it reports.
phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,info,txt,md,yml menucleanup/
FILE: menucleanup/README.txt
------------------------------------------------------------------------
FOUND 1 ERROR AND 1 WARNING AFFECTING 2 LINES
------------------------------------------------------------------------
12 | WARNING | [ ] Line exceeds 80 characters; contains 126 characters
37 | ERROR | [x] Expected 1 newline at end of file; 0 found
------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------
FILE: menucleanup/config/install/menu_cleanup.settings.yml
--------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
--------------------------------------------------------------------------------
1 | ERROR | [x] Expected 1 newline at end of file; 0 found
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------
FILE: menucleanup/src/Form/MenuCleanupDeleteForm.php
--------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
--------------------------------------------------------------------------------
6 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\Core\Entity\ContentEntityDeleteForm.
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------
FILE: src/Controller/BlikController.php
$this->logger->error($exception->getResponse()->getBody()->getContents());
$this->logger->error($exception->getMessage());
The $message
parameter passed to the LoggerInterface
methods must be a literal string that uses placeholders. It's not a translatable string returned from t()
/$this->t()
, a string concatenation, a value returned from a function/method, nor a variable containing an exception object.
I think apaderno is the only one around with enough permissions to do this.
The reported changes need to be committed in the review branch (i.e. 10.x-1.x).
It would also 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.
Rest looks good to me.
Please wait for a Project Moderator to take a look and if everything goes fine, you will get the role.
A few points are still pending: one from comment #7 📌 [1.0.x] Simple AVS Needs review and another from comment #10 📌 [1.0.x] Simple AVS Needs review .
The vendor directory is still present in the codebase, and not all PHPCS errors have been resolved.
phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,info,txt,md,yml simpleavs/
FILE: simpleavs/SECURITY.md
----------------------------------------------------------------------
FOUND 1 ERROR AND 1 WARNING AFFECTING 2 LINES
----------------------------------------------------------------------
2 | WARNING | [ ] Line exceeds 80 characters; contains 83 characters
5 | ERROR | [x] Expected 1 newline at end of file; 2 found
----------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------
FILE: simpleavs/README.md
----------------------------------------------------------------------
FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 2 LINES
----------------------------------------------------------------------
3 | WARNING | Line exceeds 80 characters; contains 87 characters
4 | WARNING | Line exceeds 80 characters; contains 111 characters
----------------------------------------------------------------------
FILE: simpleavs/src/Form/AgeGateSettingsForm.php
--------------------------------------------------------------------------------
FOUND 2 ERRORS AFFECTING 2 LINES
--------------------------------------------------------------------------------
260 | ERROR | The array declaration extends to column 90 (the limit is 80). The array content should be split up over multiple lines
371 | ERROR | The array declaration extends to column 84 (the limit is 80). The array content should be split up over multiple lines
--------------------------------------------------------------------------------
FILE: simpleavs/src/Controller/AgeGateController.php
--------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
--------------------------------------------------------------------------------
39 | ERROR | [x] Missing function doc comment
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------
FILE: simpleavs/.github/workflows/phpcs.yml
---------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
---------------------------------------------------------------------------
81 | ERROR | [x] Expected 1 newline at end of file; 2 found
---------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
---------------------------------------------------------------------------
1. FILE: ajax_cart_update.info.yml
dependencies:
- drupal:views
<strong> - drupal:commerce
- drupal:commerce_car</strong>t
The dependencies follow the format
:. What used for the commerce and commerce_cart module are not correct.
2. FILE: ajax_cart_update.module
/**
* @file
* AJAX Cart Update module implementation.
*/
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/Form/AjaxCartUpdateSettingsForm.php
With Drupal 10 and Drupal 11, there is no longer need to use #default_value for each form element, when the parent class is ConfigFormBase: It is sufficient to use #config_target, as in the following code.
$form['image_toolkit'] = [
'#type' => 'radios',
'#title' => $this->t('Select an image processing toolkit'),
'#config_target' => 'system.image:toolkit',
'#options' => [],
];
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.
You can create a development release → until it gets published.
1. FILE: README.md
The README file is missing the required sections → - Project name, and Installation.
2. FILE: commerce_imoje.module
/**
* @file
* Provides Drupal hooks and alters for the Commerce Imoje 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/BlikController.php
/**
* The entity type manager.
*
* @var \Drupal\Core\Entity\EntityTypeManagerInterface
*/
protected $entityTypeManager;
The parent class already has properties and methods for the entity type manager object. There is no need to redefine properties for the same purpose; instead, the parent class methods should be used.
1. FILE: README.md
The README file is missing the required sections → - Requirements, Installation, and Configuration.
2. Fix phpcs issues.
Note: I would suggest enabling GitLab CI for the project, follow the Drupal Association .gitlab-ci.yml template and fix the PHP_CodeSniffer errors/warnings it reports.
phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,info,txt,md,yml feeds_ical/
FILE: feeds_ical/README.md
----------------------------------------------------------------------
FOUND 0 ERRORS AND 3 WARNINGS AFFECTING 3 LINES
----------------------------------------------------------------------
3 | WARNING | Line exceeds 80 characters; contains 104 characters
5 | WARNING | Line exceeds 80 characters; contains 84 characters
29 | WARNING | Line exceeds 80 characters; contains 95 characters
----------------------------------------------------------------------
FILE: feeds_ical/feeds_ical.install
--------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
--------------------------------------------------------------------------------
28 | ERROR | [x] Namespaced classes/interfaces/traits should be referenced with use statements
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------
FILE: feeds_ical/src/Feeds/Item/IcalItem.php
--------------------------------------------------------------------------------
FOUND 12 ERRORS AFFECTING 10 LINES
--------------------------------------------------------------------------------
33 | ERROR | [ ] Class property $dtstart_timezone should use lowerCamel naming without underscores
40 | ERROR | [ ] Class property $dtend_timezone should use lowerCamel naming without underscores
47 | ERROR | [ ] Class property $dtstart_raw should use lowerCamel naming without underscores
54 | ERROR | [ ] Class property $dtend_raw should use lowerCamel naming without underscores
145 | ERROR | [x] Scope keyword "protected" must be followed by a single space; found 2
152 | ERROR | [x] Scope keyword "protected" must be followed by a single space; found 2
159 | ERROR | [x] Scope keyword "protected" must be followed by a single space; found 2
159 | ERROR | [ ] Class property $dtend_tz should use lowerCamel naming without underscores
166 | ERROR | [x] Scope keyword "protected" must be followed by a single space; found 2
166 | ERROR | [ ] Class property $dtstart_tz should use lowerCamel naming without underscores
173 | ERROR | [ ] Class property $last_modified should use lowerCamel naming without underscores
180 | ERROR | [ ] Class property $last_modified_raw should use lowerCamel naming without underscores
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 4 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------
FILE: feeds_ical/src/Feeds/Parser/IcalParser.php
--------------------------------------------------------------------------------
FOUND 16 ERRORS AND 1 WARNING AFFECTING 17 LINES
--------------------------------------------------------------------------------
80 | WARNING | [ ] Unused variable $eventIndex.
91 | ERROR | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or closing parentheses
92 | ERROR | [x] Concat operator must be surrounded by a single space
110 | ERROR | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or closing parentheses
111 | ERROR | [x] Concat operator must be surrounded by a single space
114 | ERROR | [x] Line indented incorrectly; expected 18 spaces, found 16
115 | ERROR | [x] Line indented incorrectly; expected 18 spaces, found 16
126 | ERROR | [x] Line indented incorrectly; expected 12 spaces, found 14
127 | ERROR | [x] Line indented incorrectly; expected 14 spaces, found 16
128 | ERROR | [x] Line indented incorrectly; expected 16 spaces, found 18
129 | ERROR | [x] Line indented incorrectly; expected 16 spaces, found 18
130 | ERROR | [x] Line indented incorrectly; expected 16 spaces, found 18
131 | ERROR | [x] Line indented incorrectly; expected 14 spaces, found 16
132 | ERROR | [x] Line indented incorrectly; expected 14 spaces, found 16
133 | ERROR | [x] Line indented incorrectly; expected 14 spaces, found 16
135 | ERROR | [x] Line indented incorrectly; expected 14 spaces, found 16
136 | ERROR | [x] Line indented incorrectly; expected 14 spaces, found 16
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 16 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------
Rest looks good to me.
Please wait for a Project Moderator to take a look and if everything goes fine, you will get the role.
FILE: src/Form/DebugCacheabilityHeadersSplitSettingsForm.php
With Drupal 10 and Drupal 11, there is no longer need to use #default_value for each form element, when the parent class is ConfigFormBase: It is sufficient to use #config_target, as in the following code.
$form['image_toolkit'] = [
'#type' => 'radios',
'#title' => $this->t('Select an image processing toolkit'),
'#config_target' => 'system.image:toolkit',
'#options' => [],
];
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.
Releases should not be created after each review done here.
It is better not to create new release during these applications, since a review could ask for a change that is not backward compatible with the existing releases. Just using a development version avoids those BC issues.
It would also 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.
1. main
is a wrong name for a branch and should be removed. Release branch names always end with the literal .x as described in
Release branches →
.
main will be a supported branch in future, but for the moment it is better not to use it. It is not wrong, but it is not completely supported on drupal.org.
2. FILE: social_summaries.module
/**
* Implements hook_form_BASE_FORM_ID_alter().
*
* Adds Social Summaries sidebar to node edit forms for existing nodes (Article bundle by default).
*
* @param array $form
* The form array.
* @param \Drupal\Core\Form\FormStateInterface $form_state
* The form state object.
* @param string $form_id
* The form ID.
*/
function social_summaries_form_node_form_alter(array &$form, FormStateInterface $form_state, $form_id): void {
The description for this hook should also say for which form that hook is implemented, either by indicating that with the name of the class that implements the form (namespace included) or the form ID (which is usually indicated by getFormId()
).
/**
* @file
* Provides the Social Summaries UI integration and form handlers.
*/
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/Form/BundleSettingsForm.php, src/Form/SettingsForm.php
ConfigFormBase::__construct() needs to be called. Since its parameters 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 Drupal 10 and Drupal 11, there is no longer need to use #default_value for each form element, when the parent class is ConfigFormBase: It is sufficient to use #config_target, as in the following code.
$form['image_toolkit'] = [
'#type' => 'radios',
'#title' => $this->t('Select an image processing toolkit'),
'#config_target' => 'system.image:toolkit',
'#options' => [],
];
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.
4. FILE: src/Service/VisibilityManager.php
/**
* Constructor.
*/
public function __construct(ConfigFactoryInterface $configFactory) {
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.
Great, thanks for confirming! I’ll go ahead and commit the patch.
@dhavalpanchal Thanks for the patch.
@fjgarlin Could you please apply it on your side and confirm if the error is resolved? I’ve tested it on my side, and it's working fine.
1. dev
and deve
are wrong names for a branch and should be removed. Release branch names always end with the literal .x as described in
Release branches →
.
2. Fix phpcs issues.
Note: I would suggest enabling GitLab CI for the project, follow the Drupal Association .gitlab-ci.yml template and fix the PHP_CodeSniffer errors/warnings it reports.
phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,info,txt,md,yml simpleavs/
FILE: simpleavs/SECURITY.md
----------------------------------------------------------------------
FOUND 1 ERROR AND 1 WARNING AFFECTING 2 LINES
----------------------------------------------------------------------
2 | WARNING | [ ] Line exceeds 80 characters; contains 83 characters
5 | ERROR | [x] Expected 1 newline at end of file; 2 found
----------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------
FILE: simpleavs/README.md
----------------------------------------------------------------------
FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 2 LINES
----------------------------------------------------------------------
3 | WARNING | Line exceeds 80 characters; contains 87 characters
4 | WARNING | Line exceeds 80 characters; contains 111 characters
----------------------------------------------------------------------
FILE: simpleavs/src/Form/AgeGateSettingsForm.php
--------------------------------------------------------------------------------
FOUND 2 ERRORS AFFECTING 2 LINES
--------------------------------------------------------------------------------
260 | ERROR | The array declaration extends to column 90 (the limit is 80). The array content should be split up over multiple lines
371 | ERROR | The array declaration extends to column 84 (the limit is 80). The array content should be split up over multiple lines
--------------------------------------------------------------------------------
FILE: simpleavs/src/Controller/AgeGateController.php
--------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
--------------------------------------------------------------------------------
39 | ERROR | [x] Missing function doc comment
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------
FILE: simpleavs/simpleavs.module
-----------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
-----------------------------------------------------------------------------
1 | ERROR | [x] The PHP open tag must be followed by exactly one blank line
-----------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-----------------------------------------------------------------------------
FILE: simpleavs/.github/workflows/phpcs.yml
---------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
---------------------------------------------------------------------------
81 | ERROR | [x] Expected 1 newline at end of file; 2 found
---------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
---------------------------------------------------------------------------
FILE: simpleavs/simpleavs.install
--------------------------------------------------------------------------------
FOUND 19 ERRORS AFFECTING 14 LINES
--------------------------------------------------------------------------------
1 | ERROR | [x] The PHP open tag must be followed by exactly one blank line
17 | ERROR | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or closing parentheses
17 | ERROR | [x] Comments may not appear after statements
18 | ERROR | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or closing parentheses
18 | ERROR | [x] Comments may not appear after statements
19 | ERROR | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or closing parentheses
19 | ERROR | [x] Comments may not appear after statements
24 | ERROR | [x] The first index in a multi-value array must be on a new line
26 | ERROR | [x] Closing parenthesis of array declaration must be on a new line
27 | ERROR | [x] The first index in a multi-value array must be on a new line
28 | ERROR | [x] Closing parenthesis of array declaration must be on a new line
29 | ERROR | [x] The first index in a multi-value array must be on a new line
30 | ERROR | [x] Closing parenthesis of array declaration must be on a new line
31 | ERROR | [x] The first index in a multi-value array must be on a new line
32 | ERROR | [x] Closing parenthesis of array declaration must be on a new line
39 | ERROR | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or closing parentheses
39 | ERROR | [x] Comments may not appear after statements
43 | ERROR | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or closing parentheses
43 | ERROR | [x] Comments may not appear after statements
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 19 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------
FILE: .gitlab-ci.yml
You should follow the Drupal Association .gitlab-ci.yml template and fix the PHP_CodeSniffer errors/warnings it reports.
1. FILE: enhanced_status_messages.module
// $messenger = \Drupal::messenger();
Remove commented code.
/**
* @file
* Enhanced Status Messages module.
*
* Provides beautiful, modern status message cards with enhanced styling
* and animations for success, warning, error, and info messages.
*/
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.
2. FILE: css/enhanced_status_messages.css
/* max-width: 400px; */
Remove commented code.
3. Fix phpcs issues.
Note: you should enable GitLab CI for the project and fix the PHP_CodeSniffer errors/warnings it reports.
phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,info,txt,md,yml messages/
FILE: messages/INSTALL.md
----------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
----------------------------------------------------------------------
45 | WARNING | Line exceeds 80 characters; contains 93 characters
----------------------------------------------------------------------
FILE: messages/CHANGELOG.md
----------------------------------------------------------------------
FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 2 LINES
----------------------------------------------------------------------
3 | WARNING | Line exceeds 80 characters; contains 91 characters
34 | WARNING | Line exceeds 80 characters; contains 86 characters
----------------------------------------------------------------------
FILE: messages/README.txt
----------------------------------------------------------------------
FOUND 0 ERRORS AND 18 WARNINGS AFFECTING 18 LINES
----------------------------------------------------------------------
3 | WARNING | Line exceeds 80 characters; contains 181 characters
7 | WARNING | Line exceeds 80 characters; contains 83 characters
9 | WARNING | Line exceeds 80 characters; contains 86 characters
10 | WARNING | Line exceeds 80 characters; contains 82 characters
12 | WARNING | Line exceeds 80 characters; contains 90 characters
14 | WARNING | Line exceeds 80 characters; contains 86 characters
16 | WARNING | Line exceeds 80 characters; contains 82 characters
45 | WARNING | Line exceeds 80 characters; contains 107 characters
49 | WARNING | Line exceeds 80 characters; contains 81 characters
64 | WARNING | Line exceeds 80 characters; contains 94 characters
70 | WARNING | Line exceeds 80 characters; contains 105 characters
71 | WARNING | Line exceeds 80 characters; contains 103 characters
72 | WARNING | Line exceeds 80 characters; contains 89 characters
73 | WARNING | Line exceeds 80 characters; contains 95 characters
80 | WARNING | Line exceeds 80 characters; contains 90 characters
81 | WARNING | Line exceeds 80 characters; contains 86 characters
83 | WARNING | Line exceeds 80 characters; contains 83 characters
174 | WARNING | Line exceeds 80 characters; contains 89 characters
----------------------------------------------------------------------
FILE: messages/enhanced_status_messages.module
--------------------------------------------------------------------------------
FOUND 16 ERRORS AFFECTING 16 LINES
--------------------------------------------------------------------------------
6 | ERROR | [x] Whitespace found at end of line
47 | ERROR | [x] Functions must not contain multiple empty lines in a row; found 3 empty lines
49 | ERROR | [ ] More than 2 empty lines are not allowed
55 | ERROR | [x] Functions must not contain multiple empty lines in a row; found 2 empty lines
59 | ERROR | [x] Whitespace found at end of line
131 | ERROR | [x] Namespaced classes/interfaces/traits should be referenced with use statements
132 | ERROR | [x] Whitespace found at end of line
138 | ERROR | [x] Case breaking statements must be followed by a single blank line
141 | ERROR | [x] Case breaking statements must be followed by a single blank line
144 | ERROR | [x] Case breaking statements must be followed by a single blank line
154 | ERROR | [x] Whitespace found at end of line
164 | ERROR | [x] Whitespace found at end of line
170 | ERROR | [x] Whitespace found at end of line
176 | ERROR | [x] Whitespace found at end of line
180 | ERROR | [x] Whitespace found at end of line
184 | ERROR | [x] Whitespace found at end of line
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 15 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------
@fjgarlin Could you please share which version of Webform you’re using and what type of elements are included in the webform you’re trying to export? That will help in reproducing and debugging the issue.
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.
have been asked to create and link my Drupal account to the organisation
Linking your Drupal.org account to the organisation simply means adding the University of Edinburgh under the Work section of your Drupal.org profile. You can do this by editing your profile details.
The typical path to confirm users usually involves reviewing content you created on this site. In this case, you just created this issue, so there is no content to review.
I am postponing this issue. After you posted some content on Drupal.org, you may want to add a comment to this issue to request a new review.
1. FILE: webform_intl_tel_national_mode.info.yml
core_version_requirement: ^9 || ^10 || ^11
FILE: composer.json
"require": {
"drupal/core": "^9 || ^10 || ^11",
A new project should not declare itself compatible with a Drupal release that is no longer supported. No site should be using Drupal 8 nor Drupal 9, and people should not be encouraged to use those Drupal releases.
2. FILE: webform_intl_tel_national_mode.libraries.yml
version: VERSION
VERSION is only used by Drupal core modules. Contributed modules should use a literal string that does not change with the Drupal core version a site is using.
3. FILE: webform_intl_tel_national_mode.module
/**
* @file
* Implements webform intl tel national mode.
*/
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.
Hello, and a warm welcome to the Drupal community!
You can contribute to drupal.org without having the role.
The 'confirmed' role is for users that contribute to this website. In this case, you've not contributed any content except this post, so there is no content to review. Postponing for now, after you have posted some content on Drupal.org.
You can add a comment to this issue to request a new review in order to get 'confirmed' or you will get that automatically.
Please visit the Become a confirmed user → page for information.
Here is a list of resources that will assist you in making helpful contributions:
Hello, and a warm welcome to the Drupal community!
You can contribute to drupal.org without having the role.
The 'confirmed' role is for users that contribute to this website. In this case, you've not contributed any content except this post, so there is no content to review. Postponing for now, after you have posted some content on Drupal.org.
You can add a comment to this issue to request a new review in order to get 'confirmed' or you will get that automatically.
Please visit the Become a confirmed user → page for information.
Here is a list of resources that will assist you in making helpful contributions:
1. FILE: README.txt
The README file is missing the required sections → - Requirements, Installation, and Configuration.
2. FILE: rnc.module
File is empty and can be removed.
3. FILE: rnc.css
Twig code needs to be correctly indented. Drupal uses two spaces for indentation, not four spaces or tabs.
4. Fix phpcs issues.
phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,info,txt,md,yml random_name_chooser/
FILE: /home/vishalkadam/DRUPAL-CONTRIBUTE/random_name_chooser/rnc.install
-----------------------------------------------------------------------------
FOUND 9 ERRORS AND 2 WARNINGS AFFECTING 8 LINES
-----------------------------------------------------------------------------
1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
136 | WARNING | [ ] Line exceeds 80 characters; contains 82 characters
192 | ERROR | [ ] The array declaration extends to column 100 (the limit is 80). The array content should be split up over multiple lines
195 | WARNING | [ ] Line exceeds 80 characters; contains 81 characters
200 | ERROR | [ ] The array declaration extends to column 85 (the limit is 80). The array content should be split up over multiple lines
202 | ERROR | [x] Newline required after opening brace
202 | ERROR | [x] Closing brace must be on a line by itself
211 | ERROR | [x] Newline required after opening brace
211 | ERROR | [x] Closing brace must be on a line by itself
217 | ERROR | [x] Newline required after opening brace
217 | ERROR | [x] Closing brace must be on a line by itself
-----------------------------------------------------------------------------
PHPCBF CAN FIX THE 7 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-----------------------------------------------------------------------------
FILE: /home/vishalkadam/DRUPAL-CONTRIBUTE/random_name_chooser/rnc.module
-----------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
-----------------------------------------------------------------------------
1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
-----------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-----------------------------------------------------------------------------
FILE: /home/vishalkadam/DRUPAL-CONTRIBUTE/random_name_chooser/README.txt
------------------------------------------------------------------------
FOUND 1 ERROR AND 8 WARNINGS AFFECTING 8 LINES
------------------------------------------------------------------------
4 | WARNING | [ ] Line exceeds 80 characters; contains 165 characters
9 | WARNING | [ ] Line exceeds 80 characters; contains 256 characters
13 | WARNING | [ ] Line exceeds 80 characters; contains 124 characters
15 | WARNING | [ ] Line exceeds 80 characters; contains 230 characters
17 | WARNING | [ ] Line exceeds 80 characters; contains 277 characters
19 | WARNING | [ ] Line exceeds 80 characters; contains 137 characters
21 | WARNING | [ ] Line exceeds 80 characters; contains 93 characters
23 | WARNING | [ ] Line exceeds 80 characters; contains 165 characters
23 | ERROR | [x] Expected 1 newline at end of file; 0 found
------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------
FILE: /home/vishalkadam/DRUPAL-CONTRIBUTE/random_name_chooser/src/Form/RncSettingsForm.php
-----------------------------------------------------------------------------
FOUND 10 ERRORS AND 2 WARNINGS AFFECTING 10 LINES
-----------------------------------------------------------------------------
1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
7 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\Core\Database\Connection.
10 | WARNING | [x] Unused use statement
12 | WARNING | [x] Unused use statement
19 | ERROR | [ ] Missing short description in doc comment
24 | ERROR | [ ] Missing short description in doc comment
29 | ERROR | [x] Missing function doc comment
34 | ERROR | [x] Missing function doc comment
65 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
65 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 1
66 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
66 | ERROR | [x] Whitespace found at end of line
-----------------------------------------------------------------------------
PHPCBF CAN FIX THE 10 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-----------------------------------------------------------------------------
FILE: /home/vishalkadam/DRUPAL-CONTRIBUTE/random_name_chooser/src/Form/RncSelectNameForm.php
-----------------------------------------------------------------------------
FOUND 31 ERRORS AND 7 WARNINGS AFFECTING 21 LINES
-----------------------------------------------------------------------------
1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
7 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\Core\Database\Connection.
15 | ERROR | [ ] Missing member variable doc comment
17 | ERROR | [x] Missing function doc comment
21 | ERROR | [x] Missing function doc comment
37 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 2
38 | ERROR | [x] Line indented incorrectly; expected 6 spaces, found 4
38 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency injection instead
39 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 2
41 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 2
45 | ERROR | [x] Whitespace found at end of line
61 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
61 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 1
61 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency injection instead
109 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
109 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 1
113 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency injection instead
129 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
129 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 1
131 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency injection instead
164 | WARNING | [ ] Line exceeds 80 characters; contains 89 characters
166 | WARNING | [ ] Line exceeds 80 characters; contains 102 characters
166 | ERROR | [x] Inline comments must start with a capital letter
166 | ERROR | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or closing parentheses
166 | ERROR | [x] Comments may not appear after statements
167 | ERROR | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or closing parentheses
167 | ERROR | [x] Comments may not appear after statements
192 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency injection instead
228 | ERROR | [x] Newline required after opening brace
228 | ERROR | [x] There should be no white space after an opening "{"
228 | ERROR | [x] Each PHP statement must be on a line by itself
228 | ERROR | [x] There should be no white space before a closing "}"
228 | ERROR | [x] Closing brace must be on a line by itself
231 | ERROR | [x] Newline required after opening brace
231 | ERROR | [x] There should be no white space after an opening "{"
231 | ERROR | [x] Each PHP statement must be on a line by itself
231 | ERROR | [x] There should be no white space before a closing "}"
231 | ERROR | [x] Closing brace must be on a line by itself
-----------------------------------------------------------------------------
PHPCBF CAN FIX THE 30 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-----------------------------------------------------------------------------
FILE: /home/vishalkadam/DRUPAL-CONTRIBUTE/random_name_chooser/src/Form/RncDeleteNameForm.php
-----------------------------------------------------------------------------
FOUND 19 ERRORS AFFECTING 12 LINES
-----------------------------------------------------------------------------
1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
10 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\Core\Database\Connection.
24 | ERROR | [ ] Missing member variable doc comment
33 | ERROR | [x] Missing function doc comment
38 | ERROR | [x] Missing function doc comment
78 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
78 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 1
83 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
83 | ERROR | [x] Line indented incorrectly; expected 6 spaces, found 2
84 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
84 | ERROR | [x] Line indented incorrectly; expected 8 spaces, found 4
85 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
85 | ERROR | [x] Line indented incorrectly; expected 8 spaces, found 4
86 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
86 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 2
86 | ERROR | [x] Closing brace indented incorrectly; expected 4 spaces, found 2
87 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 6
88 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
88 | ERROR | [x] Whitespace found at end of line
-----------------------------------------------------------------------------
PHPCBF CAN FIX THE 18 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-----------------------------------------------------------------------------
FILE: /home/vishalkadam/DRUPAL-CONTRIBUTE/random_name_chooser/src/Form/RncAddNameForm.php
-----------------------------------------------------------------------------
FOUND 48 ERRORS AND 1 WARNING AFFECTING 26 LINES
-----------------------------------------------------------------------------
1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
8 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\Core\Database\Connection.
18 | ERROR | [ ] Missing member variable doc comment
19 | ERROR | [ ] Missing member variable doc comment
20 | ERROR | [ ] Missing member variable doc comment
22 | ERROR | [x] Missing function doc comment
28 | ERROR | [x] Missing function doc comment
36 | ERROR | [x] Missing function doc comment
40 | ERROR | [x] Missing function doc comment
48 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
48 | ERROR | [x] Line indented incorrectly; expected 6 spaces, found 3
48 | ERROR | [x] Object operator not indented correctly; expected 6 spaces but found 3
49 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
49 | ERROR | [x] Line indented incorrectly; expected 6 spaces, found 3
50 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
50 | ERROR | [x] Line indented incorrectly; expected 6 spaces, found 3
51 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
51 | ERROR | [x] Line indented incorrectly; expected 6 spaces, found 3
58 | ERROR | [x] Array indentation error, expected 8 spaces but found 10
59 | ERROR | [x] Array indentation error, expected 8 spaces but found 10
83 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
83 | ERROR | [x] Line indented incorrectly; expected at least 4 spaces, found 3
83 | ERROR | [x] Array indentation error, expected 6 spaces but found 3
90 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
90 | ERROR | [x] Line indented incorrectly; expected at least 4 spaces, found 3
90 | ERROR | [x] Array indentation error, expected 6 spaces but found 3
97 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
97 | ERROR | [x] Line indented incorrectly; expected at least 6 spaces, found 2
97 | ERROR | [x] Array indentation error, expected 8 spaces but found 2
97 | WARNING | [ ] #description values usually have to run through t() for translation
135 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
135 | ERROR | [x] Array indentation error, expected 12 spaces but found 6
136 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
136 | ERROR | [x] Line indented incorrectly; expected at least 6 spaces, found 5
136 | ERROR | [x] Array indentation error, expected 8 spaces but found 5
137 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
137 | ERROR | [x] Line indented incorrectly; expected at least 6 spaces, found 5
137 | ERROR | [x] Array indentation error, expected 8 spaces but found 5
138 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
138 | ERROR | [x] Line indented incorrectly; expected at least 6 spaces, found 5
138 | ERROR | [x] Array indentation error, expected 8 spaces but found 5
139 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
139 | ERROR | [x] Line indented incorrectly; expected at least 6 spaces, found 5
139 | ERROR | [x] Array indentation error, expected 8 spaces but found 5
140 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
140 | ERROR | [x] Array closing indentation error, expected 6 spaces but found 3
141 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
141 | ERROR | [x] Array closing indentation error, expected 10 spaces but found 4
172 | ERROR | [x] Missing function doc comment
-----------------------------------------------------------------------------
PHPCBF CAN FIX THE 45 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-----------------------------------------------------------------------------
FILE: /home/vishalkadam/DRUPAL-CONTRIBUTE/random_name_chooser/src/Form/RncAdminResultsForm.php
-----------------------------------------------------------------------------
FOUND 1 ERROR AND 4 WARNINGS AFFECTING 5 LINES
-----------------------------------------------------------------------------
1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
24 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency injection instead
25 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency injection instead
124 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency injection instead
125 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency injection instead
-----------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-----------------------------------------------------------------------------
FILE: /home/vishalkadam/DRUPAL-CONTRIBUTE/random_name_chooser/src/Service/RncMatcher.php
-----------------------------------------------------------------------------
FOUND 9 ERRORS AND 1 WARNING AFFECTING 10 LINES
-----------------------------------------------------------------------------
1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
8 | ERROR | [x] Missing class doc comment
10 | ERROR | [ ] Missing member variable doc comment
11 | ERROR | [ ] Missing member variable doc comment
13 | ERROR | [x] Missing function doc comment
41 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "NULL" but found "null"
49 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "NULL" but found "null"
65 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency injection instead
98 | ERROR | [x] Expected 1 blank line after function; 0 found
99 | ERROR | [x] The closing brace for the class must have an empty line before it
-----------------------------------------------------------------------------
PHPCBF CAN FIX THE 7 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-----------------------------------------------------------------------------
FILE: /home/vishalkadam/DRUPAL-CONTRIBUTE/random_name_chooser/rnc.routing.yml
-----------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
-----------------------------------------------------------------------------
65 | ERROR | [x] Expected 1 newline at end of file; 0 found
-----------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-----------------------------------------------------------------------------
NOTE:
It is better to enable GitLab CI for the project, and fix what reported from the phpcs job.
1. 1.2.1
, 1.2.0
, 1.1.2
, 1.1.1
, 1.1.0
, and 1.0.0
are wrong names for a branch and should be removed. Release branch names always end with the literal .x as described in
Release branches →
.
2. FILE: README.txt
Remove README.txt since README.md is present.
3. FILE: README.md
The README file is missing the required sections → - Installation and Configuration.
4. FILE: TagsOverviewTermMergeForm.php
/**
* Constructs the form.
*
* @param \Drupal\Core\Entity\EntityTypeManagerInterface $entity_type_manager
* The entity type manager.
* @param \Drupal\Core\Routing\RouteMatchInterface $route_match
* The route match service.
* @param \Symfony\Component\HttpFoundation\RequestStack $request_stack
* The request.
*/
public function __construct(EntityTypeManagerInterface $entity_type_manager, RouteMatchInterface $route_match, RequestStack $request_stack) {
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.
Fix phpcs issues.
phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,info,txt,md,yml alt_text_generator/
FILE: /home/vishalkadam/DRUPAL-CONTRIBUTE/alt_text_generator/alt_text_generator.links.menu.yml
--------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
--------------------------------------------------------------------------------
5 | ERROR | [x] Expected 1 newline at end of file; 0 found
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------
FILE: /home/vishalkadam/DRUPAL-CONTRIBUTE/alt_text_generator/README.md
-----------------------------------------------------------------------
FOUND 1 ERROR AND 1 WARNING AFFECTING 2 LINES
-----------------------------------------------------------------------
5 | WARNING | [ ] Line exceeds 80 characters; contains 82 characters
38 | ERROR | [x] Expected 1 newline at end of file; 0 found
-----------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-----------------------------------------------------------------------
FILE: /home/vishalkadam/DRUPAL-CONTRIBUTE/alt_text_generator/config/schema/alt_text_generator.schema.yml
--------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
--------------------------------------------------------------------------------
10 | ERROR | [x] Expected 1 newline at end of file; 0 found
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------
FILE: /home/vishalkadam/DRUPAL-CONTRIBUTE/alt_text_generator/config/install/alt_text_generator.settings.yml
--------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
--------------------------------------------------------------------------------
2 | ERROR | [x] Expected 1 newline at end of file; 0 found
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------
FILE: /home/vishalkadam/DRUPAL-CONTRIBUTE/alt_text_generator/src/Form/AltTextGeneratorSettingsForm.php
--------------------------------------------------------------------------------
FOUND 5 ERRORS AND 4 WARNINGS AFFECTING 6 LINES
--------------------------------------------------------------------------------
7 | WARNING | [x] Unused use statement
82 | WARNING | [x] A comma should follow the last multiline array item. Found: 'https://alttextgeneratorai.com/dashboard'
114 | WARNING | [x] A comma should follow the last multiline array item. Found: ]
124 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency injection instead
144 | ERROR | [x] Expected 1 blank line after function; 0 found
145 | ERROR | [x] The closing brace for the class must have an empty line before it
145 | ERROR | [ ] Closing class brace must be on a line by itself
145 | ERROR | [x] Expected 1 newline at end of file; 0 found
145 | ERROR | [x] Whitespace found at end of line
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 7 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------
FILE: /home/vishalkadam/DRUPAL-CONTRIBUTE/alt_text_generator/src/Form/AltTextGenerator.php
--------------------------------------------------------------------------------
FOUND 8 ERRORS AFFECTING 6 LINES
--------------------------------------------------------------------------------
27 | ERROR | [x] Whitespace found at end of line
28 | ERROR | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or closing parentheses
30 | ERROR | [x] Whitespace found at end of line
31 | ERROR | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or closing parentheses
33 | ERROR | [x] Whitespace found at end of line
37 | ERROR | [ ] Closing class brace must be on a line by itself
37 | ERROR | [x] Expected 1 newline at end of file; 0 found
37 | ERROR | [x] Whitespace found at end of line
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 7 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------
FILE: /home/vishalkadam/DRUPAL-CONTRIBUTE/alt_text_generator/src/Controller/AltTextGeneratorController.php
--------------------------------------------------------------------------------
FOUND 7 ERRORS AND 3 WARNINGS AFFECTING 8 LINES
--------------------------------------------------------------------------------
13 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\Core\Config\ConfigFactoryInterface.
90 | WARNING | [ ] File::load calls should be avoided in classes, use dependency injection instead
109 | ERROR | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or closing parentheses
114 | ERROR | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or closing parentheses
131 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency injection instead
132 | ERROR | [ ] The array declaration extends to column 84 (the limit is 80). The array content should be split up over multiple lines
135 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency injection instead
140 | ERROR | [ ] Closing class brace must be on a line by itself
140 | ERROR | [x] Expected 1 newline at end of file; 0 found
140 | ERROR | [x] Whitespace found at end of line
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 5 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------
FILE: /home/vishalkadam/DRUPAL-CONTRIBUTE/alt_text_generator/alt_text_generator.module
--------------------------------------------------------------------------------
FOUND 5 ERRORS AND 1 WARNING AFFECTING 5 LINES
--------------------------------------------------------------------------------
10 | WARNING | [x] Unused use statement
26 | ERROR | [x] Whitespace found at end of line
31 | ERROR | [x] Whitespace found at end of line
32 | ERROR | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or closing parentheses
53 | ERROR | [x] Expected 1 newline at end of file; 0 found
53 | ERROR | [x] Whitespace found at end of line
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 6 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------
FILE: /home/vishalkadam/DRUPAL-CONTRIBUTE/alt_text_generator/alt_text_generator.libraries.yml
--------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
--------------------------------------------------------------------------------
16 | ERROR | [x] Expected 1 newline at end of file; 0 found
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------
FILE: /home/vishalkadam/DRUPAL-CONTRIBUTE/alt_text_generator/alt_text_generator.info.yml
--------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
--------------------------------------------------------------------------------
8 | ERROR | [x] Expected 1 newline at end of file; 0 found
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------
FILE: /home/vishalkadam/DRUPAL-CONTRIBUTE/alt_text_generator/alt_text_generator.routing.yml
--------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
v
18 | ERROR | [x] Expected 1 newline at end of file; 0 found
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------
Note: It is better to enable GitLab CI for the project and fix the PHP_CodeSniffer errors/warnings it reports.
I published 🐛 Same alias cannot be set if accessing node creation page with same domain name Active and confirmed the account.
I deleted the project as requested.
Thanks for granting me the Site Moderator role! I’ll follow the guidelines and learn from experienced moderators like @avpaderno. Looking forward to contributing more.
I confirmed the account, since creating an organization node requires a confirmed account.
I have reviewed your posts and confirmed the account.
I confirmed the account, since creating an organization node requires a confirmed account.
I confirmed the account, since creating/editing an organization node requires a confirmed account.
I confirmed the account, since creating/editing an organization node requires a confirmed account.
I have confirmed the account based on module project contribution.
I have confirmed the account based on module project contribution.
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.
1. 11.1.x-dev
is a wrong name for a branch and should be removed. Release branch names always end with the literal .x as described in
Release branches →
.
2. FILE: README.md
The README file is missing the required sections → - Requirements, Installation, and Configuration.
3. FILE: book_library_api.module
/**
* @file
* Provides a book entity type.
*/
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.
function book_library_api_theme(): array
{
function template_preprocess_book(array &$variables): void
{
function template_preprocess_genre(array &$variables): void
{
function book_library_api_form_alter(&$form, \Drupal\Core\Form\FormStateInterface $form_state, $form_id)
{
Drupal coding standards say function declarations are written on a single line, even if they exceed 80 characters.
A similar issue exists in other files as well, and all of them can be resolved by fixing the phpcs job in GitLab CI.
4. FILE: src/Controller/BookController.php
// 'label' => $author,
// 'label' => $title,
FILE: src/Entity/Book.php
// ->setRequired(TRUE)
Remove commented code.
1. 1.0.0
and 1.0.1
are wrong name for a branch and should be removed. Release branch names always end with the literal .x as described in
Release branches →
.
2. FILE: README.txt
The README file is missing the required sections → - Project name and introduction, Requirements, Installation, and Configuration.
3. FILE: media_kinescope.info.yml
core: 8.x
core_version_requirement: ^8 || ^9 || ^10
core: 8.x cannot be used together core_version_requirement: ^8 || ^9 || ^10; Drupal core throws an
error →
.
A new project should not declare itself compatible with a Drupal release that is no longer supported. No site should be using Drupal 8 nor Drupal 9, and people should not be encouraged to use those Drupal releases.
4. FILE: media_kinescope.module
/**
* @file
* Primary module hooks for Media Kinescope module.
*/
Drupal does not have primary and secondary hooks. Instead of that, it is preferable to use the usual description: “Hook implementations for the [module name] module”, where [module name] is the name of the module given in its .info.yml file.
5. FILE: templates/media-kinescope.html.twig
Twig code needs to be correctly indented. Drupal uses two spaces for indentation, not four spaces or tabs.
6. FILE: src/Resource.php
/**
* Resource constructor.
*
* @param string $title
* (optional) A text title, describing the resource.
* @param string $subtitle
* (optional) A text subtitle, describing the resource.
* @param string $description
* (optional) A text, describing the resource.
* @param string $thumbnail_url
* (optional) A URL to a thumbnail image representing the resource.
* @param string $embed_url
* (optional) A URL to the resource.
* @param string $resolution
* (optional) A resolution of the resource.
*/
public function __construct($title = NULL, $subtitle = NULL, $description = NULL, $thumbnail_url = NULL, $embed_url = NULL, $resolution = NULL) {
FILE: src/ResourceException.php
/**
* ResourceException constructor.
*
* @param string $message
* The exception message.
* @param string $url
* The URL of the resource. Can be the actual endpoint URL or the canonical
* URL.
* @param array $data
* (optional) The raw resource data, if available.
* @param \Exception $previous
* (optional) The previous exception, if any.
*/
public function __construct($message, $url, array $data = [], \Exception $previous = NULL) {
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.
7. FILE: src/Resource.php
protected function setDimensions($width, $height)
{
public function getSubtitle()
{
public function getDescription()
{
public function getWidth()
{
public function getHeight()
{
FILE: src/Plugin/media/Source/KinescopeVideo.php
public static function create(ContainerInterface $container, array $configuration, $plugin_id, $plugin_definition)
{
protected function getLocalThumbnailUri(Resource $resource)
{
protected function getThumbnailFileExtensionFromUrl(string $thumbnail_url, ResponseInterface $response): ?string
{
public function getSourceFieldConstraints()
{
public function prepareViewDisplay(MediaTypeInterface $type, EntityViewDisplayInterface $display)
{
public function prepareFormDisplay(MediaTypeInterface $type, EntityFormDisplayInterface $display)
{
Drupal coding standards say function declarations are written on a single line, even if they exceed 80 characters.
vishal.kadam → created an issue.
FILE: config_warning.module
/**
* @file
* Primary module hooks for Config Warning module.
*/
Drupal does not have primary and secondary hooks. Instead of that, it is preferable to use the usual description: “Hook implementations for the [module name] module”, where [module name] is the name of the module given in its .info.yml file.
@avpaderno Thank you for adding me as a maintainer. I appreciate the trust and will make sure to handle credits appropriately.
You don't need a confirmed account to host your projects. The ability to host a module, theme, or distribution on Drupal.org requires the Git access permission.
I am still interested in becoming site moderator.
1. FILE: dify.info.yml
core_version_requirement: ^9 || ^10 || ^11
FILE: modules/dify_augmented_search/dify_augmented_search.info.yml
core_version_requirement: ^9 || ^10 || ^11
FILE: modules/dify_search_api/dify_search_api.info.yml
core_version_requirement: ^9 || ^10 || ^11
FILE: modules/dify_widget_official/dify_widget_official.info.yml
core_version_requirement: ^9 || ^10 || ^11
FILE: modules/dify_widget_vanilla/dify_widget_vanilla.info.yml
core_version_requirement: ^9 || ^10 || ^11
A new project should not declare itself compatible with a Drupal release that is no longer supported. No site should be using Drupal 8 nor Drupal 9, and people should not be encouraged to use those Drupal releases.
2. FILE: dify.links.menu.yml
File is empty and can be removed.
FILE: dify.module,
FILE: modules/dify_search_api/dify_search_api.module
Only one hook is present in file but it is empty and can be removed.
3. FILE: src/DifyClient.php
/**
* Creates a new Guzzle client.
*
* @param string $base_url
* The base URL of the Dify API.
* @param string $authorization_token
* The authorization token to use for requests.
*/
public function __construct(string $base_url, string $authorization_token) {
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.
4. FILE: modules/dify_augmented_search/dify_augmented_search.module
/**
* @file
* Dify Augmented Search module hooks.
*/
FILE: modules/dify_widget_official/dify_widget_official.module
/**
* @file
* Dify official widget module hooks.
*/
FILE: modules/dify_widget_vanilla/dify_widget_vanilla.module
/**
* @file
* Dify Widget Vanilla module.
*
* Floating chatbot widget with direct Dify API integration.
*/
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.
5. FILE: modules/dify_widget_vanilla/templates/dify-widget-vanilla.html.twig
<style>
:root {
--dify-primary-color: {{ custom_colors['primary-color'] }};
--dify-primary-hover: {{ custom_colors['primary-hover'] }};
--dify-primary-light: {{ custom_colors['primary-light'] }};
--dify-background-main: {{ custom_colors['background-main'] }};
--dify-background-secondary: {{ custom_colors['background-secondary'] }};
--dify-background-tertiary: {{ custom_colors['background-tertiary'] }};
--dify-background-input: {{ custom_colors['background-input'] }};
--dify-text-primary: {{ custom_colors['text-primary'] }};
--dify-text-secondary: {{ custom_colors['text-secondary'] }};
--dify-text-muted: {{ custom_colors['text-muted'] }};
--dify-text-placeholder: {{ custom_colors['text-placeholder'] }};
--dify-border-color: {{ custom_colors['border-color'] }};
--dify-border-light: {{ custom_colors['border-light'] }};
--dify-user-message-bg: {{ custom_colors['user-message-bg'] }};
--dify-bot-message-bg: {{ custom_colors['bot-message-bg'] }};
--dify-error-bg: {{ custom_colors['error-bg'] }};
--dify-error-text: {{ custom_colors['error-text'] }};
--dify-notification-color: {{ custom_colors['notification-color'] }};
--dify-success-color: {{ custom_colors['success-color'] }};
--dify-warning-color: {{ custom_colors['warning-color'] }};
}
</style>
Move styles (CSS) into a library and attach them. See the process here → .
1. FILE: paragraph_group.libraries.yml
main:
version: VERSION
settings:
version: VERSION
VERSION is only used by Drupal core modules. Contributed modules should use a literal string that does not change with the Drupal core version a site is using.
2. FILE: paragraph_group.module
/**
* @file
* Contains paragraph_group.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.
/**
* Implements hook_form_FORM_ID_alter().
*
* @param array $form
* The form array, passed by reference.
* @param \Drupal\Core\Form\FormStateInterface $form_state
* The form state object.
* @param string $form_id
* The form ID.
*/
function paragraph_group_form_paragroup_config_form_alter(
/**
* Implements hook_form_FORM_ID_alter().
*
* @param array $form
* The form array, passed by reference.
* @param \Drupal\Core\Form\FormStateInterface $form_state
* The form state object.
* @param string $form_id
* The form ID.
*/
function paragraph_group_form_system_themes_admin_form_alter(
The description for this hook should also say for which form that hook is implemented, either by indicating that with the name of the class that implements the form (namespace included) or the form ID (which is usually indicated by getFormId()
).
3. FILE: src/Form/ParagroupConfigForm.php
/**
* Constructor.
*
* @param \Drupal\paragraph_group\Paragroup\ParagroupBatch $batch_obj
* The batch processing service.
* @param \Drupal\paragraph_group\Paragroup\ParagroupFormData $form_data
* The form data service.
*/
public function __construct(
FILE: src/Paragroup/ParagroupBatch.php
/**
* Constructor.
*
* @param \Drupal\Core\StringTranslation\TranslationInterface $string_translation
* The string translation service.
* @param \Drupal\paragraph_group\Paragroup\ParagroupFormData $form_data
* The form data service.
*/
public function __construct(
FILE: src/Paragroup/ParagroupFormData.php
/**
* Constructor.
*
* @param \Drupal\Core\StringTranslation\TranslationInterface $string_translation
* The string translation service.
*/
public function __construct(TranslationInterface $string_translation) {
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.
2.0.4
, set-sast-config-1
, 1.x.-dev
, main
, 1.0.1-alpha2
, 2.x-alpha
, 2.0.3-beta1
, 2.0.3-beta2
, and 2.0.4-beta1
are wrong names for a branch and should be removed. Release branch names always end with the literal .x as described in
Release branches →
. The only exception is for the main branch, which is actually not fully supported on drupal.org and should be avoided.