{"action":"closed","issue":{"url":"https://api.github.com/repos/mnapoli/bref/issues/26","repository_url":"https://api.github.com/repos/mnapoli/bref","labels_url":"https://api.github.com/repos/mnapoli/bref/issues/26/labels{/name}","comments_url":"https://api.github.com/repos/mnapoli/bref/issues/26/comments","events_url":"https://api.github.com/repos/mnapoli/bref/issues/26/events","html_url":"https://github.com/mnapoli/bref/issues/26","id":332065604,"node_id":"MDU6SXNzdWUzMzIwNjU2MDQ=","number":26,"title":"Load extension dynamically","user":{"login":"t-geindre","id":6348039,"node_id":"MDQ6VXNlcjYzNDgwMzk=","avatar_url":"https://avatars1.githubusercontent.com/u/6348039?v=4","gravatar_id":"","url":"https://api.github.com/users/t-geindre","html_url":"https://github.com/t-geindre","followers_url":"https://api.github.com/users/t-geindre/followers","following_url":"https://api.github.com/users/t-geindre/following{/other_user}","gists_url":"https://api.github.com/users/t-geindre/gists{/gist_id}","starred_url":"https://api.github.com/users/t-geindre/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/t-geindre/subscriptions","organizations_url":"https://api.github.com/users/t-geindre/orgs","repos_url":"https://api.github.com/users/t-geindre/repos","events_url":"https://api.github.com/users/t-geindre/events{/privacy}","received_events_url":"https://api.github.com/users/t-geindre/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2018-06-13T16:11:33Z","updated_at":"2018-06-20T22:09:56Z","closed_at":"2018-06-20T22:09:56Z","author_association":"CONTRIBUTOR","body":"As done in #14 with `opcache.so`, I tried to load more extensions dynamically.\r\n\r\nI was able to compile Redis and MongoDB extensions with a bit tweaked version of `bin/php/Dockerfile` and `bin/php/build.sh`.\r\n\r\nThen I created a tar archive containing those two extensions in the `ext` directory.\r\n\r\nAnd finally I used the following hook to make php binary load those extensions:\r\n\r\n```yaml\r\nhooks:\r\n    build:\r\n        # Add custom extensions to php.ini\r\n        - 'echo \"extension=mongodb.so\" >> .bref/php.ini'\r\n        - 'echo \"extension=redis.so\" >> .bref/php.ini'\r\n```\r\n\r\nA `phpinfo()` confirms that those two extensions are correctly loaded.\r\n\r\nI think this could be done in a better way, especially the `php.ini` update.\r\n\r\nWhat do you think?"}}
{"actor":{"display_login":"mnapoli"}}