- What is phphleb/webrotor and what problem does it solve?
- WebRotor is a Composer package described as an asynchronous PHP web server for shared hosting and a fast, flexible PHP router. It provides route groups, parameters, middleware, named routes, and PSR-7/PSR-15 integration for adding clean, high-performance routing to PHP projects. In a Laravel context, it should be evaluated as a routing and possibly server-layer package, subject to compatibility checks.
- Is WebRotor a router or an asynchronous web server?
- The provided context uses both descriptions: the overview calls it an asynchronous PHP web server for shared hosting, while the blurb calls it a PHP router. Treat the routing features as the documented core, with the async server and shared-hosting angle as part of the package positioning. Confirm the exact runtime behavior in the repository README for your deployment model.
- How do I install phphleb/webrotor with Composer?
- Install it as a Composer dependency using the package name phphleb/webrotor, then follow the repository README for required configuration and bootstrap steps. The provided context does not include the exact composer require command or any Laravel service provider setup, so check GitHub for those details. Test the integration in a non-production environment before enabling it in a Laravel application.
- Does WebRotor support Laravel, and which Laravel versions are supported?
- The package is evaluated in a Laravel/PHP context, but the provided context does not list explicit Laravel version constraints. Validate support against your target Laravel minor version, PHP runtime, and Composer constraints before adopting it. Check the repository composer.json and release notes for the authoritative compatibility matrix.
- Is Redis required for WebRotor v1.2.2?
- The context says v1.2.2 adds Redis storage for session data, but it does not state whether Redis is a hard dependency or an opt-in configuration. Treat Redis as an optional capability unless the README or package configuration confirms otherwise. Verify the configuration flags and fallback behavior before making Redis part of your request path.
- What exactly does WebRotor store in Redis for session data?
- The context only says Redis storage is added from session data, which is ambiguous. It could mean full session payloads, package-specific keys, or derived session-adjacent data, so confirm serialization, key prefixes, TTLs, tenant isolation, and encryption expectations. Do not assume migration compatibility with existing file, database, or cookie sessions until that behavior is documented and tested.
- How should I configure WebRotor Redis session storage safely in production?
- Start in non-production, enable the Redis storage mode behind configuration or a feature flag, and run session read, write, expiry, and multi-instance tests. Validate Redis client support such as phpredis versus predis, Redis version, connection pooling, eviction policy, and failover behavior. Document and test a rollback path to your previous session driver before rolling out to production traffic.
- What happens if Redis is unavailable or evicts WebRotor session keys?
- The context identifies Redis outages and key eviction as failure modes that can cause session-backed reads or writes to fail or sessions to be lost. Plan for connection health monitoring, memory and eviction-policy visibility, and runbooks for Redis degradation. If WebRotor reads session-backed data synchronously, Redis availability becomes part of the request path.
- Can WebRotor run on shared hosting?
- The package overview describes WebRotor as an asynchronous PHP web server for shared hosting, so that is part of its stated positioning. Shared hosting environments vary widely in process limits, extensions, and long-running request support, so verify the async server requirements against your host. For Laravel applications, confirm that routing and any Redis-backed session features are supported in that hosting model.
- How do I test and roll back a WebRotor session storage migration?
- Sequence the migration separately from unrelated application changes: confirm package compatibility, add Redis configuration in staging, enable the new storage mode behind a flag, and test session read/write, expiry, multi-instance consistency, and load behavior. Validate Redis latency, connection pooling, and failover, and keep the prior file or database session driver available. Document a tested rollback path and avoid broad production enablement until those checks pass.