-
Notifications
You must be signed in to change notification settings - Fork 195
Onboard php 8.5 #2813
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
Merged
Merged
Onboard php 8.5 #2813
Changes from all commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
986d267
Onboard PHP 8.5
Saipriya-1144 4a67bc8
Update SDKs dockerfile
Saipriya-1144 a9b32ee
Remove libdb4o-cil-dev
Saipriya-1144 c4e96ce
Install PHP composer for noble
Saipriya-1144 6a18dde
Add runtime tests for PHP 8.5
Saipriya-1144 99843c1
Add build image tests
Saipriya-1144 2f2e70d
Fix merge conflicts
Saipriya-1144 9b90b70
Fix runtime image tests
Saipriya-1144 6d75118
Revert Python changes
Saipriya-1144 51de5a0
Add libjpeg-turbo in noble images
Saipriya-1144 d0ed854
Merge branch 'main' of https://github.com/microsoft/Oryx into user/vc…
Saipriya-1144 95aa68a
Update golang version
Saipriya-1144 8554c55
Remove phpRuntimeBase dockerfile
Saipriya-1144 3fa80a7
Push 8.5 SDKs for bookworm and bullseye
Saipriya-1144 0f1951b
Fix python test
Saipriya-1144 b53069a
Merge branch 'main' of https://github.com/microsoft/Oryx into user/vc…
Saipriya-1144 ec45680
Pin versions for odbc packages
Saipriya-1144 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| #!/bin/sh | ||
| set -e | ||
|
|
||
| # first arg is `-f` or `--some-option` | ||
| if [ "${1#-}" != "$1" ]; then | ||
| set -- php-fpm "$@" | ||
| fi | ||
|
|
||
| exec "$@" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,69 @@ | ||
| #!/bin/sh | ||
| set -e | ||
|
|
||
| # prefer user supplied CFLAGS, but default to our PHP_CFLAGS | ||
| : ${CFLAGS:=$PHP_CFLAGS} | ||
| : ${CPPFLAGS:=$PHP_CPPFLAGS} | ||
| : ${LDFLAGS:=$PHP_LDFLAGS} | ||
| export CFLAGS CPPFLAGS LDFLAGS | ||
|
|
||
| srcExists= | ||
| if [ -d /usr/src/php ]; then | ||
| srcExists=1 | ||
| fi | ||
| docker-php-source extract | ||
| if [ -z "$srcExists" ]; then | ||
| touch /usr/src/php/.docker-delete-me | ||
| fi | ||
|
|
||
| cd /usr/src/php/ext | ||
|
|
||
| usage() { | ||
| echo "usage: $0 ext-name [configure flags]" | ||
| echo " ie: $0 gd --with-jpeg-dir=/usr/local/something" | ||
| echo | ||
| echo 'Possible values for ext-name:' | ||
| find . \ | ||
| -mindepth 2 \ | ||
| -maxdepth 2 \ | ||
| -type f \ | ||
| -name 'config.m4' \ | ||
| | xargs -n1 dirname \ | ||
| | xargs -n1 basename \ | ||
| | sort \ | ||
| | xargs | ||
| echo | ||
| echo 'Some of the above modules are already compiled into PHP; please check' | ||
| echo 'the output of "php -i" to see which modules are already loaded.' | ||
| } | ||
|
|
||
| ext="$1" | ||
| if [ -z "$ext" ] || [ ! -d "$ext" ]; then | ||
| usage >&2 | ||
| exit 1 | ||
| fi | ||
| shift | ||
|
|
||
| pm='unknown' | ||
| if [ -e /lib/apk/db/installed ]; then | ||
| pm='apk' | ||
| fi | ||
|
|
||
| if [ "$pm" = 'apk' ]; then | ||
| if \ | ||
| [ -n "$PHPIZE_DEPS" ] \ | ||
| && ! apk info --installed .phpize-deps > /dev/null \ | ||
| && ! apk info --installed .phpize-deps-configure > /dev/null \ | ||
| ; then | ||
| apk add --no-cache --virtual .phpize-deps-configure $PHPIZE_DEPS | ||
| fi | ||
| fi | ||
|
|
||
| if command -v dpkg-architecture > /dev/null; then | ||
| gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)" | ||
| set -- --build="$gnuArch" "$@" | ||
| fi | ||
|
|
||
| cd "$ext" | ||
| phpize | ||
| ./configure --enable-option-checking=fatal "$@" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,114 @@ | ||
| #!/bin/sh | ||
| set -e | ||
|
|
||
| extDir="$(php -d 'display_errors=stderr' -r 'echo ini_get("extension_dir");')" | ||
| cd "$extDir" | ||
|
|
||
| usage() { | ||
| echo "usage: $0 [options] module-name [module-name ...]" | ||
| echo " ie: $0 gd mysqli" | ||
| echo " $0 pdo pdo_mysql" | ||
| echo " $0 --ini-name 0-apc.ini apcu apc" | ||
| echo | ||
| echo 'Possible values for module-name:' | ||
| find -maxdepth 1 \ | ||
| -type f \ | ||
| -name '*.so' \ | ||
| -exec basename '{}' ';' \ | ||
| | sort \ | ||
| | xargs | ||
| echo | ||
| echo 'Some of the above modules are already compiled into PHP; please check' | ||
| echo 'the output of "php -i" to see which modules are already loaded.' | ||
| } | ||
|
|
||
| opts="$(getopt -o 'h?' --long 'help,ini-name:' -- "$@" || { usage >&2 && false; })" | ||
| eval set -- "$opts" | ||
|
|
||
| iniName= | ||
| while true; do | ||
| flag="$1" | ||
| shift | ||
| case "$flag" in | ||
| --help|-h|'-?') usage && exit 0 ;; | ||
| --ini-name) iniName="$1" && shift ;; | ||
| --) break ;; | ||
| *) | ||
| { | ||
| echo "error: unknown flag: $flag" | ||
| usage | ||
| } >&2 | ||
| exit 1 | ||
| ;; | ||
| esac | ||
| done | ||
|
|
||
| modules= | ||
| for module; do | ||
| if [ -z "$module" ]; then | ||
| continue | ||
| fi | ||
| if [ -f "$module.so" ] && ! [ -f "$module" ]; then | ||
| # allow ".so" to be optional | ||
| module="$module.so" | ||
| fi | ||
| if ! [ -f "$module" ]; then | ||
| echo >&2 "error: '$module' does not exist" | ||
| echo >&2 | ||
| usage >&2 | ||
| exit 1 | ||
| fi | ||
| modules="$modules $module" | ||
| done | ||
|
|
||
| if [ -z "$modules" ]; then | ||
| usage >&2 | ||
| exit 1 | ||
| fi | ||
|
|
||
| pm='unknown' | ||
| if [ -e /lib/apk/db/installed ]; then | ||
| pm='apk' | ||
| fi | ||
|
|
||
| apkDel= | ||
| if [ "$pm" = 'apk' ]; then | ||
| if \ | ||
| [ -n "$PHPIZE_DEPS" ] \ | ||
| && ! apk info --installed .phpize-deps > /dev/null \ | ||
| && ! apk info --installed .phpize-deps-configure > /dev/null \ | ||
| ; then | ||
| apk add --no-cache --virtual '.docker-php-ext-enable-deps' binutils | ||
| apkDel='.docker-php-ext-enable-deps' | ||
| fi | ||
| fi | ||
|
|
||
| for module in $modules; do | ||
| if readelf --wide --syms "$module" | grep -q ' zend_extension_entry$'; then | ||
| # https://wiki.php.net/internals/extensions#loading_zend_extensions | ||
| absModule="$(readlink -f "$module")" | ||
| line="zend_extension=$absModule" | ||
| else | ||
| line="extension=$module" | ||
| fi | ||
|
|
||
| ext="$(basename "$module")" | ||
| ext="${ext%.*}" | ||
| if php -d 'display_errors=stderr' -r 'exit(extension_loaded("'"$ext"'") ? 0 : 1);'; then | ||
| # this isn't perfect, but it's better than nothing | ||
| # (for example, 'opcache.so' presents inside PHP as 'Zend OPcache', not 'opcache') | ||
| echo >&2 | ||
| echo >&2 "warning: $ext ($module) is already loaded!" | ||
| echo >&2 | ||
| continue | ||
| fi | ||
|
|
||
| ini="$PHP_INI_DIR/conf.d/${iniName:-"docker-php-ext-$ext.ini"}" | ||
| if ! grep -q "$line" "$ini" 2>/dev/null; then | ||
| echo "$line" >> "$ini" | ||
| fi | ||
| done | ||
|
|
||
| if [ "$pm" = 'apk' ] && [ -n "$apkDel" ]; then | ||
| apk del --no-network $apkDel | ||
| fi |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.