diff --git a/lib/datasource/packagist/__snapshots__/index.spec.ts.snap b/lib/datasource/packagist/__snapshots__/index.spec.ts.snap
index 87a2107f708b408acdbf2da75c8f6a363bc6c1b2..c34ca81ee0da8d86f49ae678651b4f7ce5b6b246 100644
--- a/lib/datasource/packagist/__snapshots__/index.spec.ts.snap
+++ b/lib/datasource/packagist/__snapshots__/index.spec.ts.snap
@@ -700,3 +700,33 @@ Array [
   },
 ]
 `;
+
+exports[`datasource/packagist/index getReleases supports providers without a hash 1`] = `
+Object {
+  "homepage": "https://wordpress.org/plugins/1beyt/",
+  "registryUrl": "https://composer.renovatebot.com",
+  "releases": Array [
+    Object {
+      "gitRef": "1.0",
+      "version": "1.0",
+    },
+    Object {
+      "gitRef": "1.1",
+      "version": "1.1",
+    },
+    Object {
+      "gitRef": "1.4",
+      "version": "1.4",
+    },
+    Object {
+      "gitRef": "1.5",
+      "version": "1.5",
+    },
+    Object {
+      "gitRef": "1.5.1",
+      "version": "1.5.1",
+    },
+  ],
+  "sourceUrl": "https://plugins.svn.wordpress.org/1beyt/",
+}
+`;
diff --git a/lib/datasource/packagist/index.spec.ts b/lib/datasource/packagist/index.spec.ts
index a4e083e2d71349af134ebb34ceb34a2c907c3427..edf010c4c9f06b3a0bfceb054331af6433fec57b 100644
--- a/lib/datasource/packagist/index.spec.ts
+++ b/lib/datasource/packagist/index.spec.ts
@@ -305,6 +305,34 @@ describe('datasource/packagist/index', () => {
       expect(res).not.toBeNull();
       expect(httpMock.getTrace()).toMatchSnapshot();
     });
+    it('supports providers without a hash', async () => {
+      const packagesJson = {
+        packages: [],
+        'providers-url': '/p/%package%.json',
+        providers: {
+          'wpackagist-plugin/1337-rss-feed-made-for-sharing': {
+            sha256: null,
+          },
+          'wpackagist-plugin/1beyt': {
+            sha256: null,
+          },
+        },
+      };
+      httpMock
+        .scope('https://composer.renovatebot.com')
+        .get('/packages.json')
+        .reply(200, packagesJson)
+        .get('/p/wpackagist-plugin/1beyt.json')
+        .reply(200, beytJson);
+      const res = await getPkgReleases({
+        ...config,
+        datasource,
+        versioning,
+        depName: 'wpackagist-plugin/1beyt',
+      });
+      expect(res).toMatchSnapshot();
+      expect(res).not.toBeNull();
+    });
     it('handles providers miss', async () => {
       const packagesJson = {
         packages: [],
diff --git a/lib/datasource/packagist/index.ts b/lib/datasource/packagist/index.ts
index c515e1c01cae63c827263c34f03ec2d79b231d05..605662dcc3efa4c35b881d41f07d3a83bb12429f 100644
--- a/lib/datasource/packagist/index.ts
+++ b/lib/datasource/packagist/index.ts
@@ -238,7 +238,7 @@ async function packageLookup(
       return includesPackages[name];
     }
     let pkgUrl;
-    if (providerPackages?.[name]) {
+    if (name in providerPackages) {
       pkgUrl = URL.resolve(
         regUrl,
         providersUrl