A Nix flake that automatically builds custom PHP development environments with required extensions from composer.json.
Nix (PHP) Shell is a Nix flake that creates custom PHP development environments by automatically detecting and enabling required PHP extensions from a project's composer.json file. It solves the problem of manual PHP environment setup and ensures that developers have the exact extensions needed for their projects, from PHP 5.6 to 8.4.
PHP developers and teams using Nix for development environment management who want reproducible, automated PHP setups without manual configuration.
Developers choose Nix (PHP) Shell because it automates PHP environment configuration, reduces setup time, and guarantees consistency by building PHP with only the extensions specified in composer.json, leveraging Nix's reproducibility.
Nix shells for PHP development
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Parses the composer.json file to automatically identify and enable required PHP extensions from the 'require' and 'require-dev' sections, eliminating manual configuration and ensuring consistency.
Compiles PHP binaries with only the extensions specified in composer.json, reducing bloat and optimizing performance for specific project needs, as highlighted in the custom build process.
Supports stable PHP versions from 5.6 to 8.4, allowing teams to manage multiple projects with different PHP requirements in a unified workflow, as listed via 'nix flake show'.
Works seamlessly with Nix flakes, legacy nix-shell, and direnv, providing multiple ways to load environments based on team preferences, including impure mode for dynamic config.
Uses IFD to dynamically parse composer.json, which the README notes is not allowed in NixOS/nixpkgs because it prevents evaluation without building, limiting compatibility with strict Nix workflows.
Effective use demands familiarity with Nix concepts like flakes and overlays, creating a steep learning curve for developers new to the ecosystem, despite documentation.
For dynamic features like loading custom .user.ini files, the --impure flag is required, which might be seen as a hack in pure Nix environments and adds complexity.