Skip to content

Commit

Permalink
Merge pull request #1443 from brefphp/v2-blog-post
Browse files Browse the repository at this point in the history
  • Loading branch information
mnapoli authored Mar 14, 2023
2 parents e4cf97d + 0edefd1 commit 5902553
Show file tree
Hide file tree
Showing 8 changed files with 452 additions and 10 deletions.
402 changes: 402 additions & 0 deletions docs/news/02-bref-2.0.md

Large diffs are not rendered by default.

Binary file added docs/news/02/executions.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/news/02/social-card.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
16 changes: 15 additions & 1 deletion docs/news/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,20 @@ introduction: Bref-related news.
layout: news
---

## [Bref 2.0 is released 🎉](02-bref-2.0.md)

The work on what would be Bref 2.0 started in October 2021, about 1.5 year ago. We went through many different strategies, experiments, rewrites, over **700 commits** to finally land with the stable release.

So far, Bref has been installed more than 2 million times and powers more than **10 billion Lambda executions** (aka requests) every month.

That's [1 in every 1000 AWS Lambda executions](https://twitter.com/matthieunapoli/status/1603032544424894464)!

Today, we celebrate these achievements, the ongoing work and **the release of Bref 2.0** 🎉

Let's dive in what's new in v2 👇

[▶ Read more](02-bref-2.0.md)

## [Bref 1.0 is released 🎉](01-bref-1.0.md)

Bref started in November 2017, 3 years ago. Back then, running PHP on AWS Lambda was experimental at best.
Expand All @@ -14,4 +28,4 @@ Needless to say **Bref is stable** and has been for a long time.

Today, we're finally releasing **Bref 1.0**!

[▶ Read more](/docs/news/01-bref-1.0.md)
[▶ Read more](01-bref-1.0.md)
24 changes: 21 additions & 3 deletions docs/upgrading/v2.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ You should update the `bref/bref` dependency in your application's composer.json

```diff
- "bref/bref": "^1.0",
+ "bref/bref": "^2.0@beta",
+ "bref/bref": "^2.0",
```

Then run `composer update bref/bref --with-all-dependencies`.
Expand Down Expand Up @@ -57,10 +57,28 @@ The following commands of `vendor/bin/bref` have changed:

- `vendor/bin/bref cli` is replaced by the simpler `serverless bref:cli`.

Read [the Console documentation](../runtimes/console.md#usage) to learn more. You will also find alternatives if you don't use the `serverless` CLI.
For example:

```bash
vendor/bin/bref cli mystack-dev-artisan --region=eu-west-1 -- migrate --force
# becomes:
serverless bref:cli --args="migrate --force"
```

No need to provide the function name or the region anymore. Read [the Console documentation](../runtimes/console.md#usage) to learn more. You will also find alternatives if you don't use the `serverless` CLI.

- `vendor/bin/bref local` is replaced by the simpler `serverless bref:local`.

For example:

```bash
vendor/bin/bref local --handler=my-handler.php
# becomes:
serverless bref:local -f hello
```

No need to provide the handler file name anymore, we directly use the function name. The new `serverless bref:local` command has similar arguments as `serverless invoke`.

Read [the Local Development documentation](../function/local-development.md) to learn more. You will also find alternatives if you don't use the `serverless` CLI.

- `vendor/bin/bref layers` is replaced by the simpler `serverless layers`.
Expand All @@ -71,7 +89,7 @@ These changes allowed us to simplify the commands (automatically use the AWS reg

## Development Docker images

The development Docker images have been simplified. You will need to update your `serverless-compose.yml`.
The development Docker images have been simplified. You will need to update your `docker-compose.yml`.

Before (Bref v1):

Expand Down
11 changes: 9 additions & 2 deletions website/template/layout.twig
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,17 @@
<meta property="og:description" content="{{ metaDescription|e('html_attr') }}" />
<meta property="og:locale" content="en_US" />
<meta property="og:site_name" content="Bref" />
<meta property="og:image" content="https://bref.sh/img/logo-small.png" />
<meta name="twitter:card" content="summary" />
{% if socialCard|default %}
<meta property="og:image" content="{{ socialCard }}" />
<meta name="twitter:card" content="summary_large_image" />
<meta name="twitter:image" content="{{ socialCard }}">
{% else %}
<meta property="og:image" content="https://bref.sh/img/logo-small.png" />
<meta name="twitter:card" content="summary" />
{% endif %}
<meta name="twitter:title" content="{{ metaTitle|e('html_attr') }}" />
<meta name="twitter:description" content="{{ metaDescription|e('html_attr') }}" />
<meta name="twitter:creator" content="@brefphp">
<meta name="google-site-verification" content="RRmKDrWI2l69B0nMwv4ndrYOHSuaTBfarvCgtJxMpXA" />
{#<meta name="twitter:site" content="@brefphp" />#}
<link rel="icon" type="image/png" href="/img/favicon-32x32.png" sizes="32x32" />
Expand Down
4 changes: 4 additions & 0 deletions website/template/news-article.twig
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@
</div>
<div class="md:w-4/5">
{{ content|raw }}
<div id="in-page-menu" class="hidden fixed top-0 max-h-screen text-xs text-gray-500 max-w-48 mr-2" style="margin-left: 780px;margin-top: 144px;">
<p class="mb-2 uppercase font-semibold tracking-wider">Summary</p>
<ul class="list-none p-0 m-0"></ul>
</div>
</div>
</div>
{% endblock %}
5 changes: 1 addition & 4 deletions website/template/news.twig
Original file line number Diff line number Diff line change
Expand Up @@ -69,12 +69,9 @@
$(this).prepend(' <a class="title-anchor" href="' + url + '">#</a>');
});
$('article h2').each(function () {
if ($(this).find('a').length) {
return;
}
var url = '#' + $(this).attr('id');
var caption = $(this).text().substr(2);
$('#in-page-menu ul').append('<li class="py-2"><a class="text-gray-500" href="' + url + '">' + caption + '</a></li>');
$('#in-page-menu ul').append('<li><a class="text-gray-500" href="' + url + '">' + caption + '</a></li>');
});
});
</script>
Expand Down

0 comments on commit 5902553

Please sign in to comment.