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 roots/wordpress for WordPress code symbol discovery by IDEs/editors #1275

Closed
wants to merge 4 commits into from

Conversation

thelovekesh
Copy link
Member

Summary

When working with wp-env, code editors and IDEs often struggle to locate WordPress code symbols. This PR introduces roots/wordpress, which dumps core files into the vendor/roots/wordpress directory. This enhancement improves developer experience (DX) by enabling IDEs and editors to resolve function and class symbols more effectively.

Relevant technical choices

  • Add roots/wordpress package.
  • Add config to add WordPress files in vendor/roots/wordpress.
@thelovekesh thelovekesh added [Type] Enhancement A suggestion for improvement of an existing feature skip changelog PRs that should not be mentioned in changelogs labels Jun 5, 2024
Copy link

github-actions bot commented Jun 5, 2024

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: thelovekesh <thelovekesh@git.wordpress.org>
Co-authored-by: westonruter <westonruter@git.wordpress.org>
Co-authored-by: swissspidy <swissspidy@git.wordpress.org>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

@westonruter
Copy link
Member

Humm. We already have core files locally, however, when wp-env had started. Personally I symlink vendor/wp-env/wp-core to the path returned by wp-env install-path. This gets me the the symbols as well as when I jump to a definition for some symbol in core, I can actually modify the core source code and it is the actual code that is being used in the running environment. If we added the core files to vendor/roots/wordpress then there would be another copy that isn't doing anything.

@swissspidy
Copy link
Member

We also already have the WordPress stubs from PHPStan. If we added this then there would be another copy that isn't doing anything.

@westonruter
Copy link
Member

Maybe later

@westonruter westonruter closed this Jul 9, 2024
@westonruter westonruter removed this from the performance-lab n.e.x.t milestone Jul 9, 2024
@swissspidy swissspidy deleted the add/roots-wp branch July 9, 2024 15:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
skip changelog PRs that should not be mentioned in changelogs [Type] Enhancement A suggestion for improvement of an existing feature
3 participants