Commit Graph

4 Commits

Author SHA1 Message Date
Blax Software 5eee2f83b8 fix: ConnectionRegistry robust to numeric-string ids
PHP coerces numeric-string array keys ("1") to int keys, so ids()/each()/clear()
could hand ints to remove(string) and TypeError. Cast to string in those paths.
Surfaced by the laravel-ws integration (connection ids are sequential numbers).
Regression test added. Suite: 20 tests.

rel learn-atc #1055 #1057

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-07 14:04:58 +02:00
Blax Software 9173a8897b feat: PSR-3 logging + ConnectionRegistry backbone primitives
- Kernel now accepts an optional PSR-3 LoggerInterface (default NullLogger),
  exposes logger(), emits boot/running/shutdown lifecycle lines
- Add Support\ConnectionRegistry: transport-agnostic id->connection registry
  (add/remove/get/each/onAdd/onRemove/clear) for presence + broadcast, reused by
  WS channels + WebRTC peers
- Tests: 19 total / 35 assertions (added ConnectionRegistry + logging coverage)
- require psr/log

rel learn-atc #1055

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-07 13:49:43 +02:00
Blax Software 3c710b5132 chore: finish package to Blax standard (namespace, README, tests, scaffolding)
- Rename namespace BlaxSoftware\ReactPhpKernel -> Blax\ReactPhpKernel (house
  standard; the BlaxSoftware\LaravelWebSockets form is grandfathered only there)
- README rewritten to the Blax OSS package principles: OSS banner, title+badges,
  emoji feature list, quick start, what's-in-the-box, testing, star history
- Add PHPUnit suite (13 tests / 19 assertions, green) + phpunit.xml.dist
- Add pint.json (laravel preset, applied), composer scripts (test/lint),
  .gitattributes export-ignores, test.sh (nix), CHANGELOG
- composer.json: Blax psr-4, PHP ^8.1-^8.4, dev deps

rel learn-atc #1055

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-07 13:24:36 +02:00
Blax Software 96b3de6a53 feat: initial reactphp-kernel — shared ReactPHP backbone
Protocol-agnostic backbone extracted from blax-software/laravel-websockets so
WebSockets, WebRTC signaling and future protocols attach to one long-lived
process + loop + IPC + supervision:

- Kernel: loop lifecycle, server registration, signals, graceful stop
- Contracts\Server: attachable protocol server (boot/shutdown)
- Server\SocketServerFactory: plain/TLS listening socket (no framework coupling)
- Ipc\SocketPairIpc: event-driven parent/child IPC (lifted verbatim)
- Process\SignalHandler + ChildReaper (reusable form of laravel-websockets #982)

rel learn-atc #1055 #1051

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-07 13:07:47 +02:00