------ ----------------------------------------------------------------------
Line modules/workflow_cleanup/src/Form/WorkflowCleanupSettingsForm.php
------ ----------------------------------------------------------------------
122 Call to deprecated function drupal_set_message():
in Drupal 8.5.0 and will be removed before Drupal 9.0.0.
Use \Drupal\Core\Messenger\MessengerInterface::addMessage() instead.
130 Call to deprecated function drupal_set_message():
in Drupal 8.5.0 and will be removed before Drupal 9.0.0.
Use \Drupal\Core\Messenger\MessengerInterface::addMessage() instead.
135 Call to deprecated function drupal_set_message():
in Drupal 8.5.0 and will be removed before 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 will be removed before Drupal 9.0.0.
Use \Drupal\Core\Messenger\MessengerInterface::addMessage() instead.
99 Call to deprecated function drupal_set_message():
in Drupal 8.5.0 and will be removed before 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.x, will be removed before 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
------ ----------------------------------------------------------------------
308 Call to deprecated function drupal_set_message():
in Drupal 8.5.0 and will be removed before Drupal 9.0.0.
Use \Drupal\Core\Messenger\MessengerInterface::addMessage() instead.
313 Call to deprecated function drupal_set_message():
in Drupal 8.5.0 and will be removed before Drupal 9.0.0.
Use \Drupal\Core\Messenger\MessengerInterface::addMessage() instead.
318 Call to deprecated function drupal_set_message():
in Drupal 8.5.0 and will be removed before Drupal 9.0.0.
Use \Drupal\Core\Messenger\MessengerInterface::addMessage() instead.
326 Call to deprecated function drupal_set_message():
in Drupal 8.5.0 and will be removed before Drupal 9.0.0.
Use \Drupal\Core\Messenger\MessengerInterface::addMessage() instead.
354 Call to deprecated function drupal_set_message():
in Drupal 8.5.0 and will be removed before Drupal 9.0.0.
Use \Drupal\Core\Messenger\MessengerInterface::addMessage() instead.
367 Call to deprecated function drupal_set_message():
in Drupal 8.5.0 and will be removed before 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 will be removed before 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 will be removed before 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 will be removed before 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 will be removed before Drupal 9.0.0.
Use \Drupal\Core\Messenger\MessengerInterface::addMessage() instead.
------ ----------------------------------------------------------------------
------ ----------------------------------------------------------------------
Line src/Element/WorkflowTransitionElement.php
------ ----------------------------------------------------------------------
430 Call to deprecated function drupal_set_message():
in Drupal 8.5.0 and will be removed before Drupal 9.0.0.
Use \Drupal\Core\Messenger\MessengerInterface::addMessage() instead.
------ ----------------------------------------------------------------------
------ ----------------------------------------------------------------------
Line src/Entity/Workflow.php
------ ----------------------------------------------------------------------
160 Call to deprecated function drupal_set_message():
in Drupal 8.5.0 and will be removed before Drupal 9.0.0.
Use \Drupal\Core\Messenger\MessengerInterface::addMessage() instead.
187 Call to deprecated function drupal_set_message():
in Drupal 8.5.0 and will be removed before Drupal 9.0.0.
Use \Drupal\Core\Messenger\MessengerInterface::addMessage() instead.
199 Call to deprecated function drupal_set_message():
in Drupal 8.5.0 and will be removed before Drupal 9.0.0.
Use \Drupal\Core\Messenger\MessengerInterface::addMessage() instead.
301 Call to deprecated function drupal_set_message():
in Drupal 8.5.0 and will be removed before Drupal 9.0.0.
Use \Drupal\Core\Messenger\MessengerInterface::addMessage() instead.
------ ----------------------------------------------------------------------
------ ----------------------------------------------------------------------
Line src/Entity/WorkflowManager.php
------ ----------------------------------------------------------------------
270 Call to deprecated function drupal_set_message():
in Drupal 8.5.0 and will be removed before Drupal 9.0.0.
Use \Drupal\Core\Messenger\MessengerInterface::addMessage() instead.
------ ----------------------------------------------------------------------
------ ----------------------------------------------------------------------
Line src/Entity/WorkflowScheduledTransition.php
------ ----------------------------------------------------------------------
145 Call to deprecated function drupal_set_message():
in Drupal 8.5.0 and will be removed before 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 will be removed before Drupal 9.0.0.
Use \Drupal\Core\Messenger\MessengerInterface::addMessage() instead.
306 Call to deprecated function drupal_set_message():
in Drupal 8.5.0 and will be removed before Drupal 9.0.0.
Use \Drupal\Core\Messenger\MessengerInterface::addMessage() instead.
562 Call to deprecated function drupal_set_message():
in Drupal 8.5.0 and will be removed before Drupal 9.0.0.
Use \Drupal\Core\Messenger\MessengerInterface::addMessage() instead.
1065 Calls to function dpm should not exist.
------ ----------------------------------------------------------------------
------ ----------------------------------------------------------------------
Line src/Form/WorkflowTypeForm.php
------ ----------------------------------------------------------------------
233 Call to deprecated function drupal_set_message():
in Drupal 8.5.0 and will be removed before 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 will be removed before Drupal 9.0.0.
Use \Drupal\Core\Messenger\MessengerInterface::addMessage() instead.
------ ----------------------------------------------------------------------
------ ----------------------------------------------------------------------
Line src/Plugin/Action/WorkflowNodeNextStateAction.php
------ ----------------------------------------------------------------------
48 Call to deprecated function drupal_set_message():
in Drupal 8.5.0 and will be removed before Drupal 9.0.0.
Use \Drupal\Core\Messenger\MessengerInterface::addMessage() instead.
------ ----------------------------------------------------------------------
------ ----------------------------------------------------------------------
Line src/Plugin/Action/WorkflowStateActionBase.php
------ ----------------------------------------------------------------------
129 Call to deprecated function drupal_set_message():
in Drupal 8.5.0 and will be removed before 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 will be removed before 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 will be removed before Drupal 9.0.0.
Use \Drupal\Core\Messenger\MessengerInterface::addMessage() instead.
------ ----------------------------------------------------------------------
------ ----------------------------------------------------------------------
Line src/Plugin/Field/FieldWidget/WorkflowDefaultWidget.php
------ ----------------------------------------------------------------------
173 Call to deprecated function drupal_set_message():
in Drupal 8.5.0 and will be removed before 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 will be removed before 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 will be removed before Drupal 9.0.0.
Use \Drupal\Core\Messenger\MessengerInterface::addMessage() instead.
------ ----------------------------------------------------------------------
------ ----------------------------------------------------------------------
Line workflow.module
------ ----------------------------------------------------------------------
773 Call to deprecated function drupal_set_message():
in Drupal 8.5.0 and will be removed before Drupal 9.0.0.
Use \Drupal\Core\Messenger\MessengerInterface::addMessage() instead.
------ ----------------------------------------------------------------------
| Comment | File | Size | Author |
|---|---|---|---|
| #35 | workflow-d9-deprecated-3077078-35.patch | 757 bytes | szloredan |
| #26 | workflow-d9-deprecated-3077078-26.patch | 23.42 KB | szloredan |
| #26 | interdiff_21_26.txt | 382 bytes | szloredan |
| #21 | workflow-d9-deprecated-3077078-18.patch | 23.04 KB | szloredan |
| #18 | workflow-drupal9-compatiility-code-sniffer-3077078-18-8.patch | 663.84 KB | gun2dru |
Comments
Comment #2
samitk commentedPatch for Drupal 9 compatibility.
Comment #4
sagesolutions commentedIn your WorkflowStateListBuilder.php patch you have
$messenger = \Drupal::messenger();We can instead use dependency injection and use
$this->messenger()->addMessage()Also, there are a lot of
\Drupal::messenger()->...calls inside your classes. It is better than using the deprecated function, but it would be better if you used dependency injection here too.Having said that, these are all minor changes, and the above patch does fix all the deprecated code, so I would think it would be ok to push.
Comment #5
kristen polPer a Slack discussion with Gábor Hojtsy regarding usage of D9 tags (Drupal 9, Drupal 9 compatibility, Drupal 9 readiness, etc.), "Drupal 9 compatibility" should be used for contributed projects that need updating and "Drupal 9" was the old tag for D8 issues before the D9 branch was ready. Doing tag cleanup here based on that discussion.
Comment #6
jcnventuraPlease provide the core_version_requirement property in the module .info.yml file.
Comment #7
ridhimaabrol24 commentedComment #8
ridhimaabrol24 commentedPatch #2 failed to apply. Fixed the issues for that and added core_version_requirement in .info.yml file.
Comment #9
ridhimaabrol24 commentedComment #11
shimpyComment #12
shimpyI have created a patch for above deprecated functions
Please review
Comment #14
gun2dru commentedComment #15
gun2dru commentedComment #16
gun2dru commentedComment #18
gun2dru commentedComment #19
gun2dru commentedComment #21
szloredan commentedgun2dru the code sniffer issue it's for all the files from project and not related to d9 compatibility. Let's keep this issue only for d9 compatibility and create a new issue for coding standars. I created a new patch using the MessengerTrait where possible.
Comment #22
szloredan commentedComment #23
szloredan commentedComment #25
a.dmitriiev commentedSorry, but the patch still has problems according to drupal-check:
drupal-check workflow ✔ 10776 14:30:26
60/60 [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓] 100%
------ ----------------------------------------------------------------------
Line workflow.module
------ ----------------------------------------------------------------------
773 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.
------ ----------------------------------------------------------------------
[ERROR] Found 1 error
Comment #26
szloredan commentedComment #27
a.dmitriiev commentedNo errors now, thank you. drupal-check is passing with the last patch.
Comment #28
a.dmitriiev commentedComment #34
johnvThanks,
I committed all changes in #26. (there was 1 typo to fix, however).
I will dedicate some time to the coded sniffer part.
Comment #35
szloredan commentedjohnv small typo fixed.
Comment #36
szloredan commentedComment #39
johnvThanks, committed - but it is not showing on the issue comments ( due to status Fixed?).
Comment #41
jcnventura