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

Fix assert testing callmap return types #8676

Merged
merged 1 commit into from Nov 6, 2022

Conversation

othercorey
Copy link
Contributor

closes #8675

This removes the assert that callmap return type is empty if PHP does not provide a return type.

Fixes a couple other errors I encountered when running callmap tests.

@@ -282,6 +282,7 @@ class InternalCallMapHandlerTest extends TestCase
'sqlsrv_prepare',
'sqlsrv_query',
'sqlsrv_server_info',
'ssh2_forward_accept',
Copy link
Contributor Author

Choose a reason for hiding this comment

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

The extension defined 2 optional parameters (host and port) that are unused in the code and undocumented in PHP docs but are reflected.

if ($expectedType !== null) {
$this->assertTypeValidity($expectedType, $entryReturnType, true, 'CallMap entry has incorrect return type');
} else {
$this->assertNotEmpty($entryReturnType);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm not sure if this is ever true or if the parse checks above catch this, but we should define a return type at least.

@othercorey othercorey deleted the fix-return-callmap branch November 6, 2022 09:06
@weirdan weirdan added the release:internal The PR will be included in 'Internal changes' section of the release notes label Nov 6, 2022
@orklah
Copy link
Collaborator

orklah commented Nov 6, 2022

Thanks! That looks great!

@orklah orklah merged commit b48a713 into vimeo:4.x Nov 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release:internal The PR will be included in 'Internal changes' section of the release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

testCallMapCompliesWithReflection failures
3 participants