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

Idea how to infer most custom types without descriptors #617

Draft
wants to merge 1 commit into
base: 1.5.x
Choose a base branch
from

Conversation

janedbal
Copy link
Contributor

@janedbal janedbal commented Oct 8, 2024

I believe it would be much better to work out of the box even with custom types.

Generating custom descriptors is painful and ensuring descriptors exist is disabled by default (reportUnknownTypes).

@@ -2188,4 +2195,18 @@ private function simpleFloatify(Type $type): Type
});
}

private function autodetectDbalTypePhpValue(DbalType $dbalType): Type
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Basically the same thing as ReflectionDescriptor does. So the deafult behaviour could be the same as registering ReflectionDescriptor for all registered types.

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.

1 participant