Skip to content

Commit

Permalink
Merge pull request #617 from yiisoft/split-debug
Browse files Browse the repository at this point in the history
Split debug
  • Loading branch information
xepozz authored Jul 28, 2023
2 parents 52a6e08 + 81ba449 commit c01d368
Show file tree
Hide file tree
Showing 9 changed files with 1,015 additions and 5 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

## 1.1.0 July 24, 2023

- Enh #617: Add debug collector for yiisoft/yii-debug (@xepozz)
- Chg #722: Remove legacy array syntax for typecast. Use `Param` instead (@terabytesoftw)
- Chg #724: Typecast refactoring (@Tigrov)
- Chg #728: Refactor `AbstractSchema::getColumnPhpType()` (@Tigrov)
Expand Down
6 changes: 6 additions & 0 deletions composer-require-checker.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"symbol-whitelist" : [
"Yiisoft\\Yii\\Debug\\Collector\\CollectorTrait",
"Yiisoft\\Yii\\Debug\\Collector\\SummaryCollectorInterface"
]
}
18 changes: 14 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,15 @@
"rector/rector": "^0.17",
"roave/infection-static-analysis-plugin": "^1.16",
"spatie/phpunit-watcher": "^1.23",
"vimeo/psalm": "^4.30|^5.6",
"yiisoft/aliases": "^1.1|^2.0",
"vimeo/psalm": "^4.30|^5.12.0",
"yiisoft/aliases": "^3.0",
"yiisoft/cache-file": "^2.0",
"yiisoft/di": "^1.0",
"yiisoft/event-dispatcher": "^1.0",
"yiisoft/json": "^1.0",
"yiisoft/log": "^2.0",
"yiisoft/var-dumper": "^1.5"
"yiisoft/var-dumper": "^1.5",
"yiisoft/yii-debug": "dev-master"
},
"autoload": {
"psr-4": {
Expand All @@ -59,11 +60,20 @@
"Yiisoft\\Db\\Sqlite\\Tests\\": "vendor/yiisoft/db-sqlite/tests"
}
},
"extra": {
"config-plugin-options": {
"source-directory": "config"
},
"config-plugin": {
"params": "params.php"
}
},
"config": {
"sort-packages": true,
"allow-plugins": {
"infection/extension-installer": true,
"composer/package-versions-deprecated": true
"composer/package-versions-deprecated": true,
"yiisoft/config": false
}
},
"scripts": {
Expand Down
18 changes: 18 additions & 0 deletions config/params.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<?php

declare(strict_types=1);

use Yiisoft\Db\Connection\ConnectionInterface;
use Yiisoft\Db\Debug\ConnectionInterfaceProxy;
use Yiisoft\Db\Debug\DatabaseCollector;

return [
'yiisoft/yii-debug' => [
'collectors' => [
DatabaseCollector::class,
],
'trackedServices' => [
ConnectionInterface::class => [ConnectionInterfaceProxy::class, DatabaseCollector::class],
],
],
];
2 changes: 1 addition & 1 deletion src/Connection/ConnectionInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ public function setTablePrefix(string $value): void;
/**
* Executes callback provided in a transaction.
*
* @param Closure $closure A valid PHP callback that performs the job. Accepts connection instance as parameter.
* @psalm-param Closure(ConnectionInterface): mixed $closure A valid PHP callback that performs the job. Accepts connection instance as parameter.
* @param string|null $isolationLevel The isolation level to use for this transaction.
* {@see TransactionInterface::begin()} for details.
*
Expand Down
Loading

0 comments on commit c01d368

Please sign in to comment.