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

apply codes to php8.4(PHP8.4にコードを対応させる) #625

Open
77web opened this issue Nov 25, 2024 · 4 comments
Open

apply codes to php8.4(PHP8.4にコードを対応させる) #625

77web opened this issue Nov 25, 2024 · 4 comments

Comments

@77web
Copy link

77web commented Nov 25, 2024

Do this before creating an issue

  • ✅ Check our developer documentation and FAQ page for more information on LINE bots and the Messaging API
  • ✅ Make sure your issue is related to the LINE Bot SDK. For general questions or issues about LINE bots, create an issue on the LINE Platform feedback repository. Note that we don't provide technical support.

When creating an issue

We want to update our product to php8.4. In php8.4 environment almost every model object has this problem:

Implicitly marking parameter $data as nullable is deprecated, the explicit nullable type must be used instead

In php8.4, the nullable value should be marked as nullable explicitly.
refs. https://www.php.net/manual/ja/migration84.deprecated.php

- function foo (array $data = null)
+ function foo (array|null $data = null)
@Yang-33
Copy link
Contributor

Yang-33 commented Nov 25, 2024

Hi, thank you for using line-bot-sdk-php, @77web !

Here is my question:
Do all the libraries used by your(user) application need to make such adjustments in order for all warnings to disappear? In other words, is this adjustment necessary even for the libraries that the application depends on? Is it not possible to suppress them?

Ultimately, I understand the situation, so we would like to consider a solution. The method is almost singular: to modify the comments generated by the openapi generator based on whether they are nullable. If the openapi generator has not yet addressed this issue and you are interested, you can tackle this problem.

@77web
Copy link
Author

77web commented Dec 5, 2024

I've sent a PullRequest to openapi-generator.
OpenAPITools/openapi-generator#20243

@77web
Copy link
Author

77web commented Dec 6, 2024

My PullRequest to openapi-generator was successfully merged!
OpenAPITools/openapi-generator#20243

Maybe you can apply to php8.4 in upcoming openapi-generator v7.11.0 😄

@Yang-33
Copy link
Contributor

Yang-33 commented Dec 18, 2024

Thank you, @77web !!!! That is great contribution for all users openapi-generator!

We'll update the library for line-bot-sdk-php after openapi-generator v7.11.0 is released. Let us release new version for line-bot-sdk-php and close this after updating version! Thanks!

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

No branches or pull requests

2 participants