Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: PHP Deprecated: #3588

Closed
1 task done
rajibhossainpavel opened this issue Mar 24, 2022 · 4 comments
Closed
1 task done

[Bug]: PHP Deprecated: #3588

rajibhossainpavel opened this issue Mar 24, 2022 · 4 comments
Labels

Comments

@rajibhossainpavel
Copy link

Is the bug applicable and reproducable to the latest version of the package and hasn't it been reported before?

  • Yes, it's still reproducable

What version of Laravel Excel are you using?

3.1

What version of Laravel are you using?

8.1

What version of PHP are you using?

8.1

Describe your issue

PHP Deprecated: Return type of Maatwebsite\Excel\Validators\Failure::jsonSerialize() should either be compatible with JsonSerializable::jsonSerialize(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice

How can the issue be reproduced?

rules()

What should be the expected behaviour?

should not show this notice.

@patrickbrouwers
Copy link
Member

Sounds like you are not on the latest package version. Please specify the exact package version you are on (3.1 has 37 releases)

@J2TEAM
Copy link
Contributor

J2TEAM commented Apr 22, 2022

@patrickbrouwers I got the same issue.

Laravel version: 9.9.0

Laravel Excel version: 3.1.38

image

Error:

image

I add the attribute to file \Maatwebsite\Excel\Validators\Failure::jsonSerialize() as it says and that error disappears.

image

@patrickbrouwers
Copy link
Member

Please PR that change if possible

@J2TEAM J2TEAM mentioned this issue Apr 23, 2022
3 tasks
patrickbrouwers pushed a commit that referenced this issue Apr 23, 2022
@williamdes
Copy link

williamdes commented Apr 23, 2022

/retitle "[Bug] PHP 8.1 deprecation warning on jsonSerialize"
/closed
/released

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants