I cant install ffmpeg binary driver on my laravel project - laravel

I am trying to install ffmpeg binary on my laravel application but I am getting this error. Could not find a matching version of package php-ffmpeg/binary-driver. Check the package spelling, your version constraint and that the package is available in a stability which matches your minimum-stability (dev). I am using laravel 6.4.1
My composer.json
{
"require": {
"pawlox/video-thumbnail": "^1.0",
"lakshmaji/thumbnail": "^1.4",
"pion/laravel-chunk-upload": "^1.3",
"pbmedia/laravel-ffmpeg": "^5.0"
},
"repositories": [{
"type": "vcs",
"url": "https://github.com/PHP-FFMpeg/BinaryDriver.git"
}]
}
composer require php-ffmpeg/binary-driver=dev-master
Any Solutions. Thanks

php-ffmpeg is not a front-end package, so you have to install it by your composer and it is on composer.json not package.json. you can find windows version of php-ffmpeg here:
For Windows users: Please find the binaries at

Related

How to write an odd case version constraint for composer?

The constraint that I am interested in is
"require":{ "php": "..."
Is there a way to target php 7.1 for the project packages in composer.json even though I'm running 7.2 when I call composer update/install on the command line?
You can use platform configuration from Composer: https://getcomposer.org/doc/06-config.md#platform
Basically, your composer.json would look like this:
{
"require": {
...
},
"config": {
"platform": {
"php": "7.1"
}
}
}
This will make sure that you install only packages compatible with PHP 7.1, no matter which PHP version you use to actually install the packages.

Composer package with dependencies giving me error

I don't understand why this error is occurring as each project is published on packagist using only master:
composer.json of second project
{
"type": "symfony-bundle",
"license": "MIT",
"require": {
"php": "^7.1.3",
"vendor/project1": "dev-master"
}
}
Here is the error I am getting:
Problem 1
- Installation request for VENDOR/PROJECT2 dev-master -> satisfiable by VENDOR/PROJECT2[dev-master].
- VENDOR/PROJECT2 dev-master requires VENDOR/PROJECT1 dev-master -> satisfiable by VENDOR/PROJECT1[dev-master] but these conflict with your requirements or minimum-stability.
What am I missing?
This is related to minimum-stability settings. By default this is set to stable, which will not allow installing unstable package unless you explicitly declare that you want it. You may fix this in 2 ways:
Allow to install unstable dependencies. Add this to your composer.json:
"minimum-stability": "dev",
"prefer-stable": true,
prefer-stable ensures that you will get stable package if it exist - without this setting Composer will install everything from dev branches, and you probably don't want this.
Explicitly require package in unstable version:
"require": {
...
"VENDOR/PROJECT1": "dev-master"
},
Both solutions works only if you do this in composer.json of your main app.

How not upgrade to Laravel 5.4 when I run composer update

How can I Prevent my application from upgrading to Laravel 5.4 when I run composer update.
Thanks for any assistance.
Simply edit your project's composer.json and set exact version for laravel/laravel component you want to keep, i.e.:
"require": {
"laravel/framework": "5.3.29",
...
},
Alternatively, if you want still to have automatic updates for your current version you can use * (and this is constrain which Laravel uses too):
"require": {
"laravel/framework": "5.3.*",
...
},
See docs on how Composer versions are handled.
If unsure what version of Laravel you are using now, list it with composer:
composer show laravel/*
If you want to work on dev branch of the 5.3 version you should change dependency in your Laravel's composer.json:
"require": {
...
"laravel/framework": "5.3.*#dev",
...
},
where #dev points the development feature branch of 5.3.*.
Inside your composer.json file:
"require": {
"php": ">=5.6.4",
"laravel/framework": "5.3.*"
- your other packages here -
},
Make sure the "laravel/framework": "5.3.*" line is set to version 5.3.* instead of 5.4.*

Required package in composer.json not found

I have created using the workbench of Laravel a package and uploded it to Packagist under pica/pica-base. The package contains the following require statement:
"require": {
"php": ">=5.4.0",
"illuminate/support": "4.2.*",
"gregwar/captcha": "dev-master"
},
When I try to install my pica/pica-base package it fails stating the following error message:
Your requirements could not be resolved to an installable set of packages.
Problem 1
- pica/pica-base dev-master requires gregwar/captcha dev-master -> no matching package found.
- pica/pica-base dev-master requires gregwar/captcha dev-master -> no matching package found.
- Installation request for pica/pica-base dev-master -> satisfiable by pica/pica-base[dev-master].
On advice of the FAQ I also tried the procedure with 'dev'in staed of 'dev-master'with the gregwar/captcha package but with the same result.
I don't understand this because with the exact same requirement I can install the gregwar-package in any other project. And the link to the package shows up in the page of my package on Packigist (https://packagist.org/packages/pica/pica-base).
So why does this fail?
Thanks for efforts!
By default, Composer uses only stable packages when calculating your dependencies. There are two ways to override this if you want to use an unstable (dev-master) package:
In your root composer.json, require a dev-master version of a package (this is why you have no problem getting the pica/pica-base package, as it is in your root composer.json)
In your root composer.json, set the minimum-stability flag to dev:
"require": {
...
},
"minimum-stability": "dev"
So you can basically do one of the following things:
Add the gregwar/captcha dependency in your root composer.json (the one of your Laravel project)
Add "minimum-stability": "dev" to your root composer.json.
I recommend going for the second option. If you do so, you might want to also add the prefer-stable flag, in order to make sure that not all packages are downloaded in unstable versions:
"require": {
...
"pica/pica-base": "dev-master"
},
"minimum-stability": "dev",
"prefer-stable": true

Composer test branch install

I have made a test branch to test some composer installations:
https://github.com/Sangoku/laravel4-idehelper-generator/tree/compabilityTest
Now I want to install via Composer this changed branch on my Laravel project, but I don't know how I could tell composer to pull my version of the code.
I don't know Composer enough to tell it which branch he should pull.
Edit your composer.json and:
require the package
"require": {
...
"jonphipps/idehelper": "dev-master"
},
And set the repository for it to be downloaded from
"repositories": [
{
"type": "vcs",
"url": "https://github.com/Sangoku/laravel4-idehelper-generator.git"
}
],

Resources