Hello @osman,
Do you have any news for the release please?
The latest tag does not yet contain this fix
Thanks
+1 RTBC
Rerunning phpcs, all is fine for me.
- No errors except on README, I don't know if that makes sense.
FILE: modules/contrib/tmgmt_powerling/README.txt
---------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 9 WARNINGS AFFECTING 9 LINES
---------------------------------------------------------------------------------------
5 | WARNING | Line exceeds 80 characters; contains 325 characters
6 | WARNING | Line exceeds 80 characters; contains 89 characters
9 | WARNING | Line exceeds 80 characters; contains 88 characters
10 | WARNING | Line exceeds 80 characters; contains 107 characters
15 | WARNING | Line exceeds 80 characters; contains 272 characters
16 | WARNING | Line exceeds 80 characters; contains 183 characters
20 | WARNING | Line exceeds 80 characters; contains 83 characters
24 | WARNING | Line exceeds 80 characters; contains 411 characters
26 | WARNING | Line exceeds 80 characters; contains 129 characters
---------------------------------------------------------------------------------------
- README file extension
I noticed your readme file is .txt but not .md (I don't know what is the recommandation)
Let's wait for other reviewers if this should be changed or not.
Running
phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml icm.info.yml
FILE: contrib/icm/icm.info.yml
-------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 4 WARNINGS AFFECTING 2 LINES
-------------------------------------------------------------------------------------------------------------
9 | WARNING | All dependencies must be prefixed with the project name, for example "drupal:"
-------------------------------------------------------------------------------------------------------------
FILE: contrib/icm/src/Plugin/Field/FieldFormatter/IcmFieldFormatter.php
----------------------------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AND 8 WARNINGS AFFECTING 9 LINES
----------------------------------------------------------------------------------------------------------------------------------------------
13 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\Core\Entity\EntityTypeManagerInterface.
134 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
137 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
151 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
155 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
161 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
178 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
239 | WARNING | [ ] Unused variable $element_name.
242 | WARNING | [ ] Unused variable $key.
----------------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------------------------------------------------------------------------------
Running
phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml conditional_features
No errors except on README, I don't know if that makes sense for this type of file.
Let's wait for other reviewers if this should be changed or not
FILE: contrib/conditional_features/README.md
-------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 5 WARNINGS AFFECTING 5 LINES
-------------------------------------------------------------------------------------------
3 | WARNING | Line exceeds 80 characters; contains 121 characters
7 | WARNING | Line exceeds 80 characters; contains 101 characters
9 | WARNING | Line exceeds 80 characters; contains 186 characters
19 | WARNING | Line exceeds 80 characters; contains 108 characters
21 | WARNING | Line exceeds 80 characters; contains 132 characters
-------------------------------------------------------------------------------------------
Running
phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml tmgmt_powerling
FILE: contrib/tmgmt_powerling/src/Plugin/tmgmt/Translator/PowerlingTranslator.php
--------------------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 2 LINES
--------------------------------------------------------------------------------------------------------------------------------
939 | WARNING | Only string literals should be passed to t() where possible
981 | WARNING | Only string literals should be passed to t() where possible
--------------------------------------------------------------------------------------------------------------------------------
Running
phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml meta_conversions_api
FILE: contrib/meta_conversions_api/config/schema/meta_conversions_api.schema.yml
-------------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
-------------------------------------------------------------------------------------------------------------------------------
19 | ERROR | [x] Expected 1 newline at end of file; 0 found
-------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-------------------------------------------------------------------------------------------------------------------------------
FILE: contrib/meta_conversions_api/meta_conversions_api.api.php
--------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
--------------------------------------------------------------------------------------------------------------
1 | ERROR | [x] Missing file doc comment
--------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------------------------------------
FILE: contrib/meta_conversions_api/meta_conversions_api.module
-------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
-------------------------------------------------------------------------------------------------------------
1 | ERROR | [x] Missing file doc comment
-------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-------------------------------------------------------------------------------------------------------------
FILE: contrib/meta_conversions_api/meta_conversions_api.links.task.yml
---------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
---------------------------------------------------------------------------------------------------------------------
9 | ERROR | [x] Expected 1 newline at end of file; 0 found
---------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
---------------------------------------------------------------------------------------------------------------------
FILE: contrib/meta_conversions_api/src/Logger/FacebookLogger.php
---------------------------------------------------------------------------------------------------------------
FOUND 3 ERRORS AFFECTING 3 LINES
---------------------------------------------------------------------------------------------------------------
37 | ERROR | [x] Short array syntax must be used to define arrays
44 | ERROR | [x] Short array syntax must be used to define arrays
55 | ERROR | [x] Short array syntax must be used to define arrays
---------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 3 MARKED SNIFF VIOLATIONS AUTOMATICALLY
---------------------------------------------------------------------------------------------------------------
FILE: contrib/meta_conversions_api/src/MetaApiTwig.php
-----------------------------------------------------------------------------------------------------
FOUND 1 ERROR AND 1 WARNING AFFECTING 2 LINES
-----------------------------------------------------------------------------------------------------
29 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency injection instead
82 | ERROR | [x] Expected 1 newline at end of file; 0 found
-----------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-----------------------------------------------------------------------------------------------------
I checked and everything seems fine for me.
Hi AstonVictor
For params $form_id
, it's a last param so if you dont need it you can remove it.
You don't use it anywhere in your function.
For the $field, you must test it before using.
What happen if $field
is not object but you use
($field->isDisplayConfigurable('form')
Thank you for applying!
I have some suggestions:
contrib/field_extra/field_extra.module
if (strpos($name, 'private_') !== FALSE) {}
I think you can use str_contains
instead of strpos
if (str_contains($name, 'private_')) {}
Reverse the order of tests
if ($field->isDisplayConfigurable('form') &&
$field instanceof FieldConfigInterface &&
$field->getThirdPartySetting('field_extra', 'private_field'))
it's good to check the $field is an FieldConfigInterface before using it
if ($field instanceof FieldConfigInterface &&
$field->isDisplayConfigurable('form') &&
$field->getThirdPartySetting('field_extra', 'private_field'))
Remove unused parameters (Not mandatory but nice to have)
Unused parameter $route_match
:
- function field_extra_help($route_name, RouteMatchInterface $route_match) {}
Unused parameter '$form_id
' :
- function field_extra_form_field_config_edit_form_alter(&$form, FormStateInterface $form_state, $form_id) {}
- function field_extra_form_alter(&$form, FormStateInterface $form_state, $form_id) {}
Comment
I don't know if it's necessary to have this comment
/**
* @file
* Contains field_extra.module.
*/
Thank you for applying!
rest_log/src/EventSubscriber/RestLogSubscriber.php
Type Hinting
Because you use type declaration for your function arguments in the majority of your code.
Can you add a type for $event
?
public function logResponse($event): void
public function onException($event): void
Unused argument
I think you can remove $event
public function terminate($event): void {
foreach ($this->stack as $item) {
$this->doLogResponse($item['request'], $item['response']);
}
}
Thank you for applying!
I have three suggestions:
- media_power_bi/src/Plugin/Validation/Constraint/MediaPowerBiConstraintValidator.php
public static function getUrlRegexPattern() {
return '/^' . preg_quote(self::POWER_BI_DOMAIN, '/') . '|' . preg_quote(self::POWER_BI_GOV_DOMAIN, '/') . '\/view\?r=(\w+)/';
}
This method is static, but you call it with $this
$pattern = $this->getUrlRegexPattern();
You can also call it with self::
but I don't know what is the best practice
- media_power_bi/src/Form/MediaPowerBiMediaForm.php
$media = $this->createMediaFromValue($media_type, $media_storage, $source_field_name, $url);
As you use declare(strict_types=1);
Can you declare $media
to /** @var \Drupal\media\MediaInterface $media */
- media_power_bi/media_power_bi.module hook_theme()
function media_power_bi_theme($existing, $type, $theme, $path)
I think you can remove all unused params $existing, $type, $theme, $path
Yes but, I think that if it is not necessary, it should be deleted. it's a standalone module.
Hook_help:
- function media_popup_help($route_name, RouteMatchInterface $route_match)
You can remove the param RouteMatchInterface $route_match if you don't need it.
In your js:
- attach: function (context, settings)
You can remove the param settings if you don't need it
- Use const/let instead of "var"in a block if possible.
In each folder there are these files:
- .gitkeep
- DS_Store
- gitignore
Can you delete them please?
Thanks for applying!
I see two empty .gitkeep files, I don't know if this is really necessary.
I think you can delete them
- current_date_time/src/Plugin/.gitkeep
- current_date_time/src/.gitkeep
Thanks @hemant-gupta for applying!
I have a few recommendations:
- /time_clock.libraries.yml - core/jquery.once
: you add core/jquery.once as a dependency but never use it
- /js/timezone.js function ($, Drupal, once)
: You declare 'once' in the parameters but you don't use it (I think you can remove it)
- /css/custom.css: This file is empty (you can delete it)
- /time_clock.module time_clock_theme($existing, $theme, $type, $path)
: I think you can remove these unused params ($existing, $theme, $type, $path)
- /time_clock.module hook_help() function time_clock_help($route_name, RouteMatchInterface $route_match)
: You can remove $route_match if you don't use it
I can reproduce it when I use "Full HTML" but not if I use "Basic HTML"
Hello,
Same Problem on drupal 9.5.10
DevTools failed to load source map: Could not load content for http://127.0.0.1/sites/default/files/js/optimized/dialog-min.js.map: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE
DevTools failed to load source map: Could not load content for http://127.0.0.1/sites/default/files/js/optimized/index.umd.min.js.map: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE
DevTools failed to load source map: Could not load content for http://127.0.0.1/sites/default/files/js/optimized/jquery.form.min.js.map: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE
DevTools failed to load source map: Could not load content for http://127.0.0.1/sites/default/files/js/optimized/shepherd.min.js.map: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE
DevTools failed to load source map: Could not load content for http://127.0.0.1/sites/default/files/css/optimized/style.css.map: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE
Thanks @shashank5563 and @sgourebi for the review,
@sgourebi, I removed the implementation of ContainerFactoryPluginInterface in src/Plugin/Field/FieldWidget/MonthYearRangeWidget.php
For the version, I think that for the moment we can leave it like this core_version_requirement: ^8 || ^9 || ^10
thanks @paderno,
I just deleted the license and unnecessary files.
Hello Christopher,
I think this module is no longer maintained.