Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding PHP 8 to the documentation and to Docker image #123

Merged
merged 7 commits into from
Apr 28, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: Docker Image CI

on: [push]
on: [push, pull_request]

jobs:

Expand Down Expand Up @@ -38,6 +38,10 @@ jobs:
dockerfile-flavour: "debian"
legacy-gd-lib: ""
pecl-xdebug-suffix: ""
- php-base-image-version: "8.0-fpm"
dockerfile-flavour: "debian"
legacy-gd-lib: ""
pecl-xdebug-suffix: ""
- php-base-image-version: "5.6-apache"
dockerfile-flavour: "debian"
legacy-gd-lib: "1"
Expand Down Expand Up @@ -68,6 +72,11 @@ jobs:
legacy-gd-lib: ""
pecl-xdebug-suffix: ""
pecl-mongodb-suffix: ""
- php-base-image-version: "8.0-apache"
dockerfile-flavour: "debian"
legacy-gd-lib: ""
pecl-xdebug-suffix: ""
pecl-mongodb-suffix: ""
fail-fast: false
env:
PHP_IMAGE_NAME: "yiisoftware/yii2-php"
Expand Down
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ matrix:
- env: PHP_BASE_IMAGE_VERSION=7.2-apache DOCKERFILE_FLAVOUR=debian X_LEGACY_GD_LIB=1

before_install:
- export TEST_YII_VERSION=a777c2e8f69dc753f8a945b1dd54bbaaa1e9e66c
- export TEST_YII_VERSION=5fbd28e05609bd31c8415ede663747c2133d1e46
- export DOCKER_COMPOSE_VERSION=1.25.4
- export PHP_IMAGE_NAME=yiisoftware/yii2-php
- if [ -n "$TRAVIS_TAG" ]; then export PHP_IMAGE_VERSION_SUFFIX=-${TRAVIS_TAG}; fi
Expand Down
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,14 @@ The `Dockerfile`(s) of this repository are designed to build from different PHP-
### Available versions for `yiisoftware/yii2-php`

```
7.4-apache, 7.3-apache
7.4-fpm, 7.3-fpm
8.0-apache, 8.0-fpm
7.4-apache, 7.4-fpm
```

#### Deprecated or EOL versions

```
7.3-apache, 7.3-fpm
7.2-apache, 7.1-apache, 7.0-apache, 5.6-apache
7.2-fpm, 7.1-fpm, 7.0-fpm, 5.6-fpm
```
Expand Down Expand Up @@ -79,3 +80,4 @@ More information can be found in the [docs](/docs) folder.

- We do not officially support Alpine images, due to numerous issues with PHP requirements and because framework tests are not passing.
- Depending on the (Debian) base-image (usually PHP <7.4) you might need to set `X_LEGACY_GD_LIB=1`
- test
12 changes: 5 additions & 7 deletions php/Dockerfile-debian
Original file line number Diff line number Diff line change
Expand Up @@ -67,12 +67,15 @@ RUN if [ $X_LEGACY_GD_LIB = 1 ]; then \

# Install PECL extensions
# see http://stackoverflow.com/a/8154466/291573) for usage of `printf`
# see https://github.com/Imagick/imagick/issues/331#issuecomment-779190777 for usage of `mkdir -p /usr/src/php/ext/imagick`
ARG PECL_XDEBUG_INSTALL_SUFFIX
ARG PECL_MONGODB_INSTALL_SUFFIX
RUN printf "\n" | pecl install \
imagick \
xdebug${PECL_XDEBUG_INSTALL_SUFFIX} \
mongodb${PECL_MONGODB_INSTALL_SUFFIX} && \
mkdir -p /usr/src/php/ext/imagick; \
curl -fsSL https://github.com/Imagick/imagick/archive/06116aa24b76edaf6b1693198f79e6c295eda8a9.tar.gz | tar xvz -C "/usr/src/php/ext/imagick" --strip 1; \
docker-php-ext-install imagick; \
docker-php-ext-enable \
imagick \
mongodb
Expand All @@ -95,16 +98,11 @@ RUN chmod 755 \

# Install composer
RUN curl -sS https://getcomposer.org/installer | php -- \
--version=1.10.16 \
--version=2.0.11 \
--filename=composer.phar \
--install-dir=/usr/local/bin && \
composer clear-cache

# Install composer plugins
RUN composer global require --optimize-autoloader \
"hirak/prestissimo:${VERSION_PRESTISSIMO_PLUGIN}" && \
composer global dumpautoload --optimize && \
composer clear-cache

# Enable mod_rewrite for images with apache
RUN if command -v a2enmod >/dev/null 2>&1; then \
Expand Down