-
Notifications
You must be signed in to change notification settings - Fork 269
Closed
Description
First reported by @jrseliga in the Devbox Discord
Current Experience
- The PHP Nix package installs the
php.ini
file in the Nix Store, where it cannot be edited through normal means.
Desired Experience
- Developers should have a way to modify the settings in
php.ini
for their project.
Current Workarounds
- Developers can currently install PHP extensions by including them in their package list. This should work for installing any PHP extensions that do not require additional php.ini config. See our example for more details
"packages": [
"php@latest",
"phpExtensions.xdebug"
]
- If developers want to add a custom extension or modify the config via Nix, they can do this with a Flake as shown in this example.
Some Ideas for Improvement:
- Users can configure a
.user.ini
file in their local project to override some settings for their local project. This is a bit limited in which settings can be overridden, but may work for most cases. We can update our plugin to create this file by default + point PHP to it's location. - Our plugin can modify PHP so that it looks for the php.ini file in the local project directory. This would make it editable, but would also result in a copy of PHP being installed for each project. Might be best to set as an option
- Add a way to pass a php.ini file or additional config that will be added to the php.ini file in the Nix store when building PHP for the project.
jrseliga
Metadata
Metadata
Assignees
Labels
No labels