Account created on 27 September 2021, over 3 years ago
#

Merge Requests

Recent comments

@larowlan Thanks for response. Actually i am busy on project i don't spent much time on contribution if i will free or sure will ping you on slack

oops! wrong patch uploaded. upload right patch agaign

@larowlan I checked file core/lib/Drupal/Core/Ajax/AjaxResponseAttachmentsProcessor.php it isn't good example for comment #11

 /**
   * Constructs an AjaxResponseAttachmentsProcessor object.
   *
   * @param \Drupal\Core\Asset\AssetResolverInterface $asset_resolver
   *   An asset resolver.
   * @param \Drupal\Core\Config\ConfigFactoryInterface $config_factory
   *   A config factory for retrieving required config objects.
   * @param \Drupal\Core\Asset\AssetCollectionRendererInterface $css_collection_renderer
   *   The CSS asset collection renderer.
   * @param \Drupal\Core\Asset\AssetCollectionRendererInterface $js_collection_renderer
   *   The JS asset collection renderer.
   * @param \Symfony\Component\HttpFoundation\RequestStack $request_stack
   *   The request stack.
   * @param \Drupal\Core\Render\RendererInterface $renderer
   *   The renderer.
   * @param \Drupal\Core\Extension\ModuleHandlerInterface $module_handler
   *   The module handler.
   */
  public function __construct(AssetResolverInterface $asset_resolver, ConfigFactoryInterface $config_factory, AssetCollectionRendererInterface $css_collection_renderer, AssetCollectionRendererInterface $js_collection_renderer, RequestStack $request_stack, RendererInterface $renderer, ModuleHandlerInterface $module_handler) {
    $this->assetResolver = $asset_resolver;
    $this->config = $config_factory->get('system.performance');
    $this->cssCollectionRenderer = $css_collection_renderer;
    $this->jsCollectionRenderer = $js_collection_renderer;
    $this->requestStack = $request_stack;
    $this->renderer = $renderer;
    $this->moduleHandler = $module_handler;
  }

@larowlan could you please check the below code for #7 point 1

+   * @param \Drupal\Core\File\FileSystemInterface $file_system
+   *   The file system service.
    */
-  public function __construct(RendererFactoryInterface $renderer_factory, EventDispatcherInterface $event_dispatcher, TranslationInterface $string_translation) {
+  public function __construct(RendererFactoryInterface $renderer_factory, EventDispatcherInterface $event_dispatcher, TranslationInterface $string_translation, FileSystemInterface $file_system = NULL) {
     $this->rendererFactory = $renderer_factory;
     $this->dispatcher = $event_dispatcher;
     $this->stringTranslation = $string_translation;
+    if (!$file_system) {
+      @trigger_error('Calling $file_system without argument the constructor of ' . __CLASS__ . ' is deprecated in entity_print:8.x-2.4 and is removed from entity_print:3.0.0. Pass an instance of FileSystemInterface instead. See https://www.drupal.org/node/3238430', E_USER_DEPRECATED);
+      $this->fileSystem = \Drupal::service('file_system');
+    }
+    $this->fileSystem = $file_system;

@larowlan #7 point 2 have done with added phpcs ignore and recreate patch. I checked for point 1 \Drupal\entity_print\Asset\AssetCollector::__construct

object is InfoParserInterface then @trigger_error for deprecation so in PrintBuilder class which object will check null for @trigger_error.

#3 suggested code optimized fixed and recreate patch.

Getting below error use dependency injection.

FILE: /var/www/html/modules/contrib/paragraphs_wizard/css/paragraphswizard.css
------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
------------------------------------------------------------------------------
78 | ERROR | [x] Expected 1 newline at end of file; 0 found
------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------------

FILE: /var/www/html/modules/contrib/paragraphs_wizard/src/Plugin/Field/FieldFormatter/ParagraphsWizardFieldFormatter.php
----------------------------------------------------------------------------------------------------------------------------------------------
FOUND 5 ERRORS AND 11 WARNINGS AFFECTING 15 LINES
----------------------------------------------------------------------------------------------------------------------------------------------
5 | WARNING | [x] Unused use statement
6 | WARNING | [x] Unused use statement
11 | WARNING | [x] Unused use statement
28 | ERROR | [x] Expected 1 blank line before function; 0 found
30 | WARNING | [x] A comma should follow the last multiline array item. Found: 'default'
45 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency injection instead
45 | ERROR | [x] Expected one space after the comma, 0 found
46 | ERROR | [x] Short array syntax must be used to define arrays
48 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
51 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
60 | WARNING | [ ] Translatable strings must not begin or end with white spaces, use placeholders with t() for variables
69 | ERROR | [x] Expected 1 space after IF keyword; 0 found
93 | ERROR | [ ] Inline doc block comments are not allowed; use "/* Comment */" or "// Comment" instead
101 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency injection instead
102 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency injection instead
104 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency injection instead
----------------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 8 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------------------------------------------------------------------------------

FILE: /var/www/html/modules/contrib/paragraphs_wizard/paragraphs_wizard.libraries.yml
-------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
-------------------------------------------------------------------------------------
11 | ERROR | [x] Expected 1 newline at end of file; 0 found
-------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-------------------------------------------------------------------------------------

FILE: /var/www/html/modules/contrib/paragraphs_wizard/paragraphs_wizard.module
----------------------------------------------------------------------------------
FOUND 1 ERROR AND 1 WARNING AFFECTING 2 LINES
----------------------------------------------------------------------------------
34 | WARNING | [x] A comma should follow the last multiline array item. Found: ]
37 | ERROR | [x] Expected 1 newline at end of file; 0 found
----------------------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------------------

Time: 157ms; Memory: 6MB

@apaderno comment #8 📌 Fix the errors/warnings reported by PHP_CodeSniffer Needs review code in hooks in post-commit file which it's not showing in phpcs report and comment #5 has suggested on README.md and CONTRIBUTING.md file which have fixed in merge request.

The patch 📌 Automated Drupal 10 compatibility fixes Fixed has failed. . I have recreated patch with fixes phpcs below error

FILE: /var/www/html/modules/contrib/notify_user_default/notify_user_default.module
----------------------------------------------------------------------------------
FOUND 2 ERRORS AFFECTING 2 LINES
----------------------------------------------------------------------------------
25 | ERROR | [x] Expected 1 blank line after function; 2 found
31 | ERROR | [x] Expected 1 space before opening brace; found 0
----------------------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------------------

FILE: /var/www/html/modules/contrib/notify_user_default/notify_user_default.info.yml
----------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
----------------------------------------------------------------------------------------------
7 | WARNING | All dependencies must be prefixed with the project name, for example "drupal:"
----------------------------------------------------------------------------------------------

FILE: /var/www/html/modules/contrib/notify_user_default/README.md
----------------------------------------------------------------------
FOUND 0 ERRORS AND 4 WARNINGS AFFECTING 4 LINES
----------------------------------------------------------------------
15 | WARNING | Line exceeds 80 characters; contains 92 characters
35 | WARNING | Line exceeds 80 characters; contains 82 characters
36 | WARNING | Line exceeds 80 characters; contains 83 characters
43 | WARNING | Line exceeds 80 characters; contains 117 characters
----------------------------------------------------------------------

PHPCS fixed and exclude js in phpcs command. some error are still open to fix.

FILE: /var/www/html/modules/contrib/better_exposed_filters/src/BetterExposedFiltersHelper.php
---------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 3 WARNINGS AFFECTING 2 LINES
---------------------------------------------------------------------------------------------
 80 | WARNING | Unused variable $value.
 80 | WARNING | Unused variable $value.
 83 | WARNING | Unused variable $value.
---------------------------------------------------------------------------------------------


FILE: /var/www/html/modules/contrib/better_exposed_filters/src/Plugin/better_exposed_filters/filter/DatePickers.php
-------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
-------------------------------------------------------------------------------------------------------------------
 41 | WARNING | Unused variable $element.
-------------------------------------------------------------------------------------------------------------------

@kunal_sahu if you have review the issue then you can moved to RTBC

@joseph.olstad i did installed Entity Translation Unified Form module for drupal 10 and access the url admin/structure/types/add i got same error which you got i did debug in module file function entity_translation_unified_form_save_only_button called inside the function content_translation.manager service call in getBundleTranslationSettings function config getThirdPartySetting given the error. and found solution
to add condition like that

diff --git a/core/modules/content_translation/src/ContentTranslationManager.php b/core/modules/content_translation/src/ContentTranslationManager.php
index 56ac55cf7e..dcc5280bab 100644
--- a/core/modules/content_translation/src/ContentTranslationManager.php
+++ b/core/modules/content_translation/src/ContentTranslationManager.php
@@ -119,7 +119,10 @@ public function setBundleTranslationSettings($entity_type_id, $bundle, array $se
*/
public function getBundleTranslationSettings($entity_type_id, $bundle) {
$config = $this->loadContentLanguageSettings($entity_type_id, $bundle);
- return $config->getThirdPartySetting('content_translation', 'bundle_settings', []);
+ if ($config = $this->loadContentLanguageSettings($entity_type_id, $bundle)) {
+ return $config->getThirdPartySetting('content_translation', 'bundle_settings', []);
+ }
+ return [];
}

/**

Production build 0.71.5 2024