#37861 closed enhancement (fixed)
Renaming of class files for consistency
Reported by: | afragen | Owned by: | hellofromTonya |
---|---|---|---|
Milestone: | 6.1 | Priority: | normal |
Severity: | normal | Version: | |
Component: | Bootstrap/Load | Keywords: | has-patch |
Focuses: | coding-standards | Cc: |
Description
I'm not sure how relevant this is in general, but with #36335 shouldn't we at least follow the naming convention for the few class files left?
A quick glance shows
wp-includes/class.wp-dependencies.php
-> wp-includes/class-wp-dependencies.php
wp-includes/class.wp-scripts.php
-> wp-includes/class-wp-scripts.php
wp-includes/class.wp-styles.php
-> wp-includes/class-wp-styles.php
I'm not certain what type of breakage may occur, unless someone is loading these independently of core.
Attachments (1)
Change History (12)
#2
@
7 years ago
I am generally in favor of this, but I think we should at least scan the .org repository for any plugins including or requiring these files directly. If there are many, we need to properly communicate the change with enough notice.
#3
@
7 years ago
I think we'd just copy the files using svn (to keep the history) and then require the new ones inside the old files for back compat. That's what was done in the past when classes were moved to other files.
#5
@
2 years ago
- Focuses coding-standards added
- Milestone changed from Awaiting Review to 6.1
Hi there, thanks for the ticket!
It's worth noting that these files are also included in the BackPress library, which may or may not be relevant as it does not seem to be actively supported.
I don't have a strong opinion here, but if there is a general consensus that these should be renamed for consistency, might as well do it. Moving to 6.1 for discussion.
#6
@
2 years ago
- Keywords has-patch changes-requested added; dev-feedback removed
@SergeyBiryukov I agree +1. Let's get these filenames consistent.
To avoid things breaking in plugins, I'm +1 for @swissspidy suggestion:
I think we'd just copy the files using svn (to keep the history) and then require the new ones inside the old files for back compat. That's what was done in the past when classes were moved to other files.
That extra step has precedence and can mitigate risks for users who have a plugin, theme or script that includes any of these renamed files.
#7
follow-up:
↓ 8
@
2 years ago
- Owner set to hellofromTonya
- Status changed from new to accepted
I'll work on an updated patch tomorrow for consideration. Assigning ownership to me too to remind me (lol) and to help shepherd it forward in time for 6.1 feature freeze.
#8
in reply to:
↑ 7
@
2 years ago
Replying to hellofromTonya:
I'll work on an updated patch tomorrow for consideration. Assigning ownership to me to remind me (lol) and to help shepherd it forward in time for 6.1 feature freeze.
Great! Please note that svn mv
commands may not be properly reflected in a patch. See comment:33:ticket:47632 for a general procedure with these renamings.
Rename offending files and adapt all mentions