Composer Require: Could not find package

Composer Require: Could not find package

  1. Blog
  2. 15 November 2026
  3. 3 min read

Stefan Bogdanescu

Founder & Senior Architect

Composer Require: Could not find package

When you run composer require digitaldonkey/ethereum-php, it is possible to encounter an InvalidArgumentException that states: "Could not find package digitaldonkey/ethereum-php at any version for your minimum-stability (stable)." This error often confuses developers because the repository clearly exists on GitHub, and the package name appears correct. The issue lies in how Composer interprets stability requirements versus what is actually published to the Packagist registry.

Composer does not pull packages directly from GitHub repositories by default; it sources them from Packagist. While many modern repositories are configured to automatically upload their latest release tags to Packagist, this synchronization is not guaranteed for every project. In cases like digitaldonkey/ethereum-php, the package may exist on GitHub but have been removed or unpublished from Packagist, or simply never pushed there in a way that Composer can detect under the standard "stable" channel.

To resolve this without falling into common traps, you must first verify whether the package is actually available on Packagist. You can do this by visiting the official registry directly: https://packagist.org/packages/digitaldonkey/ethereum-php. If the page returns a 404 or shows no versions, the package has not been published to the stable channel you are currently querying.

If the package is indeed missing from Packagist but exists on GitHub with releases, you have a few options depending on your project's needs and constraints.

Adjusting Minimum-Stability

The error message mentions minimum-stability. By default, Composer sets this to "stable". If the package has been published but only as an "alpha" or "beta" version, Composer will reject it unless you explicitly allow lower stability levels. You can check your composer.json file for a "minimum-stability" key. If it is not present, it defaults to stable.

To proceed with a pre-release package, you can temporarily set the minimum stability to "dev" or "beta". Here is how you might modify your command:

composer require digitaldonkey/ethereum-php --prefer-lowest --ignore-platform-reqs -W dev

However, simply lowering the stability flag is not a silver bullet if the package never made it to Packagist in the first place. If the repository owner has not configured Packagist, these flags will not help. In such scenarios, relying on direct GitHub integration becomes necessary.

Using Direct GitHub Repositories

If the package is strictly hosted on GitHub and lacks a Packagist entry, you can force Composer to use the repository directly. This approach bypasses Packagist entirely for this specific dependency. You do this by specifying the dev-master branch or a specific tag in your require command:

composer require digitaldonkey/ethereum-php:dev-master --no-update

Alternatively, you can define a custom repository in your composer.json:

{
    "repositories": [
        {
            "type": "vcs",
            "url": "https://github.com/digitaldonkey/ethereum-php.git"
        }
    ],
    "require": {
        "digitaldonkey/ethereum-php": "dev-master"
    }
}

This method is generally less stable for long-term maintenance because you are tying your application directly to a GitHub branch that might diverge from tagged releases. It also exposes your project to potential security issues if the maintainer does not rigorously audit pull requests or merge conflicts.

Best Practices and Trade-offs

Before committing to a direct VCS repository, consider whether the package has an official Packagist entry elsewhere or if it is part of a monolithic library that includes this feature. Often, maintainers recommend using a specific version tag rather than dev-master to ensure reproducible builds. Pinning to a version like 1.2.3 ensures that all developers on your team get the exact same codebase regardless of upstream changes.

If you are building a Laravel application and need this integration, it is worth checking if there is an alternative package that is actively maintained and properly published to Packagist. For enterprise-grade applications where stability and auditability are paramount, relying on custom VCS repositories should be a last resort unless the project is internal or part of a tightly controlled ecosystem.

In summary, when Composer cannot find a package, verify its presence on Packagist first. If it is missing but exists on GitHub, use the vcs repository type in your configuration, ensuring you pin specific tags rather than using loose branches to maintain build consistency.

Our network