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: remove exception inheritance from UnresolvableType #386

Merged
merged 1 commit into from
Jul 7, 2023

Conversation

romm
Copy link
Member

@romm romm commented Jul 7, 2023

Because UnresolvableType can be applied to any property, parameter or function/method return type, it can be present in a class definition hierarchy. This class definition can then be cached for better application performance, meaning these UnresolvableType will be present in the cache entry. This is a problem because an exception contains a lot of information, including reflection instances which can not be serialized and can break caching mechanisms that rely on serialization.

UnresolvableType extending LogicException was not necessary, so it is removed and the code relying on it has been adapted.

Because `UnresolvableType` can be applied to any property, parameter or
function/method return type, it can be present in a class definition
hierarchy. This class definition can then be cached for better
application performance, meaning these `UnresolvableType` will be
present in the cache entry. This is a problem because an exception
contains a lot of information, including reflection instances which can
not be serialized and can break caching mechanisms that rely on
serialization.

`UnresolvableType` extending `LogicException` was not necessary, so it
is removed and the code relying on it has been adapted.
@romm romm enabled auto-merge (rebase) July 7, 2023 11:15
@romm romm merged commit eaa1283 into CuyZ:master Jul 7, 2023
@romm romm deleted the fix/unresolvable-type-exception-class branch July 7, 2023 11:16
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