-
-
Notifications
You must be signed in to change notification settings - Fork 29
[MCP SDK] Use foreach instead of array_map
because array_map
does not accept generators
#143
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
[MCP SDK] Use foreach instead of array_map
because array_map
does not accept generators
#143
Conversation
44750cc
to
35c6c5b
Compare
array_map
because array_map
does not accept generators
array_map
because array_map
does not accept generatorsarray_map
because array_map
does not accept generators
src/mcp-sdk/tests/Server/RequestHandler/PromptListHandlerTest.php
Outdated
Show resolved
Hide resolved
src/mcp-sdk/tests/Server/RequestHandler/PromptListHandlerTest.php
Outdated
Show resolved
Hide resolved
src/mcp-sdk/tests/Server/RequestHandler/PromptListHandlerTest.php
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
… accept generators
35c6c5b
to
61b0f0d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @dorrogeray for providing that patch! 👍
I quickly changed tests and removed one that actually didn't work with the original code instead the mock. That's always the tricky part with mocks.
It was just so annoying to have that bug - so I took over your PR here -sorry for that!
Thank you @dorrogeray. |
Use foreach instead of array_map because array_map does not accept generators and add test coverage.