Skip to content

Optimized the parameters of method __call() to make them more standardized. - #7637

Merged
limingxinleo merged 9 commits into
hyperf:3.2from
kingIZZZY:macro-call-type-hints
Nov 26, 2025
Merged

limingxinleo merged 9 commits into
hyperf:3.2from
kingIZZZY:macro-call-type-hints

Conversation

@kingIZZZY

@kingIZZZY kingIZZZY commented Nov 25, 2025 •

Copy link
Copy Markdown
Contributor

Would it be OK to make Hyperf\Macroable\Macroable::__call to have explicit type hints

This will help fix compatibility with downstream framework Hypervel: hypervel/components#277

@limingxinleo

Copy link
Copy Markdown
Member

单测没过

@kingIZZZY

Copy link
Copy Markdown
Contributor Author

Sorry I'm not too familiar with the github checks process.. I don't have the codebase set up on my computer..

Any chance someone can do this code fixing step please 🙏

@kingIZZZY

Copy link
Copy Markdown
Contributor Author

OK I think I found what PHP CS issues needs to be fixed...I hope

@limingxinleo

Copy link
Copy Markdown
Member

容我再检查检查,明天合并,明天可以回复下,提醒下我,如果我忘了的话

* @return mixed
*/
public function __call($method, $parameters)
public function __call(string $name, array $arguments): mixed

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I was trying to only fix code that uses Macroable::__call
Is this code also somehow affected by Macroable?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

只是顺便把 __call 的规范都改了,之前太乱了

@kingIZZZY

Copy link
Copy Markdown
Contributor Author

Good morning 🌞
Reminder 🔔🙏
This would be very helpful for my site

@limingxinleo limingxinleo changed the title Macro __call type hints compatibility with downstream Hypervel framework Optimized the parameters of method __call() to make them more standardized. Nov 26, 2025
@limingxinleo
limingxinleo merged commit 4d1ccd2 into hyperf:3.2 Nov 26, 2025
76 checks passed
@kingIZZZY

Copy link
Copy Markdown
Contributor Author

Thank you very very much! 🙌

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