Problem/Motivation

There are a few deprecated methods shown when checking with "drupal-check" utility:

------ -------------------------------------------------------------
Line drivers/lib/Drupal/Driver/Database/sqlsrv/Install/Tasks.php
------ -------------------------------------------------------------
65 Call to deprecated function db_set_active():
in drupal:8.0.0 and is removed from drupal:9.0.0. Use
\Drupal\Core\Database\Database::setActiveConnection().
------ -------------------------------------------------------------

------ ---------------------------------------------------------------------
Line sqlsrv.install
------ ---------------------------------------------------------------------
177 Call to deprecated function file_scan_directory():
in drupal:8.8.0 and is removed from drupal:9.0.0.
Use \Drupal\Core\File\FileSystemInterface::scanDirectory() instead.
------ ---------------------------------------------------------------------

------ ---------------------------------------------------------------------
Line src/Indexes/IndexManager.php
------ ---------------------------------------------------------------------
51 Call to deprecated function file_scan_directory():
in drupal:8.8.0 and is removed from drupal:9.0.0.
Use \Drupal\Core\File\FileSystemInterface::scanDirectory() instead.
------ ---------------------------------------------------------------------

------ ---------------------------------------------------------------------------
Line src/Tests/SchemaTest.php
------ ---------------------------------------------------------------------------
42 Call to deprecated function db_create_table():
in drupal:8.0.0 and is removed from drupal:9.0.0. Instead,
get a database connection injected into your service from the container,
get its schema driver, and call createTable() on it. For example,
43 Call to deprecated function db_table_exists():
in drupal:8.0.0 and is removed from drupal:9.0.0. Instead,
get a database connection injected into your service from the container,
get its schema driver, and call tableExists() on it. For example,
45 Call to deprecated function db_add_primary_key():
in drupal:8.0.0 and is removed from drupal:9.0.0. Instead,
get a database connection injected into your service from the container,
get its schema driver, and call addPrimaryKey() on it. For example,
49 Call to deprecated function db_insert():
in drupal:8.0.0 and is removed from drupal:9.0.0. Instead, get
a database connection injected into your service from the container and
call insert() on it. For example,
52 Call to deprecated function db_insert():
in drupal:8.0.0 and is removed from drupal:9.0.0. Instead, get
a database connection injected into your service from the container and
call insert() on it. For example,
58 Call to deprecated function db_drop_primary_key():
in drupal:8.0.0 and is removed from drupal:9.0.0. Instead,
get a database connection injected into your service from the container,
get its schema driver, and call dropPrimaryKey() on it. For example,
61 Call to deprecated function db_insert():
in drupal:8.0.0 and is removed from drupal:9.0.0. Instead, get
a database connection injected into your service from the container and
call insert() on it. For example,
65 Call to deprecated function db_add_primary_key():
in drupal:8.0.0 and is removed from drupal:9.0.0. Instead,
get a database connection injected into your service from the container,
get its schema driver, and call addPrimaryKey() on it. For example,
85 Call to deprecated function db_create_table():
in drupal:8.0.0 and is removed from drupal:9.0.0. Instead,
get a database connection injected into your service from the container,
get its schema driver, and call createTable() on it. For example,
88 Call to deprecated function db_change_field():
in drupal:8.0.0 and is removed from drupal:9.0.0. Instead,
get a database connection injected into your service from the container,
get its schema driver, and call changeField() on it. For example,
109 Call to deprecated function db_create_table():
in drupal:8.0.0 and is removed from drupal:9.0.0. Instead,
get a database connection injected into your service from the container,
get its schema driver, and call createTable() on it. For example,
112 Call to deprecated function db_insert():
in drupal:8.0.0 and is removed from drupal:9.0.0. Instead, get
a database connection injected into your service from the container and
call insert() on it. For example,
123 Call to deprecated function db_insert():
in drupal:8.0.0 and is removed from drupal:9.0.0. Instead, get
a database connection injected into your service from the container and
call insert() on it. For example,
132 Call to deprecated function db_change_field():
in drupal:8.0.0 and is removed from drupal:9.0.0. Instead,
get a database connection injected into your service from the container,
get its schema driver, and call changeField() on it. For example,
140 Call to deprecated function db_change_field():
in drupal:8.0.0 and is removed from drupal:9.0.0. Instead,
get a database connection injected into your service from the container,
get its schema driver, and call changeField() on it. For example,
157 Call to deprecated function db_insert():
in drupal:8.0.0 and is removed from drupal:9.0.0. Instead, get
a database connection injected into your service from the container and
call insert() on it. For example,
166 Call to deprecated function db_insert():
in drupal:8.0.0 and is removed from drupal:9.0.0. Instead, get
a database connection injected into your service from the container and
call insert() on it. For example,
174 Call to deprecated function db_delete():
in drupal:8.0.0 and is removed from drupal:9.0.0. Instead, get
a database connection injected into your service from the container and
call delete() on it. For example,
185 Call to deprecated function db_insert():
in drupal:8.0.0 and is removed from drupal:9.0.0. Instead, get
a database connection injected into your service from the container and
call insert() on it. For example,
194 Call to deprecated function db_insert():
in drupal:8.0.0 and is removed from drupal:9.0.0. Instead, get
a database connection injected into your service from the container and
call insert() on it. For example,
202 Call to deprecated function db_delete():
in drupal:8.0.0 and is removed from drupal:9.0.0. Instead, get
a database connection injected into your service from the container and
call delete() on it. For example,
219 Call to deprecated function db_create_table():
in drupal:8.0.0 and is removed from drupal:9.0.0. Instead,
get a database connection injected into your service from the container,
get its schema driver, and call createTable() on it. For example,
222 Call to deprecated function db_add_field():
in drupal:8.0.0 and is removed from drupal:9.0.0. Instead,
get a database connection injected into your service from the container,
get its schema driver, and call addField() on it. For example,
232 Call to deprecated function db_index_exists():
in drupal:8.0.0 and is removed from drupal:9.0.0. Instead,
get a database connection injected into your service from the container,
get its schema driver, and call indexExists() on it. For example,
235 Call to deprecated function db_drop_index():
in drupal:8.0.0 and is removed from drupal:9.0.0. Instead,
get a database connection injected into your service from the container,
get its schema driver, and call dropIndex() on it. For example,
236 Call to deprecated function db_index_exists():
in drupal:8.0.0 and is removed from drupal:9.0.0. Instead,
get a database connection injected into your service from the container,
get its schema driver, and call indexExists() on it. For example,
238 Call to deprecated function db_change_field():
in drupal:8.0.0 and is removed from drupal:9.0.0. Instead,
get a database connection injected into your service from the container,
get its schema driver, and call changeField() on it. For example,
248 Call to deprecated function db_index_exists():
in drupal:8.0.0 and is removed from drupal:9.0.0. Instead,
get a database connection injected into your service from the container,
get its schema driver, and call indexExists() on it. For example,
268 Call to deprecated function db_query():
in drupal:8.0.0 and is removed from drupal:9.0.0. Instead,
get a database connection injected into your service from the container
and call query() on it. For example,
292 Call to deprecated function db_create_table():
in drupal:8.0.0 and is removed from drupal:9.0.0. Instead,
get a database connection injected into your service from the container,
get its schema driver, and call createTable() on it. For example,
297 Call to deprecated function db_insert():
in drupal:8.0.0 and is removed from drupal:9.0.0. Instead, get
a database connection injected into your service from the container and
call insert() on it. For example,
316 Call to deprecated function db_change_field():
in drupal:8.0.0 and is removed from drupal:9.0.0. Instead,
get a database connection injected into your service from the container,
get its schema driver, and call changeField() on it. For example,
327 Call to deprecated function db_change_field():
in drupal:8.0.0 and is removed from drupal:9.0.0. Instead,
get a database connection injected into your service from the container,
get its schema driver, and call changeField() on it. For example,
336 Call to deprecated function db_change_field():
in drupal:8.0.0 and is removed from drupal:9.0.0. Instead,
get a database connection injected into your service from the container,
get its schema driver, and call changeField() on it. For example,
346 Call to deprecated function db_change_field():
in drupal:8.0.0 and is removed from drupal:9.0.0. Instead,
get a database connection injected into your service from the container,
get its schema driver, and call changeField() on it. For example,
377 Call to deprecated function db_create_table():
in drupal:8.0.0 and is removed from drupal:9.0.0. Instead,
get a database connection injected into your service from the container,
get its schema driver, and call createTable() on it. For example,
396 Call to deprecated function db_insert():
in drupal:8.0.0 and is removed from drupal:9.0.0. Instead, get
a database connection injected into your service from the container and
call insert() on it. For example,
407 Call to deprecated function db_update():
in drupal:8.0.0 and is removed from drupal:9.0.0. Instead, get
a database connection injected into your service from the container and
call update() on it. For example,
446 Call to deprecated function db_create_table():
in drupal:8.0.0 and is removed from drupal:9.0.0. Instead,
get a database connection injected into your service from the container,
get its schema driver, and call createTable() on it. For example,
449 Call to deprecated function db_insert():
in drupal:8.0.0 and is removed from drupal:9.0.0. Instead, get
a database connection injected into your service from the container and
call insert() on it. For example,
454 Call to deprecated function db_transaction():
in drupal:8.0.0 and is removed from drupal:9.0.0. Instead, get
a database connection injected into your service from the container and
call startTransaction() on it. For example,
456 Call to deprecated function db_query():
in drupal:8.0.0 and is removed from drupal:9.0.0. Instead,
get a database connection injected into your service from the container
and call query() on it. For example,
458 Call to deprecated function db_query():
in drupal:8.0.0 and is removed from drupal:9.0.0. Instead,
get a database connection injected into your service from the container
and call query() on it. For example,
463 Call to deprecated function db_query():
in drupal:8.0.0 and is removed from drupal:9.0.0. Instead,
get a database connection injected into your service from the container
and call query() on it. For example,
469 Call to deprecated function db_query():
in drupal:8.0.0 and is removed from drupal:9.0.0. Instead,
get a database connection injected into your service from the container
and call query() on it. For example,
474 Call to deprecated function db_query():
in drupal:8.0.0 and is removed from drupal:9.0.0. Instead,
get a database connection injected into your service from the container
and call query() on it. For example,
485 Call to deprecated function db_query():
in drupal:8.0.0 and is removed from drupal:9.0.0. Instead,
get a database connection injected into your service from the container
and call query() on it. For example,
545 Call to deprecated function db_create_table():
in drupal:8.0.0 and is removed from drupal:9.0.0. Instead,
get a database connection injected into your service from the container,
get its schema driver, and call createTable() on it. For example,
547 Call to deprecated function db_query():
in drupal:8.0.0 and is removed from drupal:9.0.0. Instead,
get a database connection injected into your service from the container
and call query() on it. For example,
548 Call to deprecated function db_query():
in drupal:8.0.0 and is removed from drupal:9.0.0. Instead,
get a database connection injected into your service from the container
and call query() on it. For example,
549 Call to deprecated function db_query():
in drupal:8.0.0 and is removed from drupal:9.0.0. Instead,
get a database connection injected into your service from the container
and call query() on it. For example,
555 Call to deprecated function db_change_field():
in drupal:8.0.0 and is removed from drupal:9.0.0. Instead,
get a database connection injected into your service from the container,
get its schema driver, and call changeField() on it. For example,
561 Call to deprecated function db_query():
in drupal:8.0.0 and is removed from drupal:9.0.0. Instead,
get a database connection injected into your service from the container
and call query() on it. For example,
562 Call to deprecated function db_query():
in drupal:8.0.0 and is removed from drupal:9.0.0. Instead,
get a database connection injected into your service from the container
and call query() on it. For example,
563 Call to deprecated function db_query():
in drupal:8.0.0 and is removed from drupal:9.0.0. Instead,
get a database connection injected into your service from the container
and call query() on it. For example,
569 Call to deprecated function db_field_set_default():
in drupal:8.0.0 and is removed from drupal:9.0.0. Instead,
get a database connection injected into your service from the container,
get its schema driver, and call changeField() on it, passing a full field
specification. For example,
580 Call to deprecated function db_query():
in drupal:8.0.0 and is removed from drupal:9.0.0. Instead,
get a database connection injected into your service from the container
and call query() on it. For example,
581 Call to deprecated function db_query():
in drupal:8.0.0 and is removed from drupal:9.0.0. Instead,
get a database connection injected into your service from the container
and call query() on it. For example,
582 Call to deprecated function db_query():
in drupal:8.0.0 and is removed from drupal:9.0.0. Instead,
get a database connection injected into your service from the container
and call query() on it. For example,
------ ---------------------------------------------------------------------------

------ --------------------------------------------------------------------------
Line src/Tests/SelectQueryTest.php
------ --------------------------------------------------------------------------
56 Call to deprecated function db_create_table():
in drupal:8.0.0 and is removed from drupal:9.0.0. Instead,
get a database connection injected into your service from the container,
get its schema driver, and call createTable() on it. For example,
57 Call to deprecated function db_insert():
in drupal:8.0.0 and is removed from drupal:9.0.0. Instead, get
a database connection injected into your service from the container and
call insert() on it. For example,
58 Call to deprecated function db_insert():
in drupal:8.0.0 and is removed from drupal:9.0.0. Instead, get
a database connection injected into your service from the container and
call insert() on it. For example,
59 Call to deprecated function db_insert():
in drupal:8.0.0 and is removed from drupal:9.0.0. Instead, get
a database connection injected into your service from the container and
call insert() on it. For example,
60 Call to deprecated function db_insert():
in drupal:8.0.0 and is removed from drupal:9.0.0. Instead, get
a database connection injected into your service from the container and
call insert() on it. For example,
61 Call to deprecated function db_insert():
in drupal:8.0.0 and is removed from drupal:9.0.0. Instead, get
a database connection injected into your service from the container and
call insert() on it. For example,
62 Call to deprecated function db_insert():
in drupal:8.0.0 and is removed from drupal:9.0.0. Instead, get
a database connection injected into your service from the container and
call insert() on it. For example,
84 Call to deprecated function db_select():
in drupal:8.0.0 and is removed from drupal:9.0.0. Instead, get
a database connection injected into your service from the container and
call select() on it. For example,
125 Call to deprecated function db_select():
in drupal:8.0.0 and is removed from drupal:9.0.0. Instead, get
a database connection injected into your service from the container and
call select() on it. For example,
137 Call to deprecated function db_select():
in drupal:8.0.0 and is removed from drupal:9.0.0. Instead, get
a database connection injected into your service from the container and
call select() on it. For example,
158 Call to deprecated function db_select():
in drupal:8.0.0 and is removed from drupal:9.0.0. Instead, get
a database connection injected into your service from the container and
call select() on it. For example,
180 Call to deprecated function db_select():
in drupal:8.0.0 and is removed from drupal:9.0.0. Instead, get
a database connection injected into your service from the container and
call select() on it. For example,
208 Call to deprecated function db_query():
in drupal:8.0.0 and is removed from drupal:9.0.0. Instead,
get a database connection injected into your service from the container
and call query() on it. For example,
226 Call to deprecated function db_select():
in drupal:8.0.0 and is removed from drupal:9.0.0. Instead, get
a database connection injected into your service from the container and
call select() on it. For example,
229 Call to deprecated function db_query_temporary():
in drupal:8.0.0 and is removed from drupal:9.0.0. Instead,
get a database connection injected into your service from the container
and call queryTemporary() on it. For example,
232 Call to deprecated function db_table_exists():
in drupal:8.0.0 and is removed from drupal:9.0.0. Instead,
get a database connection injected into your service from the container,
get its schema driver, and call tableExists() on it. For example,
234 Call to deprecated function db_select():
in drupal:8.0.0 and is removed from drupal:9.0.0. Instead, get
a database connection injected into your service from the container and
call select() on it. For example,
246 Call to deprecated function db_drop_table():
in drupal:8.0.0 and is removed from drupal:9.0.0. Instead,
get a database connection injected into your service from the container,
get its schema driver, and call dropTable() on it. For example,
249 Call to deprecated function db_table_exists():
in drupal:8.0.0 and is removed from drupal:9.0.0. Instead,
get a database connection injected into your service from the container,
get its schema driver, and call tableExists() on it. For example,
283 Call to deprecated function db_like():
in drupal:8.0.0 and is removed from drupal:9.0.0. Instead,
get a database connection injected into your service from the container
and call escapeLike() on it. For example,
286 Call to deprecated function db_insert():
in drupal:8.0.0 and is removed from drupal:9.0.0. Instead, get
a database connection injected into your service from the container and
call insert() on it. For example,
292 Call to deprecated function db_select():
in drupal:8.0.0 and is removed from drupal:9.0.0. Instead, get
a database connection injected into your service from the container and
call select() on it. For example,
294 Call to deprecated function db_like():
in drupal:8.0.0 and is removed from drupal:9.0.0. Instead,
get a database connection injected into your service from the container
and call escapeLike() on it. For example,
298 Call to deprecated function db_insert():
in drupal:8.0.0 and is removed from drupal:9.0.0. Instead, get
a database connection injected into your service from the container and
call insert() on it. For example,
304 Call to deprecated function db_select():
in drupal:8.0.0 and is removed from drupal:9.0.0. Instead, get
a database connection injected into your service from the container and
call select() on it. For example,
306 Call to deprecated function db_like():
in drupal:8.0.0 and is removed from drupal:9.0.0. Instead,
get a database connection injected into your service from the container
and call escapeLike() on it. For example,
311 Call to deprecated function db_select():
in drupal:8.0.0 and is removed from drupal:9.0.0. Instead, get
a database connection injected into your service from the container and
call select() on it. For example,
318 Call to deprecated function db_select():
in drupal:8.0.0 and is removed from drupal:9.0.0. Instead, get
a database connection injected into your service from the container and
call select() on it. For example,
325 Call to deprecated function db_select():
in drupal:8.0.0 and is removed from drupal:9.0.0. Instead, get
a database connection injected into your service from the container and
call select() on it. For example,
326 Call to deprecated function db_like():
in drupal:8.0.0 and is removed from drupal:9.0.0. Instead,
get a database connection injected into your service from the container
and call escapeLike() on it. For example,
332 Call to deprecated function db_select():
in drupal:8.0.0 and is removed from drupal:9.0.0. Instead, get
a database connection injected into your service from the container and
call select() on it. For example,
339 Call to deprecated function db_select():
in drupal:8.0.0 and is removed from drupal:9.0.0. Instead, get
a database connection injected into your service from the container and
call select() on it. For example,
340 Call to deprecated function db_like():
in drupal:8.0.0 and is removed from drupal:9.0.0. Instead,
get a database connection injected into your service from the container
and call escapeLike() on it. For example,
346 Call to deprecated function db_query():
in drupal:8.0.0 and is removed from drupal:9.0.0. Instead,
get a database connection injected into your service from the container
and call query() on it. For example,
352 Call to deprecated function db_query():
in drupal:8.0.0 and is removed from drupal:9.0.0. Instead,
get a database connection injected into your service from the container
and call query() on it. For example,
353 Call to deprecated function db_like():
in drupal:8.0.0 and is removed from drupal:9.0.0. Instead,
get a database connection injected into your service from the container
and call escapeLike() on it. For example,
------ --------------------------------------------------------------------------

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

Comments

rajeevgole created an issue. See original summary.

gnanagowthaman sankar’s picture

Hi @rajeevgole,

Here by i attached the patch. Please review and let me know for changes.

Thanks & Regards,
Gnanagowthaman sankar

gnanagowthaman sankar’s picture

Status: Active » Needs review
StatusFileSize
new32.55 KB

Patch

Thanks & Regards,
Gnanagowthaman sankar

avpaderno’s picture

Status: Needs review » Closed (won't fix)

I am closing this issue, since it was opened for an already released version, which cannot be changed anymore.