guzzle/guzzle to guzzlehttp/guzzle with laravel - laravel-5

I had setup intervention/imagecache and this package need to guzzlehttp/guzzle and i was setup weboap/visitor and this package need to guzzle/guzzle (the old version of guzzlehttp/guzzle)
si have problem with using composer update
it's say:
Package guzzle/guzzle is abandoned, you should avoid using it. Use guzzlehttp/guzzle instead.
can any help?

Related

Why haven't install predis on laravel 8

According laravel manual https://laravel.com/docs/8.x/redis for install predis, need run: composer require predis/predis. When that command is running (for laravel 8) - appear next Error:
Your requirements could not be resolved to an installable set of packages.
Problem 1
- facade/ignition is locked to version 2.4.2 and an update of this package was not requested.
- facade/ignition 2.4.2 requires php ^7.2.5 -> your php version (8.0.0) does not satisfy that requirement.
Problem 2
- facade/ignition-contracts 1.0.1 requires php ^7.1 -> your php version (8.0.0) does not satisfy that requirement.
- nunomaduro/collision v4.3.0 requires facade/ignition-contracts ^1.0 -> satisfiable by facade/ignition-contracts[1.0.1].
- nunomaduro/collision is locked to version v4.3.0 and an update of this package was not requested.
In my composer.json: "php": "^7.2.5|^8.0",
What here is wrong))?
You need to update facade/ignition and nunomaduro/collision first to support PHP 8 in your project.
Running the following commands should update them accordingly.
composer require --dev facade/ignition nunomaduro/collision
composer require predis/predis
i run comand: composer require --dev facade/ignition nunomaduro/collision and have got new Error: Your requirements could not be resolved to an installable set of packages.
Problem 1
- facade/ignition[2.10.0, ..., 2.10.2] require facade/ignition-contracts ^1.0.2 -> found facade/ignition-contracts[1.0.2] but the package is fixed to 1.0.1 (lock file version) by a partial update and that version does not match. Make sure you list it as an argument for the update command.
- Root composer.json requires facade/ignition ^2.10 -> satisfiable by facade/ignition[2.10.0, 2.10.1, 2.10.2].
Use the option --with-all-dependencies (-W) to allow upgrades, downgrades and removals for packages currently locked to specific versions.
Installation failed, reverting ./composer.json and ./composer.lock to their original content.
I have new laravel 8 project (blog) && use new Vagrant Homestead (with all updates) && i use laravel 8 manual)) may be laravel developers is a little busy and is a little tired to give full instruction in manual). I think may be for Laravel8 Homestead allready is not suitable and need Docker and Sail... But project work (with the exception of predis) Now i use phpredis. May be will try use docker... As for Vagrant&&Homestead - https://laravel.com/docs/8.x/homestead#introduction i don't understand what is problem to use that technology .... god with they)...

league/flysystem-aws-s3-v3 on Laravel 8 other packages require lower version

When running composer require league/flysystem-aws-s3-v3 I get:
league/flysystem-aws-s3-v3[2.0.0, ..., 2.x-dev] require league/flysystem ^2.0.0 -> found league/flysystem[2.0.0-alpha.1, ..., 2.x-dev] but the package is fixed to 1.1.3 (lock file version) by a partial update and that version does not match. Make sure you list it as an argument for the update command.
In my composer.json there is no mention of league/flysystem, but it does appear in my composer.lock as "league/flysystem": "^1.1",. It looks like I have a few packages (like spatie/laravel-backup) that have this as an dependancy.
How do I proceed? I'm not sure how to update a package that other packages have as an dependancy, and that these other packages have also fixed to a specific version.
As you've found already: spatie/laravel-backup is not yet compatible with league/flysystem v2 (which is pretty new, it got released... yesterday!).
Simply require the "old" version of that AWS package through composer require league/flysystem-aws-s3-v3:"^1.0".
After all, this is not a problem of Laravel itself.
I am using the latest version of laravel V8.4.0 (JULY 2021)
I solve this by:
Deleting composer.lock in the root folder of the project
running composer require league/flysystem-aws-s3-v3:"~1.0"
For Laravel 8 use
composer require --with-all-dependencies league/flysystem-aws-s3-v3 "^1.0"
It is a problem with Laravel. Laravel v8 does not support league/flysystem v2 yet. v9 will be shipped with a support for it: https://github.com/laravel/framework/pull/33612
For those on Laravel 9, you'll need to upgrade to v3.0 instead.
composer require -W league/flysystem-aws-s3-v3 "^3.0"
After deleting compose.lock

Cannot remove package phpoffice/phpword. (laravel 5.2)

I've been working on a Laravel project. While I'm trying to install some package. I got warned
Package phpoffice/phpexcel is abandoned, you should avoid using it.
Use phpoffice/phpspreadsheet instead.
Therefore, I executed the command
composer remove phpoffice/phpexcel
The phpoffice/phpexcel has been remove from composer.json successfully.
Then install the package,
composer require phpoffice/phpspreadsheet
I still got warned by the same warning,
Package phpoffice/phpexcel is abandoned, you should avoid using it.
Use phpoffice/phpspreadsheet instead.
I always got warned by this sentence from every composer command even the phpoffice/phpexcel has been removed from composer.json.
Pls help I really have no idea to remove this warning.
Maybe the package phpoffice/phpexcel is used by another package in your composer.json. To see if that's the case you can use the following command to find out which other packages may need phpoffice/phpexcel:
composer why phpoffice/phpexcel
Does that give you a list of packages or an error?
To avoid this error you can run the following commands --
composer remove phpoffice/phpexcel
Then -
composer require phpoffice/phpspreadsheet
Then -
composer dump-autoload
composer update

how can we install composer require spatie/laravel-searchable in 5.7 version of laravel

I am setting up search in my project.which includes more than one model to search.Firstly, I tried using scout and scout extended but it does not give much flexibility with where clause.so I thought to have a look to composer require spatie/laravel-searchable but it seems its dependency is laravel 5.8.
but my laravel version is 5.7.28.Please provide me the solution.
How should I proceed with the same?
I tried using scout and scout extended but it does not give much flexibility with where clause
$channels = Channel::where('created_at', '>', now()->subDays(7))->get();
return view('search.index')->with(compact('channels'));
this works perfectly as this is simple query but if I try the same with
the scout and algolia(search request)
$channels = Channel::search($request->q)->where('created_at', '>', now()-
>subDays(7))->get();
it does not give any result.
when I tried installing composer require spatie/laravel-searchable
I got this error
Problem 1
Can only install one of: laravel/framework[v5.7.28, 5.8.x-dev].
Can only install one of: laravel/framework[5.8.x-dev, v5.7.28].
Can only install one of: laravel/framework[5.8.x-dev, v5.7.28].
spatie/laravel-searchable 1.3.0 requires laravel/framework ~5.8.0 ->
satisfiable by laravel/framework[5.8.x-dev].
Installation request for spatie/laravel-searchable ^1.3 -> satisfiable
by spatie/laravel-searchable[1.3.0].
Installation request for laravel/framework (locked at v5.7.28, required
as 5.7.*) -> satisfiable by laravel/framework[v5.7.28].
Laravel 5.7 support droped with v1.3.0 so you need to install the older version.
Changelog: https://github.com/spatie/laravel-searchable/blob/master/CHANGELOG.md
You can install the older version using command:
composer require spatie/laravel-searchable:1.2.3
Or add this version into your composer.json file and run composer update

Cannot remove composer root package dependency package

I need to remove the package http-interop/http-middleware and replace it with http-interop/http-server-middleware.
It's not a defined package in my composer.json but from what I can see stems from zendframework/zendframework.
In any case, when I try to run composer remove http-interop/http-middleware it does not remove the package. Then, I get this when trying to run composer require http-interop/http-server-middleware
Problem 1
- Conclusion: don't install http-interop/http-server-middleware 1.1.1
- don't install http-interop/http-server-middleware 1.1.0|remove http-interop/http-middleware 0.2.0
- don't install http-interop/http-server-middleware 1.1.0|don't install http-interop/http-middleware 0.2.0
- don't install http-interop/http-server-middleware 1.1.0|don't install http-interop/http-middleware 0.2.0
- Installation request for http-interop/http-server-middleware ^1.1 -> satisfiable by http-interop/http-server-middleware[1.1.0, 1.1.1].
- Installation request for http-interop/http-middleware (locked at 0.2.0) -> satisfiable by http-interop/http-middleware[0.2.0].
I really do not know what to do at this point.
If that is a package required by another package, you cannot remove it without removing that other package. In your case: you have to get rid of zendframework/zendframework first, but that is surely not what you want.
According to https://packagist.org/packages/http-interop/http-middleware/dependents?page=13, the dependency comes from multiple packages in the zendframework. They directly require ^0.4.1 of that package and http-interop/http-server-middleware contains a replace section. So, probably you get it working by adding http-interop/http-server-middleware first and remove http-interop/http-middleware afterwards?

Resources