Skip to content

Avoid instantation of class with type mixed during mapping#60

Open
danog wants to merge 2 commits into
felixfbecker:masterfrom
nicelocal:fix_mixed_mapping
Open

Avoid instantation of class with type mixed during mapping#60
danog wants to merge 2 commits into
felixfbecker:masterfrom
nicelocal:fix_mixed_mapping

Conversation

@danog

@danog danog commented Aug 25, 2023

Copy link
Copy Markdown

Some PHP 8+ coding standards require the specification of a typehint in all parameters of all functions, even if it's just a mixed typehint.
Unfortunately, the library treats mixed typehints as a concrete class type, trying to automatically map passed objects.
This is undesirable for methods like LSP's executeCommand, which takes an LSPAny = LSPObject | LSPArray | string | integer | uinteger | decimal | boolean | null arg, essentially equivalent to a mixed type.

This library already supports skipping by not providing a typehint: this PR allow skipping mapping by also providing a mixed typehint.

@danog

danog commented Aug 25, 2023

Copy link
Copy Markdown
Author

Could I also get a tag after the merge please?
I need this for Psalm v6.

@DannyvdSluijs

Copy link
Copy Markdown
Contributor

Maybe good to know this repo is kind of dead. The sole maintainer doesn’t seem to be active anymore. Also see #59 (comment)

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.

2 participants