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

Build list for unprepared table/field names, to be improved with WP 6.2's %i placeholder #20194

Closed
3 of 5 tasks
leonidasmi opened this issue Apr 24, 2023 · 1 comment
Closed
3 of 5 tasks
Assignees

Comments

@leonidasmi
Copy link
Contributor

leonidasmi commented Apr 24, 2023

With WP 6.2, the %i placeholder has been introduced, that can be used for table or field names in queries. Until now, WP developers had to phpcs:ignore those instances because there was no way of dealing with this.

We have a lot of queries where we do that and now we're able to improve our handling of those with the new placeholder. This task is the first step of this.

  • Run vendor/bin/phpcs --sniffs=WordPress.DB.PreparedSQL,WordPress.DB.PreparedSQLPlaceholders --ignore-annotations in all Yoast plugins
  • Manually review the results and single out the ones that are about unprepared table/field names. An example is this one.
  • Create a Google sheet with all those cases

That sheet will later used in order to improve our handling of those unprepared table/field data, as per this.

Tasks

  1. 4 of 11
  2. pls78
  3. vraja-pro
  4. enricobattocchi
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

No branches or pull requests

2 participants