------ ----------------------------------------------------------------------
  Line   force_password_change.module
 ------ ----------------------------------------------------------------------
  217    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.
  393    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/EventSubscriber/ForcePasswordChangeEventSubscriber.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.
  133    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/Form/AdminForm.php
 ------ ----------------------------------------------------------------------
  364    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.
  368    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/Form/RoleForceForm.php
 ------ ----------------------------------------------------------------------
  150    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.
  154    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/Service/ForcePasswordChangeService.php
 ------ -------------------------------------------------------
  326    Call to deprecated function user_load_multiple():
         in drupal:8.0.0 and is removed from drupal:9.0.0. Use
         \Drupal\user\Entity\User::loadMultiple().
 ------ -------------------------------------------------------

Comments

Deeksha B created an issue. See original summary.

Deeksha B’s picture

Issue summary: View changes
Status: Active » Needs review
StatusFileSize
new5.72 KB
edycarreyes99’s picture

Assigned: Unassigned » edycarreyes99
StatusFileSize
new7.24 KB
new7.24 KB

patch not apply, fixing that.

drupal.ninja03’s picture

.

drupal.ninja03’s picture

Issue summary: View changes
drupal.ninja03’s picture

Status: Needs review » Needs work

Patch from #3 didn't work for me:

$ git apply ~/Downloads/fpc-D9-support-3096554-03.patch
error: patch failed: force_password_change.info.yml:1
error: force_password_change.info.yml: patch does not apply
error: patch failed: force_password_change.module:320
error: force_password_change.module: patch does not apply
drupal.ninja03’s picture

Issue tags: +Needs reroll
drupal.ninja03’s picture

Status: Needs work » Needs review
Issue tags: -Needs reroll
StatusFileSize
new82.79 KB

Created a fresh patch as the previous ones failed probably due to indentation errors.

heddn’s picture

Assigned: edycarreyes99 » Unassigned
Status: Needs review » Reviewed & tested by the community
StatusFileSize
new5.72 KB

That's a lot of whitespace changes. Let's re-upload #2, which is working on a live D9 site.

drupal.ninja03’s picture

Hi @heddn, did you test the patch I uploaded? Did it not work for you?

The whitespace changes were automatically fixed by the code sniffer CLI tool.

heddn’s picture

@drupal.ninja03, this issue is that there are too many whitespace changes and it would be nearly impossible to know what changed. Much better to do whitespace cleanup in another issue. And keep the fixes limited to only D9 support here. Which is why I went back to #2.

mvogel’s picture

Status: Reviewed & tested by the community » Needs review
StatusFileSize
new760 bytes
new5.71 KB
new913 bytes

I couldn't apply the patch.

I wrote an info yml file patch to delete the information added by the Drupal.org packaging script. So if you want to apply the D9 patch you need to run the info-file.patch first. I don't know where this packaging script came from and how to patch it properly.

For the D9 Patch, I had to change some line numbers and array syntax to apply correctly. (see interdif)

mistrae’s picture

StatusFileSize
new6.05 KB

Wrong patch

mistrae’s picture

StatusFileSize
new6.06 KB

Changing $this->messenger->addMessage( to \Drupal::messenger()->addMessage( as it errors the following : Call to a member function addMessage() on null

guilhermevp’s picture

Title: Drupal 9 Deprecated Code Report » Call to deprecated function drupal_set_message()
Status: Needs review » Reviewed & tested by the community
StatusFileSize
new63.13 KB

Patch works as intended in the scope of the proposed issue. But there is more deprecated code to be addressed.
Updated the issue title to reflect the scope.

guilhermevp’s picture

Title: Call to deprecated function drupal_set_message() » Call to deprecated function drupal_set_message() / Call to deprecated function user_load_multiple()
larisse’s picture

Version: 8.x-1.x-dev » 2.0.x-dev
Status: Reviewed & tested by the community » Needs work

Needs reroll for 2.0.x branch

laisbonafe’s picture

Assigned: Unassigned » laisbonafe
laisbonafe’s picture

Assigned: laisbonafe » Unassigned
Status: Needs work » Needs review
StatusFileSize
new4.01 KB

Hi, I did a re-roll of the patch #14.

larisse’s picture

Assigned: Unassigned » larisse
Status: Needs review » Needs work
StatusFileSize
new53.19 KB

The patch #19 could not be applied.
I will try to work on this.

larisse’s picture

StatusFileSize
new77.25 KB

Opss, this is the error that I get when I try to apply the patch #19

larisse’s picture

Assigned: larisse » Unassigned
Status: Needs work » Needs review
StatusFileSize
new794 bytes

A reroll for 2.0.x branch.

  • larisse committed 44d7ad5 on 2.0.x
    Issue #3096554 by mvogel, Mistrae, larisse, edycarreyes99, drupal....
larisse’s picture

Status: Needs review » Fixed
StatusFileSize
new794 bytes

Thank you all.

Status: Fixed » Closed (fixed)

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

orb’s picture

Priority: Normal » Critical

everything is good