- @sonal-gyanani opened merge request.
- Status changed to Needs work
4 months ago 7:56am 12 July 2024 - 🇮🇳India riddhi.addweb
I tried both the Patches [Mr7 & #2] but when the #2 patch was applied, it showed some errors. And MR7 was applied cleanly but errors are still not resolved. Also attaching screenshots.
MR7 Issue:-
FILE: /var/www/html/web/drupal10/web/modules/contrib/bitly_shortener/bitly_shortener.links.menu.yml --------------------------------------------------------------------------------------------------- FOUND 1 ERROR AFFECTING 1 LINE --------------------------------------------------------------------------------------------------- 5 | ERROR | [x] Expected 1 newline at end of file; 2 found --------------------------------------------------------------------------------------------------- PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY --------------------------------------------------------------------------------------------------- FILE: /var/www/html/web/drupal10/web/modules/contrib/bitly_shortener/src/Plugin/Block/BitlyShortenerBlock.php ------------------------------------------------------------------------------------------------------------------------------------------------------------ FOUND 1 ERROR AND 2 WARNINGS AFFECTING 3 LINES ------------------------------------------------------------------------------------------------------------------------------------------------------------ 8 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\bitly_shortener\Services\BitlyShortenerServicesInterface. 60 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency injection instead 61 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency injection instead ------------------------------------------------------------------------------------------------------------------------------------------------------------ PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY ------------------------------------------------------------------------------------------------------------------------------------------------------------ FILE: /var/www/html/web/drupal10/web/modules/contrib/bitly_shortener/src/Services/BitlyShortenerTwigServices.php ---------------------------------------------------------------------------------------------------------------- FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE ---------------------------------------------------------------------------------------------------------------- 37 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead ---------------------------------------------------------------------------------------------------------------- FILE: /var/www/html/web/drupal10/web/modules/contrib/bitly_shortener/src/Services/BitlyShortenerServices.php ------------------------------------------------------------------------------------------------------------ FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE ------------------------------------------------------------------------------------------------------------ 68 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead ------------------------------------------------------------------------------------------------------------ FILE: /var/www/html/web/drupal10/web/modules/contrib/bitly_shortener/src/Form/BitlyShortenerSettingsForm.php ----------------------------------------------------------------------------------------------------------------------------------------- FOUND 0 ERRORS AND 6 WARNINGS AFFECTING 5 LINES ----------------------------------------------------------------------------------------------------------------------------------------- 33 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead 34 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead 47 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead 72 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead 84 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead 84 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead ----------------------------------------------------------------------------------------------------------------------------------------- FILE: /var/www/html/web/drupal10/web/modules/contrib/bitly_shortener/css/bitly-shortener.css -------------------------------------------------------------------------------------------- FOUND 1 ERROR AFFECTING 1 LINE -------------------------------------------------------------------------------------------- 1 | ERROR | [x] Expected 1 newline at end of file; 0 found -------------------------------------------------------------------------------------------- PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY -------------------------------------------------------------------------------------------- FILE: /var/www/html/web/drupal10/web/modules/contrib/bitly_shortener/bitly_shortener.info.yml --------------------------------------------------------------------------------------------- FOUND 1 ERROR AFFECTING 1 LINE --------------------------------------------------------------------------------------------- 5 | ERROR | [x] Expected 1 newline at end of file; 2 found --------------------------------------------------------------------------------------------- PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY ---------------------------------------------------------------------------------------------
#2 Patch Error:-
Checking patch js/bitly-shortener.js...
error: while searching for:
function bitlyShortenerOutFunc() {
let tooltip = document.getElementById("shortener-tooltip-text");
tooltip.innerHTML = "Copy to clipboard";
}
error: patch failed: js/bitly-shortener.js:17
error: js/bitly-shortener.js: patch does not apply
Checking patch src/Form/BitlyShortenerSettingsForm.php...
error: while searching for:
use Symfony\Component\DependencyInjection\ContainerInterface;/**
* Class BitlyShortenerSettingsForm.
*
* @package Drupal\bitly_shortener\Form
*/error: patch failed: src/Form/BitlyShortenerSettingsForm.php:7
error: src/Form/BitlyShortenerSettingsForm.php: patch does not apply
Checking patch src/Services/BitlyShortenerServices.php...
error: while searching for:
use Drupal\Core\Messenger\MessengerInterface;/**
* BitlyShortenerServices.
*/
class BitlyShortenerServices implements BitlyShortenerServicesInterface {error: patch failed: src/Services/BitlyShortenerServices.php:7
error: src/Services/BitlyShortenerServices.php: patch does not apply
Checking patch src/Services/BitlyShortenerServicesInterface.php...
Checking patch src/Services/BitlyShortenerTwigServices.php...
error: while searching for:/**
* {@inheritdoc}
* Return your twig function.
*/
public function getFunctions(): array {error: patch failed: src/Services/BitlyShortenerTwigServices.php:36
error: src/Services/BitlyShortenerTwigServices.php: patch does not apply - Assigned to radheymkumar
- Status changed to Fixed
4 months ago 6:22am 14 July 2024