Thanks for your interest in contributing! Please read this before opening an issue or pull request.
- For bugs: Open a Bug Report first so we can confirm the issue before you start writing code.
- For features: Open a Feature Request first. Nothing is worse than a finished PR that doesn't get merged because the feature doesn't fit the project direction.
- For small fixes (typos, docs, obvious bugs): Just open a PR directly.
Requirements: PHP 8.1+, Composer.
git clone https://github.com/CallMeLeon167/debugphp-server.git
cd debugphp-server
composer installCopy .env.example to .env and fill in your credentials, or run the setup wizard at /setup/.
Run PHPStan before every commit to make sure everything is clean:
composer analyseEvery PHP file in src/ and setup/ must pass PHPStan at level 10 with zero errors. Run it before every commit:
composer analyseAll classes, methods, and non-trivial properties need PHPDoc blocks. Look at the existing source files for the expected style — they serve as the reference.
Good:
/**
* Returns all entries for a session that are newer than the given ID.
*
* @param string $sessionId The session to query.
* @param int $afterId Only return entries with an ID greater than this value.
*
* @return list<array{id: int, ...}> The matching entries ordered by ID ascending.
*/
public function findNewerThan(string $sessionId, int $afterId): arrayNot acceptable:
// get new entries
public function findNewerThan(string $sessionId, int $afterId): arraydeclare(strict_types=1)at the top of every PHP file- PSR-4 autoloading, namespace
DebugPHP\Server\ finalclasses wherever possible- No external runtime dependencies — the
requiresection incomposer.jsonstays as-is
If you change assets/js/dashboard.js or assets/css/dashboard.css, test the dashboard manually in the browser. There are no automated frontend tests — make sure the SSE stream reconnects correctly, entries render as expected, and filters still work.
Before opening a PR, make sure:
-
composer analysepasses with zero errors - All new public methods and classes have complete PHPDoc blocks
-
declare(strict_types=1)is present in every new or modified PHP file - Dashboard changes have been tested manually in the browser