composer: Missing Support for Stability Flags in 'require' Command

$ composer.phar require "vierbergenlars/php-semver": "dev-master@dev"



  [InvalidArgumentException]                                                                                                                      
  Could not find package dev-master@dev at any version for your minimum-stability (stable). Check the package spelling or your minimum-stability 

It would appear stability flags @dev, @stable, etc. is not supported with the require command. When I manually add the line with stability flags to composer.json and then run composer.phar update it updates as expected applying the stability flags.

I believe it would be good to have consistent behavior with the stability flags across both the require command and the update command.

About this issue

  • Original URL
  • State: closed
  • Created 10 years ago
  • Comments: 20 (4 by maintainers)

Commits related to this issue

Most upvoted comments

composer require vendor/package=dev-master

Looks like invalid report.

You should remove the space between package name (after colon) and version. Right: composer require “doctrine/orm”:“2.5.@dev" Wrong: composer require “doctrine/orm”: "2.5.@dev

Same problem: composer require “doctrine/orm”: “2.5.*@dev” gives me : [InvalidArgumentException]
Could not find package 2.5 at any version for your minimum-stability (stable). Check the package spelling or your minimum-stability