Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

Harsh panchal created an issue. See original summary.

Harsh panchal’s picture

Category: Task » Bug report
Status: Active » Needs review
StatusFileSize
new20.77 KB

I have fixed this issue and providing a patch.

shamir.vs’s picture

Status: Needs review » Needs work

I applied patch #2. one file failed to apply the patch. Can you please check

patching file sharpspring_crm.module
patching file src/Form/SharpSpringCrmConfigForm.php
patching file src/Plugin/WebformHandler/SharpSpringCrmLeadHandler.php
Hunk #5 FAILED at 75.
1 out of 8 hunks FAILED -- saving rejects to file src/Plugin/WebformHandler/SharpSpringCrmLeadHandler.php.rej
patching file src/Plugin/WebformHandler/SharpSpringCrmListHandler.php
patching file src/SharpSpringCrm.php

urvashi_vora’s picture

Hi,

Because of inactivity for more than a week, assigning this to myself and I am working on this currently.

nitin_lama’s picture

Assigned: urvashi_vora » nitin_lama
Status: Needs work » Needs review
StatusFileSize
new18.99 KB

No activity since last 2 days. Here's the updated patch.

nitin_lama’s picture

Assigned: nitin_lama » Unassigned
urvashi_vora’s picture

Assigned: Unassigned » urvashi_vora
Status: Needs review » Needs work

Hi,

Your patch applied, but still, some errors are there. I am working on them.

gisle’s picture

Hi, I am a site moderator at Drupal.org, resposible for sorting out spam.

Today, an extraordinary number of spam flags was raised about comments posted about this, and other, issues. Viz.:
#3292463: Fix the issues reported by phpcs, #3222510: Drupal Coding Standard Fixes., #3290851: Coding Standard Issue, #3169485: Fix Drupal Coding Standard Errors, #3291030: Fix the issues reported by phpcs, #2876993: Fix the issue reported by phpcs, #2886164: Coding Standard issues.

Please note that spam is defined as "unsolicited advertising". The spam flag should not be used for other purposes, such as flagging that you dislike a post or you disagree with someone's behaviour. Please do not do this. It is just wasting the site moderators' time. If you need help to sort out some dispute, report it to the CWG. A possible conflict between community members is out of scope for site moderators.

Looking at the flagged comments, it looks like the root of the matter is some sort of disagreement between individuals from two different agencies about the handling of coding standards patches. I hope this has stopped now, but I shall conclude by adding this standard text created by the Drupal Community Health Team for use in situations like this:

Escalating emotions

This discussion appears to include escalating emotions, creating the opportunity for miscommunication. The invested parties are encouraged to take a break from this discussion to help gain perspective. It is important to the community that all members are shown the appropriate amount of respect and openness when working together. Additionally, there are resources offered by the Drupal community to aid conflict resolution should those be needed.

For more information, please refer to Drupal’s Values and Principles of seeking first to understand, then to be understood. Assume best intentions of other contributors and suspend judgment until you have invested time to understand decisions, ask questions, and listen. Before expressing a disagreement, make a serious attempt to understand the reasons behind the decision.

This comment is provided as a service (currently being tested) of the Drupal Community Health Team as part of a project to encourage all participants to engage in positive discourse. For more information, please visit https://www.drupal.org/project/drupal_cwg/issues/3129687

urvashi_vora’s picture

Assigned: urvashi_vora » Unassigned
Status: Needs work » Needs review
StatusFileSize
new19.35 KB

Hi,

Please review this patch.

Thanks

drupalmatts’s picture

Thanks I will review these asap and get a new release ready. I would also like to get this certified for a 1.0 release.

sidharth_soman’s picture

Assigned: Unassigned » sidharth_soman
Status: Needs review » Needs work

Hi @urvashi_vora,

Your patch applied cleanly. It has solved most of the coding standard issues. However, there are a few of them remaining shown below.

C:\xampp\htdocs\backendassignment\web\modules\contrib>phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml,twig sharpspring_crm-3292463

FILE: C:\xampp\htdocs\backendassignment\web\modules\contrib\sharpspring_crm-3292463\sharpspring_crm.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: C:\xampp\htdocs\backendassignment\web\modules\contrib\sharpspring_crm-3292463\src\Form\SharpSpringCrmConfigForm.php
-------------------------------------------------------------------------------------------------------------------------
FOUND 4 ERRORS AND 1 WARNING AFFECTING 5 LINES
-------------------------------------------------------------------------------------------------------------------------
  1 | ERROR   | [x] End of line character is invalid; expected "\n" but found "\r\n"
 19 | ERROR   | [ ] Public method name "SharpSpringCrmConfigForm::get_form_id" is not in lowerCamel format
 30 | ERROR   | [ ] Public method name "SharpSpringCrmConfigForm::get_editable_config_names" is not in lowerCamel format
 48 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency injection instead
 78 | ERROR   | [ ] Public method name "SharpSpringCrmConfigForm::submit_form" is not in lowerCamel format
-------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-------------------------------------------------------------------------------------------------------------------------


FILE: C:\xampp\htdocs\backendassignment\web\modules\contrib\sharpspring_crm-3292463\src\Plugin\WebformHandler\SharpSpringCrmLeadHandler.php
-------------------------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AND 2 WARNINGS AFFECTING 3 LINES
-------------------------------------------------------------------------------------------------------------------------------------------
  1 | ERROR   | [x] End of line character is invalid; expected "\n" but found "\r\n"
 56 | WARNING | [ ] Unused variable $config.
 82 | WARNING | [ ] Unused variable $key.
-------------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-------------------------------------------------------------------------------------------------------------------------------------------


FILE: C:\xampp\htdocs\backendassignment\web\modules\contrib\sharpspring_crm-3292463\src\Plugin\WebformHandler\SharpSpringCrmListHandler.php
-------------------------------------------------------------------------------------------------------------------------------------------
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: C:\xampp\htdocs\backendassignment\web\modules\contrib\sharpspring_crm-3292463\src\SharpSpringCrm.php
----------------------------------------------------------------------------------------------------------
FOUND 2 ERRORS AND 1 WARNING AFFECTING 3 LINES
----------------------------------------------------------------------------------------------------------
   1 | ERROR   | [x] End of line character is invalid; expected "\n" but found "\r\n"
  15 | ERROR   | [ ] Missing @var tag in member variable comment
 114 | WARNING | [ ] Unused variable $result.
----------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------------------------------------------

Time: 757ms; Memory: 6MB

I'll work on this.

sidharth_soman’s picture

Assigned: sidharth_soman » Unassigned
Status: Needs work » Needs review
StatusFileSize
new19.39 KB

Here is the updated patch. Please review.

hardikpandya’s picture

Assigned: Unassigned » hardikpandya
Status: Needs review » Needs work

The last applied patch is not applying.

error: patch failed: src/Plugin/WebformHandler/SharpSpringCrmLeadHandler.php:105
error: src/Plugin/WebformHandler/SharpSpringCrmLeadHandler.php: patch does not apply

I will work on fixing this.

hardikpandya’s picture

Status: Needs work » Needs review

Created MR that fixes all phpcs issues reported.

avpaderno’s picture

Title: phpcs drupal coding standard issues » Fix the issues reported by phpcs
Category: Bug report » Task
Status: Needs review » Needs work
Issue tags: +Coding standards, +Needs issue summary update

The issue summary should always describe what the issue is trying to fix and, in the case, of coding standards issues, show which command has been used, which arguments have been used, and which report that command shown.

hardikpandya’s picture

Issue summary: View changes
hardikpandya’s picture

Assigned: hardikpandya » Unassigned
Status: Needs work » Needs review
avpaderno’s picture

mahima_mathur23’s picture

Priority: Normal » Minor
cleavinjosh’s picture

Status: Needs review » Needs work

Hi @hardikpandya,

I tried to apply MR!1 but I encountered some errors.

➜  sharpspring_crm git:(1.0.x) curl https://git.drupalcode.org/project/sharpspring_crm/-/merge_requests/1.diff | patch -p1
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 19994    0 19994    0     0  50220      0 --:--:-- --:--:-- --:--:-- 50362
patching file sharpspring_crm.module
patching file src/Form/SharpSpringCrmConfigForm.php
patching file src/Plugin/WebformHandler/SharpSpringCrmLeadHandler.php
Hunk #6 FAILED at 98.
Hunk #7 succeeded at 117 (offset 4 lines).
Hunk #8 succeeded at 144 (offset 4 lines).
1 out of 8 hunks FAILED -- saving rejects to file src/Plugin/WebformHandler/SharpSpringCrmLeadHandler.php.rej
patching file src/Plugin/WebformHandler/SharpSpringCrmListHandler.php
patching file src/SharpSpringCrm.php
➜  sharpspring_crm git:(1.0.x) ✗
➜  sharpspring_crm git:(1.0.x) ✗
➜  sharpspring_crm git:(1.0.x) ✗ git restore .
➜  sharpspring_crm git:(1.0.x) ✗
➜  sharpspring_crm git:(1.0.x) ✗
➜  sharpspring_crm git:(1.0.x) ✗ curl https://git.drupalcode.org/project/sharpspring_crm/-/merge_requests/1.diff | git apply -v
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 19994    0 19994    0     0  37761      0 --:--:-- --:--:-- --:--:-- 37724
Checking patch sharpspring_crm.module...
Checking patch src/Form/SharpSpringCrmConfigForm.php...
Checking patch src/Plugin/WebformHandler/SharpSpringCrmLeadHandler.php...
error: while searching for:
  /**
   * {@inheritdoc}
   */
  public function submitConfigurationForm(array &$form, FormStateInterface $form_state): void
  {
    parent::submitConfigurationForm($form, $form_state);

    // Save Configurations for Handler
    $fields = $form_state->getValues()['sharpspring'];
    foreach($fields as $key => $field) {
      if(!empty($field)) {
        $this->configuration[$key] = $field;
      }
    }

error: patch failed: src/Plugin/WebformHandler/SharpSpringCrmLeadHandler.php:105
error: src/Plugin/WebformHandler/SharpSpringCrmLeadHandler.php: patch does not apply
Checking patch src/Plugin/WebformHandler/SharpSpringCrmListHandler.php...
Checking patch src/SharpSpringCrm.php...
➜  sharpspring_crm git:(1.0.x) ✗

Please check and advise.
Thank you.

avpaderno’s picture

Issue summary: View changes
cleavinjosh’s picture

Status: Needs work » Needs review

Hi,

Please review MR!3. Thank you.