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

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

ChaseOnTheWeb created an issue. See original summary.

ChaseOnTheWeb’s picture

Status: Active » Needs review
FileSize
8.24 KB

Patch attached to address all listed issues.

Strtolower is a simple find/replace per CR [#2850048]. drupal_set_message is also a simple find/replace for anything implementing FormBase per CR [#2774931].

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.

Status: Needs review » Needs work

The last submitted patch, 2: 3042586-captcha-d9-readiness-2.patch, failed testing. View results
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

ChaseOnTheWeb’s picture

Status: Needs work » Needs review
FileSize
8.24 KB

Typo in last patch, sorry for noise

Status: Needs review » Needs work

The last submitted patch, 4: 3042586-captcha-d9-readiness-4.patch, failed testing. View results
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

thalles’s picture

thalles’s picture

Status: Needs work » Needs review

Status: Needs review » Needs work

The last submitted patch, 6: captcha-readiness-3042586-6-D8.patch, failed testing. View results

yogen.prasad’s picture

Assigned: Unassigned » yogen.prasad
Issue tags: +Seattle2019
yogen.prasad’s picture

yogen.prasad’s picture

Status: Needs work » Needs review
arpitr’s picture

Status: Needs review » Needs work

Thanks @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()->addMessage
with Messenger Trait as in example
https://www.drupal.org/node/2774931

yogen.prasad’s picture

Status: Needs work » Needs review
FileSize
7.58 KB

Changes done as per suggestions.

yogen.prasad’s picture

Assigned: yogen.prasad » Unassigned

Status: Needs review » Needs work

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

yogen.prasad’s picture

JeroenT’s picture

thalles’s picture

@JeroenT, can you post the interdiff?

JeroenT’s picture

FileSize
6.89 KB

Added interdiff.

thalles’s picture

Status: Needs review » Reviewed & tested by the community

Thanks @JeroenT!

wundo’s picture

wundo’s picture

Status: Reviewed & tested by the community » Fixed

  • wundo committed d3c9b8e on 8.x-1.x authored by JeroenT
    Issue #3042586 by yogen.prasad, ChaseOnTheWeb, JeroenT, thalles, arpitr...
wundo’s picture

Thanks, committed

andrey.troeglazov’s picture

Status: Fixed » Closed (fixed)

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

Steven Brown’s picture

Run against 6731656. Here are some new deprecations since this issue was closed.

 ------ ----------------------------------------------------------------------------------------------------------------------
  Line   src/Tests/CaptchaSessionReuseAttackTestCase.php
 ------ ----------------------------------------------------------------------------------------------------------------------
  16     Class Drupal\captcha\Tests\CaptchaSessionReuseAttackTestCase extends deprecated class Drupal\simpletest\WebTestBase:
         in drupal:8.8.0 and is removed from drupal:9.0.0. Instead,
         use \Drupal\Tests\BrowserTestBase. See https://www.drupal.org/node/3030340.
  70     Call to method setUp() of deprecated class Drupal\simpletest\WebTestBase:
         in drupal:8.8.0 and is removed from drupal:9.0.0. Instead,
         use \Drupal\Tests\BrowserTestBase. See https://www.drupal.org/node/3030340.
 ------ ----------------------------------------------------------------------------------------------------------------------