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

Serialization of 'Closure' is not allowed #2

Closed
thomas-alrek opened this issue Feb 11, 2020 · 1 comment
Closed

Serialization of 'Closure' is not allowed #2

thomas-alrek opened this issue Feb 11, 2020 · 1 comment

Comments

@thomas-alrek
Copy link

thomas-alrek commented Feb 11, 2020

Thank you for this cool helper. I was testing it out, and got the following error when testing.

$test = function () {
    return true;
};

tinker($test);

Also, would it be possible to add support for tinker($this) when in a class context?

@mpociot
Copy link
Member

mpociot commented Feb 11, 2020

Unfortunately, it is only possible to send data to tinkerwell that can be serialized - which is not easily possible with closures. When in a class context, it will work as long as the class itself can be serialized, even though I'm not sure about that, since it would have the variable name $this , which PHP might not like

@mpociot mpociot closed this as completed Feb 11, 2020
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

No branches or pull requests

2 participants