-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Autoloading WordPress classes #3470
base: trunk
Are you sure you want to change the base?
Conversation
6f5d207
to
aa17c97
Compare
Ohhh, love this PR! |
Not quite... 😄 Worth noting: |
I'm also thinking that at very least, it's a DX improvement and future unlocker. If it lands with no performance regressions, that's cherry on top. |
Hey @aristath are you daily driving this by any chance, or is anybody else? Wondering if I could become real hands-on for testing this in my semi-production / staging env 🤔 or will everything blow up instantly. |
Hey @lkraav! The implementation here is complete, and the autoloader works as expected. I haven't seen anything "blow up"... I plan to create a new trac ticket when the time comes and publish a formal proposal, so any testing and additional data we have will be greatly appreciated! 👍 |
Ah, this brings up a compatibility question - I'd like to stay in at least release candidate stability, but I guess this branch is constantly moving with trunk? Maybe you have tags available so I could merge only up to some "latest compatible with 6.1, or 6.2" state? |
Yeah, I'm keeping it up to date with trunk constantly... |
I'm running into trouble trying to apply it to release WP at https://github.com/WordPress/WordPress.git didn't think of that before.
EDIT This hunk gets rejected on top of 6.2 RC2 $ [-] cat index.php.rej
diff a/index.php b/index.php (rejected hunks)
@@ -19,9 +19,8 @@
/*
* Load the actual index.php file if the assets were already built.
- * Note: WPINC is not defined yet, it is defined later in wp-settings.php.
*/
-if ( file_exists( ABSPATH . 'wp-includes/js/dist/edit-post.js' ) ) {
+if ( file_exists( ABSPATH . WPINC . '/js/dist/edit-post.js' ) ) {
require_once ABSPATH . '_index.php';
return;
} Aha but I see this Skimmed through our sites, and everything seems to be working 💪 no crashes! |
3a6050e
to
daac22d
Compare
@spacedmonkey The front-end performance test suite for this pull request appears to show a performance improvement for both classic and block themes: That's with 20 runs against the |
24d7ccd
to
81aabba
Compare
This file will need to be broken up into multiple files. |
Co-authored-by: Colin Stewart <[email protected]>
Co-authored-by: Peter Wilson <[email protected]>
Trac ticket: https://core.trac.wordpress.org/ticket/60414
This Pull Request is for code review only. Please keep all other discussion in the Trac ticket. Do not merge this Pull Request. See GitHub Pull Requests for Code Review in the Core Handbook for more details.