From 4893fc6c976b6a5a5a25b09e135d359eead2b6eb Mon Sep 17 00:00:00 2001 From: roxblnfk Date: Thu, 20 Jun 2024 22:45:38 +0400 Subject: [PATCH 1/2] fix: default ports; --- src/Command/Run.php | 2 +- src/Config/Server/TcpPorts.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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 From 21963630e4daf7fac892c6abe52bec1ab13d8226 Mon Sep 17 00:00:00 2001 From: roxblnfk Date: Thu, 20 Jun 2024 22:48:59 +0400 Subject: [PATCH 2/2] docs: update installation and about sections --- README.md | 29 ++++++++++++++++++++++++++--- 1 file changed, 26 insertions(+), 3 deletions(-) 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