Cannot install "Remove Unused Files" for Drupal - composer-php

Instructions for https://www.drupal.org/project/remove_unused_files from #zealialize is to install via composer;
composer require 'drupal/remove_unused_files:^1.0#beta'
Getting this;
-bash-4.2$ composer require -W 'drupal/remove_unused_files:^1.0#beta' ./composer.json has been updated Running composer update
drupal/remove_unused_files --with-all-dependencies Loading composer
repositories with package information Updating dependencies Your
requirements could not be resolved to an installable set of packages.
Problem 1
- drupal/remove_unused_files[1.0.0-beta1, ..., 1.0.0-beta2] require drush/drush ^9.0 -> found drush/drush[9.0.0, ..., 9.7.3] but
it conflicts with your root composer.json require (^10.6).
- Root composer.json requires drupal/remove_unused_files ^1.0#beta -> satisfiable by drupal/remove_unused_files[1.0.0-beta1, 1.0.0-beta2].
Installation failed, reverting ./composer.json and ./composer.lock to
their original content.
Does this mean I have to revert drush to version 9.0 in order to install "unused_files" extension?

Related

Why Can't use marjose/laravel-bootstrap-notify in laravel 9

Hello guys i try to use Laravel notification package But When I Run This command in terminal
composer require marjose/laravel-bootstrap-notify
Here I Have This Error
C:\xampp\htdocs\EShop>composer require marjose/laravel-bootstrap-notify
Using version ^1.0 for marjose/laravel-bootstrap-notify
./composer.json has been updated
Running composer update marjose/laravel-bootstrap-notify
Loading composer repositories with package information
Updating dependencies
Your requirements could not be resolved to an installable set of packages.
Problem 1
- Root composer.json requires marjose/laravel-bootstrap-notify ^1.0 -> satisfiable by marjose/laravel-bootstrap-notify[v1.0.0].
- marjose/laravel-bootstrap-notify v1.0.0 requires illuminate/contracts ~6.0|~7.0|~8.0 -> found illuminate/contracts[v6.0.0, ..., 6.x-dev, v7.0.0, ..., 7.x-dev, v8.0.0, ..., 8.x-de
v] but these were not loaded, likely because it conflicts with another require.
You can also try re-running composer require with an explicit version constraint, e.g. "composer require marjose/laravel-bootstrap-notify:*" to figure out if any version is installable
, or "composer require marjose/laravel-bootstrap-notify:^2.1" if you know which you need.
Installation failed, reverting ./composer.json and ./composer.lock to their original content.
I Try to use These Commands But Doesn't Work
composer require marjose/laravel-bootstrap-notify:*
composer require marjose/laravel-bootstrap-notify:^2.1"

Your requirements could not be resolved to an installable set of packages - laravel / valet

I am running this command on the terminal:
composer global require laravel/valet
but I got this error message:
Your requirements could not be resolved to an installable set of packages.
Problem 1
- friendsofphp/php-cs-fixer is locked to version v2.16.4 and an update of this package was not requested.
- friendsofphp/php-cs-fixer v2.16.4 requires php ^5.6 || ^7.0 -> your php version (8.1.5) does not satisfy that requirement.
You can also try re-running composer require with an explicit version constraint, e.g. "composer require laravel/valet:*" to figure out if any version is installable, or "composer require laravel/valet:^2.1" if you know which you need.
Installation failed, reverting ./composer.json and ./composer.lock to their original content.
I search on google but couldn't find any solution.
PHP version I am running is 8.08 on MAMP
How can I solve it?
Run composer global require laravel/valet:*.
This will check any installable version is available for your dev environment and install the package.

composer error when installing spatie media

I want to install spatie media library but I get this error while installing:
PS C:\xampp\htdocs\myproject> composer require "spatie/laravel-medialibrary:^9.0.0"
./composer.json has been updated
Running composer update spatie/laravel-medialibrary
Loading composer repositories with package information
Updating dependencies
Your requirements could not be resolved to an installable set of packages.
Problem 1
- Root composer.json requires spatie/laravel-medialibrary 9.0.0 -> satisfiable by spatie/laravel-medialibra
ry[9.0.0].
- spatie/laravel-medialibrary 9.0.0 requires illuminate/bus ^7.0|^8.0 -> found illuminate/bus[v7.0.0, ...,
7.x-dev, v8.0.0, ..., 8.x-dev] but these were not loaded, likely because it conflicts with another require.
Installation failed, reverting ./composer.json and ./composer.lock to their original content.
i didn't have this problem in Laravel 8
how can i fix it?
Try this:
"composer require spatie/laravel-medialibrary:*"

I want to install composer require laravelista/comments but I get an error

I have php verison "PHP 7.4.27", composer version "2.2.4" and laravel version"4.2.9". And my error messages:
Your requirements could not be resolved to an installable set of packages.
Problem 1
- Root composer.json requires laravelista/comments ^4.5 ->
satisfiable by laravelista/comments[4.5.0].
- laravelista/comments 4.5.0 requires illuminate/database ^8.0 ->
found illuminate/database[v8.0.0, ..., v8.79.0] but these were not loaded, likely because it
conflicts with another require.
You can also try re-running composer require with an explicit version constraint,
e.g. "composer require laravelista/comments:*" to figure out if any version is installable, or
"composer require laravelista/comments:^2.1" if you know which you need.
Installation failed, reverting ./composer.json and ./composer.lock to their original content.

What is the error I am making when I'm installing the passport dependencies?

Using version ^10.1 for laravel/passport
./composer.json has been updated
Running composer update laravel/passport
Loading composer repositories with package information
Updating dependencies
Your requirements could not be resolved to an installable set of packages.
Problem 1
- laravel/passport[v10.1.0, ..., 10.x-dev] require illuminate/auth ^8.2 -> found illuminate/auth[v8.2.0, ..., 8.x-dev] but these were not loaded, likely because it conflicts with another require.
- Root composer.json requires laravel/passport ^10.1 -> satisfiable by laravel/passport[v10.1.0, v10.1.1, v10.1.2, 10.x-dev].
Installation failed, reverting ./composer.json and ./composer.lock to their original content.
you must check your project dependencies and laravel dependencies , you can test this remove composer.lock file and run this composer install
You need to upgrade your Laravel or install an older version of Laravel Passport
composer require laravel/passport:X.x.x

Resources