Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Composer require error #202

Open
monaw opened this issue Feb 28, 2023 · 3 comments
Open

Composer require error #202

monaw opened this issue Feb 28, 2023 · 3 comments
Labels
bug Something isn't working

Comments

@monaw
Copy link

monaw commented Feb 28, 2023

Description of the bug
I am running into a very similar error that was reported in this closed issue:

$ composer require acquia-pso/dst-entity-generate

In PackageDiscoveryTrait.php line 327:
                                                                               
  Could not find a version of package acquia-pso/dst-entity-generate matching  
   your minimum-stability (stable). Require it with an explicit version const  
  raint allowing its desired stability.
[...]

and i did do the solution recommended for the previous issue, specifically add the repo by modifying the repositories section of composer.json:

$ composer config repositories.acquia-pso vcs https://github.com/acquia-pso/dst-entity-generate

which generated the following entry in my composer.json:

    "repositories": {
        "acquia-pso": {
            "type": "vcs",
            "url": "https://github.com/acquia-pso/dst-entity-generate"
        },
        "0": {
            "type": "composer",
            "url": "https://packages.drupal.org/8"
        }
    },

But the composer require command is still failing with the same error.

what did i miss? i admit i'm just a casual user of composer so maybe there is something about composer that i don't understand? anyone's help is greatly appreciated!

How to reproduce the bug?
I followed the steps outline in the documentation...

@monaw monaw added the bug Something isn't working label Feb 28, 2023
@monaw
Copy link
Author

monaw commented Feb 28, 2023

is the composer.json correct? what's the proper branch or release tag of the code? because now i'm having a new error which suggests the main branch isn't correct:

$ composer require acquia-pso/dst-entity-generate dev-main
./composer.json has been updated
Running composer update acquia-pso/dst-entity-generate
Loading composer repositories with package information
Updating dependencies                 
Your requirements could not be resolved to an installable set of packages.
 Problem 1
  - Root composer.json requires acquia-pso/dst-entity-generate dev-main, found acquia-pso/dst-entity-generate[dev-generate-layout-canvas-field-of-site-studio, ..., dev-paragraph-fields] but it does not match the constraint.
Installation failed, reverting ./composer.json and ./composer.lock to their original content.
composer [require acquia-pso/dst-entity-generate dev-main] failed, composer command failed: exit status 2. stderr=

all help is appreciated!

@monaw
Copy link
Author

monaw commented Feb 28, 2023

ok, rereading the documentation, i updated my composer.json:

    "repositories": {
        "acquia-pso": {
            "url": "https://github.com/acquia-pso/dst-entity-generate.git",
            "type": "git"
        },
        "0": {
            "type": "composer",
            "url": "https://packages.drupal.org/8"
        }
    },

but still getting the same error:

$ composer require acquia-pso/dst-entity-generate

In PackageDiscoveryTrait.php line 327:
                                                                               
  Could not find a version of package acquia-pso/dst-entity-generate matching  
   your minimum-stability (stable). Require it with an explicit version const  
  raint allowing its desired stability.

@monaw
Copy link
Author

monaw commented Mar 1, 2023

ok, finally this command worked for me to solve the above version problem:
composer require acquia-pso/dst-entity-generate dev-master
next problem is that drush 11 isn't supported by the composer so i had to downgrade to drush 10...can drush 11 be supported?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant