Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to force a package to be installed?

I'm trying to install the following package through composer:

https://packagist.org/packages/cartalyst/sentry#dev-feature/laravel-5

When I do:

composer require cartalyst/sentry dev-feature/laravel-5

I always receive this error:

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

If I change minimum-stability to dev it will still complain.

However, if I install dev-master and manually merge the files from dev-feature/laravel-5 into dev-master, it works fine.

Hence why I'm asking how to force this package to be installed via composer.

like image 485
user2094178 Avatar asked Feb 10 '15 21:02

user2094178


People also ask

What is the command to install a package?

The Install-Package cmdlet installs one or more software packages on the local computer. If you have multiple software sources, use Get-PackageProvider and Get-PackageSource to display details about your providers.


2 Answers

To force the installation of this package, I added the following to the require element of composer.json:

"cartalyst/sentry":"dev-feature/laravel-5 as 2.1.4"

Below is the link from where I found this suggestion:

http://vvv.tobiassjosten.net/php/have-composer-use-development-branches/

It will not work from the command line, must be through composer.json. That I don't know why.

Update:

I believe I was wrong in my last statement above, actually something like the following will work from the command line:

composer require "codeception/codeception":"2.1.0-rc1 as 2.0.9"
like image 66
user2094178 Avatar answered Oct 18 '22 07:10

user2094178


Try to use this

composer require "cartalyst/sentry": "2.0.*@dev"

I believe sentry is not fully compatible with Laravel 5 yet

like image 3
Dimitri Acosta Avatar answered Oct 18 '22 05:10

Dimitri Acosta