You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
''dirtsimple\imposer\PostModel::on_save_post'' is not a valid function name.
at /repos/imposer/vendor/brain/monkey/src/Name/Exception/InvalidName.php:80
#0 Brain\Monkey\Name\Exception\InvalidName::createFor (/repos/imposer/vendor/brain/monkey/src/Name/Exception/InvalidName.php:32)
#1 Brain\Monkey\Name\Exception\InvalidName::forFunction (/repos/imposer/vendor/brain/monkey/src/Name/FunctionName.php:93)
#2 Brain\Monkey\Name\FunctionName->parseName (/repos/imposer/vendor/brain/monkey/src/Name/FunctionName.php:39)
#3 Brain\Monkey\Name\FunctionName->__construct (/repos/imposer/vendor/brain/monkey/src/Name/CallbackStringForm.php:132)
#4 Brain\Monkey\Name\CallbackStringForm->parseString (/repos/imposer/vendor/brain/monkey/src/Name/CallbackStringForm.php:73)
#5 Brain\Monkey\Name\CallbackStringForm->parseCallback (/repos/imposer/vendor/brain/monkey/src/Name/CallbackStringForm.php:39)
#6 Brain\Monkey\Name\CallbackStringForm->__construct (/repos/imposer/vendor/brain/monkey/src/Hook/HookStorage.php:227)
#7 Brain\Monkey\Hook\HookStorage->parseArgsToAdd (/repos/imposer/vendor/brain/monkey/src/Hook/HookStorage.php:163)
#8 Brain\Monkey\Hook\HookStorage->pushToStorage (/repos/imposer/vendor/brain/monkey/src/Hook/HookStorage.php:58)
#9 Brain\Monkey\Hook\HookStorage->pushToAdded (/repos/imposer/vendor/brain/monkey/inc/wp-hook-functions.php:21)
#10 add_action (/repos/imposer/src/PostModel.php:27)
#11 dirtsimple\imposer\PostModel::configure (/repos/imposer/specs/PostModel.spec.php:111)
The issue appears to be that CallbackStringForm->parseString doesn't think that static method string callbacks such as 'dirtsimple\imposer\PostModel::on_save_post' are valid Wordpress filters or actions. Changing the code under test to use the array form of static method specification works, but the issue should be fixed in BrainMonkey.
The text was updated successfully, but these errors were encountered:
This code in a static method under test:
Causes the following to be thrown:
The issue appears to be that
CallbackStringForm->parseString
doesn't think that static method string callbacks such as'dirtsimple\imposer\PostModel::on_save_post'
are valid Wordpress filters or actions. Changing the code under test to use the array form of static method specification works, but the issue should be fixed in BrainMonkey.The text was updated successfully, but these errors were encountered: