sohophp / sofinder-psr15
PSR-15 bridge for SoFinder, supporting Slim 4, Mezzio 3 and framework-free PHP
Requires
- php: ^8.1
- psr/event-dispatcher: ^1.0
- psr/http-factory: ^1.1
- psr/http-message: ^1.1 || ^2.0
- psr/http-server-handler: ^1.0
- psr/http-server-middleware: ^1.0
- sohophp/sofinder-http: v1.5.2
Requires (Dev)
None
Suggests
- guzzlehttp/psr7: Provides PSR-7 and PSR-17 factories for a framework-free host
- mezzio/mezzio: Registers the shared endpoints in a Mezzio 3 application
- nyholm/psr7: Provides compact PSR-7 and PSR-17 factories for a framework-free host
- slim/slim: Registers the shared endpoints in a Slim 4 application
Provides
None
Conflicts
- sohophp/sofinder-legacy: *
Replaces
None
README
PSR-15 middleware and canonical route registration for Slim 4, Mezzio 3 and
plain PSR applications. It exposes the complete 52-route UI/API surface,
including the framework-neutral /browser shell and versioned frontend assets.
Hosts that render their own page can construct RouteRegistrar with
includeBrowser: false to register only the 51 non-presentation routes.
composer require sohophp/sofinder-psr15:^1.1
The bridge is supported on PHP 8.1–8.5. Slim 4, Mezzio 3 and framework-free PHP run the same complete HTTP, security, lifecycle and browser contracts as the Symfony and Laravel bridges.
Construct SoFinderApplication with an EndpointDispatcher and HostServices,
or use LocalApplicationFactory to build the complete 52-action local-storage
runtime from normalized configuration and explicit host services.
HostServices requires explicit authorization, actor, CSRF and event-dispatcher
implementations, so the official runtime cannot silently start with anonymous
access. NativeSessionCsrfTokenProvider is available for framework-free PHP.
Hosts using document_preview.mode=messenger must also provide an available
DocumentPreviewDispatcherInterface; auto uses it when present and otherwise
keeps the bounded inline behavior.
The factory discovers the packaged dist directory automatically; consumers
only need to pass packageDirectory when deliberately serving a custom build.
Install a PSR-7/PSR-17 implementation such as nyholm/psr7 or
guzzlehttp/psr7 for a framework-free host. Publication checks install this
bridge by itself (without Symfony or Laravel) and boot the complete browser and
asset runtime with both implementations.
Runnable Slim, Mezzio and plain PHP front controllers live in
examples/psr15. Each host serves the real React browser and every API action;
HTTP and Chromium smoke tests verify the browser bootstrap, assets and shared
configuration API. The example deliberately denies protected operations until
a real host supplies its services.
Documentation: https://sofinder.sohophp.app/framework-support
License: MIT.