Skip to content

Commit b60d804

Browse files
hungnv-srNguyen Vu Hung
andauthored
Add support for xmlrpc (#511)
* add xmlrpc support * update readme and pump php version * fix space --------- Co-authored-by: Nguyen Vu Hung <[email protected]>
1 parent 43b8c38 commit b60d804

File tree

4 files changed

+34
-0
lines changed

4 files changed

+34
-0
lines changed

Readme.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,7 @@ functions:
9898
| UUID | `${bref-extra:uuid-php-81}` |
9999
| Xdebug | `${bref-extra:xdebug-php-81}` |
100100
| Xlswriter | `${bref-extra:xlswriter-php-81}` |
101+
| xmlrpc | `${bref-extra:xmlrpc-php-81}` |
101102
| Yaml | `${bref-extra:yaml-php-81}` |
102103

103104
### Blackfire installation

layers/xmlrpc/Dockerfile

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
ARG PHP_VERSION
2+
ARG BREF_VERSION
3+
FROM bref/build-php-$PHP_VERSION:$BREF_VERSION AS ext
4+
5+
RUN MAKEFLAGS="-j $(nproc)" && pecl install xmlrpc-1.0.0RC3 > /dev/null
6+
RUN cp `php-config --extension-dir`/xmlrpc.so /tmp/xmlrpc.so
7+
RUN strip --strip-debug /tmp/xmlrpc.so
8+
RUN echo 'extension=xmlrpc.so' > /tmp/ext.ini
9+
10+
# Build the final image with just the files we need
11+
FROM scratch
12+
13+
# Copy things we installed to the final image
14+
COPY --from=ext /tmp/xmlrpc.so /opt/bref/extensions/xmlrpc.so
15+
# This is exclusive for php bref lambda
16+
COPY --from=ext /tmp/xmlrpc.so /opt/bref/extensions/php_xmlrpc.so
17+
COPY --from=ext /tmp/ext.ini /opt/bref/etc/php/conf.d/ext-xmlrpc.ini

layers/xmlrpc/config.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"php": [
3+
"80",
4+
"81",
5+
"82",
6+
"83"
7+
]
8+
}

layers/xmlrpc/test.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<?php
2+
3+
if (!function_exists($func = 'xmlrpc_server_create')) {
4+
echo sprintf('FAIL: Function "%s" does not exist.', $func).PHP_EOL;
5+
exit(1);
6+
}
7+
8+
exit(0);

0 commit comments

Comments
 (0)