[wp-trac] [WordPress Trac] #50482: Uncaught Exception: Serialization of 'Closure' is not allowed when run PHPUnit in plugin development
WordPress Trac
noreply at wordpress.org
Tue Nov 17 21:10:09 UTC 2020
#50482: Uncaught Exception: Serialization of 'Closure' is not allowed when run
PHPUnit in plugin development
------------------------------+-----------------------
Reporter: yshinoda | Owner: (none)
Type: defect (bug) | Status: reopened
Priority: normal | Milestone: 5.6
Component: Build/Test Tools | Version: 5.5
Severity: critical | Resolution:
Keywords: | Focuses:
------------------------------+-----------------------
Comment (by TimothyBlynJacobs):
IMO we should close this as `wontfix`. I don't think Core should be forced
to forego any use of closures that may wind up in global state somewhere.
For the use case outlined in the original ticket description, I'd
recommend using `wp_die` instead of `die()` in your code. `wp_die`
supports multiple handlers and during test suite execution throws
`WPDieException` instead of killing the request.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/50482#comment:17>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list