Problem/Motivation

There are a few deprecated methods shown when checking with "drupal-check" utility:

------ ----------------------------------------------------------------------
Line modules/workflow_cleanup/src/Form/WorkflowCleanupSettingsForm.php
------ ----------------------------------------------------------------------
118 Call to deprecated function drupal_set_message():
in drupal:8.5.0 and is removed from drupal:9.0.0.
Use \Drupal\Core\Messenger\MessengerInterface::addMessage() instead.
126 Call to deprecated function drupal_set_message():
in drupal:8.5.0 and is removed from drupal:9.0.0.
Use \Drupal\Core\Messenger\MessengerInterface::addMessage() instead.
131 Call to deprecated function drupal_set_message():
in drupal:8.5.0 and is removed from drupal:9.0.0.
Use \Drupal\Core\Messenger\MessengerInterface::addMessage() instead.
------ ----------------------------------------------------------------------

------ -----------------------------------------------------------------------
Line modules/workflow_operations/src/Form/WorkflowTransitionRevertForm.php
------ -----------------------------------------------------------------------
38 Call to deprecated function drupal_set_message():
in drupal:8.5.0 and is removed from drupal:9.0.0.
Use \Drupal\Core\Messenger\MessengerInterface::addMessage() instead.
96 Call to deprecated function workflow_execute_transition():
D8: @see WorkflowManager::executeTransition().
99 Call to deprecated function drupal_set_message():
in drupal:8.5.0 and is removed from drupal:9.0.0.
Use \Drupal\Core\Messenger\MessengerInterface::addMessage() instead.
------ -----------------------------------------------------------------------

------ -------------------------------------------------------------------------------------
Line modules/workflow_ui/src/Controller/WorkflowListBuilder.php
------ -------------------------------------------------------------------------------------
45 Call to deprecated method getLabel() of class Drupal\Core\Entity\EntityListBuilder:
in drupal:8.0.0 and is removed from drupal:9.0.0.
Use $entity->label() instead. This method used to escape the entity
label. The render system's autoescape is now relied upon.
------ -------------------------------------------------------------------------------------

------ ----------------------------------------------------------------------
Line modules/workflow_ui/src/Controller/WorkflowStateListBuilder.php
------ ----------------------------------------------------------------------
271 Call to deprecated function drupal_set_message():
in drupal:8.5.0 and is removed from drupal:9.0.0.
Use \Drupal\Core\Messenger\MessengerInterface::addMessage() instead.
337 Call to deprecated function drupal_set_message():
in drupal:8.5.0 and is removed from drupal:9.0.0.
Use \Drupal\Core\Messenger\MessengerInterface::addMessage() instead.
342 Call to deprecated function drupal_set_message():
in drupal:8.5.0 and is removed from drupal:9.0.0.
Use \Drupal\Core\Messenger\MessengerInterface::addMessage() instead.
350 Call to deprecated function drupal_set_message():
in drupal:8.5.0 and is removed from drupal:9.0.0.
Use \Drupal\Core\Messenger\MessengerInterface::addMessage() instead.
377 Call to deprecated function drupal_set_message():
in drupal:8.5.0 and is removed from drupal:9.0.0.
Use \Drupal\Core\Messenger\MessengerInterface::addMessage() instead.
------ ----------------------------------------------------------------------

------ ----------------------------------------------------------------------
Line modules/workflow_ui/src/Form/WorkflowConfigTransitionFormBase.php
------ ----------------------------------------------------------------------
117 Call to deprecated function drupal_set_message():
in drupal:8.5.0 and is removed from drupal:9.0.0.
Use \Drupal\Core\Messenger\MessengerInterface::addMessage() instead.
------ ----------------------------------------------------------------------

------ ----------------------------------------------------------------------
Line modules/workflow_ui/src/Form/WorkflowConfigTransitionLabelForm.php
------ ----------------------------------------------------------------------
100 Call to deprecated function drupal_set_message():
in drupal:8.5.0 and is removed from drupal:9.0.0.
Use \Drupal\Core\Messenger\MessengerInterface::addMessage() instead.
------ ----------------------------------------------------------------------

------ ----------------------------------------------------------------------
Line modules/workflow_ui/src/Form/WorkflowConfigTransitionRoleForm.php
------ ----------------------------------------------------------------------
183 Call to deprecated function drupal_set_message():
in drupal:8.5.0 and is removed from drupal:9.0.0.
Use \Drupal\Core\Messenger\MessengerInterface::addMessage() instead.
------ ----------------------------------------------------------------------

------ ----------------------------------------------------------------------
Line modules/workflow_ui/workflow_ui.install
------ ----------------------------------------------------------------------
17 Call to deprecated function drupal_set_message():
in drupal:8.5.0 and is removed from drupal:9.0.0.
Use \Drupal\Core\Messenger\MessengerInterface::addMessage() instead.
------ ----------------------------------------------------------------------

------ ----------------------------------------------------------------------
Line src/Element/WorkflowTransitionElement.php
------ ----------------------------------------------------------------------
450 Call to deprecated function drupal_set_message():
in drupal:8.5.0 and is removed from drupal:9.0.0.
Use \Drupal\Core\Messenger\MessengerInterface::addMessage() instead.
------ ----------------------------------------------------------------------

------ ----------------------------------------------------------------------
Line src/Entity/Workflow.php
------ ----------------------------------------------------------------------
147 Call to deprecated function drupal_set_message():
in drupal:8.5.0 and is removed from drupal:9.0.0.
Use \Drupal\Core\Messenger\MessengerInterface::addMessage() instead.
174 Call to deprecated function drupal_set_message():
in drupal:8.5.0 and is removed from drupal:9.0.0.
Use \Drupal\Core\Messenger\MessengerInterface::addMessage() instead.
186 Call to deprecated function drupal_set_message():
in drupal:8.5.0 and is removed from drupal:9.0.0.
Use \Drupal\Core\Messenger\MessengerInterface::addMessage() instead.
287 Call to deprecated function drupal_set_message():
in drupal:8.5.0 and is removed from drupal:9.0.0.
Use \Drupal\Core\Messenger\MessengerInterface::addMessage() instead.
------ ----------------------------------------------------------------------

------ -------------------------------------------------------------------------
Line src/Entity/WorkflowManager.php
------ -------------------------------------------------------------------------
273 Call to deprecated function drupal_set_message():
in drupal:8.5.0 and is removed from drupal:9.0.0.
Use \Drupal\Core\Messenger\MessengerInterface::addMessage() instead.
313 Call to deprecated function db_update():
in drupal:8.0.0 and is removed from drupal:9.0.0. Instead, get
a database connection injected into your service from the container and
call update() on it. For example,
317 Call to deprecated function db_update():
in drupal:8.0.0 and is removed from drupal:9.0.0. Instead, get
a database connection injected into your service from the container and
call update() on it. For example,
------ -------------------------------------------------------------------------

------ ----------------------------------------------------------------------
Line src/Entity/WorkflowScheduledTransition.php
------ ----------------------------------------------------------------------
145 Call to deprecated function drupal_set_message():
in drupal:8.5.0 and is removed from drupal:9.0.0.
Use \Drupal\Core\Messenger\MessengerInterface::addMessage() instead.
------ ----------------------------------------------------------------------

------ ----------------------------------------------------------------------
Line src/Entity/WorkflowTransition.php
------ ----------------------------------------------------------------------
168 Call to deprecated function drupal_set_message():
in drupal:8.5.0 and is removed from drupal:9.0.0.
Use \Drupal\Core\Messenger\MessengerInterface::addMessage() instead.
320 Call to deprecated function drupal_set_message():
in drupal:8.5.0 and is removed from drupal:9.0.0.
Use \Drupal\Core\Messenger\MessengerInterface::addMessage() instead.
571 Call to deprecated function drupal_set_message():
in drupal:8.5.0 and is removed from drupal:9.0.0.
Use \Drupal\Core\Messenger\MessengerInterface::addMessage() instead.
1075 Calls to function dpm should not exist.
------ ----------------------------------------------------------------------

------ ----------------------------------------------------------------------
Line src/Form/WorkflowTypeForm.php
------ ----------------------------------------------------------------------
202 Call to deprecated function drupal_set_message():
in drupal:8.5.0 and is removed from drupal:9.0.0.
Use \Drupal\Core\Messenger\MessengerInterface::addMessage() instead.
------ ----------------------------------------------------------------------

------ ----------------------------------------------------------------------
Line src/Plugin/Action/WorkflowNodeGivenStateAction.php
------ ----------------------------------------------------------------------
71 Call to deprecated function drupal_set_message():
in drupal:8.5.0 and is removed from drupal:9.0.0.
Use \Drupal\Core\Messenger\MessengerInterface::addMessage() instead.
76 Call to deprecated function workflow_execute_transition():
D8: @see WorkflowManager::executeTransition().
------ ----------------------------------------------------------------------

------ ----------------------------------------------------------------------
Line src/Plugin/Action/WorkflowNodeNextStateAction.php
------ ----------------------------------------------------------------------
48 Call to deprecated function drupal_set_message():
in drupal:8.5.0 and is removed from drupal:9.0.0.
Use \Drupal\Core\Messenger\MessengerInterface::addMessage() instead.
68 Call to deprecated function workflow_execute_transition():
D8: @see WorkflowManager::executeTransition().
------ ----------------------------------------------------------------------

------ ----------------------------------------------------------------------
Line src/Plugin/Action/WorkflowStateActionBase.php
------ ----------------------------------------------------------------------
128 Call to deprecated function drupal_set_message():
in drupal:8.5.0 and is removed from drupal:9.0.0.
Use \Drupal\Core\Messenger\MessengerInterface::addMessage() instead.
------ ----------------------------------------------------------------------

------ ----------------------------------------------------------------------
Line src/Plugin/Field/FieldType/WorkflowItem.php
------ ----------------------------------------------------------------------
175 Call to deprecated function drupal_set_message():
in drupal:8.5.0 and is removed from drupal:9.0.0.
Use \Drupal\Core\Messenger\MessengerInterface::addMessage() instead.
192 Call to deprecated function drupal_set_message():
in drupal:8.5.0 and is removed from drupal:9.0.0.
Use \Drupal\Core\Messenger\MessengerInterface::addMessage() instead.
------ ----------------------------------------------------------------------

------ ----------------------------------------------------------------------
Line src/Plugin/Field/FieldWidget/WorkflowDefaultWidget.php
------ ----------------------------------------------------------------------
167 Call to deprecated function drupal_set_message():
in drupal:8.5.0 and is removed from drupal:9.0.0.
Use \Drupal\Core\Messenger\MessengerInterface::addMessage() instead.
------ ----------------------------------------------------------------------

------ ----------------------------------------------------------------------
Line workflow.install
------ ----------------------------------------------------------------------
18 Call to deprecated function drupal_set_message():
in drupal:8.5.0 and is removed from drupal:9.0.0.
Use \Drupal\Core\Messenger\MessengerInterface::addMessage() instead.
101 Call to deprecated function drupal_set_message():
in drupal:8.5.0 and is removed from drupal:9.0.0.
Use \Drupal\Core\Messenger\MessengerInterface::addMessage() instead.
------ ----------------------------------------------------------------------

------ ----------------------------------------------------------------------
Line workflow.module
------ ----------------------------------------------------------------------
712 Call to deprecated function drupal_set_message():
in drupal:8.5.0 and is removed from drupal:9.0.0.
Use \Drupal\Core\Messenger\MessengerInterface::addMessage() instead.
------ ----------------------------------------------------------------------

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

Comments

rajeevgole created an issue. See original summary.

gnanagowthaman sankar’s picture

Hi @rajeevgole,

Here by i attached the patch. Please review and let me know for changes.

Some Queries and Pending Items:

1075 Calls to function dpm should not exist. Whether you have installed devel module ?
Call to deprecated function workflow_execute_transition(): I missed this soon fix in next patch.

Thanks & Regards,
Gnanagowthaman sankar

gnanagowthaman sankar’s picture

Status: Active » Needs review
StatusFileSize
new26 KB

Patch

Thanks & Regards,
Gnanagowthaman sankar

jcnventura’s picture

Status: Needs review » Closed (duplicate)

As this needs work (misses the core_version_requirement), and someone missed the existing issue, I'm closing this. Please provide a new patch to #3077078: Drupal 9 Deprecated Code Report.

jcnventura’s picture