Package abandoned how to remove it? - laravel-5

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

Related

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

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.

Package phpunit/phpunit-mock-objects is abandoned, you should avoid using it. No replacement was suggested

I am going to install ConsoleTVs/Charts in Laravel 5.4 version with PHP(Version 7.3.6) but I have faced with the following error, is there any solution way how to fix this one?
enter image description here
First find out which package makes you require the abandoned package
composer depends phpunit/phpunit-mock-objects
If it is a direct dependency of your composer.json, remove it and use an alternative way of mocking
If it is a dependency of a dependency then:
Check if the dependency requiring phpunit/phpunit-mock-objects can be updated
Replace the dependency requiring phpunit/phpunit-mock-objects
Contribute to the package with an update replacing phpunit/phpunit-mock-objects

Composer: how to know a package by what other package is required

I've found nesbo/carbon in my vendor folder. It is a really useful library and I'm curious to know which other package I installed requires it.
How can I know this?
Lets look at composer why or composer depends command. This command shows which other packages depend on a certain package. Show usage
This is usage example
$ composer depends psr/log
symfony/debug v3.2.2 requires psr/log (~1.0)

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.

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