Skip to content

Commit

Permalink
Edited required version of Tracy
Browse files Browse the repository at this point in the history
  • Loading branch information
jvitasek committed Apr 12, 2021
1 parent c985d2d commit 458f886
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 3 deletions.
18 changes: 16 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ The best way to install jvitasek/DumpAndDie is using [Composer](http://getcompos
$ composer require jvitasek/dumpanddie
```

## Usage
## Usage in browser

```php
<?php declare(strict_types = 1);
Expand All @@ -19,7 +19,7 @@ final class TestPresenter extends Presenter {
public function actionDefault(): void
{
$price = 42;
$filename = sha1($price + time()) . '.log';
$filename = sha1((string) ($price + time())) . '.log';

// write this
dd($price, $filename);
Expand All @@ -32,3 +32,17 @@ final class TestPresenter extends Presenter {

}
```

## Usage in CLI

```php
<?php declare(strict_types = 1);

use Tracy\Debugger;

require __DIR__ . '/../vendor/autoload.php';
Debugger::enable(Debugger::DEVELOPMENT);
$price = 42;
$filename = sha1((string) ($price + time())) . '.log';
dd($price, $filename);
```
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
}
],
"require": {
"tracy/tracy": "^2.8"
"tracy/tracy": ">=2.5"
},
"autoload": {
"files": ["src/dumper.php"]
Expand Down

0 comments on commit 458f886

Please sign in to comment.