aboutsummaryrefslogtreecommitdiffhomepage
path: root/docs
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2026-05-08 21:45:02 +0900
committernsfisis <nsfisis@gmail.com>2026-05-08 21:45:02 +0900
commit9c2396134465613d3c650e881219572aecc777a5 (patch)
tree30ef4992d3f346a332771e80236a88f816501036 /docs
parent6d853db4e74f07abe480ab9532c914ba94623dc0 (diff)
downloadphp-mozart-9c2396134465613d3c650e881219572aecc777a5.tar.gz
php-mozart-9c2396134465613d3c650e881219572aecc777a5.tar.zst
php-mozart-9c2396134465613d3c650e881219572aecc777a5.zip
fix(bump): align with Composer's BumpCommand pipeline
Splits execute() into execute → do_bump → update_file_cleanly mirroring Composer's structure, switches state loading to Composer::require, adds the no-lock fallback to vendor/composer/installed.json, routes warnings and errors through stderr, and matches Composer's wording verbatim. JsonManipulator is deferred — update_file_cleanly always falls back to a full structured rewrite for now, documented in known-incompatibilities. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Diffstat (limited to 'docs')
-rw-r--r--docs/known-incompatibilities.md9
1 files changed, 9 insertions, 0 deletions
diff --git a/docs/known-incompatibilities.md b/docs/known-incompatibilities.md
index 5a46e0a..45f0c17 100644
--- a/docs/known-incompatibilities.md
+++ b/docs/known-incompatibilities.md
@@ -15,3 +15,12 @@ In typical environments this does not matter; both Composer and Mozart trust the
- PHP-only ini overrides: `openssl.cafile` / `openssl.capath` configured via `php.ini` affect Composer but have no effect on Mozart.
If you rely on a private CA, set `config.cafile` and `config.capath` in `composer.json` (or the global `$COMPOSER_HOME/config.json`). It works in Mozart too.
+
+
+## `bump` rewrites composer.json without preserving comments / key order
+
+Composer's `bump` command edits `composer.json` through `JsonManipulator`, which keeps unrelated whitespace, comments, and key ordering intact — only the bumped constraint values change in place.
+
+Mozart does not yet have a `JsonManipulator` port. `bump` therefore falls back to a full structured rewrite of `composer.json` (the same path Composer uses when `JsonManipulator` cannot handle the input). User-authored comments and idiosyncratic key orderings are lost on every run; the resulting file is functionally equivalent but reformatted.
+
+This will be addressed by porting `JsonManipulator`, which is also needed by `require`, `remove`, `config`, `init`, and `create-project`.