Option to ignore requirements when installing #1426

Closed
davidwinter opened this Issue Dec 17, 2012 · 43 comments

Projects

None yet
@davidwinter

A thread has turned up on the doctrine/mongodb repo, where there is a requirement for the mongo extension to be installed for PHP. However, if you're using Vagrant, or a setup where the version of PHP you're using to work with Composer isn't the one that'll be used to run your project, there should be a way to ignore these requirements so you can continue with installing the dependencies.

You can read the background to the discussion here: doctrine/mongodb#88

@Seldaek
Member
Seldaek commented Dec 18, 2012

This is related to #1171 - but in this case you would really need a --ignore-platform-requirements or such flag that skips those requirements while loading packages. Obviously the other solution would be to run composer with the vagrant php.

@osadi
osadi commented Mar 4, 2013

I've got the same question. Running with Vagrant and because of that are missing some requirements on the host machine.
As mentioned in #1171
This works for me: {"provide": { "ext-mcrypt": "*" },
But I wouldn't want it there when pushing code to production. Then the requirement kind of matters.
I tried with adding the above to ~/.composer/config.json and just have it on a per machine basis, but didn't work.
I think that would be my preferred solution.

@babeard
babeard commented Aug 30, 2013

+1

@funivan
funivan commented Sep 4, 2013

+1

@deep9
deep9 commented Dec 11, 2013

+1

@pborreli
Contributor

👍 for a --ignore option

@linusnorton

+1

@andrewkett

+1

@pschultz
Contributor
pschultz commented Feb 2, 2014

+1

@misterion

+1

@chr0n1x
Contributor
chr0n1x commented Feb 25, 2014

👍

@ccapndave

+1 - this would be especially useful when developing with Vagrant using the rsync shared folder strategy with an IDE in the host and the server in the guest. Since the vendors folder isn't synced its necessary to run composer on both server (to get your app to work) and the client (to get your IDE to autocomplete). In this situation it is quite possible to have different versions of PHP on host and guest, but really its only the guest that matters with respect to the requirements.

@njam
Contributor
njam commented May 8, 2014

+1

@torches
torches commented May 12, 2014

+1

@AnderoKoplus

+1 for ignore

@gquemener

I would also be very much glad if such option existence would came up

@agwidarsito

+1 For sure. Useful when you are ABOUT to update PHP and need to install Composer requirements first.

@akshayraje

+1 for cases where the CLI version of PHP is lower than the one served by webserver

@gonimar
Contributor
gonimar commented Jun 5, 2014

👍

@deplorableword

👍 my use case; Installed CLI version is older than version used by MAMP etc

@gquemener

Another use case is when using hhvm to install dependencies (drastically improve performance on big deps tree!) and requiring the doctrine/mongodb lib, you then require to compile the mongodb ext even if your server isn't using hhvm.

@pborreli
Contributor

@gquemener that's exactly why I voted 👍 too as http://composer.borreli.com/ is trying to use hhvm first, then fallbacks to vanilla php if any error encountered.

@shnhrrsn

+1, it'd be great to be able to use composer with hhvm even when it doesn't have certain extensions the composer file requires.

@saverio
saverio commented Jun 19, 2014

+1

@N30
N30 commented Jul 18, 2014

+1

@a-x-
a-x- commented Jul 22, 2014

+1

@neomoto
neomoto commented Jul 22, 2014

+1

@lisachenko

+1

@2upmedia

+1

@sidux
sidux commented Jul 30, 2014

+1

@Koutetsu666

+1

@mdoelker

+1 same reason: Vagrant. Don't want to install all kinds of php exts just for issuing a quick update command. Maybe something like --force?

@tmeisel
tmeisel commented Sep 25, 2014

+1

@stvnwrgs

+1

@brtz
brtz commented Sep 25, 2014

+1

@Seldaek
Member
Seldaek commented Oct 17, 2014

Latest composer now has --ignore-platform-reqs in update and install to ignore php, hhvm and ext-* requirements.

@Seldaek Seldaek closed this Oct 17, 2014
@lisachenko

👍 Cool!

@a-x-
a-x- commented Oct 18, 2014

What about adding this option to composer create-project?

Thank you!

@ingluisjimenez

@Seldaek Thanks, much appreciated.

@nixis
nixis commented Dec 21, 2014

@Seldaek Thank you very much!

@ChadSikorra ChadSikorra added a commit to ChadSikorra/composer that referenced this issue Mar 28, 2015
@Seldaek @ChadSikorra Seldaek + ChadSikorra Add --ignore-platform-reqs to create-project, refs #1426 8e2be3a
@bumstik
bumstik commented Sep 8, 2016

+1

@aminztw aminztw pushed a commit to aminztw/composer that referenced this issue Jan 1, 2017
@Seldaek Seldaek Add --ignore-platform-reqs to create-project, refs #1426 9872873
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment