Skip to content

Commit

Permalink
[PHP] Upgrade to 8.0 (#3655)
Browse files Browse the repository at this point in the history
  • Loading branch information
waghanza authored Sep 10, 2021
1 parent 102ea5c commit bfdf3cc
Show file tree
Hide file tree
Showing 21 changed files with 41 additions and 32 deletions.
1 change: 0 additions & 1 deletion Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,6 @@ def create_dockerfile(language, framework, **options)
config = main_config.recursive_merge(language_config).recursive_merge(framework_config)

# Path to remove stability suffix (stable, beta, alpha, or version) of php extensions
config['php_ext'] = config['php_ext']&.map { |ext| { name: ext, extension: ext.split('-').first } }

if config.key?('sources')
files = []
Expand Down
24 changes: 12 additions & 12 deletions php/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
FROM php:7.4-fpm-alpine
FROM php:8.0-fpm-buster

RUN apk add git zlib-dev libzip-dev build-base autoconf nginx openrc curl-dev icu-dev oniguruma-dev {{#deps}} {{{.}}} {{/deps}}
RUN apt-get -qq update
RUN apt-get -qy install build-essential nginx libcurl4-gnutls-dev zlib1g-dev libzip-dev {{#deps}} {{{.}}} {{/deps}}
RUN docker-php-ext-install zip opcache

WORKDIR /usr/src/app
Expand All @@ -10,16 +11,17 @@ ENV {{{.}}}
{{/environment}}

{{#build_deps}}
RUN apk add {{{.}}}
RUN apt-get -y install {{{.}}}
{{/build_deps}}

{{#php_mod}}
RUN docker-php-ext-install {{{.}}}
{{/php_mod}}

{{#php_ext}}
RUN pecl install {{{name}}}
RUN docker-php-ext-enable {{{extension}}}
RUN mkdir -p /usr/src/php/ext/{{{.}}} && \
curl -fsSL https://pecl.php.net/get/{{{.}}} | tar xvz -C "/usr/src/php/ext/{{{.}}}" --strip 1
RUN docker-php-ext-install {{{.}}}
{{/php_ext}}

{{#before_build}}
Expand All @@ -35,13 +37,11 @@ RUN if [[ -f "${EVENT_EXT_FILE}" ]] ; then \
mv /tmp/file /usr/local/etc/php/conf.d/docker-php-ext-event.ini ; fi

{{^standalone}}
RUN curl -sSL https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
RUN composer install --no-dev --prefer-dist --classmap-authoritative
RUN composer dumpautoload -o
RUN curl -sSL https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
RUN composer install --no-dev --prefer-dist --classmap-authoritative
RUN composer dumpautoload -o
{{/standalone}}



{{#before_command}}
RUN {{{.}}}
{{/before_command}}
Expand All @@ -68,7 +68,7 @@ RUN composer dumpautoload -o

RUN rm -fr /usr/local/etc/php-fpm.d/zz-docker.conf

RUN echo -e 'server {\n\
RUN echo 'server {\n\
{{#docroot}}
root {{{.}}};\n\
{{/docroot}}
Expand All @@ -88,7 +88,7 @@ RUN composer dumpautoload -o
}\n\
{{/nginx_conf}}
}\n'\
> /etc/nginx/http.d/default.conf
> /etc/nginx/sites-available/default

RUN echo -e 'opcache.enable=1\n\
opcache.memory_consumption=512\n\
Expand Down
2 changes: 2 additions & 0 deletions php/antidot/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ framework:

build_deps:
- libevent-dev
- libicu-dev
- libssl-dev

php_ext:
- event
Expand Down
1 change: 1 addition & 0 deletions php/chubbyphp-workerman/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ framework:

build_deps:
- libevent-dev
- libssl-dev

php_mod:
- pcntl
Expand Down
3 changes: 3 additions & 0 deletions php/codeigniter4/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ framework:
website: codeigniter.com
version: 4.1

build_deps:
- libicu-dev

php_mod:
- intl

Expand Down
2 changes: 1 addition & 1 deletion php/config.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
provider:
default:
language: 7.4
language: 8.0
1 change: 0 additions & 1 deletion php/ice/composer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{
"require": {
"php": ">=7.0",
"ext-ice": "~1.8.0"
}
}
7 changes: 0 additions & 7 deletions php/ice/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,6 @@ framework:
website: iceframework.org
version: 1.8

build_deps:
- bash
- libexecinfo-dev

environment:
LDFLAGS: -lexecinfo

php_ext:
- ice

Expand Down
1 change: 1 addition & 0 deletions php/imi-workerman/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ framework:

build_deps:
- libevent-dev
- libssl-dev

php_mod:
- pcntl
Expand Down
1 change: 1 addition & 0 deletions php/mixphp-workerman/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ framework:

build_deps:
- libevent-dev
- libssl-dev

php_mod:
- pcntl
Expand Down
2 changes: 1 addition & 1 deletion php/nano/composer.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"require": {
"laylatichy/nano": "~0.0.9"
"laylatichy/nano": "~1.0.8"
}
}
2 changes: 1 addition & 1 deletion php/nano/config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
framework:
gitlab: x.laylatichy.x/nano
version: 0.0.9
version: 1.0

php_mod:
- pcntl
Expand Down
2 changes: 1 addition & 1 deletion php/nano/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

require_once 'vendor/autoload.php';

use laylatichy\nano\Nano;
use laylatichy\Nano;

$nano = new Nano();

Expand Down
6 changes: 5 additions & 1 deletion php/phalcon/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,11 @@ framework:

php_ext:
- psr
- phalcon-alpha

before_build:
- mkdir -p /usr/src/php/ext/phalcon
- curl -fsSL https://github.com/phalcon/cphalcon/releases/download/v5.0.0alpha5/phalcon-pecl.tgz | tar xvz -C "/usr/src/php/ext/phalcon" --strip 1
- docker-php-ext-install phalcon

nginx_conf:
- |
Expand Down
3 changes: 1 addition & 2 deletions php/sw-fw-less/composer.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
{
"require": {
"php": "^7.1",
"ext-json": "*",
"ext-swoole": "^4.4.0",
"ext-swoole": "*",
"luoxiaojun/sw-fw-less": "dev-master"
},
"suggest": {
Expand Down
3 changes: 1 addition & 2 deletions php/ubiquity/composer.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
{
"require": {
"php": "^7.4",
"phpmv/ubiquity": "~2.4.0"
},
"require-dev": {
"phpmv/ubiquity-annotations": "*",
"phpmv/ubiquity-attributes": "*",
"phpmv/ubiquity-dev": "*",
"phpmv/ubiquity-devtools": "*"
},
Expand Down
1 change: 1 addition & 0 deletions php/webman/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ framework:

build_deps:
- libevent-dev
- libssl-dev

php_mod:
- pcntl
Expand Down
1 change: 1 addition & 0 deletions php/workerman/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ framework:

build_deps:
- libevent-dev
- libssl-dev

php_mod:
- pcntl
Expand Down
2 changes: 1 addition & 1 deletion pony/config.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
provider:
default:
language: '0.40'
language: "0.40"
6 changes: 6 additions & 0 deletions reviewers.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,12 @@ php:
- 48d90782
slim:
- l0gicgate
sunrise-router:
- fenric
sunrise-router-roadrunner:
- fenric
sunrise-router-annotations:
- fenric
phalcon:
- ruudboon
ice:
Expand Down
2 changes: 1 addition & 1 deletion scala/http4s/project/plugins.sbt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
addSbtPlugin("com.typesafe.sbt" % "sbt-native-packager" % "latest.integration")
addSbtPlugin("com.typesafe.sbt" % "sbt-native-packager" % "latest.integration")

0 comments on commit bfdf3cc

Please sign in to comment.