-
Notifications
You must be signed in to change notification settings - Fork 90
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
Add site generator command #498
Conversation
Neat! With this being a new command, let's add it to this list here: Lines 125 to 130 in 8b19b7d
That will make sure the readme can be updated properly. The readme will be updated automatically via a cron workflow, but you can also update it manually in this PR using |
@swissspidy Addressed the feedback. Please have a re-review. |
I don't see that test failing on CI, I only see this error:
That's because of my suggestion to use To address this, we can add a new private method to the class like this: /**
* Retrieves a list of reserved site on a sub-directory Multisite installation.
*
* Works on older WordPress versions where get_subdirectory_reserved_names() does not exist.
*
* @return string[] Array of reserved names.
*/
private function get_subdirectory_reserved_names() {
if ( function_exists( 'get_subdirectory_reserved_names' ) ) {
return get_subdirectory_reserved_names();
}
$names = array(
'page',
'comments',
'blog',
'files',
'feed',
'wp-admin',
'wp-content',
'wp-includes',
'wp-json',
'embed',
);
// phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound -- Calling WordPress native hook.
return apply_filters( 'subdirectory_reserved_names', $names );
} |
Ah, now I see the failing test correctly, again only on older WP versions. https://github.com/wp-cli/entity-command/actions/runs/8852432605/job/24311451054?pr=498#step:11:86 Unfortunately I don't have a local 3.7 test site (or an old PHP version) right now to manually test this. I wonder if it has to do with the URL scheme (https vs http). Some tests do
And then use e.g. If it's not that, then maybe someone else has an idea. Aside: any idea why this one other unrelated test could be failing only on this PR? |
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
@wp-cli/committers Does anyone have thoughts here on how to debug the WP 3.7 failure? I don't have a working local setup to test it myself. |
Looks like we faced same issue and fixed using |
Thanks @ernilambar. This is fixing the failing tests on local. Hoping to get the same results in CI. |
@swissspidy Any idea why regenerate-readme was not triggered after this PR? |
Description
Add site generator command
Options
Issues
Fixes #231
Related wp-cli/wp-cli#5935