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

Change parameters of NoTypeDetectedException because of php deprecati… #4241

Merged

Conversation

dorep
Copy link
Contributor

@dorep dorep commented Nov 12, 2024

Hello,

When exception is thrown with parameters as null, PHP deprecation messages are shown. I tried to change parameters to empty string and 0 for code - basically defaults. I think, that this could not break anything, but it would remove these deprecation messages.

1️⃣ Why should it be added? What are the benefits of this change?
No deprecation messages when exception is thrown. Messages are:

1) [...]/vendor/maatwebsite/excel/src/Exceptions/NoTypeDetectedException.php:20
Exception::__construct(): Passing null to parameter #1 ($message) of type string is deprecated
2) [...]/vendor/maatwebsite/excel/src/Exceptions/NoTypeDetectedException.php:20
Exception::__construct(): Passing null to parameter #2 ($code) of type int is deprecated

2️⃣ Does it contain multiple, unrelated changes? Please separate the PRs out.
No.

3️⃣ Does it include tests, if possible?
No.

4️⃣ Any drawbacks? Possible breaking changes?
No.

5️⃣ Mark the following tasks as done:

  • Checked the codebase to ensure that your feature doesn't already exist.
  • Take note of the contributing guidelines.
  • Checked the pull requests to ensure that another person hasn't already submitted a fix.
  • Added tests to ensure against regression.

6️⃣ Thanks for contributing! 🙌

@patrickbrouwers patrickbrouwers merged commit 08fa5a0 into SpartnerNL:3.1 Nov 12, 2024
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants