PHPackages                             drupify/version-resolver - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. drupify/version-resolver

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

drupify/version-resolver
========================

A PHP library for resolving version, supported releases etc. for Drupal Core, modules, themes, and other related projects.

1.1.0(1y ago)011MITPHPPHP ^8.1

Since Oct 22Pushed 1y ago1 watchersCompare

[ Source](https://github.com/vishalkhode1/version-resolver)[ Packagist](https://packagist.org/packages/drupify/version-resolver)[ Docs](https://github.com/vishalkhode1/version-resolver)[ RSS](/packages/drupify-version-resolver/feed)WikiDiscussions 1.x Synced 1mo ago

READMEChangelogDependencies (8)Versions (4)Used By (0)

[![CI](https://github.com/grasmash/yaml-expander/actions/workflows/php.yml/badge.svg)](https://github.com/vishalkhode1/version-resolver/actions/workflows/ci.yml) [![Coverage Status](https://camo.githubusercontent.com/289acb59d2871cb78c237918a7b13cd9358e54efc0cfd099f5c92c18f58d4e03/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6769746875622f76697368616c6b686f6465312f76657273696f6e2d7265736f6c7665722f62616467652e737667)](https://coveralls.io/github/vishalkhode1/version-resolver)

Drupal Version Resolver Library
-------------------------------

[](#drupal-version-resolver-library)

The **Drupal Version Resolver** Library is a PHP library designed to help you easily resolve Drupal project versions, supported releases, and retrieve all releases hosted on [Drupal.org](https://www.drupal.org/). Whether you need to fetch release information for Drupal core or contributed modules/themes, this library offers a simple API to access such data.

### Features

[](#features)

- Fetch supported releases for a given Drupal module or theme.
- Get all available releases for any Drupal project.
- Resolve different Drupal core versions, including the current version, development versions, and next minor versions.

### Requirements

[](#requirements)

- **PHP 8.1** and above.
- **Composer** for installation.
- Internet access to query data from drupal.org.

### Installation

[](#installation)

To install, you can run below command:

```
composer require drupify/version-resolver
```

### Example Usage

[](#example-usage)

Here’s an example to retrieve the releases of a module hosted on Drupal.org:

```
use Drupify\Resolver\VersionResolver;

// Initialize the resolver with the project name.
$resolver = new VersionResolver('token');

// Get supported releases for the project.
$supported = $resolver->getSupportedReleases();

// Output format example:
[
  "8.x-1.x" => [
    "stable" => [
      "name" => "token 8.x-1.15",
      "version" => "8.x-1.15",
      "tag" => "8.x-1.15",
      "core_compatibility" => "^9.2 || ^10 || ^11"
    ],
    "dev" => [
      "name" => "token 8.x-1.x-dev",
      "version" => "8.x-1.x-dev",
      "tag" => "8.x-1.x",
      "core_compatibility" => "^9.2 || ^10 || ^11"
    ]
  ]
]
```

#### Fetching All Releases

[](#fetching-all-releases)

If you need to retrieve all releases (including older versions), you can do so with the following:

```
$all = $resolver->getAllReleases();
```

**Note:** This method returns all releases, but it does not include projects compatible with Drupal Core 7.x and below.

#### Resolving Drupal Core Versions

[](#resolving-drupal-core-versions)

The library also provides methods to resolve various types of Drupal core versions:

- **Current Stable**: Returns the current stable version (e.g., `10.3`).
- **Current Dev**: Returns the current development version (e.g., `10.3.x-dev`).
- **Next Minor**: Returns the next minor version (e.g., `11.0.0-rc1`).
- **Next Minor Dev**: Returns the next minor development version (e.g., `11.0.x-dev`) and so on.

Example usage:

```
use Drupify\Resolver\CoreVersionResolver;

$resolver = new CoreVersionResolver();

$currentVersion = $resolver->findCurrent();
$currentDevVersion = $resolver->findCurrentDev();
$nextMinorVersion = $resolver->findNextMinor();
$nextMinorDevVersion = $resolver->findNextMinorDev();
```

Example Output

```
echo $currentVersion; // 10.3
echo $currentDevVersion; // 10.3.x-dev
echo $nextMinorVersion; // 11.0.0-rc1
echo $nextMinorDevVersion; // 11.0.x-dev
```

### Contact

[](#contact)

If you have any questions or issues, feel free to open a GitHub issue or contact the maintainers directly.

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance37

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity50

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

4

Last Release

573d ago

PHP version history (2 changes)1.0.0PHP ^7.4

1.1.0PHP ^8.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/102990804d65af5890df86ee8f6b8178bc5abcb2cd9855dacbb3ba3b8bd4bd2d?d=identicon)[vishalkhode1](/maintainers/vishalkhode1)

---

Top Contributors

[![vishalkhode1](https://avatars.githubusercontent.com/u/81069167?v=4)](https://github.com/vishalkhode1 "vishalkhode1 (10 commits)")

---

Tags

drupalPHP Libraryversion resolverdrupal librarydrupal version resolver

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/drupify-version-resolver/health.svg)

```
[![Health](https://phpackages.com/badges/drupify-version-resolver/health.svg)](https://phpackages.com/packages/drupify-version-resolver)
```

###  Alternatives

[lullabot/amp

A set of useful classes and utilities to convert html to AMP html (See https://www.ampproject.org/)

3802.9M10](/packages/lullabot-amp)[lodash-php/lodash-php

A port of Lodash to PHP

527719.0k5](/packages/lodash-php-lodash-php)[drupal/core-composer-scaffold

A flexible Composer project scaffold builder.

5341.9M446](/packages/drupal-core-composer-scaffold)[drupal/core-project-message

Adds a message after Composer installation.

2122.6M172](/packages/drupal-core-project-message)[acquia/drupal-recommended-settings

The composer plugin for adding drupal-recommended-settings for Acquia Cloud.

101.1M4](/packages/acquia-drupal-recommended-settings)[rapidwebltd/php-uk-bank-holidays

This library enables developers to easily retrieve UK Bank Holiday details. Holidays can be retrieved for England &amp; Wales, Scotland, and Northern Ireland. Information about these holidays can optionally be restricted by month or date.

12405.5k](/packages/rapidwebltd-php-uk-bank-holidays)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
