The file EntityResourceTestBase.php uses a static query.
$cache_items = $this->container->get('database')
->query("SELECT cid, data FROM {cache_dynamic_page_cache} WHERE cid LIKE :pattern", [
':pattern' => '%[route]=rest.%',
])
->fetchAllAssoc('cid');
SQL Server uses square brackets as an escape character in LIKE clauses. The following would be equivalent, yet allow contrib database drivers to alter the query as needed.
$cache_items = $this->container->get('database')
->select('cache_dynamic_page_cache', 'c')
->fields('c', ['cid', 'data'])
->condition('c.cid', '%[route]=rest.%', 'LIKE')
->execute()
->fetchAllAssoc('cid');
Comments
Comment #2
beakerboyPatch included
Comment #3
beakerboyComment #4
beakerboyPatch for 8.8.x
Comment #5
daffie commentedI think that we best can place this issue as a task.
The patch looks good and fixed the problem for SQL Server.
The query does not change, only from static to dynamic.
For me it is RTBC.
Comment #10
catchCommitte/pushed to 9.1.x and cherry-picked all the way down to 8.8.x, thanks!