Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Portflow Laravel Package

hamzi/portflow

PortFlow connects serial hardware (thermal printers, barcode/RFID scanners, scales, IoT boards) to Laravel via a driver-based architecture. Parse raw bytes into typed events, queue routes, and printing workflows, with Web Serial API support for browser integration.

View on GitHub
Deep Wiki
Context7
0.6.0

Security

  • IngestController: Whitelist allowed context keys (session_id, source, device, baud_rate, device_name) — reject arbitrary keys that could be used for privilege escalation ([#security])
  • ListenSerialCommand: Tighten device path regex to only allow real TTY nodes (/dev/ttyXxx, /dev/serial/by-id/*, /dev/serial/by-path/*) — prevent path traversal via /dev/shm/ or similar writable paths
  • PortFlowServiceProvider: Rate limiter now keys by IP + user ID — prevents single-IP bypass from shared/proxied networks

Features

  • PortFlowServiceProvider: Config validation at boot — invalid driver classes, missing SerialDriver implementation, or non-existent event/model classes in portflow.mappings now throw PortFlowException immediately at boot rather than failing silently at runtime
  • Facades/PortFlow: Added full [@method](https://github.com/method) PHPDoc annotations (ingest, encode, print, health) for IDE completion and PHPStan level 8 compatibility
  • PortFlowException: New factory methods invalidDriver() and invalidConfiguration() for typed configuration errors

Bug Fixes

  • MessageRouter: SerialEvent interface is now enforced — events not implementing SerialEvent are rejected with Log::error and routing is skipped (previously only logged a warning and continued)
  • FingerprintPacketDriver: Added Log::warning on checksum mismatch to surface corrupted packets; clarified that base64 cache storage is intentional for binary-safe serialisation; fixed unpack() return type handling to prevent silent offset errors
  • ListenSerialCommand: Added type-safe optionString() / argumentString() helpers — eliminates unsafe (string) casts on mixed option/argument values (PHPStan level 8 compliance)

Tests

  • Added BarcodeLineDriverTest (11 test cases): single/multi barcode, custom delimiter, prefix stripping, empty line filtering, encode round-trip, field assertions
  • Added RfidAsciiDriverTest (11 test cases): STX/ETX parsing, uppercase toggle, custom delimiters, empty tag filtering, partial frame buffering, encode round-trip
  • Added FingerprintPacketDriverTest (13 test cases): command/ack/data/end-data packets, checksum validation, garbage discarding, custom start code, encode round-trip, field assertions
  • Added FrameRoutingIntegrationTest (8 test cases): full ingest → event dispatch pipeline for raw-json/barcode-line/rfid-ascii/escpos drivers, SerialEvent enforcement, buffer persistence across split requests, context key whitelisting, queue routing, health endpoint, encode helper

Test count: 19 → 86 tests, 172 assertions

Code Quality

  • PHPStan level 8: 0 errors (was 19 errors pre-release)
  • All unpack() results guarded against false return
  • chr() arguments explicitly narrowed to int<0, 255> with & 0xFF

0.5.2

Bug Fixes

  • remove duplicate file content + add browser compatibility support (9447cf7)
0.5.1

Bug Fixes

  • resolve all Pint code-style violations (CI Quality job) (dece7be)
0.5.0

Features

  • professional hardening — rate limiting, queue routing, buffer persistence, reconnect, make:driver command, feature tests (53abaad)

Bug Fixes

  • resolve PHPStan errors in MakeDriverCommand + comprehensive README rewrite (68f359f)
0.4.0

Features

  • rename package Synapse to PortFlow (f299eec)
0.3.0

Features

  • Laravel 13 support, PHP matrix CI, README corrections, PHPStan level 8

Bug Fixes

  • Add typed array PHPDoc annotations — resolves all 24 PHPStan errors
  • phpstan: remove redundant ?? null on non-empty-list offset
0.2.0

Features

  • Professional review — EscPosBuilder commands (bold, underline, align, divider), PortFlowException, clean unit tests, README overhaul
  • Add typed PHPDoc array annotations across all drivers and services — resolves 24 PHPStan errors
0.1.0

Features

  • Initial release: hardware bridge package with RawJsonDriver, EscPosDriver, Rs232Driver
  • Web Serial JS bridge (PortFlowBridge), Livewire components, ESC/POS printing engine
  • Clean Architecture (Domain / Application / Infrastructure), CI/CD, release-please automation
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
directorytree/privacy-filter-classifier
directorytree/privacy-filter
datacore/hub-sdk
develia/commons
cuci/prototurk-sdk
cuci/prototurk-sdk-symfony
develia/geo-bundle
dreamzy/livewire-charts
touchestate-sdk/php-sdk
22h/doctrine-garbage-collection-bundle
agtp/agtp-php
agtp/mod-php
splash/sonata-admin
splash/metadata
splash/openapi
splash/scopes
splash/toolkit
testo/output-teamcity
testo/bridge-symfony
spatie/flare-daemon-runtime