diff --git a/lib/datasource/packagist/index.js b/lib/datasource/packagist/index.js
index 85e26a15b87079966e8b92ddc9ed583d20460c24..9290b3b968b5a2d2c58fe455dcb172c48411fe83 100644
--- a/lib/datasource/packagist/index.js
+++ b/lib/datasource/packagist/index.js
@@ -13,8 +13,10 @@ module.exports = {
 
 function getHostOpts(url) {
   const { host } = URL.parse(url);
-  const opts = hostRules.find({ hostType: 'packagist', host });
-  opts.json = true;
+  const opts = {
+    ...hostRules.find({ hostType: 'packagist', host }),
+    json: true,
+  };
   if (opts && opts.username && opts.password) {
     const auth = Buffer.from(`${opts.username}:${opts.password}`).toString(
       'base64'