Could not find package with stability stable - composer-php

Hi I'm trying to create a composer package and can't seem to figure out how to mark it as stable. I've tried tagging it as v1.x, setting these in composer.json:
"minimum-stability": "dev",
"prefer-stable": true
https://github.com/monsterlane/lumen-console-tests
What am I doing wrong?

Gwah my version of composer was to old so the package wasn't visible.

Related

I cant install ffmpeg binary driver on my laravel project

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

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.

Can't install module using composer on Magento 2.1

I am trying to install M2ePro module on my Magento ver. 2.1.8 application using composer and getting this error:
[http]$ php-7.0 /usr/local/bin/composer require m2e/ebay-amazon-magento2
Could not find a matching version of package m2e/ebay-amazon-magento2.
Check the package spelling, your version constraint and that the
package is available in a stability which matches your
minimum-stability (alpha).
The spelling of the package is correct, I have tried defining the version of the module (The only one available is 1.3.2):
[http]$ php-7.0 /usr/local/bin/composer require m2e/ebay-amazon-magento2:1.3.2
However get the same error so I believe stability of this module is "Beta" and I have "minimum-stability (alpha)" set so beta modules should be installed with no problems.?
I looked for solution in composer docs but could find anything about installing beta: https://getcomposer.org/doc/03-cli.md#require
Or was I looking in the wrong place?
I managed to successfully install the module on my development site and didn't receive this error so I thought it might be due to the fact that my Magento application was in the "Production" mode but setting the mode to "Developer" did not solve my problem.
UPDATE:
I just found this thread: https://magento.stackexchange.com/questions/114393/error-in-using-composer-to-install-a-module-in-magento-2-0. The answer to this question is that you need to define the package as repository. The package is from marketplace and this is content of my composer.json:
"minimum-stability": "alpha",
"prefer-stable": true,
"repositories": [
{
"type": "composer",
"url": "https://repo.magento.com/"
}
],
I have previously installed modules from marketplace using composer with no problems.
It came out that my auth.json had incorrect credentials and couldn't find the account.
Correcting the account settings fixed my problem.

Why I cannot install my composer new package?

The package - https://packagist.org/packages/drakonli/php-utils
My composer:
{
"require": {
"php": ">=5.3.0",
"drakonli/php-utils": "dev-master"
},
"minimum-stability": "dev"
}
The error I get when i use "composer install"
Your requirements could not be resolved to an installable set of packages.
Problem 1
- The requested package drakonli/php-utils could not be found in any version, there may be a typo in the package name.
Potential causes:
- A typo in the package name
- The package is not available in a stable-enough version according to your minimum-stability setting
see <https://getcomposer.org/doc/04-schema.md#minimum-stability> for more details.
Read <https://getcomposer.org/doc/articles/troubleshooting.md> for further common problems.
I have added a tag to this package, so it should not be the problem with stability of version.
What I also tried - I tried to search for my package on packagist AND using command composer search. And this is what I got:
When I try to search for "drakonli/" - I CAN find my package, but when I try to search for "drakonli/php-utils" or "php-utils" I CAN'T find my package.
Help, pls.
UPDATE
I was wrong - the package is found but it's on the 1608 page after packages that don't even have "php" or anything in it's name. Even when using the package full name.
UPDATE #2
composer search drakonli
result:
drakonli/php-utils PHP lib of different utility interfaces/classes
AND
composer info drakonli/php-utils
result:
[InvalidArgumentException]
Package drakonli/php-utils not found
Losing my mind here :D
After about 12 hours it fixed on it's own...

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

Resources