Cannot remove package phpoffice/phpword. (laravel 5.2) - laravel

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

Related

How to find and treat the cause of an outdated composer package that is not in my composer.json?

I ran composer outdated command:
$ composer outdated
phpdocumentor/type-resolver 0.4.0 0.7.1
but looking inside composer.json, I see no such package. In my case there is no type-resolver.
How do I find an outdated package that is missing in composer.json belongs to and how do I update it?
Composer install not only packages that are listed directly in composer.json but also packages that are dependencies of packages that are listed in composer.json. Assuming you have in composer package vendor/A and this package requires vendor/B you will have installed both A and B packages.
So in your case you can run:
composer update phpdocumentor/type-resolver
to try to update this package.
Of course it does not mean it will be possible to update this way. It's possible that you might need to run:
composer update
but this will update all packages (and depends on scenario this is what you can accept or maybe you don't want to update all packages).
It's also possible that it won't be possible to update this package because other package that is used has phpdocumentor/type-resolver dependency set to for example 0.4.* so 0.7 version is not compatible with this package and version 0.7 won't be installed

laravel ckeditor installation

I have install Laravel previously and it works perfectly but now when I fire command composer require unisharp/laravel-ckeditor it installs "unisharp/laravel-filemanager": "~1.8".
I have also try to install it using this link but its not worked..
I guess author have changes the package..
Anyone have any idea about it?
use
composer require ckeditor/ckeditor
result
akash#localhost /var/www/html/lara57 $ composer require ckeditor/ckeditor
Using version ^4.11 for ckeditor/ckeditor
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Package operations: 1 install, 0 updates, 0 removals
- Installing ckeditor/ckeditor (4.11.3): Downloading (100%)
Package phpoffice/phpexcel is abandoned, you should avoid using it. Use phpoffice/phpspreadsheet instead.
Writing lock file

guzzle/guzzle to guzzlehttp/guzzle with laravel

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?

Removing a package from composer with --no-update

I'm trying to remove a package from my application and I've run composer remove --no-update package/name, now all this does is remove the entry in composer.json but when I run composer show -i, I see the package is still installed, is there anyway to completely remove a package without running update?
I think this is exactly what the --no-update option is intended to do.
composer remove package/name should remove package/name from your project without updating other packages than package/name.
It's the same if you remove the entry from your composer.json and then run composer update package/name. It will update this specific package but no others!
If you activate the --no-update option it omits the update, so it only removes the entry.
I think what the --no-update option is intended to do is, this will avoid composer update.
for eg composer require "magento/magento-cloud-metapackage":">=2.3.3 <2.3.4" --no-update only update composer.json file not composer.lock file
while composer require "magento/magento-cloud-metapackage":">=2.3.3 <2.3.4"
updates both composer.json and composer.lock file

Swiftmailer Error Composer Install

i am installing composer dependencies by 'composer install'.
it download bunch of packages but after swiftmailer it gives me error
[UnexpectedValueException]
'C:\Users\DELL\Downloads\laravel-4\vendor/swiftmailer/swiftmailer/72e34d......54c82f.1' is not a zip archive.
what does it mean?
For me this problem happened due to the order composer was installing the files.
The work around that worked for me was to go into \vendor\composer\autoload_real.php and comment out the following line
require $vendorDir . '/swiftmailer/swiftmailer/lib/swift_required.php';
and then run composer again
Running composer install with the --prefer-source option, fixed this problem for me.

Resources