Problem/Motivation
As of commit e935322714de920f9378958b801cd3ab58f3d7e8
------ --------------------------------------------------------------------------------------
Line captcha.module
------ --------------------------------------------------------------------------------------
257 Call to deprecated method url() of class Drupal\Core\Config\Entity\ConfigEntityBase.
320 Call to deprecated method strtolower() of class Drupal\Component\Utility\Unicode.
320 Call to deprecated method strtolower() of class Drupal\Component\Utility\Unicode.
350 Call to deprecated method strtolower() of class Drupal\Component\Utility\Unicode.
350 Call to deprecated method strtolower() of class Drupal\Component\Utility\Unicode.
------ --------------------------------------------------------------------------------------
------ ------------------------------------------------------
Line image_captcha/src/Controller/CaptchaImageRefresh.php
------ ------------------------------------------------------
46 Call to deprecated method url() of class Drupal.
------ ------------------------------------------------------
------ -----------------------------------------------------
Line image_captcha/src/Form/ImageCaptchaSettingsForm.php
------ -----------------------------------------------------
75 Call to deprecated function drupal_set_message().
------ -----------------------------------------------------
------ -----------------------------------------------------------
Line modules/captcha_long_form_id_test/src/Form/LongIdForm.php
------ -----------------------------------------------------------
44 Call to deprecated function drupal_set_message().
------ -----------------------------------------------------------
------ ---------------------------------------------------
Line src/Form/CaptchaPointDeleteForm.php
------ ---------------------------------------------------
40 Call to deprecated function drupal_set_message().
------ ---------------------------------------------------
------ ---------------------------------------------------
Line src/Form/CaptchaPointDisableForm.php
------ ---------------------------------------------------
48 Call to deprecated function drupal_set_message().
------ ---------------------------------------------------
------ ---------------------------------------------------
Line src/Form/CaptchaPointEnableForm.php
------ ---------------------------------------------------
48 Call to deprecated function drupal_set_message().
------ ---------------------------------------------------
------ ---------------------------------------------------
Line src/Form/CaptchaPointForm.php
------ ---------------------------------------------------
104 Call to deprecated function drupal_set_message().
109 Call to deprecated function drupal_set_message().
------ ---------------------------------------------------
------ ---------------------------------------------------
Line src/Form/CaptchaSettingsForm.php
------ ---------------------------------------------------
237 Call to deprecated function drupal_set_message().
252 Call to deprecated function drupal_set_message().
------ ---------------------------------------------------
[ERROR] Found 15 errors
Proposed resolution
Remaining tasks
User interface changes
API changes
Data model changes
Release notes snippet
| Comment | File | Size | Author |
|---|---|---|---|
| #19 | interdiff-3042586-16-17.txt | 6.89 KB | jeroent |
| #17 | 3042586-17.patch | 8.77 KB | jeroent |
Comments
Comment #2
chaseonthewebPatch attached to address all listed issues.
Strtolower is a simple find/replace per CR #2850048: Use mb_* functions instead of Unicode::* methods. drupal_set_message is also a simple find/replace for anything implementing FormBase per CR #2774931: drupal_set_message() and drupal_get_messages() replaced by Messenger service.
I think I updated the url() calls correctly. I will test out and update the patch if not. I'm new to D8/9 development. I submitted this as part of a contribution sprint at MidCamp 2019.
Comment #4
chaseonthewebTypo in last patch, sorry for noise
Comment #6
thallesFollow the patch!
Comment #7
thallesComment #9
yogen.prasad commentedComment #10
yogen.prasad commentedComment #11
yogen.prasad commentedComment #12
arpitr commentedThanks @yogenprasad for working on this.
Few issues which I see
1. There is one pending deprecated message
------ --------------------------------------------------------------------------------------
Line captcha.module
------ --------------------------------------------------------------------------------------
257 Call to deprecated method url() of class Drupal\Core\Config\Entity\ConfigEntityBase.
------ --------------------------------------------------------------------------------------
[ERROR] Found 1 error
2. Instead of using the procedural way of drupal set message if we can use Messenger Trait
Replace
+ \Drupal::messenger()->addMessagewith Messenger Trait as in example
https://www.drupal.org/node/2774931
Comment #13
yogen.prasad commentedChanges done as per suggestions.
Comment #14
yogen.prasad commentedComment #16
yogen.prasad commentedComment #17
jeroentComment #18
thalles@JeroenT, can you post the interdiff?
Comment #19
jeroentAdded interdiff.
Comment #20
thallesThanks @JeroenT!
Comment #21
wundo commentedComment #22
wundo commentedComment #24
wundo commentedThanks, committed
Comment #25
andrtroe commentedComment #27
Steven Brown commentedRun against
6731656. Here are some new deprecations since this issue was closed.