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

Add Support for site__in and site__not_in parameters #2991

Merged
merged 10 commits into from
Oct 11, 2022

Conversation

burhandodhy
Copy link
Contributor

@burhandodhy burhandodhy commented Sep 8, 2022

Description of the Change

This PR adds the support for the site__in and site__not_in for the Post, Term and Comment Query. The old sites parameter will throw the deprecated warnings but keep working as it used to.

Closes #1781

How to test the Change

Changelog Entry

Added - site__in and site__not_in parameter support for Post, Term and Comment Query.
Deprecated - sites parameter is set to depreciated for. Post, Term and Comment Query.

Credits

Props @burhandodhy

Checklist:

  • I agree to follow this project's Code of Conduct.
  • I have updated the documentation accordingly.
  • I have added tests to cover my change.
  • All new and existing tests pass.

@burhandodhy burhandodhy marked this pull request as ready for review September 20, 2022 09:57
@burhandodhy burhandodhy changed the title Add Support for site__in and site__no_in parameters Add Support for site__in and site__not_in parameters Sep 20, 2022
Copy link
Member

@felipeelia felipeelia left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

EXCELLENT work on the unit tests, @burhandodhy, thanks. I've left some comments here and there with some minor changes.

One thing we will need to address (and this became obvious with your new code) is that single-site and multisite tests are always run. It would be great if we could split those up and really only run the multisite tests in multisite.

In order to parallelize these tests executions, we could create a new workflow (simply duplicating this XML) and have single tests running in one and multisite tests running in the other. What do you think? Is that something you want to tackle in this PR?

In addition to that change, we will also want to exclude "Multisite.php" classes in single-site.xml.dist

includes/classes/Indexable/Comment/QueryIntegration.php Outdated Show resolved Hide resolved
tests/php/indexables/TestPostMultisite.php Outdated Show resolved Hide resolved
tests/php/indexables/TestPostMultisite.php Outdated Show resolved Hide resolved
tests/php/indexables/TestPostMultisite.php Outdated Show resolved Hide resolved
@burhandodhy
Copy link
Contributor Author

One thing we will need to address (and this became obvious with your new code) is that single-site and multisite tests are always run. It would be great if we could split those up and really only run the multisite tests in multisite.

In order to parallelize these tests executions, we could create a new workflow (simply duplicating this XML) and have single tests running in one and multisite tests running in the other. What do you think? Is that something you want to tackle in this PR?

In addition to that change, we will also want to exclude "Multisite.php" classes in single-site.xml.dist

I removed the multisite tests from the single-site.xml.dist. We already have another file phpunit.xml.dist which runs the all the tests including the multisite tests. Do we still need a separate file for only multisite tests?

@felipeelia felipeelia merged commit 39ff793 into develop Oct 11, 2022
@felipeelia felipeelia deleted the burhan/fix-1781 branch October 11, 2022 16:12
@felipeelia felipeelia added this to the 4.4.0 milestone Oct 11, 2022
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.

Does the ‘sites’ parameter allow negative int for exclusion?
2 participants