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)

Files: 
CommentFileSizeAuthor
#9 2003616-replace-drupal_container-editor-module.patch3.71 KBDmitryDrozdik
PASSED: [[SimpleTest]]: [MySQL] 55,467 pass(es).
[ View ]
#3 2003616-replace-drupal_container-editor-module.patch3.7 KBDmitryDrozdik
PASSED: [[SimpleTest]]: [MySQL] 55,866 pass(es).
[ View ]
#1 2003616-1.patch3.71 KBebeyrent
FAILED: [[SimpleTest]]: [MySQL] Repository checkout: failed to checkout from [git://git.drupal.org/project/drupal.git].
[ View ]

Comments

ebeyrent’s picture

Status:Active» Needs review
StatusFileSize
new3.71 KB
FAILED: [[SimpleTest]]: [MySQL] Repository checkout: failed to checkout from [git://git.drupal.org/project/drupal.git].
[ View ]

Status:Needs review» Needs work

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

DmitryDrozdik’s picture

Assigned:ebeyrent» DmitryDrozdik
Status:Needs work» Needs review
Issue tags:+CodeSprintUA
StatusFileSize
new3.7 KB
PASSED: [[SimpleTest]]: [MySQL] 55,866 pass(es).
[ View ]
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()?

DmitryDrozdik’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

DmitryDrozdik’s picture

Status:Reviewed & tested by the community» Needs review
StatusFileSize
new3.71 KB
PASSED: [[SimpleTest]]: [MySQL] 55,467 pass(es).
[ View ]

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!

DmitryDrozdik’s picture

Status:Fixed» Closed (fixed)