#php2shell was fixed in #NixOS with https://github.com/NixOS/nixpkgs/pull/576853
Until Hydra has caught up with package builds, you can pin to the commit directly (and compile PHP locally, no big deal): nix flake lock --override-input nixpkgs github:NixOS/nixpkgs/8c259fc0dd1f3ccc1aaf4f9156ab16b7328b5a4f
You can verify the PHP version is 8.4.27 afterwards.