diff --git a/lib/workers/repository/update/branch/get-updated.spec.ts b/lib/workers/repository/update/branch/get-updated.spec.ts
index 123485920d9c87431530fdff47631a238a3d7fa8..04a20633fd11a2385ce3584d80a757b0436d7a90 100644
--- a/lib/workers/repository/update/branch/get-updated.spec.ts
+++ b/lib/workers/repository/update/branch/get-updated.spec.ts
@@ -205,6 +205,81 @@ describe('workers/repository/update/branch/get-updated', () => {
       });
     });
 
+    it('for updatedArtifacts passes proper lockFiles', async () => {
+      config.upgrades.push({
+        packageFile: 'composer.json',
+        manager: 'composer',
+        branchName: '',
+      });
+      config.lockFiles = ['different.lock'];
+      config.packageFiles = {
+        composer: [
+          {
+            packageFile: 'composer.json',
+            lockFiles: ['composer.lock'],
+            deps: [],
+          },
+        ] satisfies PackageFile[],
+      };
+      autoReplace.doAutoReplace.mockResolvedValueOnce('some new content');
+      composer.updateArtifacts.mockResolvedValueOnce([
+        {
+          file: {
+            type: 'addition',
+            path: 'composer.lock',
+            contents: 'some contents',
+          },
+        },
+      ]);
+      await getUpdatedPackageFiles(config);
+      expect(composer.updateArtifacts).toHaveBeenCalledWith(
+        expect.objectContaining({
+          config: expect.objectContaining({
+            lockFiles: ['composer.lock'],
+          }),
+        }),
+      );
+    });
+
+    it('for nonUpdatedArtifacts passes proper lockFiles', async () => {
+      config.upgrades.push({
+        packageFile: 'composer.json',
+        manager: 'composer',
+        branchName: '',
+        isLockfileUpdate: true,
+      });
+      composer.updateLockedDependency.mockReturnValueOnce({
+        status: 'unsupported',
+      });
+      config.lockFiles = ['different.lock'];
+      config.packageFiles = {
+        composer: [
+          {
+            packageFile: 'composer.json',
+            lockFiles: ['composer.lock'],
+            deps: [],
+          },
+        ] satisfies PackageFile[],
+      };
+      composer.updateArtifacts.mockResolvedValueOnce([
+        {
+          file: {
+            type: 'addition',
+            path: 'composer.lock',
+            contents: 'some contents',
+          },
+        },
+      ]);
+      await getUpdatedPackageFiles(config);
+      expect(composer.updateArtifacts).toHaveBeenCalledWith(
+        expect.objectContaining({
+          config: expect.objectContaining({
+            lockFiles: ['composer.lock'],
+          }),
+        }),
+      );
+    });
+
     it('for lockFileMaintenance passes proper lockFiles', async () => {
       config.upgrades.push({
         manager: 'composer',
diff --git a/lib/workers/repository/update/branch/get-updated.ts b/lib/workers/repository/update/branch/get-updated.ts
index b036b178d9a6215d4d3d98b956e1c4ac78753992..c79924d2edd2740b13116fdafea48e9f7ecb7eec 100644
--- a/lib/workers/repository/update/branch/get-updated.ts
+++ b/lib/workers/repository/update/branch/get-updated.ts
@@ -302,7 +302,11 @@ export async function getUpdatedPackageFiles(
           updatedDeps,
           // TODO #22198
           newPackageFileContent: packageFile.contents!.toString(),
-          config,
+          config: patchConfigForArtifactsUpdate(
+            config,
+            manager,
+            packageFile.path,
+          ),
         });
         processUpdateArtifactResults(results, updatedArtifacts, artifactErrors);
       }
@@ -329,7 +333,11 @@ export async function getUpdatedPackageFiles(
           updatedDeps,
           // TODO #22198
           newPackageFileContent: packageFile.contents!.toString(),
-          config,
+          config: patchConfigForArtifactsUpdate(
+            config,
+            manager,
+            packageFile.path,
+          ),
         });
         processUpdateArtifactResults(results, updatedArtifacts, artifactErrors);
         if (is.nonEmptyArray(results)) {