diff --git a/README.md b/README.md index 28acb737..54fb7594 100644 --- a/README.md +++ b/README.md @@ -17,9 +17,13 @@
-**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) @@ -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 diff --git a/src/Command/Run.php b/src/Command/Run.php index 91bb1adb..62ddb1a0 100644 --- a/src/Command/Run.php +++ b/src/Command/Run.php @@ -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( diff --git a/src/Config/Server/TcpPorts.php b/src/Config/Server/TcpPorts.php index 513a2955..dab78ed6 100644 --- a/src/Config/Server/TcpPorts.php +++ b/src/Config/Server/TcpPorts.php @@ -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