Skip to content

Commit 71ddf6e

Browse files
authored
Merge pull request #625 from brefphp/v3
v3: Bref v3 compatibility
2 parents 4b71f3b + 236b8e1 commit 71ddf6e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

79 files changed

+60
-210
lines changed

.prettyci.composer.json

Lines changed: 0 additions & 5 deletions
This file was deleted.

CHANGELOG.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,19 @@
11
# Change log
22

3+
## 3.0.0
4+
5+
- Bref v3 compatibility.
6+
- No longer compatible with Bref v2. If you use Bref v2, use the `1.x` version of the Bref extra extensions.
7+
8+
## 2.0.0
9+
10+
There is no 2.0.0 version. We're skipping v2 to jump to v3 to align with the version of Bref.
11+
12+
As a reminder:
13+
14+
- v1 of the extra extensions is compatible with Bref v2 (that was confusing).
15+
- v3 of the extra extensions is compatible with Bref v3.
16+
317
## 1.8.7
418

519
- Updated Blackfire to version 1.92.53.

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ SHELL := /bin/bash
22
layer ?= *
33
resolve_php_versions = $(or $(php_versions),`jq -r '.php | join(" ")' ${1}/config.json`)
44
resolve_tags = `./new-docker-tags.php $(DOCKER_TAG)`
5-
BREF_VERSION = 2
5+
BREF_VERSION = 3
66
77
define build_docker_image
88
docker build -t bref/${1}-php-${2} --build-arg PHP_VERSION=${2} --build-arg BREF_VERSION=${BREF_VERSION} ${DOCKER_BUILD_FLAGS} ${1}

Readme.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,16 @@ a limit of 5 layers per Lambda. You can also utilise the provided docker images
88

99
> **Note**
1010
>
11-
> If you are using Bref v2, you need to use version `1.x` of the `bref/extra-php-extensions` package.
11+
> If you are using Bref v3, you need to use version `3.x` of the `bref/extra-php-extensions` package.
12+
>
13+
> There is no version `2.x` of the `bref/extra-php-extensions` package.
1214
>
13-
> If you are using Bref v1, you need to use version `0.x` of the `bref/extra-php-extensions` package.
15+
> If you are using Bref v2, you need to use version `1.x` of the `bref/extra-php-extensions` package.
1416
1517

1618
> **Warning**
1719
>
18-
> **ARM64 is not supported yet with Bref v2.**
20+
> **ARM64 is not supported with extra extensions.**
1921
2022

2123
We are happy to get contributions for other extensions. Sky is the limit! (And also your knowledge with Docker...)
@@ -43,7 +45,7 @@ functions:
4345
handler: bin/console
4446
runtime: php-81
4547
layers:
46-
- ${bref-extra:amqp-php-81} # <----- Example for AMQP layer
48+
- ${bref-extra:amqp-php-83} # <----- Example for AMQP layer
4749
```
4850
4951
### Available layers

composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,15 @@
1111
"async-aws/core": "^1.7",
1212
"symfony/http-client": "^5.4",
1313
"async-aws/lambda": "^1.1",
14-
"bref/logger": "^1.0"
14+
"bref/logger": "^2.0"
1515
},
1616
"autoload-dev": {
1717
"psr-4": {
1818
"Bref\\Extra\\": "src/"
1919
}
2020
},
2121
"conflict": {
22-
"bref/bref": "<2.1.15"
22+
"bref/bref": "<3.0.0"
2323
},
2424
"license": "MIT",
2525
"authors": [

layers/amqp/Dockerfile

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,7 @@ RUN mkdir -p ${AMQP_BUILD_DIR}
99

1010
# Compile rabbitmq
1111
WORKDIR ${AMQP_BUILD_DIR}
12-
# Currently it is not possible to use newer rabbitmq-c version than 0.13.0 because this is
13-
# last version which supports CMake 3.17 which is latest available version in Amazon Linux 2.
12+
RUN LD_LIBRARY_PATH= dnf install -y cmake
1413
RUN curl -Ls -o rabbitmq-c.tar.gz https://github.com/alanxz/rabbitmq-c/archive/refs/tags/v0.13.0.tar.gz
1514
RUN tar xzf rabbitmq-c.tar.gz
1615
WORKDIR ${AMQP_BUILD_DIR}/rabbitmq-c-0.13.0
@@ -19,9 +18,9 @@ RUN cmake --build . --target install
1918

2019
# Compile the php amqp extension
2120
WORKDIR ${AMQP_BUILD_DIR}
22-
RUN git clone https://github.com/php-amqp/php-amqp
21+
RUN curl -Ls -o php-amqp.tar.gz https://github.com/php-amqp/php-amqp/archive/refs/tags/v2.1.2.tar.gz && \
22+
tar xzf php-amqp.tar.gz && mv php-amqp-2.1.2 php-amqp
2323
WORKDIR ${AMQP_BUILD_DIR}/php-amqp
24-
RUN git checkout v2.1.2
2524
RUN phpize
2625
RUN ./configure
2726
RUN make -j $(nproc)

layers/amqp/config.json

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
{
22
"php": [
3-
"80",
4-
"81",
53
"82",
64
"83",
75
"84"

layers/blackfire/config.json

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
{
22
"php": [
3-
"80",
4-
"81",
53
"82",
64
"83",
75
"84"

layers/bsdiff/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ FROM bref/build-php-$PHP_VERSION:$BREF_VERSION AS ext
44

55
RUN set -ex && \
66
LD_LIBRARY_PATH= && \
7-
yum -y install bzip2-devel && \
7+
dnf -y install bzip2-devel && \
88
pecl channel-update pecl.php.net && \
99
yes '' | pecl install bsdiff-stable && \
1010
cp "$(php-config --extension-dir)/bsdiff.so" /tmp/bsdiff.so && \

layers/bsdiff/config.json

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
{
22
"php": [
3-
"80",
4-
"81",
53
"82",
64
"83",
75
"84"

0 commit comments

Comments
 (0)