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

Add fibers to 8.0 #141

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
5 changes: 5 additions & 0 deletions Dockerfile-nts-alpine
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@ COPY --from=build-uv /uv.so /uv.so
# Install docker help scripts
COPY src/php/utils/docker/ /usr/local/bin/

# ext-fibers install script
COPY src/php/utils/install-fibers /usr/local/bin/

COPY src/php/conf/ /usr/local/etc/php/conf.d/
COPY src/php/cli/conf/*.ini /usr/local/etc/php/conf.d/

Expand All @@ -57,6 +60,8 @@ RUN EXTENSION_DIR=`php-config --extension-dir 2>/dev/null` && \
&& wget -q pear.php.net/go-pear.phar && php go-pear.phar \
&& docker-php-ext-install -j$(nproc) pcntl pgsql pdo pdo_pgsql bcmath zip gmp iconv opcache \
&& docker-php-ext-enable uv \
&& install-fibers \
&& rm -rf /usr/local/bin/install-fibers \
&& apk del $PHPIZE_DEPS \
&& wget -q -O - https://raw.githubusercontent.com/eficode/wait-for/master/wait-for > /bin/wait-for \
&& chmod +x /bin/wait-for \
Expand Down
5 changes: 5 additions & 0 deletions Dockerfile-nts-debian
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@ RUN yes | apt-get upgrade curl libxml2 openssl
# Install docker help scripts
COPY src/php/utils/docker/debian/ /usr/local/bin/

# ext-fibers install script
COPY src/php/utils/install-fibers /usr/local/bin/

COPY src/php/conf/ /usr/local/etc/php/conf.d/
COPY src/php/cli/conf/*.ini /usr/local/etc/php/conf.d/

Expand All @@ -64,6 +67,8 @@ RUN EXTENSION_DIR=`php-config --extension-dir 2>/dev/null` && \
$PHPIZE_DEPS \
&& docker-php-ext-install -j$(nproc) pcntl pgsql pdo pdo_pgsql bcmath zip gmp iconv \
&& docker-php-ext-enable uv \
&& install-fibers \
&& rm -rf /usr/local/bin/install-fibers \
&& wget -q -O - https://raw.githubusercontent.com/vishnubob/wait-for-it/master/wait-for-it.sh > /bin/wait-for \
&& yes | apt-get purge wget $PHPIZE_DEPS \
&& yes | apt-get install make \
Expand Down
5 changes: 5 additions & 0 deletions Dockerfile-zts-alpine
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@ COPY --from=build-uv /uv.so /uv.so
# Install docker help scripts
COPY src/php/utils/docker/alpine/ /usr/local/bin/

# ext-fibers install script
COPY src/php/utils/install-fibers /usr/local/bin/

COPY src/php/conf/ /usr/local/etc/php/conf.d/
COPY src/php/cli/conf/*.ini /usr/local/etc/php/conf.d/

Expand All @@ -63,6 +66,8 @@ RUN EXTENSION_DIR=`php-config --extension-dir 2>/dev/null` && \
&& pecl install parallel \
&& docker-php-ext-enable parallel \
&& docker-php-ext-enable uv \
&& install-fibers \
&& rm -rf /usr/local/bin/install-fibers \
&& apk del $PHPIZE_DEPS \
&& wget -q -O - https://raw.githubusercontent.com/eficode/wait-for/master/wait-for > /bin/wait-for \
&& chmod +x /bin/wait-for \
Expand Down
5 changes: 5 additions & 0 deletions Dockerfile-zts-debian
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@ RUN yes | apt-get upgrade curl libxml2 openssl
# Install docker help scripts
COPY src/php/utils/docker/debian/ /usr/local/bin/

# ext-fibers install script
COPY src/php/utils/install-fibers /usr/local/bin/

COPY src/php/conf/ /usr/local/etc/php/conf.d/
COPY src/php/cli/conf/*.ini /usr/local/etc/php/conf.d/

Expand All @@ -66,6 +69,8 @@ RUN EXTENSION_DIR=`php-config --extension-dir 2>/dev/null` && \
&& pecl install parallel \
&& docker-php-ext-enable parallel \
&& docker-php-ext-enable uv \
&& install-fibers \
&& rm -rf /usr/local/bin/install-fibers \
&& wget -q -O - https://raw.githubusercontent.com/vishnubob/wait-for-it/master/wait-for-it.sh > /bin/wait-for \
&& chmod +x /bin/wait-for \
&& yes | apt-get purge wget $PHPIZE_DEPS \
Expand Down
14 changes: 14 additions & 0 deletions src/php/utils/install-fibers
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/bin/sh

set -xe

php -v

if [ $(php -v | grep "PHP 8.0" | wc -l) != 0 ] ; then
git clone https://github.com/amphp/ext-fiber.git /usr/src/php/ext/fiber && \
cd /usr/src/php/ext/fiber && \
docker-php-source extract && \
docker-php-ext-install fiber && \
make test
fi