Skip to content

Commit

Permalink
Merge pull request #124: Fix docs and ports option
Browse files Browse the repository at this point in the history
  • Loading branch information
roxblnfk committed Jun 20, 2024
2 parents bb2bbc2 + 2196363 commit 45bc556
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 5 deletions.
29 changes: 26 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,13 @@

<br />

**Buggregator Trap** is a minified version of the [Buggregator Server](https://github.com/buggregator/server)
in the form of a terminal application and a set of utilities to assist with debugging.
The package is designed to enhance the debugging experience in conjunction with the Buggregator Server.
**Trap** is a package designed to enhance the debugging experience in conjunction with the Buggregator Server.
Trap includes:

- A set of functions for direct interaction with any Buggregator server.
- Extensions for Symfony VarDumper that become active immediately after installing Trap.
- A minimized version of the [Buggregator Server](https://github.com/buggregator/server) that does not require Docker
and is intended solely for local use.

- [Installation](#installation)
- [Overview](#overview)
Expand All @@ -43,6 +47,25 @@ composer require --dev buggregator/trap -W

And that's it. Trap is [ready to go](#usage).

### Phar

Sometimes your project may conflict with Trap's dependencies, or you might be interested in using only the local
server (e.g., for analyzing local profiler files).
In this case, consider installing Trap as a Phar (a self-contained PHP executable).
Using wget:

```bash
wget https://github.com/buggregator/trap/releases/latest/download/trap.phar
chmod +x trap.phar
./trap.phar --version
```

Using [Phive](https://phar.io/):

```bash
phive install buggregator/trap
```

## Overview

Buggregator Trap provides a toolkit for use in your code. Firstly, just having Buggregator Trap in your
Expand Down
2 changes: 1 addition & 1 deletion src/Command/Run.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ public function getServers(Container $container): array
$config = $container->get(TcpPorts::class);

$servers = [];
$ports = $config->ports ?: [1025, 8000, 9912, 9913];
$ports = $config->ports;
/** @var scalar $port */
foreach ($ports as $port) {
\is_numeric($port) or throw new \InvalidArgumentException(
Expand Down
2 changes: 1 addition & 1 deletion src/Config/Server/TcpPorts.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ final class TcpPorts
*/
#[Env('TRAP_TCP_PORTS')]
#[InputOption('port')]
public array $ports = [9912];
public array $ports = [1025, 8000, 9912, 9913];

/**
* Host to listen
Expand Down

0 comments on commit 45bc556

Please sign in to comment.