Skip to content

Commit 451e8cd

Browse files
committed
Fix extension loading to handle both file paths and extension names
- Check if extension path is a file or extension name - Add debug output to show loading method - Support both PIE-installed extensions and local .so files Signed-off-by: James Duong <[email protected]>
1 parent ec0a2d6 commit 451e8cd

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

.github/workflows/run-php-tests/action.yml

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,16 @@ runs:
8181
echo "=== Extension Debug Info ==="
8282
echo "Extension path: $EXTENSION_PATH"
8383
84-
php -n -d "extension=$EXTENSION_PATH" -r "
84+
# Check if this is a file path or extension name
85+
if [[ -f "$EXTENSION_PATH" ]]; then
86+
echo "Loading extension from file: $EXTENSION_PATH"
87+
EXTENSION_ARG="extension=$EXTENSION_PATH"
88+
else
89+
echo "Loading extension by name: $EXTENSION_PATH"
90+
EXTENSION_ARG="extension=$EXTENSION_PATH"
91+
fi
92+
93+
php -n -d "$EXTENSION_ARG" -r "
8594
echo 'Extension loaded: ' . (extension_loaded('valkey_glide') ? 'YES' : 'NO') . PHP_EOL;
8695
echo 'Extension version: ' . phpversion('valkey_glide') . PHP_EOL;
8796
echo 'Extension functions: ' . PHP_EOL;
@@ -104,7 +113,7 @@ runs:
104113
"
105114
106115
# Run tests using extension loading
107-
php -n -d "extension=$EXTENSION_PATH" tests/TestValkeyGlide.php
116+
php -n -d "$EXTENSION_ARG" tests/TestValkeyGlide.php
108117
109118
- name: Run integration tests
110119
shell: bash

0 commit comments

Comments
 (0)