My composer.json:
"require": {
"insenseanalytics/laravel-user-audit-trails": "^1.0"
}
Output of composer diagnose:
Checking composer.json: WARNING
require.insenseanalytics/nova-impersonate-tool : unbound version constraints (*) should be avoided
Checking platform settings: OK
Checking git settings: OK
Checking http connectivity to packagist: OK
Checking https connectivity to packagist: OK
Checking github.com rate limit: OK
Checking disk free space: OK
Checking pubkeys:
Tags Public Key Fingerprint: 57815BA2 7E54DC31 7ECC7CC5 573090D0 87719BA6 8F3BB723 4E5D42D0 84A14642
Dev Public Key Fingerprint: 4AC45767 E5EC2265 2F0C1167 CBBB8A2B 0C708369 153E328C AD90147D AFE50952
OK
Checking composer version: OK
Composer version: 1.7.2
PHP version: 7.1.18
PHP binary path: /usr/local/Cellar/php#7.1/7.1.18/bin/php
When I run this command:
composer update
Composer pulls in v1.0 and not v1.0.1. Packagist correctly shows v1.0.1 as the latest release but somehow it doesn't recognize it.
When I run this command:
composer show insenseanalytics/laravel-user-audit-trails
It outputs
name : insenseanalytics/laravel-user-audit-trails
descrip. : User audit trails for Laravel Eloquent.
keywords : Audit, audit trails, laravel, user trails
versions : * v1.0
type : library
license : MIT License (MIT) (OSI approved) https://spdx.org/licenses/MIT.html#licenseText
source : [git] https://github.com/insenseanalytics/laravel-user-audit-trails.git 09256e522240f29b7b214a9f15dc5f62bb8f02a7
dist : [zip] https://api.github.com/repos/insenseanalytics/laravel-user-audit-trails/zipball/09256e522240f29b7b214a9f15dc5f62bb8f02a7 09256e522240f29b7b214a9f15dc5f62bb8f02a7
names : insenseanalytics/laravel-user-audit-trails
autoload
psr-4
Insense\LaravelUserAuditTrails\ => src/
requires
illuminate/database ~5.5.0|~5.6.0
illuminate/support ~5.5.0|~5.6.0
requires (dev)
doctrine/dbal ~2.6
orchestra/testbench ~3.5.0|~3.6.0
phpunit/phpunit ^6.0|^7.0
But the above output doesn't show the latest tag v1.0.1. I am also the author of the package I'm trying to pull in but I don't seem to understand what's wrong here? The package composer.json does not have a version entry
It seems that latest release breaks backwards compatibility. Official docs
Caret Version Range (^)#
The ^ operator behaves very similarly but it sticks closer to semantic versioning, and will always allow non-breaking updates. For example ^1.2.3 is equivalent to >=1.2.3 <2.0.0 as none of the releases until 2.0 should break backwards compatibility. For pre-1.0 versions it also acts with safety in mind and treats ^0.3 as >=0.3.0 <0.4.0.
This is the recommended operator for maximum interoperability when writing library code.
Example: ^1.2.3
Related
I've installed Magento with sample data on a virtual machine. Now I'm trying to install Live Search for it. I used the instructions from this link. As the instruction says, I run the command below:
composer require magento/live-search
But it gives me an error:
Problem 1
- magento/live-search 2.0.0 requires magento/module-live-search-metrics 2.0.0 -> could not be found in any version, there may be a typo in the package name.
- magento/live-search 2.0.1 requires magento/module-live-search-metrics 2.0.1 -> could not be found in any version, there may be a typo in the package name.
- magento/live-search 2.0.2 requires magento/module-live-search-metrics 2.0.2 -> could not be found in any version, there may be a typo in the package name.
- magento/live-search 2.0.3 requires magento/module-live-search-metrics 2.0.3 -> could not be found in any version, there may be a typo in the package name.
- Root composer.json requires magento/live-search ^2.0 -> satisfiable by magento/live-search[2.0.0, 2.0.1, 2.0.2, 2.0.3].
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.
You can also try re-running composer require with an explicit version constraint, e.g. "composer require magento/live-search:*" to figure out if any version is installable, or "composer require magento/live-search:^2.1" if you know which you need.
As I can see, it says magento/module-live-search-metrics does not exist, but I couldn't find anyone else who has the same problem as mine, which means this is only my problem.
You just have to type:
composer require magento/module-live-search
and that's it =)
I'm trying to install a module on a Drupal 8.9.6 using composer 2.0 but I get the next error:
Your requirements could not be resolved to an installable set of packages.
Problem 1
- cweagans/composer-patches 1.6.7 requires composer-plugin-api ^1.0 -> found composer-plugin-api[2.0.0] but it does not match the constraint.
- drupal/varbase_heroslider_media 7.13.0 requires cweagans/composer-patches ~1.0 -> satisfiable by cweagans/composer-patches[1.6.7].
- drupal/varbase_heroslider_media is locked to version 7.13.0 and an update of this package was not requested.
You are using Composer 2, which some of your plugins seem to be incompatible with. Make sure you update your plugins or report a plugin-issue to ask them to support Composer 2.
Then, I've tried to update cweagans/composer-patches to 1.7 because this issue was solved here. But I get the next error:
Your requirements could not be resolved to an installable set of packages.
Problem 1
- drupal/drupal-library-installer-plugin 0.3 requires composer-plugin-api ^1.0 -> found composer-plugin-api[2.0.0] but it does not match the constraint.
- drupal/varbase_heroslider_media 7.13.0 requires drupal/drupal-library-installer-plugin ^0.3 -> satisfiable by drupal/drupal-library-installer-plugin[0.3].
- drupal/varbase_heroslider_media is locked to version 7.13.0 and an update of this package was not requested.
You are using Composer 2, which some of your plugins seem to be incompatible with. Make sure you update your plugins or report a plugin-issue to ask them to support Composer 2.
Ok, then, I've tried to update drupal/drupal-library-installer-plugin I get again the first error. It is a circle and I can't update Drupal.
How could I do it?
drupal/drupal-library-installer-plugin has not seen any updates since more than five years(!). Either search for an alternative, or downgrade Composer to v1
When I tried to install Elasticsearch for my Laravel instance using the following command:
composer require elasticsearch/elasticsearch
I got this error:
Problem 1
- elasticsearch/elasticsearch v7.6.0 requires guzzlehttp/ringphp dev-fork-elasticsearch -> no matching package found.
- tamayo/laravel-scout-elastic 5.0.0 requires elasticsearch/elasticsearch ^5.0 -> satisfiable by
elasticsearch/elasticsearch[5.0.x-dev].
- tamayo/laravel-scout-elastic 5.0.0 requires elasticsearch/elasticsearch ^5.0 -> satisfiable by
elasticsearch/elasticsearch[5.0.x-dev].
- tamayo/laravel-scout-elastic 5.0.0 requires elasticsearch/elasticsearch ^5.0 -> satisfiable by
elasticsearch/elasticsearch[5.0.x-dev].
- Can only install one of: elasticsearch/elasticsearch[v7.6.1, 5.0.x-dev].
- Installation request for elasticsearch/elasticsearch ^7.6 -> satisfiable by elasticsearch/elasticsearch[v7.6.0, v7.6.1].
- Installation request for tamayo/laravel-scout-elastic ^5.0 -> satisfiable by tamayo/laravel-scout-elastic[5.0.0].
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.
Installation failed, reverting ./composer.json to its original
content.
then I tried to install the package mentioned in the error using the following command:
composer require guzzlehttp/ringphp
and I got the following warning:
Package guzzlehttp/ringphp is abandoned, you should avoid using it. No
replacement was suggested. Package guzzlehttp/streams is abandoned,
you should avoid using it. No replacement was suggested
Then I tried to install it again, and I got the same error.
What can I do to address the problem?
Please simply try installing it again - according to Packagist, there is a version 7.6.1 available that does not depend on such packages any more. This is something you can also find on https://github.com/elastic/elasticsearch-php/releases
How to set up and use laravel shibboleth package,
supposing that in my organization there are distinct user roles? My version of Laravel Framework is 5.7.26. I initially tried to install it (with composer require razorbacks/laravel-shibboleth via cmd) with no success.
Below is the result of my attempt to install it. Any idea?
" Problem 1
- Installation request for razorbacks/laravel-shibboleth ^3.0
-> satisfiable by razorbacks/laravel-shibboleth[3.0.0].
- Conclusion: remove laravel/framework v5.7.26
- Conclusion: don't install laravel/framework v5.7.26
- razorbacks/laravel-shibboleth 3.0.0 requires laravel/framework 5.4.* || 5.5.*
-> satisfiable by laravel/framework[5.4.x-dev, 5.5.x-dev].
- Can only install one of: laravel/framework[5.4.x-dev, v5.7.26].
- Can only install one of: laravel/framework[5.5.x-dev, v5.7.26].
- Installation request for laravel/framework (locked at v5.7.26, required as 5.7.*)
-> satisfiable by laravel/framework[v5.7.26].
Installation failed, reverting ./composer.json to its original content."
Depending on your project it might be easiest to downgrade your Laravel framework version to 5.5. You'll see on the razorbacks/laravel-shibboleth packagist page that it requires Laravel 5.4 or 5.5. On the package's github profile you'll see that there's an issue logged for Laravel 5.6 support and that the latest commit was on 25 Jan 2018, so it is not very up to date. I recommend always checking these things before deciding on using a package.
To downgrade to Laravel 5.5, you'll need to change your composer.json file to to require "laravel/framework": "5.5.*". You'll also need to check that all your other dependencies are compatible with 5.5. If they are not, you'll also need to downgrade them to compatible versions.
Lastly, consider using uabookstores/laravel-shibboleth or prasad/laravel-shibboleth which are forks of razorbacks/laravel-shibboleth that have Laravel 5.7 support.
You can downgrade laravel. Or you can fork shibboleth, change the composer.json requirements/limits, then start testing to see if the package works with 5.7
fork this into your github account https://github.com/razorbacks/laravel-shibboleth
clone your new forked copy to local work machine
edit composer.json to adjust limits/requirements
commit and push back to your forked copy
Now, in your project that uses the package you'll need to point to your copy/fork instead of the original public version of the package.
add your fork to the "repositories" section of composer.json (NOT the same composer.json ... this is the laravel project composer.json)
run composer update
Your new repositories section in the composer.json file should look something like this...
"repositories": [
{
"type": "vcs",
"url": "https://github.com/YOUR-ACCOUNT-NAME/laravel-shibboleth"
}]
Just working my way through the Userfrosting 4 tutorial. The basic app is up and running and am now creating the first sprinkle under "Your First UserFrosting Site".
On running composer update I get the following:
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
- userfrosting/config dev-master requires userfrosting/support ^4.0.0 -> no matching package found.
- userfrosting/config dev-master requires userfrosting/support ^4.0.0 -> no matching package found.
- Installation request for userfrosting/config dev-master -> satisfiable by userfrosting/config[dev-master].
Potential causes:
- A typo in the package name
- The package is not available in a stable-enough version according to your minimum-stability setting
I've replaced my code with the copied / pasted code from the tutorial and still get the errors. I've absolutely no idea where to go from here - any pointers would be appreciated.
Make sure you have the latest version (4.0.11-alpha as of now) since the component versioning was changed/fixed in a recent version.
The core composer.json file shoudn't use the dev-master version of userfrosting/config component anymore, but one of the 4.0.x version. See : https://github.com/userfrosting/UserFrosting/blob/master/app/sprinkles/core/composer.json#L31. If you have a custom ^composer.json` file in your sprinkle, you don't need to add the packages define in the core composer file again.
That being said, if you're still having some issues, you can try running composer clear-cache as composer might have cached some outdated info.