doc: add warning about composer bug

This commit is contained in:
Maximilian Bosch
2025-10-17 15:40:32 +02:00
parent a61d468940
commit c965f5142f
2 changed files with 13 additions and 0 deletions

View File

@@ -214,6 +214,12 @@ code, while others choose not to.
In Nix, there are multiple approaches to building a Composer-based project.
::: {.warning}
`buildComposerProject2` has a [known bug](https://github.com/NixOS/nixpkgs/issues/451395)
where the `vendorHash` changes every a Composer release happens that changes the
`autoload.php` or vendored composer code.
:::
One such method is the `php.buildComposerProject2` helper function, which serves
as a wrapper around `mkDerivation`.

View File

@@ -14,6 +14,13 @@
versionCheckHook,
}:
/*
XXX IMPORTANT
Make sure to check if the `vendorHash` of `buildComposerProject2` changes when updating!
See https://github.com/NixOS/nixpkgs/issues/451395
*/
stdenvNoCC.mkDerivation (finalAttrs: {
pname = "composer";
version = "2.8.12";