Skip to content

Commit 4779a0a

Browse files
authored
Merge pull request #966 from cakephp/4.next-cake-4_5
4.next: require CakePHP 4.5
2 parents 91b0d43 + 5d0b20b commit 4779a0a

File tree

5 files changed

+7
-12
lines changed

5 files changed

+7
-12
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
},
2525
"require": {
2626
"php": ">=7.4",
27-
"cakephp/cakephp": "^4.4.0",
27+
"cakephp/cakephp": "^4.5.0",
2828
"cakephp/chronos": "^2.0",
2929
"composer/composer": "^1.3 | ^2.0",
3030
"doctrine/sql-formatter": "^1.1.3"

src/DebugSql.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ public static function sql(Query $query, $showValues = true, $showHtml = null, $
8080
}
8181

8282
/** @var array $trace */
83-
$trace = Debugger::trace(['start' => 1, 'depth' => $stackDepth + 2, 'format' => 'array']);
83+
$trace = Debugger::trace(['start' => 0, 'depth' => $stackDepth + 2, 'format' => 'array']);
8484
$file = isset($trace[$stackDepth]) ? $trace[$stackDepth]['file'] : 'n/a';
8585
$line = isset($trace[$stackDepth]) ? $trace[$stackDepth]['line'] : 0;
8686
$lineInfo = '';

src/Model/Table/RequestsTable.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -118,14 +118,12 @@ public function gc()
118118
return;
119119
}
120120

121-
$query = $this->Panels->query()
122-
->delete()
121+
$query = $this->Panels->deleteQuery()
123122
->where(['request_id NOT IN' => $noPurge]);
124123
$statement = $query->execute();
125124
$statement->closeCursor();
126125

127-
$query = $this->query()
128-
->delete()
126+
$query = $this->deleteQuery()
129127
->where(['id NOT IN' => $noPurge]);
130128

131129
$statement = $query->execute();

tests/TestCase/DebugSqlTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,6 @@ public function testSqlPlain()
135135
*/
136136
private function newQuery()
137137
{
138-
return $this->getTableLocator()->get('panels')->query();
138+
return $this->getTableLocator()->get('panels')->selectQuery();
139139
}
140140
}

tests/TestCase/Panel/VariablesPanelTest.php

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -62,10 +62,8 @@ public function testShutdown()
6262
$requests = $this->getTableLocator()->get('Requests');
6363
$query = $requests->find('all');
6464
$result = $requests->find()->all();
65-
$unbufferedQuery = $requests->find('all')->enableBufferedResults(false);
66-
$unbufferedQuery->toArray(); //toArray call would normally happen somewhere in View, usually implicitly
67-
$update = $requests->query()->update();
68-
$debugInfoException = $requests->query()->contain('NonExistentAssociation');
65+
$update = $requests->updateQuery();
66+
$debugInfoException = $requests->selectQuery()->contain('NonExistentAssociation');
6967

7068
$unserializable = new \stdClass();
7169
$unserializable->pdo = $requests->getConnection()->getDriver()->getConnection();
@@ -89,7 +87,6 @@ public function testShutdown()
8987
'debugInfoException' => $debugInfoException,
9088
'updateQuery' => $update,
9189
'query' => $query,
92-
'unbufferedQuery' => $unbufferedQuery,
9390
'result set' => $result,
9491
'string' => 'yes',
9592
'array' => ['some' => 'key'],

0 commit comments

Comments
 (0)