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

Check whether the 6.4 script-loader.php compat file should be removed in favor of the 6.5 one #58431

Closed
afercia opened this issue Jan 30, 2024 · 3 comments · Fixed by #58479
Closed
Assignees
Labels
[Package] Date /packages/date [Status] In Progress Tracking issues with work in progress [Type] Code Quality Issues or PRs that relate to code quality

Comments

@afercia
Copy link
Contributor

afercia commented Jan 30, 2024

Description

#56682 added a compat file lib/compat/wordpress-6.5/script-loader.php for the Wordpress 6.5 release.

I'm not very familiar with how copat files work @Mamaduka pointed out that:

There's already a gutenberg_update_wp_date_settings filter in WP 6.4; we should probably remove it to avoid double filtering.

And yes basically the new lib/compat/wordpress-6.5/script-loader.php file is the same of the 6.4 one with the only addition of one line. I'd appreciate someone more familiar with compat files than me to double check whether the 6,4 file should be removed. Cc @WordPress/gutenberg-core

Step-by-step reproduction instructions

Compare the filter callbacks gutenberg_update_wp_date_timezone_settings and gutenberg_update_wp_date_settings:

  • lib/compat/wordpress-6.5/script-loader.php
  • lib/compat/wordpress-6.4/script-loader.php
  • Also important: evaluate whether the change from fa802d1 needs to be added to the 6.5 comapt file

Screenshots, screen recording, code snippet

N/A

Environment info

No response

Please confirm that you have searched existing issues in the repo.

Yes

Please confirm that you have tested with all plugins deactivated except Gutenberg.

Yes

@afercia afercia added [Type] Code Quality Issues or PRs that relate to code quality [Package] Date /packages/date labels Jan 30, 2024
@ramonjd
Copy link
Member

ramonjd commented Jan 30, 2024

Thanks for creating this issue. 🙏🏻

In this case, when creating the 6.5 version of the filter, the 6.4 could have been moved into the 6.5 folder and updated from there.

What's important is backwards compatibility for folks running the plugin on older versions of WordPress.

So folks running the latest version of Gutenberg, and say, WordPress Core 6.3, will have all the plugin functionality ported to WordPress 6.4 and 6.5.

Also important: evaluate whether the change from fa802d1 needs to be added to the 6.5 comapt file

Yes! Thank you for bringing this to my attention.

I can get a Gutenberg PR up to do this.

@github-actions github-actions bot added the [Status] In Progress Tracking issues with work in progress label Jan 30, 2024
@ramonjd
Copy link
Member

ramonjd commented Jan 30, 2024

Merging compat files here:

@afercia The changes in #56682 will still need to be backported to Core for 6.5 if they haven't already. Thank you!

@afercia
Copy link
Contributor Author

afercia commented Jan 31, 2024

@ramonjd thanks for clarifying how compat files are supposed to work and for fixing it.
For core, I create a Trac ticket at https://core.trac.wordpress.org/ticket/60105

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Package] Date /packages/date [Status] In Progress Tracking issues with work in progress [Type] Code Quality Issues or PRs that relate to code quality
Projects
No open projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants