- Issue created by @kaszarobert
- Assigned to Shreya_98
- Issue was unassigned.
- Status changed to Needs review
about 1 year ago 11:41am 14 September 2023 - 🇮🇳India Shreya_98
@kaszarobert I have fixed all the code style issues successfully .Kindly review the patch file as well as attached screenshot .
- Status changed to Needs work
about 1 year ago 2:21am 15 September 2023 - 🇵🇭Philippines clarkssquared
Hi Shreya_th,
I applied your patch #3 into my local but your patch fails to apply and below is the output that is shown in my terminal:
100 6134 100 6134 0 0 840 0 0:00:07 0:00:07 --:--:-- 1379 Checking patch commerce_user_points.info.yml... error: while searching for: type: module description: 'Provides User Points functionality with Commerce.' package: Commerce (contrib) dependencies: - drupal:commerce configure: commerce_user_points.admin_settings core: '8.x' error: patch failed: commerce_user_points.info.yml:2 error: commerce_user_points.info.yml: patch does not apply Checking patch commerce_user_points.module... warning: commerce_user_points.module has type 100755, expected 100644 error: while searching for: switch ($key) { case 'commerce_user_points': $message['from'] = \Drupal::config('system.site')->get('mail'); $message['subject'] = t($params['subject']); $message['body'][] = $params['message']; break; } error: patch failed: commerce_user_points.module:92 error: commerce_user_points.module: patch does not apply Checking patch src/EventSubscriber/OrderCompleteSubscriber.php... warning: src/EventSubscriber/OrderCompleteSubscriber.php has type 100755, expected 100644 error: while searching for: namespace Drupal\commerce_user_points\EventSubscriber; use Symfony\Component\EventDispatcher\EventSubscriberInterface; use Drupal\state_machine\Event\WorkflowTransitionEvent; use Drupal\Core\Entity\EntityTypeManager; /** * Class OrderCompleteSubscriber. * * @package Drupal\commerce_user_points */ error: patch failed: src/EventSubscriber/OrderCompleteSubscriber.php:2 error: src/EventSubscriber/OrderCompleteSubscriber.php: patch does not apply Checking patch src/Form/UserPointsConfigurationForm.php... warning: src/Form/UserPointsConfigurationForm.php has type 100755, expected 100644 error: while searching for: namespace Drupal\commerce_user_points\Form; use Drupal\Core\Form\ConfigFormBase; use Symfony\Component\HttpFoundation\Request; use Drupal\Core\Form\FormStateInterface; /** * Defines a form that configures forms module settings. error: patch failed: src/Form/UserPointsConfigurationForm.php:3 error: src/Form/UserPointsConfigurationForm.php: patch does not apply Checking patch src/Plugin/Commerce/CheckoutPane/CommerceUserPoints.php... warning: src/Plugin/Commerce/CheckoutPane/CommerceUserPoints.php has type 100755, expected 100644 error: while searching for: namespace Drupal\commerce_user_points\Plugin\Commerce\CheckoutPane; use Drupal\commerce_store\Entity\Store; use Drupal\commerce_product\Entity\Product; use Drupal\commerce_checkout\Plugin\Commerce\CheckoutPane\CheckoutPaneBase; use Drupal\commerce_checkout\Plugin\Commerce\CheckoutPane\CheckoutPaneInterface; use Drupal\Core\Form\FormStateInterface; use Drupal\commerce_order\Adjustment; use Drupal\commerce_price\Price; /** * Provides the CommerceUserPoints. error: patch failed: src/Plugin/Commerce/CheckoutPane/CommerceUserPoints.php:2 error: src/Plugin/Commerce/CheckoutPane/CommerceUserPoints.php: patch does not apply
Please also look at the screenshot I attached for your refrerence.
Thank you
- Assigned to Shreya_98
- First commit to issue fork.
- Issue was unassigned.
- Status changed to Needs review
about 1 year ago 1:33pm 19 September 2023 - 🇮🇳India shubham_jain
Hi, I have raised new PR as the patch provided by @shreya_th did not included all the fixes and was unable to apply.
Please review and verify.
- Status changed to Needs work
8 months ago 7:42am 18 March 2024 - 🇮🇳India Ashutosh Ahirwal India
Hi have reviewed the MR but its still showing so many errors.
moving to need workUsed command
./vendor/bin/phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,info,txt,md,css,js,yml web/modules/custom/commerceuserpointsFILE: /Users/ashutoshahirwal/Sites/lando/contribution/web/modules/custom/commerceuserpoints/commerce_user_points.info.yml
-------------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 4 WARNINGS AFFECTING 2 LINES
-------------------------------------------------------------------------------------------------------------------------
1 | WARNING | Remove "project" from the info file, it will be added by drupal.org packaging automatically
1 | WARNING | Remove "datestamp" from the info file, it will be added by drupal.org packaging automatically
1 | WARNING | Remove "version" from the info file, it will be added by drupal.org packaging automatically
6 | WARNING | All dependencies must be prefixed with the project name, for example "drupal:"
-------------------------------------------------------------------------------------------------------------------------FILE: /Users/ashutoshahirwal/Sites/lando/contribution/web/modules/custom/commerceuserpoints/commerce_user_points.module
-----------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 2 LINES
-----------------------------------------------------------------------------------------------------------------------
38 | WARNING | Unused variable $role_order_point_discount.
39 | WARNING | Unused variable $role_date_discount.
-----------------------------------------------------------------------------------------------------------------------FILE: /Users/ashutoshahirwal/Sites/lando/contribution/web/modules/custom/commerceuserpoints/src/Form/ReferralPointsConfigurationForm.php
------------------------------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 6 WARNINGS AFFECTING 6 LINES
------------------------------------------------------------------------------------------------------------------------------------------
63 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
76 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
89 | WARNING | Role::loadMultiple calls should be avoided in classes, use dependency injection instead
107 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
119 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
143 | WARNING | Role::loadMultiple calls should be avoided in classes, use dependency injection instead
------------------------------------------------------------------------------------------------------------------------------------------FILE: /Users/ashutoshahirwal/Sites/lando/contribution/web/modules/custom/commerceuserpoints/src/Form/ThresholdAmountConfigurationForm.php
------------------------------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 7 WARNINGS AFFECTING 7 LINES
------------------------------------------------------------------------------------------------------------------------------------------
63 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
71 | WARNING | Role::loadMultiple calls should be avoided in classes, use dependency injection instead
74 | WARNING | Unused variable $roles_field.
97 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
105 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
107 | WARNING | Unused variable $roleDetails.
127 | WARNING | Role::loadMultiple calls should be avoided in classes, use dependency injection instead
------------------------------------------------------------------------------------------------------------------------------------------FILE: /Users/ashutoshahirwal/Sites/lando/contribution/web/modules/custom/commerceuserpoints/src/Form/UserPointsConfigurationForm.php
------------------------------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 24 WARNINGS AFFECTING 24 LINES
------------------------------------------------------------------------------------------------------------------------------------------
82 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
83 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
92 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
93 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
94 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
95 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
96 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
97 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
98 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
103 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
105 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
123 | WARNING | Role::loadMultiple calls should be avoided in classes, use dependency injection instead
159 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
160 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
169 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
170 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
171 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
172 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
173 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
174 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
175 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
180 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
182 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
215 | WARNING | Role::loadMultiple calls should be avoided in classes, use dependency injection instead
------------------------------------------------------------------------------------------------------------------------------------------FILE: /Users/ashutoshahirwal/Sites/lando/contribution/web/modules/custom/commerceuserpoints/src/Plugin/Commerce/CheckoutPane/CommerceUserPoints.php
---------------------------------------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 10 WARNINGS AFFECTING 10 LINES
---------------------------------------------------------------------------------------------------------------------------------------------------
115 | WARNING | Unused variable $roles.
116 | WARNING | Unused variable $role.
136 | 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
150 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
152 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
177 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
277 | WARNING | Unused variable $paymentInformation.
361 | WARNING | Unused variable $key.
416 | WARNING | Unused variable $nodeId.
---------------------------------------------------------------------------------------------------------------------------------------------------FILE: /Users/ashutoshahirwal/Sites/lando/contribution/web/modules/custom/commerceuserpoints/src/Plugin/Block/ReferralLinkBlock.php
----------------------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 2 LINES
----------------------------------------------------------------------------------------------------------------------------------
37 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
39 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
----------------------------------------------------------------------------------------------------------------------------------FILE: /Users/ashutoshahirwal/Sites/lando/contribution/web/modules/custom/commerceuserpoints/src/Controller/ReferralLink.php
---------------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 6 WARNINGS AFFECTING 6 LINES
---------------------------------------------------------------------------------------------------------------------------
19 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
21 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
24 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
29 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
32 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
35 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
---------------------------------------------------------------------------------------------------------------------------FILE: /Users/ashutoshahirwal/Sites/lando/contribution/web/modules/custom/commerceuserpoints/src/EventSubscriber/OrderCompleteSubscriber.php
-------------------------------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 6 WARNINGS AFFECTING 6 LINES
-------------------------------------------------------------------------------------------------------------------------------------------
63 | WARNING | Unused variable $userPoints.
70 | WARNING | Unused variable $userPoints.
78 | WARNING | Unused variable $orderTotal.
80 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
81 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
82 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
-------------------------------------------------------------------------------------------------------------------------------------------FILE: /Users/ashutoshahirwal/Sites/lando/contribution/web/modules/custom/commerceuserpoints/src/ReferralLinkService.php
-----------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 4 WARNINGS AFFECTING 4 LINES
-----------------------------------------------------------------------------------------------------------------------
17 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
28 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
46 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
49 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
-----------------------------------------------------------------------------------------------------------------------Time: 467ms; Memory: 12MB
- First commit to issue fork.
- Assigned to akshaydalvi212
- Issue was unassigned.
- Status changed to Needs review
8 months ago 6:43pm 18 March 2024 - 🇮🇳India akshaydalvi212
Updated the code and raised the PR.
only unused variable warnings remain.
kindly review the PR changes. - Assigned to nitin_lama
- 🇮🇳India nitin_lama India
Only remaining issue:
FILE: /contribution/commerceuserpoints-3374300/src/EventSubscriber/OrderCompleteSubscriber.php -------------------------------------------------------------------------------------------------------------------- FOUND 0 ERRORS AND 3 WARNINGS AFFECTING 3 LINES -------------------------------------------------------------------------------------------------------------------- 74 | WARNING | Unused variable $userPoints. 81 | WARNING | Unused variable $userPoints. 89 | WARNING | Unused variable $orderTotal. -------------------------------------------------------------------------------------------------------------------- Time: 110ms; Memory: 8MB
- Issue was unassigned.
- Status changed to Needs work
8 months ago 10:12am 19 March 2024 - 🇧🇪Belgium BramDriesen Belgium 🇧🇪
Many meaningless comments are being added in the MR. When adding a code comment it should clarify something or add value to the user reading the code.
- Assigned to akshaydalvi212
- Issue was unassigned.
- Status changed to Needs review
8 months ago 12:28pm 19 March 2024 - 🇮🇳India akshaydalvi212
Updated the comments and removed the mentioned code.
kindly review the PR. - Status changed to Fixed
5 months ago 1:51pm 18 June 2024 - 🇮🇳India jigish.addweb
Thanks for the help these issues has been resolved in new alpha release, if you still see these errors please create a new issue against 3.x branch.
Automatically closed - issue fixed for 2 weeks with no activity.