Transport-agnostic communication toolkit for PHP.
TalkingBytes provides a shared middleware/event core with protocol modules for:
- Email (SMTP/sendmail/mail/spool + IMAP/POP3/parser)
- HTTP (cURL + cURL multi)
- Webhook (sign/verify/replay)
- gRPC (adapter + retry + fake caller)
composer require infocyph/talkingbytesRequirements:
- PHP
>=8.4 ext-curlext-fileinfoext-openssl
use Infocyph\TalkingBytes\Http\HttpClient;
$result = HttpClient::curl()
->withBearerToken($token)
->timeout(10)
->postJson('https://api.example.com/orders', [
'order_id' => 1001,
'amount' => 500,
]);
if ($result->successful) {
$data = $result->response->json();
}use Infocyph\TalkingBytes\Email\Email;
use Infocyph\TalkingBytes\Email\EmailMessage;
$result = Email::sender()->usingNull()->send(
EmailMessage::new()
->from('sender@example.com')
->to('user@example.com')
->subject('Hello')
->text('Hello from TalkingBytes')
);use Infocyph\TalkingBytes\Webhook\Webhook;
use Infocyph\TalkingBytes\Webhook\WebhookMessage;
$delivery = Webhook::sender($httpClient)
->withSecret('whsec_test')
->send(
WebhookMessage::event('order.created')
->url('https://merchant.example.com/webhook')
->payload(['order_id' => 1001])
);use Infocyph\TalkingBytes\Grpc\GrpcClient;
use Infocyph\TalkingBytes\Grpc\GrpcRequest;
$result = GrpcClient::transport($transport)
->call(GrpcRequest::create('Orders/Create', ['order_id' => 1001]));Detailed docs are in docs/ (Read the Docs structure):
docs/getting-started.rstdocs/architecture.rstdocs/email/index.rstdocs/http/index.rstdocs/webhook/index.rstdocs/grpc/index.rstdocs/events.rstdocs/testing.rstdocs/security.rstdocs/performance.rstdocs/extensions.rstdocs/naming.rstdocs/release-checklist.rst
Run full quality and test pipeline:
composer ic:ciMIT