0.2.0
BC breaks over v0.1
- Requires Symfony 5.2 or greater
Improvements
Symfony 6 compatibility by @amacrobert in #47 and @mnapoli in #50
The package now provides a Symfony Runtime (by @mnapoli in #45) that lets users:
- Handle requests with the Kernel directly, without PHP-FPM
# serverless.yml
functions:
app:
- handler: public/index.php
+ handler: App\Kernel
layers:
# Switch from PHP-FPM to the "function" runtime:
- - ${bref:layer.php-80-fpm}
+ - ${bref:layer.php-80}
environment:
# The Symfony process will restart every 100 requests
BREF_LOOP_MAX: 100
The App\Kernel
will be retrieved via Symfony Runtime from public/index.php
.
- Handle events with Symfony services
To handle other events (e.g. SQS messages with Symfony Messenger) via a class name:
# serverless.yml
functions:
sqsHandler:
- handler: bin/consumer.php
+ handler: App\Service\MyService
layers:
- ${bref:layer.php-80}
The service will be retrieved via Symfony Runtime from the Symfony Kernel returned by public/index.php.
Note: the service must be configured as public (public: true) in the Symfony configuration.
Full Changelog: 0.1.3...0.2.0