ImageStyle::loadMultiple calls should be avoided in classes, use dependency injection instead

Created on 14 June 2022, over 2 years ago
Updated 20 May 2024, 7 months ago

$ phpcs --standard=Drupalpractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml advanced_pwa/

FILE: C:\xampp\htdocs\contribution\web\modules\contrib\advanced_pwa\src\Controller\AdvancedpwaController.php
---------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 3 WARNINGS AFFECTING 3 LINES
---------------------------------------------------------------------------------------------------------------
203 | WARNING | ImageStyle::loadMultiple calls should be avoided in classes, use dependency injection instead
207 | WARNING | ImageStyle::load calls should be avoided in classes, use dependency injection instead
222 | WARNING | ImageStyle::load calls should be avoided in classes, use dependency injection instead
---------------------------------------------------------------------------------------------------------------

📌 Task
Status

Closed: duplicate

Version

1.0

Component

Code

Created by

🇮🇳India Rakhi Soni

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • 🇮🇳India arpitk

    Hi the patch #2 applied cleanly no more ImageStyle::loadMultiple calls should be avoided in classes, use dependency injection instead error reported. Moving it to RTBC

    Thanks!

    • gMaximus committed 00ceca96 on 8.x-1.x
      Issue #3285586 by Rakhi Soni, arpitk:  ImageStyle::loadMultiple calls...
  • Status changed to Closed: duplicate 7 months ago
  • 🇬🇧United Kingdom gMaximus

    This caused errors when saving the push notifications settings page. There are a few reports of the dependency injection. I'm closing this to focus efforts in one place.

    Your help would be appreciated.

Production build 0.71.5 2024