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 support for xmlrpc #511

Merged
merged 3 commits into from
Jan 18, 2024
Merged
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
1 change: 1 addition & 0 deletions Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ functions:
| UUID | `${bref-extra:uuid-php-81}` |
| Xdebug | `${bref-extra:xdebug-php-81}` |
| Xlswriter | `${bref-extra:xlswriter-php-81}` |
| xmlrpc | `${bref-extra:xmlrpc-php-81}` |
| Yaml | `${bref-extra:yaml-php-81}` |

### Blackfire installation
Expand Down
17 changes: 17 additions & 0 deletions layers/xmlrpc/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
ARG PHP_VERSION
ARG BREF_VERSION
FROM bref/build-php-$PHP_VERSION:$BREF_VERSION AS ext

RUN MAKEFLAGS="-j $(nproc)" && pecl install xmlrpc-1.0.0RC3 > /dev/null
RUN cp `php-config --extension-dir`/xmlrpc.so /tmp/xmlrpc.so
RUN strip --strip-debug /tmp/xmlrpc.so
RUN echo 'extension=xmlrpc.so' > /tmp/ext.ini

# Build the final image with just the files we need
FROM scratch

# Copy things we installed to the final image
COPY --from=ext /tmp/xmlrpc.so /opt/bref/extensions/xmlrpc.so
# This is exclusive for php bref lambda
COPY --from=ext /tmp/xmlrpc.so /opt/bref/extensions/php_xmlrpc.so
COPY --from=ext /tmp/ext.ini /opt/bref/etc/php/conf.d/ext-xmlrpc.ini
8 changes: 8 additions & 0 deletions layers/xmlrpc/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"php": [
"80",
"81",
"82",
"83"
]
}
8 changes: 8 additions & 0 deletions layers/xmlrpc/test.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?php

if (!function_exists($func = 'xmlrpc_server_create')) {
echo sprintf('FAIL: Function "%s" does not exist.', $func).PHP_EOL;
exit(1);
}

exit(0);
Loading