Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
drupal-check web/modules/contrib/prlp 4/4 [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓] 100%
------ ----------------------------------------------------------------------
Line prlp.module
------ ----------------------------------------------------------------------
31 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/Controller/PrlpController.php
------ ----------------------------------------------------------------------
36 Call to deprecated constant REQUEST_TIME: Deprecated in drupal:8.3.0
and is removed from drupal:9.0.0. Use
\Drupal::time()->getRequestTime();
52 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.
75 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.
81 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.
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.
------ ----------------------------------------------------------------------
[ERROR] Found 6 errors
Comment | File | Size | Author |
---|---|---|---|
#22 | prlp-d9-deprecated-3065364-22.patch | 435 bytes | jcnventura |
#22 | interdiff_18_22.txt | 4.4 KB | jcnventura |
Comments
Comment #2
simgui8 CreditAttribution: simgui8 as a volunteer and commentedHere is a patch
Comment #3
simgui8 CreditAttribution: simgui8 as a volunteer and commentedComment #4
simgui8 CreditAttribution: simgui8 as a volunteer and commentedComment #5
alonaoneill CreditAttribution: alonaoneill at Hook 42 commentedCode looks good.
Patch applied!
Comment #6
JeroenTGreat job @simgui8, once we are at it, we can probably also remove the deprecated usage of
REQUEST_TIME
.Comment #7
JeroenTComment #8
simgui8 CreditAttribution: simgui8 as a volunteer and commentedRerolled plus #6 (replace deprecated REQUEST_TIME)
Comment #9
JeroenTSince we're in a controller we can replace this by
$this->messenger()->addError()
and$this->messenger()->addStatus().
Comment #10
simgui8 CreditAttribution: simgui8 as a volunteer and commented@JeroenT
Does that applies to any Drupal service placed in a controller ?
Comment #11
simgui8 CreditAttribution: simgui8 as a volunteer and commentedAnswer to myself: no
Here is an updated patch!
Comment #12
ankushgautam76@gmail.com@simhgui8
patch failed to apply :
Checking patch prlp.module...
Checking patch src/Controller/PrlpController.php...
Hunk #1 succeeded at 33 (offset 1 line).
Hunk #2 succeeded at 49 (offset 1 line).
Hunk #3 succeeded at 72 (offset 1 line).
error: while searching for:
);
}
drupal_set_message($this->t('You have tried to use a one-time login link that has either been used or is no longer valid. Please request a new one using the form below.'), 'error');
return $this->redirect('user.pass');
}
}
Comment #13
ankushgautam76@gmail.comAdding updated patch !
Comment #14
simgui8 CreditAttribution: simgui8 as a volunteer and commentedHello ankushgautam76@gmail.com,
#11 should pass on latest dev (not on stable 1.4)
Comment #15
Jitesh Doshi CreditAttribution: Jitesh Doshi at SpinSpire commentedThank you all. I'll review and commit these in due course of time.
Comment #16
jcnventura CreditAttribution: jcnventura at 1xINTERNET commentedThis patch should also add the core_version_requirement information to the .info.yml file of the module.
Comment #17
ridhimaabrol24 CreditAttribution: ridhimaabrol24 at Srijan | A Material+ Company for Drupal India Association commentedComment #18
ridhimaabrol24 CreditAttribution: ridhimaabrol24 at Srijan | A Material+ Company for Drupal India Association commentedAdded core_version_requirement in the patch.
Comment #19
drupalvikingReviewing latest patch
Comment #20
drupalvikingPatches reviewed and tested.
Comment #21
drupalvikingComment #22
jcnventura CreditAttribution: jcnventura at 1xINTERNET commentedThe recent security release fixed all the D9 deprecations.. It's only a shame that it didn't add 'core_version_requirement' to the .info.yml file.Not changing the RTBC because
Comment #23
Jitesh Doshi CreditAttribution: Jitesh Doshi at SpinSpire commentedI have committed the info.yml file fix to the 8.x branch. But I'm not sure what I have to do to make 9.x release. Should I just make a 8.x release and it will automatically be usable for 9.x or do I need to add a Git tag for 9.x and make a separate release?
Comment #24
JeroenTThanks @jitesh Doshi!
You can create a new 8.x release as you did for The previous releases: https://www.drupal.org/docs/updating-drupal/how-to-prepare-your-drupal-7...
Comment #25
jcnventura CreditAttribution: jcnventura at 1xINTERNET commented@Jitesh Doshi, it is good practice to credit patch authors even if the patch is so simple that you can just copy+paste it from somewhere else. In this case, @ridhimaabrol24 and me provided patches more than 20 days ago for that one line you committed yesterday. Not that you need to do something now, just a request to be nice to the community in the future.
Comment #26
Jitesh Doshi CreditAttribution: Jitesh Doshi at SpinSpire commentedSorry, I didn't understand how the credit system works (I still don't). And now when I'm trying to amend the commit message and "git push -f" the git server is rejecting it.
Comment #27
Jitesh Doshi CreditAttribution: Jitesh Doshi at SpinSpire commented8.x-1.6 released.