Skip to content

0.5.33

Compare
Choose a tag to compare
@mnapoli mnapoli released this 21 Nov 18:27
· 1889 commits to master since this release

Hey everyone, Bref 1.0 is coming next week, are you ready 😬

AWS re:Invent will also be happening from December 1st, expect some pretty cool announcements :) I'll be covering it in the newsletter: serverless-php.news

Oh also, @deleugpn and I (@mnapoli) finally released 7777 πŸŽ‰


Full Changelog of Bref 0.5.33

Enhancements

πŸŽ‰ πŸŽ‰ Websocket support πŸŽ‰ πŸŽ‰

Congrats to @danniehansen for adding both:

  • a handler class for receiving websocket events in PHP (through API Gateway) in #773
  • a simple Websocket client to send events from PHP in #783

In case you didn't know, API Gateway supports websockets and we don't have to maintain connections. That's huge, because it makes websocket fully compatible with PHP's "process and die" execution model. No daemon to run, no persistent connection, just like HTTP requests.

Documentation will be added in 1.0, but here is an example:

class MyHandler extends WebsocketHandler
{
    public function handleWebsocket(WebsocketEvent $event, Context $context): HttpResponse
    {
        echo 'Route key: ' . $event->getRouteKey() . "\n";
        echo 'Event type: ' . $event->getEventType() . "\n";
        echo 'Body: ' . $event->getBody() . "\n";
        echo 'connectionId: ' . $event->getConnectionId() . "\n";

        return new HttpResponse('ok');
    }
}

You can see a much more complete example in #783

Documentation

  • Suggest to exclude the var directory when deploying Symfony #597 (@pyrech)