------ ----------------------------------------------------------------------
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.
------ ----------------------------------------------------------------------

Comments

samit.310@gmail.com created an issue. See original summary.

samitk’s picture

Assigned: samitk » Unassigned
Status: Needs work » Needs review
StatusFileSize
new26.41 KB

Patch for Drupal 9 compatibility.

Status: Needs review » Needs work

The last submitted patch, 2: workflow-drupal9-3077078-2.patch, failed testing. View results
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

sagesolutions’s picture

Status: Needs work » Reviewed & tested by the community

In 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.

kristen pol’s picture

Issue tags: -Drupal 9 Deprecated Code Report +Drupal 9 compatibility

Per 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.

jcnventura’s picture

Status: Reviewed & tested by the community » Needs work

Please provide the core_version_requirement property in the module .info.yml file.

ridhimaabrol24’s picture

Assigned: Unassigned » ridhimaabrol24
ridhimaabrol24’s picture

Issue tags: +Drupal 9 porting weekend, +DIACWMay2020
StatusFileSize
new27.35 KB

Patch #2 failed to apply. Fixed the issues for that and added core_version_requirement in .info.yml file.

ridhimaabrol24’s picture

Assigned: ridhimaabrol24 » Unassigned
Status: Needs work » Needs review

Status: Needs review » Needs work

The last submitted patch, 8: 3077078-8.patch, failed testing. View results
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

shimpy’s picture

Assigned: Unassigned » shimpy
shimpy’s picture

Status: Needs work » Needs review
StatusFileSize
new20.02 KB

I have created a patch for above deprecated functions
Please review

Status: Needs review » Needs work

The last submitted patch, 12: 3077078_10.patch, failed testing. View results
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

gun2dru’s picture

Assigned: shimpy » gun2dru
gun2dru’s picture

gun2dru’s picture

Status: Needs work » Needs review

Status: Needs review » Needs work

The last submitted patch, 15: workflow-drupal9-compatiility-3077078-15-8.patch, failed testing. View results
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

gun2dru’s picture

gun2dru’s picture

Status: Needs work » Needs review

Status: Needs review » Needs work

The last submitted patch, 18: workflow-drupal9-compatiility-code-sniffer-3077078-18-8.patch, failed testing. View results
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

szloredan’s picture

StatusFileSize
new23.04 KB

gun2dru 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.

szloredan’s picture

Assigned: gun2dru » szloredan
szloredan’s picture

Status: Needs work » Needs review

Status: Needs review » Needs work

The last submitted patch, 21: workflow-d9-deprecated-3077078-18.patch, failed testing. View results
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

a.dmitriiev’s picture

Sorry, 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

szloredan’s picture

StatusFileSize
new382 bytes
new23.42 KB
a.dmitriiev’s picture

No errors now, thank you. drupal-check is passing with the last patch.

a.dmitriiev’s picture

Status: Needs work » Reviewed & tested by the community

Status: Reviewed & tested by the community » Needs work

The last submitted patch, 26: workflow-d9-deprecated-3077078-26.patch, failed testing. View results
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

  • johnv committed 72c7fde on 8.x-1.x authored by szloredan
    Issue #3077078 by szloredan, gun2dru, samit.310@gmail.com,...

  • johnv committed 7860af1 on 8.x-1.x authored by szloredan
    Issue #3077078 by szloredan, gun2dru, samit.310@gmail.com,...

  • johnv committed c0f30aa on 8.x-1.x authored by szloredan
    Issue #3077078 by szloredan, gun2dru, samit.310@gmail.com,...

  • johnv committed 5b47dff on 8.x-1.x authored by szloredan
    Issue #3077078 by szloredan, gun2dru, samit.310@gmail.com,...
johnv’s picture

Version: 8.x-1.x-dev » 8.x-1.1
Assigned: szloredan » Unassigned
Status: Needs work » Fixed

Thanks,
I committed all changes in #26. (there was 1 typo to fix, however).
I will dedicate some time to the coded sniffer part.

szloredan’s picture

StatusFileSize
new757 bytes

johnv small typo fixed.

szloredan’s picture

Status: Fixed » Needs review

  • johnv committed 34efde9 on 8.x-1.x
    Issue #3077078: Drupal 9 Deprecated Code Report - coding standards
    

Status: Needs review » Needs work

The last submitted patch, 35: workflow-d9-deprecated-3077078-35.patch, failed testing. View results
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

johnv’s picture

Thanks, committed - but it is not showing on the issue comments ( due to status Fixed?).

  • johnv committed e769e34 on 8.x-1.x authored by szloredan
    Issue #3077078 by szloredan, gun2dru, samit.310@gmail.com,...
  • johnv committed e9cacfb on 8.x-1.x
    Issue #3077078: Drupal 9 Deprecated Code Report - coding standards
    
jcnventura’s picture

Status: Needs work » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.