Skip to content

Commit d34e167

Browse files
Merge pull request #49 from laminas/feature/output-php-extensions-with-their-versions
Output PHP extensions with version
2 parents cd8d97d + 335134a commit d34e167

File tree

3 files changed

+9
-1
lines changed

3 files changed

+9
-1
lines changed

Dockerfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,8 @@ RUN chmod a+x /scripts/*
5757

5858
RUN /scripts/php_ini_dev_settings.sh
5959
COPY entrypoint.sh /usr/local/bin/entrypoint.sh
60+
COPY php-extensions-with-version.php /usr/local/bin/php-extensions-with-version.php
61+
RUN chmod +x /usr/local/bin/php-extensions-with-version.php
6062

6163
RUN useradd -ms /bin/bash testuser
6264

entrypoint.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ fi
170170

171171
echo "PHP version: $(php --version)"
172172
echo "Installed extensions:"
173-
php -m
173+
/usr/local/bin/php-extensions-with-version.php
174174

175175
# If a token is present, tell Composer about it so we can avoid rate limits
176176
if [[ "${GITHUB_TOKEN}" != "" ]];then

php-extensions-with-version.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#!/usr/bin/env php
2+
<?php
3+
4+
foreach (get_loaded_extensions() as $extension) {
5+
printf('%s: %s%s', $extension, phpversion($extension), PHP_EOL);
6+
}

0 commit comments

Comments
 (0)