Closed (fixed)
Project:
REST UI
Version:
8.x-1.x-dev
Component:
Code
Priority:
Critical
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
8 Jan 2014 at 09:49 UTC
Updated:
25 Jan 2014 at 21:20 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
pflame commentedI found that drupal_container function is used in multiple files when I add, edit resources. The comment has full patch which will replace the drupal_container with \Drupal::service()
Comment #2
klausido not use \Drupal in classes. All dependencies of a class should be passed into the constructor, if possible. ContainerInjectionInterface with public static function create(ContainerInterface $container) helps with that. Example: https://drupal.org/node/2060189
Comment #3
juampynr commentedCommitted @pflame's patch http://drupalcode.org/project/restui.git/commit/1a58a4d Thanks!
Also improved Dependency Injection in the module's classes as suggested by @klausi http://drupalcode.org/project/restui.git/commit/b5b176c.