Skip to content

Commit

Permalink
Merge pull request #49 from laminas/feature/output-php-extensions-wit…
Browse files Browse the repository at this point in the history
…h-their-versions

Output PHP extensions with version
  • Loading branch information
weierophinney authored Aug 23, 2021
2 parents cd8d97d + 335134a commit d34e167
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
2 changes: 2 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@ RUN chmod a+x /scripts/*

RUN /scripts/php_ini_dev_settings.sh
COPY entrypoint.sh /usr/local/bin/entrypoint.sh
COPY php-extensions-with-version.php /usr/local/bin/php-extensions-with-version.php
RUN chmod +x /usr/local/bin/php-extensions-with-version.php

RUN useradd -ms /bin/bash testuser

Expand Down
2 changes: 1 addition & 1 deletion entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ fi

echo "PHP version: $(php --version)"
echo "Installed extensions:"
php -m
/usr/local/bin/php-extensions-with-version.php

# If a token is present, tell Composer about it so we can avoid rate limits
if [[ "${GITHUB_TOKEN}" != "" ]];then
Expand Down
6 changes: 6 additions & 0 deletions php-extensions-with-version.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/usr/bin/env php
<?php

foreach (get_loaded_extensions() as $extension) {
printf('%s: %s%s', $extension, phpversion($extension), PHP_EOL);
}

0 comments on commit d34e167

Please sign in to comment.