On 7 Jun, the libSSE-php released version 2.1.0 and providing well interface available to integrate with popular framework. And I release the laravel-sse for the Laravel. The libSSE-php has changed so much comparing from version 1. In this post, I hope to share about the libSSE-php version 2.
The most important change is adding namespaces and available on packagist. To make it simple and easy to remember, I picked the prefix
SSE and the packagist package name as
tonyhhyip/sse. Most of the classes had the prefix SSE and not being autoload. The prefix was changed into namespace SSE. The method name is using the snake case which is not the common practice in PSR-2, all of them is then changed into camel case.
In the most common issue of the libSSE-php is people complain about they are not able to change session data. To solve this issue, Data Mechanism is added for people, which is using apc, mysql and file in version 1. In version 2.0, memcache, redis and PDO mechanism is added to provide more choice for users. In version 2.1, a Session Mechanism is added by making use of Symfony session interface. The core heart – class SSE had changed in the version 2.1, it makes use of the Symfony StreamedResponse. As a result, it is more easy to integrate the libSSE-php into the popular PHP framework like Symfony 2 and Laravel.
This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.