Skip to content

Releases: brefphp/bref

0.5.0-beta1

10 Jul 12:06
Compare
Choose a tag to compare
0.5.0-beta1 Pre-release
Pre-release

First beta release for v0.5. This is a "major" version without BC break, but with major changes that affect the usage of Bref.

This is a beta version, please test and report any problem. Note that the new documentation hasn't been published yet because this is not a stable release.

Switching from SAM to Serverless

AWS SAM is being replaced by Serverless as the tool to configure and deploy applications.

This is a major change because:

  • Bref now recommends Serverless instead of SAM
  • the documentation has been rewritten around Serverless
  • tooling has been added around Serverless

SAM will continue to work with Bref, just like CloudFormation, Terraform, Now (#368), etc. Bref layers are independent of the tooling used. If you have created applications with SAM, you can keep using it. Most of the time however migrating template.yaml to serverless.yml is not too complex (migrating a production stack may be more effort).

Why?

Serverless offers a configuration format (serverless.yml) that is much simpler and more concise (#320). Sometimes serverless.yml is twice less YAML than template.yaml for the same application.

Another major simplification is that the stack name and the region are configured inside serverless.yml. Deploying no longer take 3 steps and 10 lines of code, but only 2 words:

# Before
aws s3 mb s3://<bucket-name>
sam package \
    --output-template-file .stack.yaml \
    --region eu-west-1 \
    --s3-bucket <bucket-name>
sam deploy \
    --template-file .stack.yaml \
    --region eu-west-1 \
    --capabilities CAPABILITY_IAM \
    --stack-name <stack-name>

# After
serverless deploy

On top of that, Serverless offers a plugin system that lets us simplify a lot of things, especially around Bref (#351). For example, using Bref layers is now much simpler:

# Before
functions:
    foo:
        handler: index.php
        layers:
            - 'arn:aws:lambda:us-east-1:209497400698:layer:php-73:7'

# After
functions:
    foo:
        handler: index.php
        layers:
            - ${bref:layer.php-73}

Layer version numbers are now tied to a specific Bref version, and we no longer need to mess with the AWS region name. Upgrading layers is now as simple as upgrading Bref via Composer.

Additionally, serverless deploy can deploy the same application in multiple stages.

Finally, Serverless offers a lot of plugins: https://serverless.com/plugins/

Other changes

  • #347 fixed in #349: the console layer now logs everything. Note that I haven't rebuilt the layers yet, I will probably do for the final 0.5.0 release.
  • #362 Fix non-clickable titles in the documentation
  • #360 Document using the bref/logger package
  • #364 New case study by MyBuilder

0.4.1

14 Jun 09:43
Compare
Choose a tag to compare

Following the 0.4.0 release the runtimes need to be updated (see https://runtimes.bref.sh/ for the latest versions).

This release updates the version of the runtimes when using bref init to start a project.

0.4.0

13 Jun 07:56
f17a750
Compare
Choose a tag to compare

Bref has moved on GitHub and Packagist to its own organization:

To update to future releases you need to change your dependency in composer.json to replace mnapoli/bref with bref/bref.

Other than that this 0.4.0 release contains no BC break.

Features

Other changes

  • #340: Classes that are meant to be used only internally to Bref are now clearly marked as @internal: these are not covered by backward compatibility. (by @mnapoli)

0.3.9

05 May 10:00
Compare
Choose a tag to compare
  • Fixed #316 (random FastCGI errors) with #319 by replacing the underlying library for FastCGI communication (we now use hollodotme/fast-cgi-client).

    This brings a performance improvement as well (around 1ms shaved of HTTP responses, which is a 40% improvement).

  • #301 New PHP extension available: sockets (update to the latest runtimes)

  • #311 The AWS Lambda context is now available in PHP as the second parameter for handlers, see https://bref.sh/docs/runtimes/function.html#context for the complete documentation. Example:

    lambda(function (array $event, Context $context) {
        return /* response */;
    });
  • Fixed #323 Better handling of errors in bref init

  • Fixed #275 with #321: avoid filling up /tmp with PHP-FPM core dumps

  • #308 New bref deployment command to debug what went wrong with the last deployment

    vendor/bin/bref deployment <stack-name>
    

0.3.8

08 Apr 11:16
4183429
Compare
Choose a tag to compare

#297 Fix some bugs with PUT and PATCH requests when the HTTP request did not contain a Content-Length header, by @TimoSchaefer (related to #162).

0.3.7

06 Apr 13:45
dfbf327
Compare
Choose a tag to compare
  • Fix #292 with #293: add the bcmath extension
  • Fix #294: add the mysqli extension
  • Fix #283 with #289: add the soap extension
  • Fix #290 with #291: populate $_ENV
  • #298: runtime optimization by reusing the curl handler

Thanks to all contributors to this release: @TiagoBrito, @jsamouh, @jenschude, @lhilton.

New runtimes have been published: see runtimes.bref.sh for the new versions.

Performances are tested via brefphp/bref-benchmark

0.3.6

16 Mar 13:45
08cbe87
Compare
Choose a tag to compare

Fixed #265, #272 Handle and recover from AWS Lambda timeouts.

New runtime versions have been released as well.

0.3.5

07 Mar 20:09
Compare
Choose a tag to compare

#257 Better handling of timeouts and other errors related to PHP-FPM and FastCGI.

This also includes much better error messages when errors happen.

0.3.4

24 Feb 15:54
2ad8984
Compare
Choose a tag to compare

#234 Set the memory size to 1024M by default for new lambdas
#253 Improve error handling

0.3.3

18 Feb 22:48
8e0b0e3
Compare
Choose a tag to compare

Fix #249 404 responses stick after one 404 response
#248 Publish runtimes in eu-north-1 (Stockholm)
New runtime versions: upgrade to PHP 7.3.2 and 7.2.15