- Issue created by @aman_lnwebworks
- Gaurav Gupta Jaipur, Rajasthsan
Gaurav Gupta โ made their first commit to this issueโs fork.
- Status changed to Needs review
7 months ago 7:01am 13 December 2023 - Status changed to Needs work
6 months ago 8:19am 14 December 2023 - ๐ต๐ญPhilippines clarkssquared
Hi
I applied MR !1 and I noticed that there is a file that the patch fails to apply
โ md_slider git:(master) โ curl https://git.drupalcode.org/project/md_slider/-/merge_requests/1.diff | patch -p1 % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 155k 0 155k 0 0 225k 0 --:--:-- --:--:-- --:--:-- 228k patching file md_slider.install patching file md_slider.module patching file 'src/Ajax/ImageDialogSave.php' patching file 'src/Controller/MDSliderController.php' patching file 'src/Form/MDSliderCloneForm.php' patching file 'src/Form/MDSliderConfigForm.php' patching file 'src/Form/MDSliderDeleteForm.php' patching file 'src/Form/MDSliderEditForm.php' patching file 'src/Form/MDSliderExportForm.php' patching file 'src/Form/MDSliderImageForm.php' patching file 'src/Form/MDSliderImportForm.php' patching file 'src/MDCommon.php' patching file 'src/MDSlide.php' patching file 'src/MDSlider.php' patching file 'src/MDSliderDataBase.php' patching file 'src/MDSliderInterface.php' patching file 'src/Plugin/Block/MDSliderBlock.php' patching file 'src/Plugin/Derivative/MDSliderBlock.php' patching file 'src/Plugin/Field/FieldFormatter/MDSliderFormatter.php' patching file 'src/Plugin/Field/FieldType/FieldMDSlider.php' patching file 'src/Plugin/Field/FieldWidget/MDSliderWidget.php' patching file 'src/Slider/MDSliderExport.php' patching file 'src/Slider/MDSliderImport.php' 1 out of 5 hunks failed--saving rejects to 'src/Slider/MDSliderImport.php.rej' patching file 'src/Slider/MDSliderRenderCss.php' patching file 'src/Slider/MDSliderZip.php' โ md_slider git:(master) โ
I also checked the PHPCS issues and there are so many issues that the PHPCS flagged, below is the preview of what are the errors I couldn't add the whole errors because it is too many.
FILE: /Users/clarksubing-subing/Projects/d9/d9-local/web/modules/contrib/md_slider/src/Slider/MDSliderExport.php -------------------------------------------------------------------------------------------------------------------------------------------- FOUND 5 ERRORS AFFECTING 5 LINES -------------------------------------------------------------------------------------------------------------------------------------------- 51 | ERROR | unserialize() is insecure unless allowed classes are limited. Use a safe format like JSON or use the allowed_classes option. 57 | ERROR | unserialize() is insecure unless allowed classes are limited. Use a safe format like JSON or use the allowed_classes option. 58 | ERROR | unserialize() is insecure unless allowed classes are limited. Use a safe format like JSON or use the allowed_classes option. 112 | ERROR | The array declaration extends to column 96 (the limit is 80). The array content should be split up over multiple lines 121 | ERROR | Public method name "MDSliderExport::exportMDSlider" is not in lowerCamel format -------------------------------------------------------------------------------------------------------------------------------------------- FILE: /Users/clarksubing-subing/Projects/d9/d9-local/web/modules/contrib/md_slider/src/Controller/MDSliderController.php -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- FOUND 17 ERRORS AND 10 WARNINGS AFFECTING 24 LINES -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 23 | ERROR | Public method name "MDSliderController::listMDSlider" is not in lowerCamel format 78 | ERROR | Public method name "MDSliderController::configMDSlider" is not in lowerCamel format 81 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead 95 | ERROR | Public method name "MDSliderController::editMDSlider" is not in lowerCamel format 98 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead 116 | ERROR | The $_POST super global must not be accessed directly; inject the request_stack service and use $stack->getCurrentRequest()->request->get('action') instead 122 | ERROR | The $_POST super global must not be accessed directly; inject the request_stack service and use $stack->getCurrentRequest()->request->get('fid') instead 123 | ERROR | The $_POST super global must not be accessed directly; inject the request_stack service and use $stack->getCurrentRequest()->request->get('fid') instead 126 | ERROR | The $_POST super global must not be accessed directly; inject the request_stack service and use $stack->getCurrentRequest()->request->get('slider_id') instead 127 | ERROR | The $_POST super global must not be accessed directly; inject the request_stack service and use $stack->getCurrentRequest()->request->get('slider_id') instead 135 | WARNING | File::load calls should be avoided in classes, use dependency injection instead 137 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead 138 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead 145 | ERROR | The $_POST super global must not be accessed directly; inject the request_stack service and use $stack->getCurrentRequest()->request->get('url') instead 145 | ERROR | The $_POST super global must not be accessed directly; inject the request_stack service and use $stack->getCurrentRequest()->request->get('url') instead 147 | ERROR | The $_POST super global must not be accessed directly; inject the request_stack service and use $stack->getCurrentRequest()->request->get('url') instead 154 | ERROR | The $_POST super global must not be accessed directly; inject the request_stack service and use $stack->getCurrentRequest()->request->get('sid') instead 172 | ERROR | The $_POST super global must not be accessed directly; inject the request_stack service and use $stack->getCurrentRequest()->request->get('action') instead 178 | ERROR | The $_POST super global must not be accessed directly; inject the request_stack service and use $stack->getCurrentRequest()->request->get('change') instead 180 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead 194 | ERROR | The $_POST super global must not be accessed directly; inject the request_stack service and use $stack->getCurrentRequest()->request->get('path') instead 194 | ERROR | The $_POST super global must not be accessed directly; inject the request_stack service and use $stack->getCurrentRequest()->request->get('path') instead 194 | ERROR | The $_POST super global must not be accessed directly; inject the request_stack service and use $stack->getCurrentRequest()->request->get('path') instead 200 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead 204 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead 218 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead 219 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- FILE: /Users/clarksubing-subing/Projects/d9/d9-local/web/modules/contrib/md_slider/src/MDSlider.php ------------------------------------------------------------------------------------------------------------------------------------------- FOUND 1 ERROR AFFECTING 1 LINE ------------------------------------------------------------------------------------------------------------------------------------------- 66 | ERROR | unserialize() is insecure unless allowed classes are limited. Use a safe format like JSON or use the allowed_classes option. ------------------------------------------------------------------------------------------------------------------------------------------- Time: 1.5 secs; Memory: 22MB โ contrib git:(master) โ
- Status changed to Needs review
6 months ago 8:51am 14 December 2023 - Assigned to nitin_lama
- Issue was unassigned.
- Status changed to Needs work
6 months ago 9:50am 14 December 2023 - ๐ฎ๐นItaly apaderno Brescia, ๐ฎ๐น
Why is only one of the Drupal rulesets used? There is also the DrupalPractice one, which would report more warnings/errors.
- ๐ฎ๐ณIndia priya_07_
priya_07_ โ changed the visibility of the branch 3406124- to hidden.
- ๐ฎ๐ณIndia priya_07_
priya_07_ โ changed the visibility of the branch 3406124- to active.
- Status changed to Needs review
2 months ago 12:10pm 16 April 2024 - Status changed to Needs work
2 months ago 3:20pm 19 April 2024 - ๐ต๐ญPhilippines paraderojether
Hi
I reviewed MR!3, applied against Mega Slider 1.5.4, confirmed the patch applied however there are still phpcs that are not fixed.
Kindly check and advise, please.
Thank you. - Status changed to Needs review
29 days ago 9:54am 28 May 2024 - Gaurav Gupta Jaipur, Rajasthsan
Solve the phpcs issue and check the pipeline.
Showing no phpcs error.