The codebase should not contain db_select() and db_update() as these are deprecated at 8.x and will be removed in 9.x.
https://api.drupal.org/api/drupal/core%21includes%21database.inc/functio...
https://api.drupal.org/api/drupal/core%21includes%21database.inc/functio...

The majority of the Scheduler codebase does not use these, but they do remain in three test files.

Comments

Pavan B S created an issue. See original summary.

Pavan B S’s picture

Assigned: Pavan B S » Unassigned
Status: Active » Needs review
StatusFileSize
new2.71 KB

Applying the patch, please review.

jonathan1055’s picture

Thanks for bringing this to our attention. Could you give a link to the Change Record and/or the coding standards and good practice info, so that we can properly evaluate the changes required.

Pavan B S’s picture

@jonathan1055 i am not sure which is the proper link for the db_() but, when i searched about depreciated db_ i got the following link which shows that db_select,db_insert,db_update are depreciated
https://api.drupal.org/api/drupal/core%21lib%21Drupal%21Core%21Database%...
Please Suggest if i am wrong in that patch

dhruveshdtripathi’s picture

Status: Needs review » Reviewed & tested by the community
StatusFileSize
new8.08 KB

All deprecated db_() replaced.

Good work!

jonathan1055’s picture

Title: Replace all calls to db_(), which is deprecated » Replace db_select() and db_update() which are deprecated
Issue summary: View changes
Status: Reviewed & tested by the community » Needs review
StatusFileSize
new3.55 KB
new2.48 KB

Thanks. I have updated the summary with links to db_update and db_select which explain that these are deprecated now.

The new patch uses dependency injection to create a $this->database property which can be re-used in the test files.

  • jonathan1055 committed 3f572dc on 8.x-1.x
    Issue #2867269 by jonathan1055, Pavan B S, dhruveshdtripathi: Replace...
jonathan1055’s picture

Status: Needs review » Fixed

Fixed.
Thanks Pavan B S and dhruveshdtripathi, I've given you credit on the commit.

Status: Fixed » Closed (fixed)

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