I want install phpexcel laravel but phpexcel is abandoned - php

I want to install phpoffice/phpexcel in My Project.
When composer install or composer update, i receive error:
Package phpoffice/phpexcel is abandoned, you should avoid using it.
Use phpoffice/phpspreadsheet instead.
What is wrong with my project? Please help me. My project use PHP version 7.1.3 and Laravel version 5.7

It means the project is not being maintained. you can still use if you want to.

That message you are getting is just a warning, not an error so there is nothing wrong with your project. So you could ignore the warning and continue using the package with your current code.
However, as the message said you should avoid using it because the package might stop working properly if you decide to update laravel, php or any other dependencies. And if it does stop working or you encountered a bug, there will no code maintainer to help you solve your issue.
In your case, phpoffice/phpspreadsheet package actually provide a useful entry in their documentation to help you migrate to their package, so you should definitely give it a read as there are quite a few breaking changes if you decide to use their package.

Related

PHP Composer: "Package paypal/paypalhttp is abandoned"

I have been using the PHP SDK, while doing some other composer stuff, we noticed this warning about the http portion of the sdk. Package paypal/paypalhttp is abandoned, you should avoid using it. No replacement was suggested.
I've tried deleting the paypalhttp directory and rerunning composer update but it's a required dependency of "paypal/paypal-checkout-sdk": "1.0.1" which as far as I can tell is the current latest version of the SDK, at least as far as PayPal's own documentation is concerned (although I've learned by now not to always trust their docs). As such it reinstalled itself on a composer update.
Am I just supposed to ignore this? Am I using some old version of the sdk that relies on this abandoned package? Is there a newer alternative to either the SDK or the http package?
You're using the correct, newest checkout SDK for PHP. [Update: the PayPal-Checkout-PHP has been deprecated now as well...]

Laravel passport 7.5.1 - Replicating claims

We are having a new error related with laravel/passport: 7.5.1. Today, this library has been working as the last week. But this stops showing this message via Postman:
Replicating claims as headers is deprecated and will removed from v4.0. Please manually set the header if you need it replicated.
Do someone knows something about this issue?
We don't know how to continue with this...
We're using Laravel 5.7 (we know that...)
We "solved" this temporally downgrading the library lcobucci/jwt from 3.4.0 to 3.3.3.
help me in laravel 5.8
set in composer.json
"laravel/passport": "^7.5",
"lcobucci/jwt": "3.3.2",
and update vendor
composer update
For me downgrading, lcobucci/jwt worked for me. I was currently using 3.4.* but downgraded it to a constant 3.3.3
to downgrade I run the command
composer require lcobucci/jwt 3.3.3
And that was it. But my only concern is I am not certain if this is a temporary or a permanent solution to this issue. But at least it will reboot things up if your system failed cause of that error

laravel 5.4 sitemap error

I want to install this package in my project
https://github.com/spatie/laravel-sitemap
but the installation's failed. the error is
Anyone encountered this error. or their have other better package for laravel sitemap? any tutorial? thanks everyone :)
The error message is pretty clear. You're trying to install spatie/laravel-sitemap:^3.3, which requires laravel/framework:5.5 or higher. So you need to either upgrade to use Laravel 5.5, or use an older version of spatie/laravel-sitemap.
The Github repository lists the available releases. I would suggest looking at v2.4 as a starting point, as the ChangeLog for v3.0 mentions about adding Laravel 5.5 support.
composer require spatie/laravel-sitemap:2.4
Edit:
You asked where to put the generator code. It isn't something you're going to want to run on every request, so I would suggest creating a route dedicated to creating the sitemap.
// routes/web.php
Route::get('sitemap/generate', function () {
SitemapGenerator::create(base_url())->writeToFile($path);
});

how to use wepay PHP sdk in laravel 5?

I want to use wepay PHP sdk in laravel 5 using composer but I didn't found any laravel package for it.
Can you please tell me me how can I do this?
The package is available via packagist.org - unfortunately only as a dev-master branch and with suboptimal autoloading configured (I'm trying to fix that, sent both a patch and opened an issue suggesting they tag their version).
Adding that package is basic Composer action. The classes should be automatically available within Laravel wherever you think you want to use it.

How to install modern PHP packages?

How do I install modern PHP packages? I haven't used PHP for 5 years so everything seems new.
In particular I'm trying to install https://github.com/pda/pheanstalk. I downloaded the code, but when I try to
require_once 'Pheanstalk/Pheanstalk.php'
I get an error:
Fatal error: Interface 'Pheanstalk\PheanstalkInterface' not found
in /web/Pheanstalk/Pheanstalk.php
I found I should use use. When I try use Pheanstalk\Pheanstalk I get this error:
Fatal error: Class 'Pheanstalk\Pheanstalk' not found in /web/test.php on line 5
Can't I just download and use PHP code anymore like back in the day? How do I get these modern packages working? Packages seem to mention composer. Should I use that? Can't I just download code and use it? I don't want to depend on composer or any other package manager. I just want to run code.
The modern way of installing packages is to use Composer.
It might seem scary at first, but it isn't such a big deal.
You should also be able to download and use the package yourself, if the creator made that possible, it should be explained in the documentation however.
There might be no "easy" way to install your package without composer if the package creator intended it that way. For this package in particular, the only instructions are for Composer, so it's safe to assume that it's the easiest way to install it.
Of course it's possible to use his code directly, but you'll need to know what you're doing and understand namespaces.

Categories