The serverless PHP framework ➯ https://xitter.cf/t.co/X0LdkTZmw0

Joined December 2020
Bref is 4 years old today! ▸ 118 contributors ▸ 118 releases ▸ 300 community members in Slack ▸ 3k downloads/day ▸ 1 billion requests processed each week PHP + AWS Lambda = ❤️
3
22
5
181
Hello Aurora DSQL 🤩 - PostgreSQL compatible, creates in <1min - no instances, scales to zero, no cold start - billed per request, starts at $0 - redundant & multi-AZ OOTB - no VPC/NAT Create DSQL databases in Bref Cloud and use in Laravel with `bref/laravel-dsql` Great for new apps. For existing apps it might be harder, read the differences -> bref.sh/docs/environment/dat…
I think I finally found a truly serverless database ✨
2
10
966
My first PHP RFC: a single binary for CLI and FPM 🎉 Instead of `php` + `php-fpm`, just use `php --fpm`: - 26 MB saved - 70ms saved on cold starts in Lambda - one `php` CLI that does it all wiki.php.net/rfc/single-bina…
13
21
1
235
10,204
You can now view and search logs from the terminal: bref logs --env=prod --search="payment failed" bref.sh/docs/environment/log… It's built to be friendly for humans (pretty-print stack traces, filters noise) _and_ AI agents too (low tokens, multiple filters…)
1
2
7
706
On Bref Cloud, opening a trace now also shows the logs for that invocation. Timeline above, logs below. Warnings, errors, and stack traces without jumping to CloudWatch or a separate log viewer.
1
7
509
Bref now has improved support and docs for multiple Laravel queues. Using multiple queues allows scaling independently, or having different limits or CPU/memory config. Useful for example to process "urgent" jobs separately from big batches, etc bref.sh/docs/laravel/queues#…
1
7
585
After being asked so many times, Bref finally has a guide to migrate from Laravel Vapor. It is mostly a config change, there should be almost no code change. bref.sh/docs/laravel/migrati…
2
2
5
535
Large file uploads with Laravel and Bref is now easier than ever AWS Lambda caps uploads at ~4 MB. For larger files, you can upload straight to S3 from the browser. Bref now provides a direct integration making this very simple: bref.sh/docs/laravel/file-st…
1
2
8
663
You can now create serverless databases in Bref Cloud. Aurora Serverless v2, MySQL or PostgreSQL. They scale up instantly, scale down on their own, and can pause when idle. Auto-pause is the cheapest option for rarely used environments. If the app is always active and doesn’t need scaling, a small regular DB is still cheaper (around $12/mo vs $43/mo for always-on serverless). Wake-up is usually about 12 seconds.
1
1
4
629
I haven't sent a "Bref newsletter" in years 😬 Finally getting back into it, expect it every month. And it will be hand edited. AI is really helpful for gathering content but I hate reading AI, so I'll be very careful with that. bref.mailcoach.app/webview/c…
1
4
487
Laravel 13 added fonts-manifest.json (and font CSS that PHP reads). I updated the default serverless.yml stub for new Bref apps. Existing apps don't get that automatically. If fonts break after upgrading, add these under package.patterns: - 'public/build/fonts-manifest.json' - 'public/build/assets/fonts-*.css'
1
2
504
bref.sh is now on Nextra v4 (up from v2). Nothing visible should change. It was a long upgrade with a few failed attempts, the kind of invisible work that has to happen eventually.
2
4
684
3 nice Bref updates: - zero-downtime deploys for website assets - public storage on S3 made simple - osls 4.0: resolved deprecations, hardened, supports SSO
1
2
6
1,106
I rewrote externals.io to Laravel! (runs with Octane on @brefphp) 50% of requests under 5ms, p90 is 40ms 🚀 2.5M req/mo, costs: ~$2.5/mo + $11 for the database, staging costs $0 Open source on GitHub: github.com/mnapoli/externals
3
6
60
4,951
I have a Laravel app running serverless with @brefphp and generating PDF via chrome on Lambda. I added X-Ray to visualize it: 1 - the HTTP route (Laravel controller) invokes the pdf function synchronously and passes it a URL to render 2 - the "pdf-renderer" function starts chromium, opens the URL, exports it to PDF, and uploads it to S3 3 - the HTTP route returns a temporary signed URL to the S3 file This specific scenario is synchronous (~1s) because the PDF is live generated. When possible the PDF is generated asynchronously in a Laravel job. With that approach I write PDF templates with blade, it renders exactly the same locally or in Lambda (easy to test), never have to worry about scaling, and pay per PDF generated (about 0.004 cents/PDF)
3
1
25
2,830
TIL about @brefphp's CloudWatch log formatter, 👋 Monolog's built in JSON formatter.
1
1
151
New UI in Bref Cloud to go through Laravel failed jobs: list, retry, clear…
1
1
3
855
New Bref documentation page: Cold Starts bref.sh/docs/environment/col… (should have done it years ago but better late than never)
1
1
1
8
1,011
.@brefphp v3😮
1
3
53
4,233
Bref 3 is released 🎉 Since its creation, Bref has served 1.2 trillion requests and jobs! ▸ simpler & lighter runtimes ▸ PHP 8.5 ▸ improved observability (logs & tracing) ▸ simpler Laravel onboarding ▸ postgres & redis built-in and more ⤵ bref.sh/news/03-bref-3.0
6
28
170
10,058
Working on Bref v3 release for tomorrow 🤞
1
16
901