[wp-trac] [WordPress Trac] #28707: Expand WP_AUTO_UPDATE_CORE option to automatically do major+minor updates

WordPress Trac noreply at wordpress.org
Wed Jul 2 01:54:02 UTC 2014


#28707: Expand WP_AUTO_UPDATE_CORE option to automatically do major+minor updates
-----------------------------+------------------------------
 Reporter:  lovingboth       |       Owner:
     Type:  enhancement      |      Status:  closed
 Priority:  normal           |   Milestone:  Awaiting Review
Component:  Upgrade/Install  |     Version:  3.9.1
 Severity:  normal           |  Resolution:  invalid
 Keywords:  has-patch        |     Focuses:  administration
-----------------------------+------------------------------
Changes (by lovingboth):

 * status:  new => closed
 * resolution:   => invalid


Comment:

 Looking a bit more closely at the code, I wonder if it is the
 documentation that is at fault in implying that you can't already have
 major+minor upgrades without the dev ones:

 should_update_to_version..

 .. finds out the installed version
 .. and the latest offered version
 .. and whether the installed version is a dev version.

 It then defaults to
 {{{
 $upgrade_dev   = true;
 $upgrade_minor = true;
 $upgrade_major = false;
 }}}

 before processing WP_AUTO_UPDATE_CORE, which may change those.

 Then..
 {{{// 1: If we're already on that version, not much point in updating?}}}

 {{{// 2: If we're running a newer version, that's a nope}}}

 Also no if previous attempt failed.

 Then I now think that
 {{{if ( $current_is_development_version ) {}}}
 and the consequent filter and test of $upgrade_dev means that can only be
 true iff the current version is a development version.

 Otherwise, the minor and major updates are filtered and tested.

 Ahhh. You have to update to a dev version yourself before it will
 automatically update to (another) one. If I'm right, which I think I am as
 this is the behaviour if WP_AUTO_UPDATE_CORE isn't set, this ticket can be
 marked as invalid (there are no sensible circumstances where you would be
 using a dev version, and want updates to major+minor but not later dev
 versions, and if there are you are presumably smart enough to set the
 filters up to achieve that).

 I'll file a bug against the documentation which doesn't make this
 behaviour clear.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/28707#comment:4>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list