Unavailability of package razorpay/omnipay-razorpay - composer-php

My composer.json file is as follows:
{
"name": "razorpay/razorpay",
"description": "Razorpay PHP Client Library",
"keywords": ["razorpay", "api", "php", "client"],
"authors": [
{
"name": "Abhay Rana",
"email": "nemo#razorpay.com",
"homepage": "https://captnemo.in",
"role": "Developer"
},
{
"name": "Shashank Kumar",
"email": "shashank#razorpay.com",
"role": "Developer"
}
],
"support": {
"email": "contact#razorpay.com",
"issues": "https://github.com/Razorpay/razorpay-php/issues",
"source": "https://github.com/Razorpay/razorpay-php"
},
"homepage": "https://docs.razorpay.com",
"license": "MIT",
"require": {
"php": ">=5.3.0",
"rmccue/requests": "^2.0",
"ext-json": "*",
"razorpay/omnipay-razorpay": "~2.0"
},
"require-dev": {
"raveren/kint": "1.*",
"phpunit/phpunit": "^9"
},
"autoload": {
"psr-4": {
"Razorpay\\Api\\": "src/",
"Razorpay\\Tests\\": "tests/"
},
"files" : ["Deprecated.php"]
}
}
the error when I use
$composer update
is as follows:
Your requirements could not be resolved to an installable set of packages.
Problem 1
- Root composer.json requires razorpay/omnipay-razorpay, it could not be found in any version, there may be a typo in the package name.
Problem 2
- phpunit/phpunit[9.0.0, ..., 9.2.6] require php ^7.3 -> your php version (5.6.40) does not satisfy that requirement.
- phpunit/phpunit[9.3.0, ..., 9.3.8] require php ^7.3 || ^8.0 -> your php version (5.6.40) does not satisfy that requirement.
- phpunit/phpunit[9.3.9, ..., 9.5.20] require php >=7.3 -> your php version (5.6.40) does not satisfy that requirement.
- Root composer.json requires phpunit/phpunit ^9 -> satisfiable by phpunit/phpunit[9.0.0, ..., 9.5.20].
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.
- It's a private package and you forgot to add a custom repository to find it
For clarification purpose where do I update
{
"require": {
"`razorpay/omnipay-razorpay`": "~2.0"
}
}
as per the instruction given in https://github.com/razorpay/omnipay-razorpay
Do we have to update it in composer.json file available in razorpay-php file (https://github.com/razorpay/razorpay-php/releases/) or create a new composer.json file and add information based on composer JSON schema.

You can inspect all packages that you can install without any custom settings on https://packagist.org. When searching for razorpay/omnipay-razorpay on that site, it does not list this package. You should contact the maintainers of that package about this, as they need to publish the package on Packagist. If it should not be available there, but in any other package repository, they need to update their documentation about this.
Anyways, their package has not seen any substantial update since years. I would assume that development on their side has ended, and you should check for any third-party connector

Related

satis composer package not found

I'm trying to create custom composer packages in order use/update some custom wordpress plugins across all my projects.
I decided on using satis, following this article: https://getcomposer.org/doc/articles/handling-private-packages-with-satis.md
I've installed satis, and successfully generated the webview and deployed it. It shows the two composer packages (git repositories) that were linked with satis.
Problem
When I create a new project and include my custom composer package in my package.json, running composer update returns an error.
Error
composer update
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.
Problem 1
- The requested package namespace/test 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.
- It's a private package and you forgot to add a custom repository to find it
Read <https://getcomposer.org/doc/articles/troubleshooting.md> for further common problems.
My package composer.json file:
{
"name": "name",
"type": "project",
"license": "MIT",
"description": "desc",
"authors": [],
"keywords": ["bedrock", "wp"],
"config": {
"preferred-install": "dist"
},
"repositories": [
{
"type": "composer",
"url": "https://wpackagist.org"
},
{
"type": "composer",
"url": "https://packages.namespace.tld"
}
],
"require": {
"php": ">=5.6",
"composer/installers": "^1.4",
"vlucas/phpdotenv": "^2.0.1",
"johnpbloch/wordpress": "^5.0.2",
"oscarotero/env": "^1.1.0",
"roots/wp-password-bcrypt": "1.0.0",
"roots/wp-config": "1.0.0",
"wpackagist-plugin/contact-form-7": "*",
"namespace/test": "*"
},
"require-dev": {
"squizlabs/php_codesniffer": "^3.0.2",
"roave/security-advisories": "dev-master"
},
"extra": {
"installer-paths": {
"www/app/mu-plugins/{$name}/": ["type:wordpress-muplugin"],
"www/app/plugins/{$name}/": ["type:wordpress-plugin"],
"www/app/themes/{$name}/": ["type:wordpress-theme"]
},
"wordpress-install-dir": "www/wp"
},
"scripts": {
"post-root-package-install": [
"php -r \"copy('.env.example', '.env');\""
],
"test": [
"phpcs"
]
}
}

Install unstable fork

I maintain a project that uses an abandoned library with a bug that affects me. I'd like to install a fork that includes the bugfix. I can't find the way.
Relevant settings were this:
{
"type": "project",
"license": "proprietary",
"minimum-stability": "stable",
"require": {
"php": "5.3 - 5.6",
"nuovo/spreadsheet-reader": "^0.5.11"
},
"config": {
"preferred-install": {
"*": "dist"
},
"vendor-dir": "Vendor/"
}
}
I've tried too many things to share but my latest iteration is:
{
"type": "project",
"license": "proprietary",
"minimum-stability": "dev",
"repositories": [
{
"type": "vcs",
"url": "https://github.com/virtua-network/spreadsheet-reader"
}
],
"require": {
"php": "5.3 - 5.6",
"nuovo/spreadsheet-reader": "dev-master"
},
"config": {
"preferred-install": {
"*": "dist"
},
"vendor-dir": "Vendor/"
}
}
The package shows up in composer outdated:
PS D:\src> composer outdated
nuovo/spreadsheet-reader 0.5.11 dev-master f6bd49d Spreadsheet reader library for Excel, OpenOffice and structured text files
… but won't update:
PS D:\src> composer update nuovo/spreadsheet-reader
Loading composer repositories with package information
Updating dependencies (including require-dev)
Nothing to install or update
Writing lock file
Generating autoload files
Also, f6bd49d hash is not latest fork revision but latest original package.
How can I install the fork with Composer?
You're using incorrect package name - in your fork package is named as virtua-network/spreadsheet-reader, but you're requesting nuovo/spreadsheet-reader. So your fork is not considered as a nuovo/spreadsheet-reader package, but as a virtua-network/spreadsheet-reader, so original package from Packagist is used. You should either revert name change in composer.json of your fork and leave it as nuovo/spreadsheet-reader, or use new name in require of composer.json in your app:
"virtua-network/spreadsheet-reader": "dev-master"

Composer conflicting requirements

I am trying to build a PHP framework for the company I work in, and the most crazy thing is ever happing!
I have one package that depends on other both in development yet.
Just to get started (they are in different folders, of course!):
I ran composer init to create a package xxxxxx/core-min, and the result was:
{
"name": "xxxxxx/core-min",
"description": "Dummy Minimal Core",
"type": "library",
"license": "New BSD License",
"authors": [
{
"name": "My Name",
"email": "me#xxxxxx.com"
}
],
"minimum-stability": "dev",
"require": {}
}
Created the Packagist Service on Github, Submitted, and everything is okay so far.
I ran composer require xxxxxx/core-min and got it perfectly installed.
Then, I ran composer init to create a package xxxxxx/core, and the result was:
{
"name": "xxxxxx/core",
"description": "Dummy Full Core",
"type": "library",
"require": {
"xxxxxx/core-min": "dev-master"
},
"license": "New BSD License",
"authors": [
{
"name": "My Name",
"email": "me#xxxxxx.com"
}
],
"minimum-stability": "dev"
}
I ran composer require xxxxxx/core-min and got this message:
Your requirements could not be resolved to an installable set of packages.
Problem 1
- Installation request for zyneframework/core dev-master -> satisfiable by zyneframework/core[dev-master].
- zyneframework/core dev-master requires zyneframework/core-min dev-master -> satisfiable by zyneframework/core-min[dev-master] but these conflict with your requirements or minimum-stability.
This is tricking me out and I can't find any real solution!
Tried several GitHub issues and nothing!

packagist laravel package -composer Could not find package

I have created package using Laravel.
The composer.json file for my package will look like this
{
"name": "lakshmajim/testview",
"description": "hi",
"keywords": [
"package"
],
"homepage": "https://github.com/lakshmajim/testview",
"license": "MIT",
"authors": [
{
"name": "lakshmajim",
"email": "lakshmaji9#gmail.com"
}
],
"require": {
"php": ">=5.3.0"
},
"autoload": {
"psr-4": {
"lakshmajim\\testview\\": "src/"
}
},
"minimum-stability": "dev"
}
then I have pulled to github
then I have linked it to Packagist
when I am running this composer require lakshmajim/testview
it is showing following error message
[InvalidArgumentException]
Could not find package lakshmajim/testview at any version for your minimum-stability (stable). Check the package spelling or your minimum-s
tability
QUESTION:
Why I am getting that error message ,when I'm trying to install using composer?
How can I successfully run composer require lakshmajim/testview
it's a release issue
you must run
composer require lakshmajim/testview dev-master
you don't have a release yet.

Minimum stability issue

I want to install neitanod/forceutf8 via composer and I get error:
Could not find package require at any version for your minimum-stability (dev). Check the package spelling or your minimum-stability.
That's the second time it does that - previously with html2text.
How to fix it?
Edit:
My composer.json:
{
"name": "vendor_name/package_name",
"description": "description_text",
"minimum-stability": "dev",
"license": "proprietary",
"authors": [
{
"name": "author's name",
"email": "email#example.com"
}
],
"require": {
...
}
}
In your command, you duplicate require keyword.
composer.phar require neitanod/forceutf8:v1.4 require => It means you want to install 2 packages. neitanod/forceutf8:v1.4 and require.
Try running composer.phar require neitanod/forceutf8 only.

Resources