Simple tool to visualize all the operations done on the operating system inside other php applications.
For the command line tool:
composer global require innmind/silent-cartographer
In the project you want to see operations:
composer require innmind/silent-cartographer
To watch all activities:
silent-cartographer panel
In your project in order to send activities:
use Innmind\CLI\{
Main,
Environment,
};
use Innmind\OperatingSystem\OperatingSystem;
use Innmind\Url\Path;
use function Innmind\SilentCartographer\bootstrap;
new class extends Main {
protected function main(Environment $env, OperatingSystem $os): void
{
$os = bootstrap($os)['cli'](Path::of(__DIR__));
// then use the $os variable like you would normally do
}
}
In an HTTP server context use the http_server
context (instead of cli
), the difference is that if no panel is activated at the reception of a request it will never try to send any activity to the panel for the rest of the request handling (this is done to reduce performance impact).