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
WP_CLI::error( "clean() method does not exist on seeder {$seeder} class." );
The issue is that $seeder is a class instance. $seeder_name is available and using this here should fix the issue.
Error message
wp-cypress ✖ Fatal error: Uncaught Error: Object of class PostSeeder could not be converted to string in /var/www/html/wp-content/plugins/wp-cypress/src/Seeder/SeedCommand.php:121
Stack trace:
#0 /var/www/html/wp-content/plugins/wp-cypress/src/Seeder/SeedCommand.php(41): WP_Cypress\Seeder\SeedCommand->clean('PostSeeder')
#1 [internal function]: WP_Cypress\Seeder\SeedCommand->__invoke(Array, Array)
#2 phar:///usr/bin/wp/vendor/wp-cli/wp-cli/php/WP_CLI/Dispatcher/CommandFactory.php(100): call_user_func(Array, Array, Array)
#3 [internal function]: WP_CLI\Dispatcher\CommandFactory::WP_CLI\Dispatcher\{closure}(Array, Array)
#4 phar:///usr/bin/wp/vendor/wp-cli/wp-cli/php/WP_CLI/Dispatcher/Subcommand.php(497): call_user_func(Object(Closure), Array, Array)
#5 phar:///usr/bin/wp/vendor/wp-cli/wp-cli/php/WP_CLI/Runner.php(441): WP_CLI\Dispatcher\Subcommand->invoke(Array, Array, Array)
#6 phar:///usr/bin/wp/vendor/wp-cli/wp-cli/php/WP_CLI/Runner.php(464): WP_CLI\Runner->run_command(Array, Array)
#7 phar:///usr/bin/wp/vendor/wp-cli/wp-cli/php/WP_CLI/Runner.php(1295): WP_CLI\Runner->run_command_and_exit()
#8 phar:///usr/bin/wp/vendor/wp-cli/wp-cli/php/WP_CLI/Bootstrap/LaunchRunner.php(28): WP_CLI\Runner->start()
#9 phar:///usr/bin/wp/vendor/wp-cli/wp-cli/php/bootstrap.php(83): WP_CLI\Bootstrap\LaunchRunner->process(Object(WP_CLI\Bootstrap\BootstrapState))
#10 phar:///usr/bin/wp/vendor/wp-cli/wp-cli/php/wp-cli.php(32): WP_CLI\bootstrap()
#11 phar:///usr/bin/wp/php/boot-phar.php(20): include('phar:///usr/bin...')
#12 /usr/bin/wp(4): include('phar:///usr/bin...')
#13 {main}
thrown in /var/www/html/wp-content/plugins/wp-cypress/src/Seeder/SeedCommand.php on line 121
Error: There has been a critical error on this website.Learn more about troubleshooting WordPress. There has been a critical error on this website.
The text was updated successfully, but these errors were encountered:
Describe the bug
Attempting to clean a seeder without a
clean
method causes a fatal error.To Reproduce
Steps to reproduce the behavior:
clean
methodnpx wp-cypress seed MySeeder --clean-first
Expected behavior
Attempting to clean a seeder which does not have a
clean
method should produce an informative error.This case is actually being handled already here:
wp-cypress/plugin/src/Seeder/SeedCommand.php
Line 121 in 9b32b48
The issue is that
$seeder
is a class instance.$seeder_name
is available and using this here should fix the issue.Error message
The text was updated successfully, but these errors were encountered: