FILE: /var/www/html/drupal-contrib/modules/contrib/orejime/src/Form/OrejimeSettingsForm.php
----------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
----------------------------------------------------------------------------------------------
174 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
----------------------------------------------------------------------------------------------

FILE: /var/www/html/drupal-contrib/modules/contrib/orejime/src/Form/OrejimeForm.php
---------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 4 WARNINGS AFFECTING 4 LINES
---------------------------------------------------------------------------------------------
30 | WARNING | Unused variable $entity.
57 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
77 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
78 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
---------------------------------------------------------------------------------------------

FILE: /var/www/html/drupal-contrib/modules/contrib/orejime/src/Controller/OrejimeController.php
-----------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 3 WARNINGS AFFECTING 3 LINES
-----------------------------------------------------------------------------------------------
52 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
102 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
121 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
-----------------------------------------------------------------------------------------------

FILE: /var/www/html/drupal-contrib/modules/contrib/orejime/src/Entity/OrejimeInterface.php
------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
------------------------------------------------------------------------------------------
17 | WARNING | There must be no blank line following an inline comment
------------------------------------------------------------------------------------------

FILE: /var/www/html/drupal-contrib/modules/contrib/orejime/src/Services/OrejimeManager.php
---------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 2 LINES
---------------------------------------------------------------------------------------------
69 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
99 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
---------------------------------------------------------------------------------------------

FILE: /var/www/html/drupal-contrib/modules/contrib/orejime/orejime_service.page.inc
-----------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
-----------------------------------------------------------------------------------
24 | WARNING | Unused variable $orejime_service.
-----------------------------------------------------------------------------------

Comments

prabha1997 created an issue. See original summary.

prabha1997’s picture

Assigned: prabha1997 » Unassigned
Status: Needs work » Needs review
StatusFileSize
new14.82 KB

Kindly review patch

fabsgugu’s picture

Hello,

I tested the code, there are several errors on it

(For example, miss use symfony\Component\DependencyInjection\ContainerInterface; on OrejimeForm. i'v also Error: Call to a member function getTranslationFromContext() on null in Drupal\Core\Entity\ContentEntityForm->initFormLangcodes() (line 313 of core/lib/Drupal/Core/Entity/ContentEntityForm.php). on the service edit).

You should also use something other than QueryFactory which is deprecated.

fabsgugu’s picture

Status: Needs review » Needs work
prabha1997’s picture

Assigned: Unassigned » prabha1997
prabha1997’s picture

Assigned: prabha1997 » Unassigned
Status: Needs work » Needs review
StatusFileSize
new2.05 KB
new15 KB

@fabsgugu thanks for reviewing. here i upload a new patch kindly review patch

prabha1997’s picture

StatusFileSize
new2.43 KB
new15.11 KB

I forgot to change in some files. Here is new patch

fabsgugu’s picture

@prabha1997

There are always problems on the form edit page. I looked, I think it is the inherit of the constructor and of the funtion create the problem. You would have to make a call to the parent (and add $ entity_repository and $ entity_type_bundle_info in create/construct).
I have not looked on the other forms, but the problem may also be present.

fabsgugu’s picture

Status: Needs review » Needs work
fabsgugu’s picture

Assigned: Unassigned » fabsgugu

  • Fabsgugu committed c26b85f on 8.x-1.x
    Issue #3123737 by prabha1997, Fabsgugu: \Drupal calls should be avoided...
fabsgugu’s picture

Corrected then merged

fabsgugu’s picture

Status: Needs work » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.