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 ext-meminfo to PHP 7.4 images #52

Open
wants to merge 4 commits 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
2 changes: 0 additions & 2 deletions .hadolint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,4 @@ ignored:
- DL3019
- SC2006
- DL3013 # So we can install the latest docker-compose
- SC2126
- DL4006
- DL3003
2 changes: 1 addition & 1 deletion Dockerfile-nts
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ RUN true

RUN EXTENSION_DIR=`php-config --extension-dir 2>/dev/null` \
&& mv /*.so "$EXTENSION_DIR/" \
&& if [ $(php -v | grep 7.4 | wc -l) != 0 ] ; then rm "$EXTENSION_DIR/meminfo.so"; else docker-php-ext-enable meminfo; fi \
&& docker-php-ext-enable meminfo \
&& apk add --no-cache \
make \
git \
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile-zts
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ RUN true

RUN EXTENSION_DIR=`php-config --extension-dir 2>/dev/null` \
&& mv /*.so "$EXTENSION_DIR/" \
&& if [ $(php -v | grep 7.4 | wc -l) != 0 ] ; then rm "$EXTENSION_DIR/meminfo.so"; else docker-php-ext-enable meminfo; fi \
&& docker-php-ext-enable meminfo \
&& apk add --no-cache \
make \
git \
Expand Down
4 changes: 2 additions & 2 deletions test/container/test_php_dev.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ def test_configuration_is_not_effective(host):

@pytest.mark.php_dev
def test_php_meminfo_is_enabled(host):
output = host.run('if [ $(php -v | grep 7.4 | wc -l) != 0 ] ; then php -r "echo(\'meminfo\');"; else php -r "exit(function_exists(\'meminfo_dump\') ? 0 : 255);"; fi')
output = host.run('php -r "exit(function_exists(\'meminfo_dump\') ? 0 : 255);"')
assert output.rc == 0

@pytest.mark.php_no_dev
Expand All @@ -34,6 +34,6 @@ def test_php_meminfo_is_not_enabled(host):

@pytest.mark.php_dev
def test_php_ext_meminfo_is_functional(host):
output = host.run('if [ $(php -v | grep 7.4 | wc -l) != 0 ] ; then php -r "echo(\'meminfo\');"; else php /tests/container/functional/meminfo.php; fi')
output = host.run('php /tests/container/functional/meminfo.php')
assert output.stdout == 'meminfo'
assert output.rc == 0
2 changes: 1 addition & 1 deletion test/container/test_php_ext.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def test_iconv_is_loaded(host):

@pytest.mark.php_dev
def test_meminfo_is_loaded(host):
assert 'meminfo' in host.run('if [ $(php -v | grep 7.4 | wc -l) != 0 ] ; then echo "meminfo"; else php -m; fi').stdout
assert 'meminfo' in host.run('php -m').stdout

@pytest.mark.php_zts
def test_parallel_is_loaded(host):
Expand Down