bref/symfony-bridge
Bref runtime bridge for running Symfony on AWS Lambda. Install with Composer, extend BrefKernel in your Kernel, and deploy with a warm cache to reduce cold-start time. Avoid filesystem writes in production.
When a Symfony application runs with the Bref runtime (not PHP-FPM), the files uploaded with a request were never deleted: they stayed in the Lambda instance's /tmp until it was full, and then everything that writes to /tmp failed. They are now deleted when the next request starts.
On Bref 3, Bref 3.0.13 is now required: before it, Bref's cleanup missed every upload on PHP 8.4 and up.
Full Changelog: https://github.com/brefphp/symfony-bridge/compare/3.0.2...3.0.3
The bundle that enables Bref's CloudWatch log formatter was never registered by Symfony Flex, so Symfony applications logged Monolog's default JSON instead. The bundle is now named BrefSymfonyBridgeBundle, which Flex adds to config/bundles.php when installing bref/symfony-bridge.
Existing applications: nothing changes and nothing breaks. Flex doesn't register bundles when a package is updated, so your logs keep their current format. To switch to Bref's log format, add this line to config/bundles.php:
Bref\SymfonyBridge\BrefSymfonyBridgeBundle::class => ['all' => true],
If you had registered Bref\SymfonyBridge\BrefBundle yourself, it keeps working. It is deprecated in favor of BrefSymfonyBridgeBundle.
bref/monolog-bridge 2.0 is now supported: with Bref's log formatter, each log line starts with the ID of the Lambda invocation that wrote it, so that all the logs of a request can be found in Bref Cloud or in CloudWatch Logs Insights (documentation). To keep the previous format, require bref/monolog-bridge: ^1.0 in your application.
Full Changelog: https://github.com/brefphp/symfony-bridge/compare/3.0.1...3.0.2
Full Changelog: https://github.com/brefphp/symfony-bridge/compare/2.0.1...3.0.1
Bref 3.0 is released 🎉
Read the full blog post here: bref.sh/news/03-bref-3.0
The full upgrade guide is here: https://bref.sh/docs/upgrading/v3
Full Changelog: https://github.com/brefphp/symfony-bridge/compare/1.2.0...3.0.0
Fix broken setFormatter() call.
Full Changelog: https://github.com/brefphp/symfony-bridge/compare/2.0.0...2.0.1
Bref 3.0 is released 🎉
Read the full blog post here: bref.sh/news/03-bref-3.0
The full upgrade guide is here: https://bref.sh/docs/upgrading/v3
Full Changelog: https://github.com/brefphp/symfony-bridge/compare/1.2.0...2.0.0
Full Changelog: https://github.com/brefphp/symfony-bridge/compare/1.1.1...1.2.0
Full Changelog: https://github.com/brefphp/symfony-bridge/compare/1.1.0...1.1.1
bref/monolog-bridge by @mnapoli in https://github.com/brefphp/symfony-bridge/pull/70The Bref\Monolog\CloudWatchFormatter is now usable, which will automatically format logs for CloudWatch.
Read https://bref.sh/docs/environment/logs#writing-logs to learn more.
Full Changelog: https://github.com/brefphp/symfony-bridge/compare/1.0.3...1.1.0
Full Changelog: https://github.com/brefphp/symfony-bridge/compare/1.0.2...1.0.3
Full Changelog: https://github.com/brefphp/symfony-bridge/compare/1.0.1...1.0.2
BrefKernel::handle method signature with the Symfony\Component\HttpKernel\HttpKernelInterface by @smoench in https://github.com/brefphp/symfony-bridge/pull/68Full Changelog: https://github.com/brefphp/symfony-bridge/compare/1.0.0...1.0.1
Full Changelog: https://github.com/brefphp/symfony-bridge/compare/0.2.2...1.0.0
Full Changelog: https://github.com/brefphp/symfony-bridge/compare/0.2.1...0.2.2
Full Changelog: https://github.com/brefphp/symfony-bridge/compare/0.2.0...0.2.1
Symfony 6 compatibility by @amacrobert in https://github.com/brefphp/symfony-bridge/pull/47 and @mnapoli in https://github.com/brefphp/symfony-bridge/pull/50
The package now provides a Symfony Runtime (by @mnapoli in #45) that lets users:
# 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.
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: https://github.com/brefphp/symfony-bridge/compare/0.1.3...0.2.0
First beta release for v0.2.0.
Symfony 6 compatibility by @amacrobert in https://github.com/brefphp/symfony-bridge/pull/47 and @mnapoli in https://github.com/brefphp/symfony-bridge/pull/50
The package now provides a Symfony Runtime (by @mnapoli in #45) that lets users:
# 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.
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: https://github.com/brefphp/symfony-bridge/compare/0.1.3...0.2.0-beta1
#42 #43 Make sure the /tmp/log directory exists.
Allow PHP8
First release
How can I help you explore Laravel packages today?