-
Notifications
You must be signed in to change notification settings - Fork 25
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
[Bug]: Class name must be a valid object or a string #49
Comments
Hi @patriktoth67, after a second run of "composer update" you encounter the same error? If you run "php artisan schedule:list" you have the same error? |
Hello! Yes, I just ran it twice, same error. |
You can replace bootingPackage() with this new code and try again? public function bootingPackage()
{
$this->callAfterResolving(Schedule::class, function (Schedule $schedule) {
$modelClass = Config::get('filament-email.resource.model') ?? Email::class;
$class = get_class(new $modelClass);
if (class_exists($class)) {
$schedule->command('model:prune --model="'.$class.'"')->daily();
}
});
} |
Yes, with this as well: |
Yep, everything works like a charm:) Ty for the help! |
Yes, my bad. You need to import the namespace as well. |
I've pushed the update on the main branch. You can checkout and check if all is ok? Thanks. |
Yes, should be all good :) |
What happened?
After
composer update
today, I get the following error:How to reproduce the bug
composer update
Package Version
1.2.0
PHP Version
8.2
Laravel Version
11.4.0
Which operating systems does with happen with?
Windows
Notes
No response
The text was updated successfully, but these errors were encountered: