- Issue created by @samit.310@gmail.com
- Status changed to Needs review
almost 2 years ago 4:36am 24 February 2023 - 🇮🇳India samit.310@gmail.com
Above error/warnings need to be fixed.
Only Following errors are remains.
FILE: /var/www/html/modules/contrib/globallink/README.txt
----------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
----------------------------------------------------------------------
17 | WARNING | Line exceeds 80 characters; contains 83 characters
----------------------------------------------------------------------For above we already have issue opened. Replace README.txt with README.md 📌 Replace README.txt with README.md RTBC
FILE: /var/www/html/modules/contrib/globallink/src/GlExchangeAdapter.php
----------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------------------------------
87 | ERROR | Public method name "GlExchangeAdapter::getPDConfig" is not in lowerCamel format
----------------------------------------------------------------------------------------------I am not sure to changes getPDConfig function to lowerCamel format, Maintainers can confirm here.
- Issue was unassigned.
- Status changed to Needs work
9 months ago 5:47am 8 March 2024 - 🇮🇳India Ashutosh Ahirwal India
Hi, Patch provided in #2 is not getting apply throwing error
Moving to need work
Result after applying patchgloballink % git apply -v 3344157-2.patch
Checking patch config/schema/globallink.schema.yml...
error: while searching for:
label: Email notification levels
pd_user_agent:
type: select
label: GlobalLink User Agent Level
error: patch failed: config/schema/globallink.schema.yml:32
error: config/schema/globallink.schema.yml: patch does not apply
Checking patch globallink.install...
Checking patch globallink.module...
Checking patch src/EventSubscriber/GloballinkContinuousEvents.php...
Checking patch src/GlExchangeAdapter.php...
Checking patch src/GlobalLinkTranslatorUi.php...
error: while searching for:$form['pd_url'] = [
'#type' => 'url',
'#title' => t('GlobalLink api url'),
'#required' => TRUE,
'#default_value' => $translator->getSetting('pd_url'),
'#description' => t('Add the api url provided by translations.com'),
];
$form['pd_username'] = [
'#type' => 'textfield',
'#title' => t('GlobalLink username'),
'#required' => TRUE,
'#default_value' => $translator->getSetting('pd_username'),
'#description' => t('Add the username provided by translations.com'),
];
$form['pd_password'] = [
'#type' => 'password',
'#title' => t('GlobalLink password'),
'#required' => TRUE,
'#default_value' => $translator->getSetting('pd_password'),
'#description' => t('Add the password provided by translations.com'),
];
$form['pd_projectid'] = [
'#type' => 'textfield',
'#title' => t('GlobalLink project id'),
'#required' => TRUE,
'#default_value' => $translator->getSetting('pd_projectid'),
'#description' => t('Add the project id provided by translations.com'),
];
$form['pd_submissionprefix'] = [
'#type' => 'textfield',
'#title' => t('GlobalLink submission prefix'),
'#required' => TRUE,
'#default_value' => $translator->getSetting('pd_submissionprefix'),
'#description' => t('Choose a prefix'),
];
$form['pd_classifier'] = [
'#type' => 'textfield',
'#title' => t('GlobalLink classifier'),
'#required' => TRUE,
'#default_value' => $translator->getSetting('pd_classifier'),
'#description' => t('Add a classifier'),
];
$form['pd_notify_emails'] = [
'#type' => 'textfield',
'#title' => t('Emails for notification'),
'#default_value' => $translator->getSetting('pd_notify_emails'),
'#description' => t('A space separated list of emails to notify. Leave blank for no notifications'),
];
$form['pd_combine'] = [
'#type' => 'checkbox',
'#title' => t('Combine all items into a single document'),
'#default_value' => $translator->getSetting('pd_combine'),
'#description' => t('If checked, a single document will be sent for a translation job, otherwise a separate document within a single submission will be created for each job item.'),
];
$form['pd_due_date_offset'] = [
'#type' => 'textfield',
'#title' => t('Default due date offset in working days'),
'#default_value' => $translator->getSetting('pd_due_date_offset') ?: 3,
'#description' => t('Controls the default due date, which then by default uses the configured amount of working days in the future.'),
];
$form['pd_notify_level'] = [
'#type' => 'checkboxes',
'#title' => t('Email notification levels'),
'#options' => [
GlobalLinkTranslator::MSG_STATUS => t('Status'),
GlobalLinkTranslator::MSG_DEBUG => t('Debug'),
GlobalLinkTranslator::MSG_WARNING => t('Warning'),
GlobalLinkTranslator::MSG_ERROR => t('Error'),
],
'#default_value' => (array) $translator->getSetting('pd_notify_level'),
'#description' => t('Select which tmgmt message types to send via email. Selecting all can result in a high volume of emails being sent.')
];
$form['pd_user_agent'] = [
'#type' => 'select',
'#title' => t('Select Environment Type'),
'#options' => [
'dev' => $this->t('Development Environment'),
'test' => $this->t('Test Environment'),
'stage' => $this->t('Staging Environment'),
'prod' => $this->t('Production Environment'),
],
'#default_value' => (array) $translator->getSetting('pd_user_agent'),
'#description' => t('Select which type of environment this is installed on. This will provide more information for Project Director.')
];return $form;
}error: patch failed: src/GlobalLinkTranslatorUi.php:44
error: src/GlobalLinkTranslatorUi.php: patch does not apply
Checking patch src/Plugin/tmgmt/Translator/GlobalLinkTranslator.php...
Hunk #8 succeeded at 572 (offset 5 lines).
Hunk #9 succeeded at 616 (offset 5 lines).
Hunk #10 succeeded at 686 (offset 5 lines).
error: while searching for:
$this->glExchangeAdapter->getGlExchange($pd_config);
}
catch (\Exception $e) {
return AvailableResult::no(t('@translator is not available. Make sure it is properly configured.', [
'@translator' => $translator->label(),
':configured' => $translator->url(),
]));error: patch failed: src/Plugin/tmgmt/Translator/GlobalLinkTranslator.php:681
error: src/Plugin/tmgmt/Translator/GlobalLinkTranslator.php: patch does not apply - Assigned to PrabuEla
- Issue was unassigned.
- Assigned to apaderno
- 🇮🇹Italy apaderno Brescia, 🇮🇹
I am assigning this issue to me, since I am working on it.
- Issue was unassigned.
- Status changed to Needs review
8 months ago 11:58am 21 March 2024 - 🇮🇹Italy apaderno Brescia, 🇮🇹
The only shown warning cannot be fixed, since the description for the .install file needs to be Install, update and uninstall functions for the GlobalLink Connect for Drupal module.
- Status changed to Needs work
4 months ago 4:20pm 30 July 2024 - 🇵🇭Philippines roberttabigue
Hi @avpaderno,
I got these errors below when applying MR!3 by using the
plain diff
to the GlobalLink Connect for Drupal module against 8.x-2.x-dev on my Drupal 10 site.% Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 37882 0 37882 0 0 92760 0 --:--:-- --:--:-- --:--:-- 94000 Checking patch .gitlab-ci.yml... Checking patch composer.json... error: while searching for: "source": "https://www.drupal.org/project/globallink" }, "require": { "drupal/core": "~8.1", "drupal/tmgmt": "~1.4", "translations-com/globallink-connect-api-php": "4.18.4" } } error: patch failed: composer.json:11 error: composer.json: patch does not apply Checking patch config/schema/globallink.schema.yml... error: while searching for: label: Submission name Prefix pd_notify_emails: type: string label: Space separated list of emails to notify pd_combine: type: string label: Combine all items into a single document error: patch failed: config/schema/globallink.schema.yml:18 error: config/schema/globallink.schema.yml: patch does not apply Checking patch globallink.info.yml... error: while searching for: - tmgmt:tmgmt - tmgmt:tmgmt_file type: module # Information added by Drupal.org packaging script on 2019-07-22 version: '8.x-2.0-rc1' core: '8.x' project: 'globallink' datestamp: 1563812593 error: patch failed: globallink.info.yml:7 error: globallink.info.yml: patch does not apply Checking patch globallink.install... Checking patch globallink.module... error: while searching for: <?php use Drupal\tmgmt\Entity\Job; /** * Implements hook_theme(). error: patch failed: globallink.module:1 error: globallink.module: patch does not apply Checking patch globallink.services.yml... Checking patch src/EventSubscriber/GloballinkContinuousEvents.php... Checking patch src/GlExchangeAdapter.php... error: while searching for: <?php namespace Drupal\globallink; use Drupal\Core\Entity\EntityTypeManagerInterface; use Drupal\Core\Extension\ModuleHandlerInterface; error: patch failed: src/GlExchangeAdapter.php:1 error: src/GlExchangeAdapter.php: patch does not apply Checking patch src/GlobalLinkTranslatorUi.php... error: while searching for: '#type' => 'textfield', '#title' => t('Emails for notification'), '#default_value' => $translator->getSetting('pd_notify_emails'), '#description' => t('A space separated list of emails to notify. Leave blank for no notifications'), ]; $form['pd_combine'] = [ '#type' => 'checkbox', error: patch failed: src/GlobalLinkTranslatorUi.php:88 error: src/GlobalLinkTranslatorUi.php: patch does not apply Checking patch src/Plugin/tmgmt/Translator/GlobalLinkTranslator.php... Hunk #1 succeeded at 8 (offset 1 line). Hunk #2 succeeded at 36 (offset 1 line). Hunk #3 succeeded at 48 (offset 1 line). error: while searching for: 'ar-DZ' => 'Arabic, Algeria', 'ar-EG' => 'Arabic, Egypt', 'ar-IQ' => 'Arabic, Iraq', 'ar-JO' => 'Arabic, Jordan', 'ar-KW' => 'Arabic, Kuwait', 'ar-LB' => 'Arabic, Lebanon', error: patch failed: src/Plugin/tmgmt/Translator/GlobalLinkTranslator.php:129 error: src/Plugin/tmgmt/Translator/GlobalLinkTranslator.php: patch does not apply
I'm moving this to ‘Needs work’ for your review.
Thank you!
- Status changed to Needs review
4 months ago 6:15am 31 July 2024 - 🇮🇹Italy apaderno Brescia, 🇮🇹
None of those errors were reported by GitLab CI PHP_CodeSniffer. The purpose of this issue is resolving those errors, not every error in the code.
If the patch does not apply, it means it is probably applied to an old version of the code.
Using a patch to verify a merge request is also using a wrong workflow. The issue fork page itself says if the merge request is not updated with the upstream repository; in this case, it says 16 commits ahead of the upstream repository. which means the merge request applies to the project repository.The only PHP_CodeSniffer error can be ignored, since Install, update, and uninstall hooks for the GlobalLink Connect for Drupal module. is the correct description for a .install file. It is not possible to tell PHP_CodeSniffer to ignore that line, as that comment must be the first one after the
<?php
tag, so it is not possible to add another comment before that. - Status changed to Needs work
3 months ago 1:26pm 21 August 2024 - 🇵🇭Philippines roberttabigue
Hi @avpaderno,
I'm still seeing 1 PHPCS warning in the GitLab CI PHP_CodeSniffer: https://git.drupalcode.org/issue/globallink-3344157/-/jobs/2507007.
FILE: ...loballink-3344157/web/modules/custom/globallink-3344157/globallink.install -------------------------------------------------------------------------------- FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE -------------------------------------------------------------------------------- 5 | WARNING | Line exceeds 80 characters; contains 85 characters | | (Drupal.Files.LineLength.TooLong) -------------------------------------------------------------------------------- Time: 238ms; Memory: 8MB PHP CODE SNIFFER REPORT SUMMARY -------------------------------------------------------------------------------- FILE ERRORS WARNINGS -------------------------------------------------------------------------------- ...57/web/modules/custom/globallink-3344157/globallink.install 0 1 -------------------------------------------------------------------------------- A TOTAL OF 0 ERRORS AND 1 WARNING WERE FOUND IN 6 FILES -------------------------------------------------------------------------------- PHP CODE SNIFFER VIOLATION SOURCE SUMMARY ---------------------------------------------------------------------- SOURCE COUNT ---------------------------------------------------------------------- Drupal.Files.LineLength.TooLong 1 ---------------------------------------------------------------------- A TOTAL OF 1 SNIFF VIOLATION WERE FOUND IN 1 SOURCE ----------------------------------------------------------------------
I'm moving this to ‘Needs work’ for your review.
Thank you!
- Status changed to Needs review
3 months ago 7:10pm 21 August 2024 - 🇮🇹Italy apaderno Brescia, 🇮🇹
The only shown warning cannot be fixed, since the description for the .install file needs to be Install, update and uninstall functions for the GlobalLink Connect for Drupal module.
- Status changed to RTBC
3 months ago 3:47pm 6 September 2024 - 🇵🇭Philippines roberttabigue
Hi @avpaderno,
I got it. I'm marking this now as 'RBTC'.
Thank you.