Conditional Runtime PHP Extension loading
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 40.4k
- Forks
- 8.1k
- Avg merge
- 2d 13h
- Merged PRs (30d)
- 96
Description
Description
I would like to build a docker container with various PHP extensions and be able to toggle them off with environment variables. (OpenTelemetry / XDebug / Tideways / Blackfire does not like each other). Of course I can build various tags, but it's an hassle of CI managment.
The solution who most people are doing is to use the docker entrypoint to move files to disable loading of extensions. This does not work when the container is read-only. Therefore I would suggest to have some kind of environment variable to disable / enable extension on the fly.
Several ideas I had so far:
in php.ini
{if hasEnv("FOO")}
extension=foo.so
{/if}
so we can toggle even php.ini settings
or a simple
PHP_EXTENSIONS_DISABLE=opentelemetry
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The issue does not name implementation files, tests, or entry points. Start by tracing PHP's extension-loading and configuration handling, then determine how environment-based enabling or disabling should work, including the proposed php.ini conditionals. Done means an agreed design is implemented and covered for read-only containers and runtime extension toggling.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c, php
- Domain
- backend
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100