Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is a major release that transforms the framework from a traditional request-response library into a production-grade, fiber-safe foundation for high-concurrency PHP 8.4+ applications.
Benchmark Results
Running on FrankenPHP (Worker Mode) with 4 workers on Apple M2 (MacBook Air), the refactored framework achieves massive throughput improvements. After applying Container Fast-Paths and Route Pre-loading, we observed a >150% increase in performance over early v2 dev builds.
Command:
wrk -t8 -c200 -d30s http://localhost:8081/health🛠 Upgrading from v1.0.5
VibeFW v2.0.0 introduces breaking changes to core execution patterns. Follow this guide to migrate your application.
1. Update Kernel Execution
The
HttpKernel::handle()method no longer emits the response. You must now capture the returned object and emit it using the newSapiEmitter.Old (v1.0.5):
New (v2.0.0):
2. Mandatory QueryBuilder Re-assignment
The
QueryBuilderis now immutable. Method chaining remains supported, but you must assign the result back to a variable if branching your queries.Old (v1.0.5):
New (v2.0.0):
3. Request Property Access
Direct modification of Request properties is no longer allowed as they are now
readonly. If you were manually overriding$_GETvalues on the Request object, you must now inject those values during construction or via the Middleware pipeline.4. Resettable Interface
If you have custom services that store data in-memory (static arrays or class properties), they should now implement
Fw\Support\ResettableInterfaceand be registered in the Container. This ensures they are automatically cleared between requests in worker mode.Summary of Changes
Performance & Async Improvements
AsyncHttpto use non-blocking socket streams and theEventLoopwatcher system.State Integrity & Safety
Containernow isolates request-scoped services per Fiber.RequestContextnow uses aWeakMapkeyed by the current Fiber to prevent data leakage between concurrent requests.HttpKernelthat throws aRuntimeExceptionif request state from a previous execution is detected.MemoryCacheandQueryWatcherare now automatically reset after every request.