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

[5.x] Change default value of update command selection #11581

Open
wants to merge 1 commit into
base: 5.x
Choose a base branch
from

Conversation

Jade-GG
Copy link
Contributor

@Jade-GG Jade-GG commented Mar 14, 2025

Note: This only applies if you have more than one index defined.

When adding the statamic:search:update command to the Laravel scheduler, if you don't also explicitly define the indexes to update (e.g. with --all) like so:

Schedule::command('statamic:search:update')->daily();

Then the scheduler will throw the following error upon running this command:

In Update.php line 28: Call to a member function update() on null

With this error it's a bit cryptic to figure out what went wrong.

I've made this change based on my own assumption that scheduling the command like this, without an option, should by default run it as if it were run with --all (this is the default selected option after all when you manually run it).

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

Successfully merging this pull request may close these issues.

1 participant