Skip to content

Commit

Permalink
Merge pull request #248 from WyriHaximusNet/add-random-extensions
Browse files Browse the repository at this point in the history
Add ext-random
  • Loading branch information
WyriHaximus authored Jul 17, 2024
2 parents e8eb909 + 26c7e64 commit 6d283f3
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 0 deletions.
1 change: 1 addition & 0 deletions Dockerfile-nts-alpine
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ RUN EXTENSION_DIR=`php-config --extension-dir 2>/dev/null` && \
## Install PECL
&& wget -q pear.php.net/go-pear.phar && php go-pear.phar \
&& install-php-extensions pcntl pgsql pdo pdo_pgsql bcmath zip gmp iconv opcache intl sockets \
&& (install-php-extensions random || true) \
&& (pecl install eio || pecl install eio-beta) \
&& docker-php-ext-enable eio \
&& pecl install event \
Expand Down
1 change: 1 addition & 0 deletions Dockerfile-nts-debian
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ RUN EXTENSION_DIR=`php-config --extension-dir 2>/dev/null` && \
gdb \
$PHPIZE_DEPS \
&& docker-php-ext-install -j$(nproc) pcntl pgsql pdo pdo_pgsql bcmath zip gmp iconv intl sockets \
&& (docker-php-ext-install -j$(nproc) random || true) \
&& (pecl install eio || pecl install eio-beta) \
&& docker-php-ext-enable eio \
&& pecl install event \
Expand Down
1 change: 1 addition & 0 deletions Dockerfile-zts-alpine
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ RUN EXTENSION_DIR=`php-config --extension-dir 2>/dev/null` && \
## Install PECL
&& wget -q pear.php.net/go-pear.phar && php go-pear.phar \
&& install-php-extensions pcntl pgsql pdo pdo_pgsql bcmath zip gmp iconv opcache intl sockets \
&& (install-php-extensions random || true) \
&& pecl install parallel || pecl install parallel-1.1.4 \
&& docker-php-ext-enable parallel \
&& (pecl install eio || pecl install eio-beta) \
Expand Down
1 change: 1 addition & 0 deletions Dockerfile-zts-debian
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ RUN EXTENSION_DIR=`php-config --extension-dir 2>/dev/null` && \
gdb \
$PHPIZE_DEPS \
&& docker-php-ext-install -j$(nproc) pcntl pgsql pdo pdo_pgsql bcmath zip gmp iconv intl sockets \
&& (docker-php-ext-install -j$(nproc) random || true) \
&& pecl install parallel || pecl install parallel-1.1.4 \
&& docker-php-ext-enable parallel \
&& (pecl install eio || pecl install eio-beta) \
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@ Both versions come with the following list of non-non-blocking related (core-) e
* pgsql
* Phar
* posix
* random
* readline
* Reflection
* session
Expand Down
7 changes: 7 additions & 0 deletions test/container/test_php_ext.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,3 +75,10 @@ def test_xdebug_is_not_loaded(host):
@pytest.mark.php_nts
def test_zip_is_loaded(host):
assert 'zip' in host.run('php -m').stdout

@pytest.mark.php_zts
@pytest.mark.php_nts
def test_zip_is_loaded(host):
output = host.run('php -r "exit(function_exists(\'mt_rand\') ? 0 : 255);"')
assert output.rc == 0
# assert 'random' in host.run('php -m').stdout

0 comments on commit 6d283f3

Please sign in to comment.