Skip to content

Conversation

@anoxia
Copy link

@anoxia anoxia commented Oct 8, 2023

大佬,让我来负责 PHP SDK 开发吧 🤣!

@anoxia anoxia changed the title modify: Optimize code structure Modify: optimize code structure Oct 8, 2023
src/Feedback.php Outdated
class Feedback implements \JsonSerializable
{
public function __construct(
public string $feedback_type,
Copy link

@michalboryczko michalboryczko Oct 11, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

constructor property promotion has been introduced in php 8 but composer.json allow you to use 7.4

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, I overlooked this point. Thank you for the reminder. I will handle it as soon as possible.

src/Feedback.php Outdated
{
public function __construct(
public string $feedback_type,
public string $user_id,

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also I think camelCase is much common now than snake_case

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Regarding this, the current coding style is being maintained as much as possible to prevent compatibility issues. The implementation of camel case naming will be considered in future major versions.

@zhenghaoz
Copy link
Contributor

感谢,但是似乎需要修复一下UT

@anoxia
Copy link
Author

anoxia commented Oct 21, 2023

感谢,但是似乎需要修复一下UT

好的,这两天内处理。

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.

3 participants