1

So I'm trying to use composer to install this php-ffmpeg extension here:

https://github.com/sharapov-outsource/php-ffmpeg-extensions

But it requires php-ffmpeg 0.6.1 and the newest version of php-ffmpeg is 0.9.3 So how can I use composer to install this and allow version 0.9.3 of the php-ffmpeg? Do I need to fork it? If so, how do I set up my composer.json file to pull and set the right classes?

swg1cor14
  • 1,682
  • 6
  • 25
  • 46

1 Answers1

2

For composer installation,

1) add:

"require": {
     "sharapov/php-ffmpeg-extensions": "0.9.3"
},

to your composer.json file and update your dependencies.

$ composer update

2) Or you can run from shell:

$ composer require sharapov/php-ffmpeg-extensions:0.9.3

Version to use can be defined in the following ways:

  • 1.2 You can specific the version of package (ex., 0.9.3 or 0.6.1)
  • The ^ (caret) operator means any non-breaking version / until major (e.g., ^1.2.3 is equivalent to >=1.2.3<2.0.0)
  • The ~ (tilde) operator means approximate / increment right most digit (e.g., ~1.2 is equivalent to >=1.2<2.0.0 or ~1.2.3 is equivalent to >=1.2.3 <1.3.0)
  • The * (star) operator means all versions on this level (e.g., 1.0.* is the equivalent of >=1.0<1.1)
  • The 1.0-2.0 is the the equivalent of >=1.0.0<2.1

For more look a doc of composer https://getcomposer.org/doc/

Grene
  • 434
  • 6
  • 18
  • But I don't need version 0.9.3 of the ffmpeg extensions. The package requires regular php-ffmpeg 0.6.1 but the newest version of php-ffmpeg is 0.9.3. I can't edit the composer.json file in the ffmpeg-extensions to allow for php-ffmpeg 0.9.3 – swg1cor14 May 29 '17 at 19:36
  • then add php-ffmpeg to your composer: composer require php-ffmpeg/php-ffmpeg:0.9.3 – Grene May 30 '17 at 08:55