2.0.0-beta1
Pre-releaseThis is the first beta version of Bref v2.0 π
And we celebrate reaching 10 billion Lambda invocations powered by Bref every month.
That's 1 in every 1000 AWS Lambda invocations that runs with Bref!
OK, now with Bref v2. This first beta contains most of the changes for v2, even though I want to squeeze in more improvements before the stable release (especially improve the docs and the website, and the Laravel integration). In the meantime, the Bref v2 roadmap is here (but it is still open for ideas).
How to get started? Update composer.json
:
- "bref/bref": "^1.0",
+ "bref/bref": "^2.0@beta",
Then run composer update bref/bref --with-all-dependencies
.
Note
Below is a short summary. Read Upgrading to v2 for more details.
How is v2 better than v1:
- The
bref/bref
package is lighter (fewer dependencies), which leaves more room for your code on Lambda and improves cold starts (15% faster). - Beta ARM (Graviton) runtimes!
- Most
vendor/bin/bref
CLI commands have been replaced by much better and simplerserverless bref:xxx
commands (#1303 provides an overview, check out the v2 docs as well). - Runtimes have been rewritten from scratch to use Red Hat's very popular Remi's RPM repository, leading to cleaner internals, more reliable PHP binaries and builds, and much faster builds! No direct benefit for users except the confidence that Bref is in a much better position to last a long time :)
- Bref internals have been reworked, improved and automated a lot, leading to a more contributor-friendly codebase, with easier maintenance.
- Bref is now easier to use with AWS CDK, Pulumi, or other Node tools thanks to the new
@bref.sh/layers
NPM package that exposes layer versions. (hint: I have more ambitious ideas on this, this is just the start)
Overview of breaking changes:
- PHP 8.0 or greater is required
- The
serverless
CLI v3 is required (runserverless --version
to check) vendor/bin/bref cli
is replaced by the simplerserverless bref:cli
vendor/bin/bref local
is replaced by the simplerserverless bref:local
vendor/bin/bref layers
is replaced by the simplerserverless layers
- Docker images for local dev have been improved and simplified:
bref/fpm-dev-gateway
is gone, you need to updatedocker-compose.yml
if you have one - The
separateVendor
option inserverless.yml
has been removed
Note
Again, read Upgrading to v2 for instructions on dealing with each of those changes.
Note that Bref Extra extensions are in the process of being updated for v2, you can follow brefphp/extra-php-extensions#377
A huge thank you to all contributors that have helped to maintain v1 and/or with this huge upcoming release, including @deleugpn who rewrote most of the Lambda runtimes, @GrahamCampbell who is helping to keep the v1 runtimes up to date, @t-richard and @afu-dev who have been extremely helpful on the Symfony integration and in the community, @Nyholm who has been maintaining flawlessly the Bref Extra extensions, @mykiwi for keeping PHP up to date, @shouze who is helping on layers and extra extensions, @georgeboot who is contributing amazing ideas on the Laravel integrations, @tillkruss who is pushing what Bref could be for Laravel users, and so many more (@shadowhand, @kevincerroβ¦).
Finally, a few things I wanted to share:
- Bref has a Twitter account: https://twitter.com/brefphp
- Bref also has an awesome Slack community: https://bref.sh/docs/community.html
- I recently launched Bref Pro and Bref Enterprise: get professional support while helping me work full time on Bref β€οΈ
And a huge thank you to all Bref sponsors, which now includes AWS as well π