Skip to content

Document that runtime loaders must keep the parameter types of runtime methods - #5050

Open
nicolas-grekas wants to merge 1 commit into
twigphp:3.xfrom
nicolas-grekas:runtime-loader-parameter-types-doc
Open

nicolas-grekas wants to merge 1 commit into
twigphp:3.xfrom
nicolas-grekas:runtime-loader-parameter-types-doc

Conversation

@nicolas-grekas

Copy link
Copy Markdown
Contributor

The sandbox skips the __toString() check of an argument when the parameter of the registered callable can't hold a string, like an int. A runtime loader that returns a subclass widening such a type would get around this check. The docs now say that runtime loaders must keep these types, and that final runtime classes prevent such subclasses.

…e methods

The sandbox relies on these types to skip some `__toString()` checks.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant