From f5f8972d119f08a9396944fb6fd7288476d94596 Mon Sep 17 00:00:00 2001 From: Laurent Laville Date: Thu, 3 Oct 2024 04:52:59 +0000 Subject: [PATCH] dump-autoload box setting should be applied only if not previously defined --- .changes/unreleased/Fixed-20241003-072041.yaml | 3 +++ box.json | 3 ++- box.json.dist | 2 +- src/Pipeline/ConfigureStage.php | 2 +- 4 files changed, 7 insertions(+), 3 deletions(-) create mode 100644 .changes/unreleased/Fixed-20241003-072041.yaml diff --git a/.changes/unreleased/Fixed-20241003-072041.yaml b/.changes/unreleased/Fixed-20241003-072041.yaml new file mode 100644 index 0000000..24baf85 --- /dev/null +++ b/.changes/unreleased/Fixed-20241003-072041.yaml @@ -0,0 +1,3 @@ +kind: Fixed +body: '[GH-13](https://github.com/llaville/box-manifest/issues/13) : v4.0.0-rc.1 does not support correctly the BOX dump-autoload setting' +time: 2024-10-03T07:20:41.299069779Z diff --git a/box.json b/box.json index dc3c425..bccbd32 100644 --- a/box.json +++ b/box.json @@ -26,5 +26,6 @@ "files-bin": [ "vendor/humbug/php-scoper/vendor-hotfix/.gitkeep" ], - "stub": "stub.php" + "stub": "stub.php", + "dump-autoload": true } diff --git a/box.json.dist b/box.json.dist index aeabfe0..863ae14 100644 --- a/box.json.dist +++ b/box.json.dist @@ -31,7 +31,7 @@ ".box.manifests.bin" ], "stub": "stub.php", - "dump-autoload": false, + "dump-autoload": true, "map": [ { "console-table.txt": ".box.manifests/console-table.txt" diff --git a/src/Pipeline/ConfigureStage.php b/src/Pipeline/ConfigureStage.php index 606ce55..69c9c36 100644 --- a/src/Pipeline/ConfigureStage.php +++ b/src/Pipeline/ConfigureStage.php @@ -48,7 +48,7 @@ public function __invoke(array $payload): array // @link Due to issue https://github.com/box-project/box/issues/580 // @see https://github.com/box-project/box/issues/580#issuecomment-2326577684 - $configs['dump-autoload'] = false; + $configs['dump-autoload'] ??= false; // should be applied only if not previously defined if (!isset($configs['files-bin'])) { $configs['files-bin'] = [];