drupal_container() is deprecated, and all calls in the editor module need to be replaced with Drupal::service(), except for where the module_handler service is requested, which needs to be replaced with Drupal::moduleHandler() (see #1957154)

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

ebeyrent’s picture

Status: Active » Needs review
FileSize
3.71 KB

Status: Needs review » Needs work

The last submitted patch, 2003616-1.patch, failed testing.

ddrozdik’s picture

Assigned: ebeyrent » ddrozdik
Status: Needs work » Needs review
Issue tags: +CodeSprintUA
FileSize
3.7 KB
podarok’s picture

Status: Needs review » Reviewed & tested by the community

#3 clean conversion
RTBC

ebeyrent’s picture

+++ b/core/modules/editor/editor.module
@@ -130,7 +130,7 @@ function editor_form_filter_admin_overview_alter(&$form, $form_state) {
+  $editors = Drupal::service('plugin.manager.editor')->getDefinitions();

Should be \Drupal::service()?

+++ b/core/modules/editor/editor.module
@@ -324,7 +324,7 @@ function editor_pre_render_format($element) {
+  $manager = Drupal::service('plugin.manager.editor');

Should be \Drupal::service()?

ddrozdik’s picture

I just think we loosely agreed on omitting in procedural code, but It's not wrong in any way though.

ebeyrent’s picture

We should be consistent then, especially in the same piece of code.

ParisLiakos’s picture

leading backslash is only needed for namespaced code.
any code in .module files is not

ddrozdik’s picture

Status: Reviewed & tested by the community » Needs review
FileSize
3.71 KB

reroll patch

ParisLiakos’s picture

Status: Needs review » Reviewed & tested by the community
webchick’s picture

Status: Reviewed & tested by the community » Fixed

Committed and pushed to 8.x. Thanks!

ddrozdik’s picture

Status: Fixed » Closed (fixed)