Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .phive/phars.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<phive xmlns="https://phar.io/phive">
<phar name="phpstan" version="2.1.17" installed="2.1.17" location="./tools/phpstan" copy="false"/>
<phar name="phpstan" version="2.1.31" installed="2.1.31" location="./tools/phpstan" copy="false"/>
</phive>
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,13 @@
"require": {
"php": ">=8.1",
"cakephp/cakephp": "^5.1",
"composer/composer": "^2.0",
"composer/composer": "^2.7.7",
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There were security updates for composer
https://getcomposer.org/changelog/2.7.7

"doctrine/sql-formatter": "^1.1.3"
},
"require-dev": {
"cakephp/authorization": "^3.0",
"cakephp/cakephp-codesniffer": "^5.0",
"phpunit/phpunit": "^10.5.5 || ^11.1.3"
"phpunit/phpunit": "^10.5.32 || ^11.1.3 || ^12.0.9"
},
"suggest": {
"ext-pdo_sqlite": "DebugKit needs to store panel data in a database. SQLite is simple and easy to use."
Expand Down
4 changes: 2 additions & 2 deletions tests/TestCase/Middleware/DebugKitMiddlewareTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -193,13 +193,13 @@ public function testInvokeNoModifyBinaryResponse()
$handler = $this->handler();
$handler->expects($this->once())
->method('handle')
->will($this->returnCallback(function ($req) use ($response) {
->willReturnCallback(function ($req) use ($response) {
$stream = new CallbackStream(function () {
return 'hi!';
});

return $response->withBody($stream);
}));
});
$middleware = new DebugKitMiddleware();
$result = $middleware->process($request, $handler);
$this->assertInstanceOf(Response::class, $result, 'Should return a response');
Expand Down
2 changes: 1 addition & 1 deletion tests/TestCase/Model/Table/RequestTableTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ public function testGc()
/** @var \PHPUnit\Framework\MockObject\MockObject&\DebugKit\Model\Table\RequestsTable $requestsTableMock */
$requestsTableMock = $this->getMockForModel('DebugKit.Requests', ['shouldGc']);
$requestsTableMock->method('shouldGc')
->will($this->returnValue(true));
->willReturn(true);

$data = array_fill(0, 10, [
'url' => '/tasks/add',
Expand Down
7 changes: 6 additions & 1 deletion tests/TestCase/Panel/IncludePanelTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
use Cake\Event\Event;
use Cake\TestSuite\TestCase;
use DebugKit\Panel\IncludePanel;
use PHPUnit\Framework\Attributes\WithoutErrorHandler;

/**
* Class IncludePanelTest
Expand All @@ -36,14 +37,17 @@ class IncludePanelTest extends TestCase
public function setUp(): void
{
parent::setUp();
$this->panel = new IncludePanel();
$this->deprecated(function () {
$this->panel = new IncludePanel();
});
}

/**
* test shutdown
*
* @return void
*/
#[WithoutErrorHandler]
public function testShutdown()
{
$this->panel->shutdown(new Event('Controller.shutdown'));
Expand All @@ -61,6 +65,7 @@ public function testShutdown()
*
* @return void
*/
#[WithoutErrorHandler]
public function testSummary()
{
$total = $this->panel->summary();
Expand Down
6 changes: 5 additions & 1 deletion tests/TestCase/Panel/SessionPanelTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
use Cake\Http\Session;
use Cake\TestSuite\TestCase;
use DebugKit\Panel\SessionPanel;
use PHPUnit\Framework\Attributes\WithoutErrorHandler;

/**
* Class RequestPanelTest
Expand Down Expand Up @@ -47,6 +48,7 @@ public function setUp(): void
*
* @return void
*/
#[WithoutErrorHandler]
public function testShutdownSkipAttributes()
{
$session = new Session();
Expand All @@ -57,7 +59,9 @@ public function testShutdownSkipAttributes()

$controller = new Controller($request);
$event = new Event('Controller.shutdown', $controller);
$this->panel->shutdown($event);
$this->deprecated(function () use ($event) {
$this->panel->shutdown($event);
});

$data = $this->panel->data();
$this->assertArrayHasKey('content', $data);
Expand Down
4 changes: 2 additions & 2 deletions tests/bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,9 @@
]);

Cache::setConfig([
'_cake_core_' => [
'_cake_translations_' => [
'engine' => 'File',
'prefix' => 'cake_core_',
'prefix' => 'cake_translations_',
'serialize' => true,
],
'_cake_model_' => [
Expand Down