Skip to content

Commit

Permalink
Add support for PHP 8.0
Browse files Browse the repository at this point in the history
  • Loading branch information
KiNgMaR committed Feb 11, 2021
1 parent 3358e67 commit cfa32cd
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
9 changes: 5 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ RUN echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selectio
echo "deb https://packages.sury.org/php/ $(lsb_release -sc) main" > /etc/apt/sources.list.d/php.list \
; fi \
&& apt-get update \
&& apt-get install -y \
autoconf pkg-config \
php$PHP_VERSION-cli php-dev libevent-dev zlib1g-dev \
&& apt-get install --no-install-recommends -y \
build-essential autoconf pkg-config patch \
php$PHP_VERSION-cli php$PHP_VERSION-dev libevent-dev zlib1g-dev \
&& if [ $ENABLE_IGBINARY -eq 1 ]; then apt-get install -y php-igbinary; fi \
&& if [ $ENABLE_MSGPACK -eq 1 ]; then apt-get install -y php-msgpack; fi \
&& apt-get clean
Expand Down Expand Up @@ -64,6 +64,7 @@ RUN rm -rf /build
RUN if ldd `find /usr/lib/php/ -name memcached.so` | grep memcached; then exit 1; fi

# check that the PHP extension can be loaded:
RUN php -dextension=memcached.so -m | grep 'memcached' \
RUN php -v \
&& php -dextension=memcached.so -m | grep 'memcached' \
&& php -dextension=memcached.so -r 'new Memcached();' \
&& php -dextension=memcached.so -r 'if (!defined("Memcached::DYNAMIC_CLIENT_MODE")) exit(1);'
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
### Supported flavors

- only Linux 64bit
- PHP 7.1 through to PHP 7.4 - thanks to the sury.org PHP repository!
- PHP 7.1 through to PHP 7.4 and also PHP 8 - thanks to the sury.org PHP repository!
- with or without igbinary (`--build-arg ENABLE_IGBINARY=1`)
- with or without msgpack (`--build-arg ENABLE_MSGPACK=1`)
- with or without JSON (`--build-arg ENABLE_JSON=1`)
Expand All @@ -20,11 +20,11 @@
1. Clone this repo
2. `git submodule update --init`
3. In the `aws-elasticache-cluster-client-*` repos, switch to the git branch that you want to build. Usually the default is fine.
4. Build the library and the extension, either with or without support for igbinary serialization:
4. Build the library and the extension, enable optional features using the `build-arg`s listed above:
```
docker build --iidfile=/tmp/elasticache.docker \
--build-arg PHP_VERSION=7.4 \
--build-arg ENABLE_IGBINARY=0 \
--build-arg ENABLE_JSON=1 \
.
```
5. Extract the freshly built PHP extension, optionally wrap into a tar file:
Expand Down

0 comments on commit cfa32cd

Please sign in to comment.