Skip to content

Commit 412b7b5

Browse files
beastbytesdgn3t
authored
readme: added Yii3 Integration (#599)
* opened 3.0-dev * requires PHP 8.1 * uses PascalCase constants * removed bridge for Latte * Logger: added typehints * Logger: md5 replaced with xxHash * error.log changed to warning.log * bar: errors panel => warnings * readme: added link to Joomla integration (#583) Link to Joomla! integration. * used attribute Deprecated * Update readme.md Add link to Yii3 integration --------- Co-authored-by: David Grudl <david@grudl.com> Co-authored-by: n3t <n3t@n3t.cz>
1 parent fea1ec5 commit 412b7b5

4 files changed

Lines changed: 47 additions & 1 deletion

File tree

readme.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -457,5 +457,6 @@ This is a list of unofficial integrations to other frameworks and CMS:
457457
- Symfony framework: [kutny/tracy-bundle](https://github.com/kutny/tracy-bundle), [VasekPurchart/Tracy-Blue-Screen-Bundle](https://github.com/VasekPurchart/Tracy-Blue-Screen-Bundle)
458458
- [Wordpress](https://github.com/ktstudio/WP-Tracy)
459459
- [Joomla! CMS](https://n3t.bitbucket.io/extension/n3t-debug/)
460+
- [Yii3 framework](https://github.com/beastbytes/yii-tracy)
460461

461462
... feel free to be famous, create an integration for your favourite platform!
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<?php
2+
3+
declare(strict_types=1);
4+
5+
namespace Tracy;
6+
7+
/** @var int[] $data */
8+
?>
9+
<h1>Warnings</h1>
10+
11+
<div class="tracy-inner">
12+
<table class="tracy-sortable">
13+
<?php foreach ($data as $item => $count): [$file, $line, $message] = explode('|', $item, 3) ?>
14+
<tr>
15+
<td class="tracy-right"><?= $count ? "$count\xC3\x97" : '' ?></td>
16+
<td><pre><?= Helpers::escapeHtml($message), ' in ', Helpers::editorLink($file, (int) $line) ?></pre></td>
17+
</tr>
18+
<?php endforeach ?>
19+
</table>
20+
</div>
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
<?php
2+
3+
declare(strict_types=1);
4+
5+
namespace Tracy;
6+
7+
/** @var int[] $data */
8+
if (empty($data)) {
9+
return;
10+
}
11+
?>
12+
<style class="tracy-debug">
13+
#tracy-debug .tracy-WarningsTab {
14+
display: block;
15+
background: #D51616;
16+
color: white;
17+
font-weight: bold;
18+
margin: -1px -.4em;
19+
padding: 1px .4em;
20+
}
21+
</style>
22+
<span class="tracy-WarningsTab">
23+
<svg viewBox="0 0 2048 2048"><path fill="#fff" d="M1152 1503v-190q0-14-9.5-23.5t-22.5-9.5h-192q-13 0-22.5 9.5t-9.5 23.5v190q0 14 9.5 23.5t22.5 9.5h192q13 0 22.5-9.5t9.5-23.5zm-2-374l18-459q0-12-10-19-13-11-24-11h-220q-11 0-24 11-10 7-10 21l17 457q0 10 10 16.5t24 6.5h185q14 0 23.5-6.5t10.5-16.5zm-14-934l768 1408q35 63-2 126-17 29-46.5 46t-63.5 17h-1536q-34 0-63.5-17t-46.5-46q-37-63-2-126l768-1408q17-31 47-49t65-18 65 18 47 49z"/>
24+
</svg><span class="tracy-label"><?= $sum = array_sum($data), $sum > 1 ? ' warnings' : ' warning' ?></span>
25+
</span>

src/Tracy/Debugger/Debugger.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ class Debugger
9393
/** theme for dump() */
9494
public static string $dumpTheme = 'light';
9595

96-
/** @deprecated */
96+
#[\Deprecated]
9797
public static $maxLen;
9898

9999
/********************* logging ****************d*g**/

0 commit comments

Comments
 (0)