'Package zendframework/zend-diactoros is abandoned, you should avoid using it. Use laminas/laminas-diactoros instead.' - laravel

I have only upgraded to Laravel ^6.0 from 5.8*.
On running $ composer require laravel/passport
I have got error message "Package zendframework/zend-diactoros is abandoned, you should avoid using it. Use laminas/laminas-diactoros instead."
I have installed laminas-json
Will that suffice?

https://www.zend.com/blog/what-status-zend-framework-transition-laminas
everything zend framework is being transitioned to laminas open source project. There's a lot of projects going to be popping up these messages as zend.

The update to use laminas/laminas-diactoros was made in v8.2.0. Using a more recent version of laravel/passport will solve the questioned issue.

Related

Package abandoned how to remove it?

I tried to remove an abandoned package from my project but got the following warning in my shell:
Package jakub-onderka/php-console-color is abandoned, you should avoid using it. Use php-parallel-lint/php-console-color instead.
Package jakub-onderka/php-console-highlighter is abandoned, you should avoid using it. Use php-parallel-lint/php-console-highlighter instead.
I've already installed the new packages but the warning still continues to show. How can I get rid of this warning?
Thank you in advance!
These packages are used by nunomaduro/collision which is a Laravel dependency.
The package creator Tweeted out the issue was fixed on April 4th 2020*
Therefore, a composer update should bring in the new version of collision without the dependency and remove the warning.
Please note: These packages may also be used by other composer packages you are using so there's no guarantee this will work.
* Tweet: https://twitter.com/enunomaduro/status/1246531267023290370
One can normally find out what is depending on an outdated package with this command:
composer depends --tree jakub-onderka/php-console-color
In this case it might show something like this:
jakub-onderka/php-console-color v0.2
└──jakub-onderka/php-console-highlighter v0.4 (requires jakub-onderka/php-console-color ~0.2)
└──psy/psysh v0.9.9 (requires jakub-onderka/php-console-highlighter 0.3.*|0.4.*)
└──laravel/tinker v1.0.8 (requires psy/psysh 0.7.*|0.8.*|0.9.*)
└──your/project (requires laravel/tinker ^1.0)
Please ignore warnings until it has been removed as a package dependency from the collision package
see: https://laracasts.com/discuss/channels/laravel/jakub-onderka-package-abandoned-warnings

Magento 2.3 upgrade error Package container-interop/container-interop is abandoned, you should avoid using it. Use psr/contain

I am upgrading magento 2.1.8 to 2.3.3 by command line it is showing below error when I run composer update command.
Package container-interop/container-interop is abandoned, you should avoid using it. Use psr/contain
Any one let me know where i need to change to solve this problem.
Thanks
Sanjeev
It comes up a lot during Composer installations. The module still installed, the message is just a false-positive. If it failed, the message would clearly state that.

Updating a single dependency with Composer

I'm using Composer and upon the last install, got the message:
Package guzzle/guzzle is abandoned, you should avoid using it. Use
guzzlehttp/guzzle instead.
I went to my composer.lock file and saw that some of my packages were using guzzle/guzzle while other packages were using guzzlehttp/guzzle:
"require-dev": {
"amphp/artax": "*#dev",
"ext-curl": "*",
"guzzle/guzzle": "*",
A few questions come to mind:
Is there any way to update those packages with guzzlehttp/guzzle?
And if I did do this, wouldn't it be possible that the packages which use guzzle/guzzle no longer qorks?
Would the best course of action be to wait for the package author to change the dependency to guzzlehttp/guzzle and then re-install?
I think the best way is to wait for the original package author to change that and then update that package in your project.
A way for you to change it yourself could be to fork that package and test all the stuff yourself.
But I see no need to change that if your project works fine. It's just a message that guzzle/guzzle is no longer maintained, but that doesn't mean that it is not working anymore. Just a suggestion to use guzzlehttp/guzzle as this is the latest maintained version now.

Laravel Collection installation with Composer and Laravel 5

I need help with a problem.
I'm learning Laravel 5.
And I've found a problem trying to do something.
I tried to install Laravel Collection.
I go to composer.json and I add this line on require:
"laravelcollective/html": "5.1.*"
But when I execute composer update on shell, I have an error:
Your requirements could not be resolved to an installable set of packages.
And a lot of posibles conclusions to the problem.
I put a screenshot to help you to understand.
Actually, the error messages are clear. You are trying to install a package that has a dependency of laravel componenents with a version of 5.1, but in your composer.json file, you imply that your project works with laravel 5.0. Either change the laravelcollective/html version to 5.0.* or change and upgrade your laravel dependency as 5.1.* so that your problem will be solved.

How to skip suggestions when composer installing

Locally when I run composer install it doesn't show anything about suggestions. In our CI environment it provides a long list of suggestions I'd like to avoid. I want to see the output of what's being loaded from cache and that kind of thing, just don't want to see this. I've been through the docs and haven't been able to figure out how to hide this.
The suggestions are (among many others)...
symfony/security-core suggests installing symfony/expression-language (For using the expression voter)
symfony/routing suggests installing symfony/expression-language (For using expression matching)
predis/predis suggests installing ext-phpiredis (Allows faster serialization and deserialization of the Redis protocol)
phpseclib/phpseclib suggests installing ext-gmp (Install the GMP (GNU Multiple Precision) extension in order to speed up arbitrary precision integer arithmetic operations.)
phpseclib/phpseclib suggests installing pear-pear/PHP_Compat (Install PHP_Compat to get phpseclib working on PHP < 4.3.3.)
patchwork/utf8 suggests installing ext-intl (Use Intl for best performance)
monolog/monolog suggests installing aws/aws-sdk-php (Allow sending log messages to AWS services like DynamoDB)
How can I hide this output?
As of composer 1.6.3, there is a --no-suggest option that hides all suggestions when running composer install or composer update.
When you run composer install on a project that has a composer.lock file, it just installs the versions locked in the composer.lock file and nothing. In other words, the required packages and versions are already resolved and it's just installing it.
When you run composer install on a project with no composer.lock file, Composer will resolve the required packages and their versions and will store it in the composer.lock file before installing them. In this case, the project was not set up and you get notified about other suggested packages.
In the second case, there is no way you can hide the suggested packages list from the output (at least, at the time of writing this answer). In the first case, nothing is new, so it isn't shown at all.
The solution will be to push your composer.lock file to the server, which is a good practice after all (you don't want your production server to have other versions of the dependencies than your dev environment, newer versions might broke your site).
Since composer 1.6.3, the --no-suggest doesn't show anything about suggestions. But in composer 2, this option is deprecated, it has no effect and will break in composer 3 (see this link for more details).
Hope that will help in 2021!

Resources