[Tony Yip] libSSE-php Version 2

On 7 June, 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.

Change in libSSE-php

Namespace and packagist

First, 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. Therefore, the prefix was changed into namespace SSE. Also, the method name is using the snake case which is not the common practice in PSR-2, as a result, all of them is then changed into lower camelcase.

Data Mechanism and Core Heart

Moreover, In the most common issue of the libSSE-php is people complain about was 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. Furthermore, in version 2.1,  I added a Session Mechanism by making use of Symfony session interface. I make a change on the core heart – class SSE 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.

Release of laravel-sse

Last but not least, I release the laravel-sse, so that the library can be easily used in the most popular PHP framework nowadays.

Find out more

Hope you will love and make use the libSSE-php. Come and give it a star on Github and Packagist.
Creative Commons Licence
This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.

Leave a Reply

Your email address will not be published. Required fields are marked *