splash / bridge-builder
Splash Bridge Builder - Package Connectors as Isolated PHAR Workers
Requires
- php: ^8.1
- ext-fileinfo: *
- ext-json: *
- ext-posix: *
- splash/php-bundle: ^2.0|^3.0
Requires (Dev)
- badpixxel/php-sdk: ^3.0
- symfony/config: ^5.4|^6.4|^7.0
- symfony/console: ^5.4|^6.4|^7.0
- symfony/dependency-injection: ^5.4|^6.4|^7.0
- symfony/dotenv: ^5.4|^6.4|^7.0
- symfony/finder: ^5.4|^6.4|^7.0
- symfony/flex: ^1.0|^2.0|^7.0
- symfony/form: ^5.4|^6.4|^7.0
- symfony/framework-bundle: ^5.4|^6.4|^7.0
- symfony/http-kernel: ^5.4|^6.4|^7.0
- symfony/monolog-bundle: ^2.0|^3.0
- symfony/twig-bundle: ^5.4|^6.4|^7.0
- symfony/yaml: ^5.4|^6.4|^7.0
Suggests
None
Provides
None
Conflicts
None
Replaces
None
This package is auto-updated.
Last update: 2026-09-11 12:42:39 UTC
README
The Bridge Builder packages any Splash connector into an isolated, standalone worker that communicates via JSON-RPC over stdin/stdout. This is the build-time companion to the Bridge Bundle, which consumes these workers at runtime.
Splash connectors are Symfony bundles with their own dependencies; running each one in its
own isolated PHP process with its own vendor directory removes every dependency conflict.
The result is a single self-contained .splx binary: zero dependency conflicts, zero PHP
installation required on the target, sub-millisecond runtime latency.
composer require --dev splash/bridge-builder
php -d phar.readonly=0 vendor/bin/bridge-builder # => dist/{name}.splx
Documentation
- Getting started — why, output formats, install, build commands, output layout
- Configuration —
extra.splash-bridgereference, post-build scripts, static-php build variants - Build pipeline — the 8 steps, testing a worker manually, reverse callbacks
- Connector constraints — what a connector must satisfy to run as a worker
- Publishing — GitLab Package Registry upload
AI coding agents: see llms.txt, and the splash-connector skill (splash/skills).
Architecture
Php-BridgeBuilder/
src/ <- Splash\BridgeBuilder namespace
Collectors/
ConfigCollector.php <- Reads extra.splash-bridge from composer.json
Builders/
ProjectBuilder.php <- Step 1: copies stubs + sources
ComposerBuilder.php <- Step 2: generates composer.json + install
WorkerBuilder.php <- Step 3: injects connector FQCN into services.yaml
ScriptsBuilder.php <- Step 4: runs post-build-cmd
ManifestBuilder.php <- Step 5: generates manifest.json (multi-locale)
VerifyBuilder.php <- Step 6: ping verification
PharBuilder.php <- Step 7: packages into .phar (GZ compressed)
SplxBuilder.php <- Step 8: downloads micro.sfx + concatenates into .splx
Publishers/
GitlabPublisher.php <- --publish: GitLab Generic Package Registry
stubs/ <- Template files copied into every build
bridge/ <- Splash\BridgeWorker namespace (runtime code)
Kernel.php <- MicroKernel with 3-step bundle loading
BridgeWorkerBundle.php <- CompilerPass wires WorkerService to connector
Services/
WorkerService.php <- Public entry point (connector injected via DI)
WorkerRunner.php <- stdin/stdout JSON-RPC loop
RpcResponseBuilder.php<- Encodes responses + Splash logs
CallbackService.php <- Sends reverse callbacks to the bridge
LocaleContext.php <- Holds current locale for translations
TransportService.php <- stdin/stdout I/O with idle timeout
Dispatcher/ <- Profile, Form, Template, Config, Action dispatchers
Listener/ <- File, Commit, IdChanged, ConfigUpdate callback listeners
Dictionary/ProtocolMessages.php
DependencyInjection/Compiler/WorkerConnectorPass.php
Resources/config/services.yaml
worker.php <- Bootstrap: boots Kernel → WorkerService::run()
bin/bridge-builder <- CLI entry point
License
MIT - See LICENSE