Drupal projects can be searched similarly as Packagist:

From Packagist can be also extrated the project's data (e.g. versions):

Is it possible to get project's data also from the Drupal repository?

More info:


Yes, the Composer documentation on repositories describes this mechanism, specifically, the provider-includes and providers-url properties.

These properties describe the package indexes & the URL pattern used for look up, for example:

  • How can I get the hash for a specific Drupal project? Thanks! – Antonín Slejška Apr 5 '18 at 8:15
  • The problem is as follows: I know the project (package) name, e.g. office_hours. I can find the package: packages.drupal.org/8/search.json?s=office_hours But there is not the hash. – Antonín Slejška Apr 5 '18 at 8:51
  • Or do I have to search all providers (first indexes) till I find the project and its hash? – Antonín Slejška Apr 5 '18 at 9:06
  • It looks like https://packagist.org/packages/$VENDOR/$PACKAGE.json URL pattern is specific to the Packgist host. It doesn't look like that's mandated by Composer (from what I saw). I'm guessing that's just a human-friendly lookup. I'd take a look @ the Composer project (github.com/composer/composer) to find it's vendor/package lookup mechanism so you don't have reinvent the wheel. – Shawn Conn Apr 5 '18 at 19:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.