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

Warn if continue is used on switch #3364

Closed
wants to merge 1 commit into from

Conversation

nikic
Copy link
Member

@nikic nikic commented Jul 4, 2018

Supersedes PR #3323 and RFC https://wiki.php.net/rfc/continue_on_switch_deprecation by generating a warning instead of deprecating and removing this functionality.

Supersedes RFC https://wiki.php.net/rfc/continue_on_switch_deprecation
by generating a warning instead of deprecating and removing this
functionality.
@nikic
Copy link
Member Author

nikic commented Jul 7, 2018

Merged as 04e3523.

@nikic nikic closed this Jul 7, 2018
jrfnl added a commit to jrfnl/PHP_CodeSniffer that referenced this pull request Jul 8, 2018
As of PHP 7.3, using `continue` to target a `switch` control structure will throw an `E_WARNING`.

Applying `continue` to a `switch` is equivalent to using `break` and more often than not, a `continue` targeting a higher level control structure is actually intended.

To target the higher level control structure, a numeric argument has to be passed to `continue`.

Refs:
* php/php-src#3364
* https://wiki.php.net/rfc/continue_on_switch_deprecation

This change has been recently committed to PHP itself and will break the build against `nightly` for the current `master` already. See: https://travis-ci.org/jrfnl/PHP_CodeSniffer/jobs/401533444 (this branch, but without commits, so equal to the current `master`).

This PR fixes the instances of this in PHPCS.
All these switches are nested in other control structures, but end the switch end the scope closer of the outer control structure, so using `break` in these cases is equivalent to using `continue 2`.

FYI: The PHPCompatibility standard will include a sniff to detect this in the near future.
jrfnl added a commit to jrfnl/PHP_CodeSniffer that referenced this pull request Jul 9, 2018
As of PHP 7.3, using `continue` to target a `switch` control structure will throw an `E_WARNING`.

Applying `continue` to a `switch` is equivalent to using `break` and more often than not, a `continue` targeting a higher level control structure is actually intended.

To target the higher level control structure, a numeric argument has to be passed to `continue`.

Refs:
* php/php-src#3364
* https://wiki.php.net/rfc/continue_on_switch_deprecation

This change has been recently committed to PHP itself and will break the build against `nightly` for the current `master` already. See: https://travis-ci.org/jrfnl/PHP_CodeSniffer/jobs/401533444 (this branch, but without commits, so equal to the current `master`).

This PR fixes the instances of this in PHPCS.
All these switches are nested in other control structures, but end the switch end the scope closer of the outer control structure, so using `break` in these cases would be equivalent to using `continue 2`.

FYI: The PHPCompatibility standard will include a sniff to detect this in the near future.
@Majkl578
Copy link
Contributor

Majkl578 commented Jul 12, 2018

This is already causing some OSS build failures:
https://travis-ci.org/doctrine/doctrine2/jobs/402924948#L526-L545
squizlabs/PHP_CodeSniffer#2086

@nikic
Copy link
Member Author

nikic commented Jul 13, 2018

@Majkl578 Based on the PR, looks like it's working as intended ^^

@stronk7
Copy link

stronk7 commented Sep 20, 2018

Hi,

performing our earlier verifications with PHP 7.3 RC1 we faced this in a number of places. And it was a little hard (to me, at least), to find the roots of the change in the current documentation.

Finally I found it, and how this comes from this original RFC: https://wiki.php.net/rfc/continue_on_switch_deprecation

I'd suggest that some comment about this change (PR or RFC) is added to the https://wiki.php.net/rfc#php_73 list (or similar), so ppl can find and trace it easily.

Other than that, many thanks for the sweet hard work towards PHP 7.3, yay!

Ciao :-)

@Majkl578
Copy link
Contributor

@stronk7 It's documented in UPGRADING: https://github.com/php/php-src/blob/php-7.3.0RC1/UPGRADING#L47-L58

@stronk7
Copy link

stronk7 commented Sep 20, 2018

Aha, didn't see it, thanks!

nylen pushed a commit to nylen/wordpress-develop-svn that referenced this pull request Sep 23, 2018
… switch

Applying continue to a switch is equivalent to using break and quite possibly, a continue targeting a higher level control structure is actually intended.

To target the higher level control structure, a numeric argument has to be passed to continue. This fixes two cases in WordPress Core where this is currently happening.

See: php/php-src#3364
See: https://wiki.php.net/rfc/continue_on_switch_deprecation

Props jrf.
Fixes #44543.



git-svn-id: https://develop.svn.wordpress.org/trunk@43653 602fd350-edb4-49c9-b593-d223f7449a82
pento pushed a commit to WordPress/wordpress-develop that referenced this pull request Sep 23, 2018
… switch

Applying continue to a switch is equivalent to using break and quite possibly, a continue targeting a higher level control structure is actually intended.

To target the higher level control structure, a numeric argument has to be passed to continue. This fixes two cases in WordPress Core where this is currently happening.

See: php/php-src#3364
See: https://wiki.php.net/rfc/continue_on_switch_deprecation

Props jrf.
Fixes #44543.



git-svn-id: https://develop.svn.wordpress.org/trunk@43653 602fd350-edb4-49c9-b593-d223f7449a82
markjaquith pushed a commit to markjaquith/WordPress that referenced this pull request Sep 23, 2018
… switch

Applying continue to a switch is equivalent to using break and quite possibly, a continue targeting a higher level control structure is actually intended.

To target the higher level control structure, a numeric argument has to be passed to continue. This fixes two cases in WordPress Core where this is currently happening.

See: php/php-src#3364
See: https://wiki.php.net/rfc/continue_on_switch_deprecation

Props jrf.
Fixes #44543.


Built from https://develop.svn.wordpress.org/trunk@43653


git-svn-id: http://core.svn.wordpress.org/trunk@43482 1a063a9b-81f0-0310-95a4-ce76da25c4cd
gMagicScott pushed a commit to gMagicScott/core.wordpress-mirror that referenced this pull request Sep 23, 2018
… switch

Applying continue to a switch is equivalent to using break and quite possibly, a continue targeting a higher level control structure is actually intended.

To target the higher level control structure, a numeric argument has to be passed to continue. This fixes two cases in WordPress Core where this is currently happening.

See: php/php-src#3364
See: https://wiki.php.net/rfc/continue_on_switch_deprecation

Props jrf.
Fixes #44543.


Built from https://develop.svn.wordpress.org/trunk@43653


git-svn-id: https://core.svn.wordpress.org/trunk@43482 1a063a9b-81f0-0310-95a4-ce76da25c4cd
svn2github pushed a commit to svn2github/wp-svn-2-git that referenced this pull request Sep 24, 2018
… switch

Applying continue to a switch is equivalent to using break and quite possibly, a continue targeting a higher level control structure is actually intended.

To target the higher level control structure, a numeric argument has to be passed to continue. This fixes two cases in WordPress Core where this is currently happening.

See: php/php-src#3364
See: https://wiki.php.net/rfc/continue_on_switch_deprecation

Props jrf.
Fixes #44543.


Built from https://develop.svn.wordpress.org/trunk@43653


git-svn-id: http://core.svn.wordpress.org/trunk@43482 1a063a9b-81f0-0310-95a4-ce76da25c4cd
pento pushed a commit to WordPress/wordpress-develop that referenced this pull request Sep 24, 2018
…a switch.

Applying continue to a switch is equivalent to using break and quite possibly, a continue targeting a higher level control structure is actually intended.

To target the higher level control structure, a numeric argument has to be passed to continue. This fixes two cases in WordPress Core where this is currently happening.

See: php/php-src#3364
See: https://wiki.php.net/rfc/continue_on_switch_deprecation

Props jrf.
Merges [43653] to the 4.9 branch.
Fixes #44543.

git-svn-id: https://develop.svn.wordpress.org/branches/4.9@43656 602fd350-edb4-49c9-b593-d223f7449a82
markjaquith pushed a commit to markjaquith/WordPress that referenced this pull request Sep 24, 2018
…a switch.

Applying continue to a switch is equivalent to using break and quite possibly, a continue targeting a higher level control structure is actually intended.

To target the higher level control structure, a numeric argument has to be passed to continue. This fixes two cases in WordPress Core where this is currently happening.

See: php/php-src#3364
See: https://wiki.php.net/rfc/continue_on_switch_deprecation

Props jrf.
Merges [43653] to the 4.9 branch.
Fixes #44543.
Built from https://develop.svn.wordpress.org/branches/4.9@43656


git-svn-id: http://core.svn.wordpress.org/branches/4.9@43485 1a063a9b-81f0-0310-95a4-ce76da25c4cd
gMagicScott pushed a commit to gMagicScott/core.wordpress-mirror that referenced this pull request Sep 24, 2018
…a switch.

Applying continue to a switch is equivalent to using break and quite possibly, a continue targeting a higher level control structure is actually intended.

To target the higher level control structure, a numeric argument has to be passed to continue. This fixes two cases in WordPress Core where this is currently happening.

See: php/php-src#3364
See: https://wiki.php.net/rfc/continue_on_switch_deprecation

Props jrf.
Merges [43653] to the 4.9 branch.
Fixes #44543.
Built from https://develop.svn.wordpress.org/branches/4.9@43656


git-svn-id: https://core.svn.wordpress.org/branches/4.9@43485 1a063a9b-81f0-0310-95a4-ce76da25c4cd
miya0001 pushed a commit to cjk4wp/wordpress that referenced this pull request Sep 28, 2018
… switch

Applying continue to a switch is equivalent to using break and quite possibly, a continue targeting a higher level control structure is actually intended.

To target the higher level control structure, a numeric argument has to be passed to continue. This fixes two cases in WordPress Core where this is currently happening.

See: php/php-src#3364
See: https://wiki.php.net/rfc/continue_on_switch_deprecation

Props jrf.
Fixes #44543.



git-svn-id: http://develop.svn.wordpress.org/trunk@43653 602fd350-edb4-49c9-b593-d223f7449a82
pento pushed a commit to WordPress/wordpress-develop that referenced this pull request Oct 18, 2018
…a switch.

Applying continue to a switch is equivalent to using break and quite possibly, a continue targeting a higher level control structure is actually intended.

To target the higher level control structure, a numeric argument has to be passed to continue. This fixes two cases in WordPress Core where this is currently happening.

See: php/php-src#3364
See: https://wiki.php.net/rfc/continue_on_switch_deprecation

Props jrf.
Merges [43653] to the 5.0 branch.
Fixes #44543.

git-svn-id: https://develop.svn.wordpress.org/branches/5.0@43746 602fd350-edb4-49c9-b593-d223f7449a82
markjaquith pushed a commit to markjaquith/WordPress that referenced this pull request Oct 18, 2018
…a switch.

Applying continue to a switch is equivalent to using break and quite possibly, a continue targeting a higher level control structure is actually intended.

To target the higher level control structure, a numeric argument has to be passed to continue. This fixes two cases in WordPress Core where this is currently happening.

See: php/php-src#3364
See: https://wiki.php.net/rfc/continue_on_switch_deprecation

Props jrf.
Merges [43653] to the 5.0 branch.
Fixes #44543.
Built from https://develop.svn.wordpress.org/branches/5.0@43746


git-svn-id: http://core.svn.wordpress.org/branches/5.0@43575 1a063a9b-81f0-0310-95a4-ce76da25c4cd
gMagicScott pushed a commit to gMagicScott/core.wordpress-mirror that referenced this pull request Oct 18, 2018
…a switch.

Applying continue to a switch is equivalent to using break and quite possibly, a continue targeting a higher level control structure is actually intended.

To target the higher level control structure, a numeric argument has to be passed to continue. This fixes two cases in WordPress Core where this is currently happening.

See: php/php-src#3364
See: https://wiki.php.net/rfc/continue_on_switch_deprecation

Props jrf.
Merges [43653] to the 5.0 branch.
Fixes #44543.
Built from https://develop.svn.wordpress.org/branches/5.0@43746


git-svn-id: https://core.svn.wordpress.org/branches/5.0@43575 1a063a9b-81f0-0310-95a4-ce76da25c4cd
miya0001 pushed a commit to cjk4wp/wordpress that referenced this pull request Oct 25, 2018
…a switch.

Applying continue to a switch is equivalent to using break and quite possibly, a continue targeting a higher level control structure is actually intended.

To target the higher level control structure, a numeric argument has to be passed to continue. This fixes two cases in WordPress Core where this is currently happening.

See: php/php-src#3364
See: https://wiki.php.net/rfc/continue_on_switch_deprecation

Props jrf.
Merges [43653] to the 5.0 branch.
Fixes #44543.

git-svn-id: http://develop.svn.wordpress.org/branches/5.0@43746 602fd350-edb4-49c9-b593-d223f7449a82
miya0001 pushed a commit to cjk4wp/wordpress that referenced this pull request Oct 25, 2018
…a switch.

Applying continue to a switch is equivalent to using break and quite possibly, a continue targeting a higher level control structure is actually intended.

To target the higher level control structure, a numeric argument has to be passed to continue. This fixes two cases in WordPress Core where this is currently happening.

See: php/php-src#3364
See: https://wiki.php.net/rfc/continue_on_switch_deprecation

Props jrf.
Merges [43653] to the 4.9 branch.
Fixes #44543.

git-svn-id: http://develop.svn.wordpress.org/branches/4.9@43656 602fd350-edb4-49c9-b593-d223f7449a82
ramazantufekci pushed a commit to ramazantufekci/github-move that referenced this pull request Nov 28, 2018
…a switch.

Applying continue to a switch is equivalent to using break and quite possibly, a continue targeting a higher level control structure is actually intended.

To target the higher level control structure, a numeric argument has to be passed to continue. This fixes two cases in WordPress Core where this is currently happening.

See: php/php-src#3364
See: https://wiki.php.net/rfc/continue_on_switch_deprecation

Props jrf.
Merges [43653] to the 5.0 branch.
Fixes #44543.
Built from https://develop.svn.wordpress.org/branches/5.0@43746
ramazantufekci pushed a commit to ramazantufekci/github-move that referenced this pull request Nov 28, 2018
…a switch.

Applying continue to a switch is equivalent to using break and quite possibly, a continue targeting a higher level control structure is actually intended.

To target the higher level control structure, a numeric argument has to be passed to continue. This fixes two cases in WordPress Core where this is currently happening.

See: php/php-src#3364
See: https://wiki.php.net/rfc/continue_on_switch_deprecation

Props jrf.
Merges [43653] to the 4.9 branch.
Fixes #44543.
Built from https://develop.svn.wordpress.org/branches/4.9@43656
nylen pushed a commit to ClassicPress/ClassicPress that referenced this pull request Dec 16, 2018
…a switch.

Applying continue to a switch is equivalent to using break and quite possibly, a continue targeting a higher level control structure is actually intended.

To target the higher level control structure, a numeric argument has to be passed to continue. This fixes two cases in WordPress Core where this is currently happening.

See: php/php-src#3364
See: https://wiki.php.net/rfc/continue_on_switch_deprecation

Props jrf.
Merges [43653] to the 4.9 branch.
Fixes #44543.

git-svn-id: https://develop.svn.wordpress.org/branches/4.9@43656 602fd350-edb4-49c9-b593-d223f7449a82
nylen added a commit to ClassicPress/ClassicPress that referenced this pull request Dec 16, 2018
- Merges https://core.trac.wordpress.org/changeset/43600 / WordPress/wordpress-develop@216ff772 to ClassicPress.
- Merges https://core.trac.wordpress.org/changeset/43610 / WordPress/wordpress-develop@89caf3bd to ClassicPress.
- Merges https://core.trac.wordpress.org/changeset/43612 / WordPress/wordpress-develop@1da5a8ba to ClassicPress.
- Merges https://core.trac.wordpress.org/changeset/43613 / WordPress/wordpress-develop@90b39a69 to ClassicPress.
- Merges https://core.trac.wordpress.org/changeset/43615 / WordPress/wordpress-develop@6a09c56c to ClassicPress.
- Merges https://core.trac.wordpress.org/changeset/43618 / WordPress/wordpress-develop@0839d324 to ClassicPress.
- Merges https://core.trac.wordpress.org/changeset/43621 / WordPress/wordpress-develop@e4afee35 to ClassicPress.
- Merges https://core.trac.wordpress.org/changeset/43625 / WordPress/wordpress-develop@9e8090fc to ClassicPress.
- Merges https://core.trac.wordpress.org/changeset/43626 / WordPress/wordpress-develop@4c6175e8 to ClassicPress.
- Merges https://core.trac.wordpress.org/changeset/43637 / WordPress/wordpress-develop@e44849ec to ClassicPress.
- Merges https://core.trac.wordpress.org/changeset/43639 / WordPress/wordpress-develop@13bd9541 to ClassicPress.
- Merges https://core.trac.wordpress.org/changeset/43646 / WordPress/wordpress-develop@c50b216b to ClassicPress.
- Merges https://core.trac.wordpress.org/changeset/43649 / WordPress/wordpress-develop@830632f7 to ClassicPress.
- Merges https://core.trac.wordpress.org/changeset/43656 / WordPress/wordpress-develop@b297a030 to ClassicPress.
- Merges https://core.trac.wordpress.org/changeset/43989 / WordPress/wordpress-develop@ff58a699 to ClassicPress.
- Merges https://core.trac.wordpress.org/changeset/43997 / WordPress/wordpress-develop@4a807b3c to ClassicPress.
- Merges https://core.trac.wordpress.org/changeset/44020 / WordPress/wordpress-develop@17759410 to ClassicPress.
- Merges https://core.trac.wordpress.org/changeset/44024 / WordPress/wordpress-develop@7a7e1ad9 to ClassicPress.
- Merges https://core.trac.wordpress.org/changeset/44051 / WordPress/wordpress-develop@07c82a28 to ClassicPress.
- Merges https://core.trac.wordpress.org/changeset/44053 / WordPress/wordpress-develop@fb09f6d1 to ClassicPress.
- Merges https://core.trac.wordpress.org/changeset/44078 / WordPress/wordpress-develop@e908aa36 to ClassicPress.

Squashed commit of the following:

commit 18cba74
Author: James Nylen <jnylen@gmail.com>
Date:   Sun Dec 16 00:07:43 2018 -0500

    Improve description of new function

    The previous description implies a whitelist, which is not what the
    function code actually does.

commit 9d82cd7
Author: James Nylen <jnylen@gmail.com>
Date:   Sat Dec 15 23:51:31 2018 -0500

    Revert "Customize: Revert [43575] from the 4.9 branch."

    This reverts commit 8abdb45.

    ClassicPress note: The commit that was reverted here is the last commit
    we took from WP in the 4.9 branch, tagged as `LAST_WP_COMMIT`.  We'll
    keep it.

commit de76674
Author: James Nylen <jnylen@gmail.com>
Date:   Sat Dec 15 21:57:34 2018 -0500

    Change `@ since WP-5.0.1` to `WP-4.9.9`

    ClassicPress note: Sloppy patches

commit 8fd09b5
Author: Simon Prosser <pross@pross.org.uk>
Date:   Thu Dec 13 18:19:18 2018 +0000

    Prefix WP versions in comments.

commit 402d0fa
Author: Jeremy Felt <jeremyfelt@git.wordpress.org>
Date:   Thu Dec 13 02:10:55 2018 +0000

    Bump 4.9 branch to version 4.9.9.

    git-svn-id: https://develop.svn.wordpress.org/branches/4.9@44078 602fd350-edb4-49c9-b593-d223f7449a82

commit 5c89b3e
Author: Gary Pendergast <pento@git.wordpress.org>
Date:   Thu Dec 13 01:37:30 2018 +0000

    Editor: Remove unwanted fields before saving posts.

    The `meta_input`, `file`, and `guid` fields are not intended to be updated through user input.

    Merges [44047] to the 4.9 branch.

    git-svn-id: https://develop.svn.wordpress.org/branches/4.9@44053 602fd350-edb4-49c9-b593-d223f7449a82

commit 909f775
Author: Peter Wilson <peterwilsoncc@git.wordpress.org>
Date:   Thu Dec 13 01:32:07 2018 +0000

    Multisite: Validate activation links.

    Merges [44048] to the 4.9 branch.

    git-svn-id: https://develop.svn.wordpress.org/branches/4.9@44051 602fd350-edb4-49c9-b593-d223f7449a82

commit f395a38
Author: Peter Wilson <peterwilsoncc@git.wordpress.org>
Date:   Thu Dec 13 00:33:05 2018 +0000

    Multisite: Improve messaging for previously activated users.

    Ensure activation of a site is not attempted multiple times and users are shown the correct message if they follow the link a second time.

    Merges [44021] to the 4.9 branch.

    git-svn-id: https://develop.svn.wordpress.org/branches/4.9@44024 602fd350-edb4-49c9-b593-d223f7449a82

commit dc422da
Author: Ian Dunn <iandunn@git.wordpress.org>
Date:   Thu Dec 13 00:13:03 2018 +0000

    KSES: Make the URI attributes DRY.

    This commit introduces the `wp_kses_uri_attributes` function and filter. The function centralizes the list of attributes, in order to prevent inconsistency, and the filter provides a way for plugins to customize the attributes.

    Merges [44014] and [44017] to the `4.9` branch.

    git-svn-id: https://develop.svn.wordpress.org/branches/4.9@44020 602fd350-edb4-49c9-b593-d223f7449a82

commit a7431b3
Author: Gary Pendergast <pento@git.wordpress.org>
Date:   Wed Dec 12 23:16:14 2018 +0000

    KSES: Conditionally remove the `<form>` element from `$allowedposttags`.

    To avoid backwards compatibility issues, `<form>` is re-added if a custom filter has added the `<input>` or `<select>` elements to `$allowedposttags`.

    Merges [43994] to the 4.9 branch.

    git-svn-id: https://develop.svn.wordpress.org/branches/4.9@43997 602fd350-edb4-49c9-b593-d223f7449a82

commit 70fe725
Author: Jeremy Felt <jeremyfelt@git.wordpress.org>
Date:   Wed Dec 12 23:02:11 2018 +0000

    Media: Improve verification of MIME file types.

    Merges [43988] to the 4.9 branch.

    git-svn-id: https://develop.svn.wordpress.org/branches/4.9@43989 602fd350-edb4-49c9-b593-d223f7449a82

commit 0cccbbd
Author: Peter Wilson <peterwilsoncc@git.wordpress.org>
Date:   Thu Nov 29 21:20:40 2018 +0000

    Media: Revert [43602] from the 4.9 branch.

    Reverts changes to the "Edit more details" link in the attachment details modal.

    This is out of scope for 4.9.9 and will be re-introduced in 5.0.0.

    Fixes #44620.

    git-svn-id: https://develop.svn.wordpress.org/branches/4.9@43948 602fd350-edb4-49c9-b593-d223f7449a82

commit b9af4f8
Author: Sergey Biryukov <sergeybiryukov@git.wordpress.org>
Date:   Thu Oct 11 07:15:22 2018 +0000

    REST API: Revert [43648] from the 4.9 branch.

    This change is out of the 4.9.x scope, and will be reintroduced in 5.0.x.

    See #40510.

    git-svn-id: https://develop.svn.wordpress.org/branches/4.9@43715 602fd350-edb4-49c9-b593-d223f7449a82

commit 505bd98
Author: Sergey Biryukov <sergeybiryukov@git.wordpress.org>
Date:   Thu Oct 11 04:41:28 2018 +0000

    Taxonomy: Revert [43620] from the 4.9 branch.

    This change is out of the 4.9.x scope, and will be reintroduced in 5.0.x.

    See #44872.

    git-svn-id: https://develop.svn.wordpress.org/branches/4.9@43711 602fd350-edb4-49c9-b593-d223f7449a82

commit 93162a0
Author: Sergey Biryukov <sergeybiryukov@git.wordpress.org>
Date:   Thu Oct 11 04:22:05 2018 +0000

    Privacy: Revert [43624] from the 4.9 branch.

    This change is out of the 4.9.x scope, and will be reintroduced in 5.0.x.

    See #44685.

    git-svn-id: https://develop.svn.wordpress.org/branches/4.9@43708 602fd350-edb4-49c9-b593-d223f7449a82

commit 142741d
Author: Sergey Biryukov <sergeybiryukov@git.wordpress.org>
Date:   Thu Oct 11 04:17:00 2018 +0000

    Posts, Post Types: Revert [43617] from the 4.9 branch.

    This change is out of the 4.9.x scope, and will be reintroduced in 5.0.x.

    See #34706.

    git-svn-id: https://develop.svn.wordpress.org/branches/4.9@43707 602fd350-edb4-49c9-b593-d223f7449a82

commit 517b28a
Author: Sergey Biryukov <sergeybiryukov@git.wordpress.org>
Date:   Thu Oct 11 04:03:23 2018 +0000

    Privacy: Revert [43614] from the 4.9 branch.

    This change is out of the 4.9.x scope, and will be reintroduced in 5.0.x.

    See #43985.

    git-svn-id: https://develop.svn.wordpress.org/branches/4.9@43705 602fd350-edb4-49c9-b593-d223f7449a82

commit cdc8f36
Author: Sergey Biryukov <sergeybiryukov@git.wordpress.org>
Date:   Thu Oct 11 03:52:44 2018 +0000

    Customize: Revert [43619] from the 4.9 branch.

    This change is out of the 4.9.x scope, and will be reintroduced in 5.0.x.

    See #44809.

    git-svn-id: https://develop.svn.wordpress.org/branches/4.9@43702 602fd350-edb4-49c9-b593-d223f7449a82

commit b92ba75
Author: Sergey Biryukov <sergeybiryukov@git.wordpress.org>
Date:   Thu Oct 11 03:47:44 2018 +0000

    Customize: Revert [43611] from the 4.9 branch.

    This change is out of the 4.9.x scope, and will be reintroduced in 5.0.x.

    See #44770.

    git-svn-id: https://develop.svn.wordpress.org/branches/4.9@43701 602fd350-edb4-49c9-b593-d223f7449a82

commit 8abdb45
Author: Sergey Biryukov <sergeybiryukov@git.wordpress.org>
Date:   Thu Oct 11 03:40:50 2018 +0000

    Customize: Revert [43575] from the 4.9 branch.

    This change is out of the 4.9.x scope, and will be reintroduced in 5.0.x.

    See #44763.

    git-svn-id: https://develop.svn.wordpress.org/branches/4.9@43699 602fd350-edb4-49c9-b593-d223f7449a82

commit e910344
Author: Sergey Biryukov <sergeybiryukov@git.wordpress.org>
Date:   Thu Oct 11 03:29:54 2018 +0000

    Twenty Sixteen: Revert [43607] from the 4.9 branch.

    This change is out of the 4.9.x scope, and will be reintroduced in 5.1.x.

    See #44668.

    git-svn-id: https://develop.svn.wordpress.org/branches/4.9@43698 602fd350-edb4-49c9-b593-d223f7449a82

commit 6d37d84
Author: Boone Gorges <boonebgorges@git.wordpress.org>
Date:   Tue Oct 9 18:17:32 2018 +0000

    Revert [43632] from the 4.9 branch.

    These new hooks are not part of the 4.9.x scope, and will be reintroduced
    as part of 5.0.x.

    See #44733.

    git-svn-id: https://develop.svn.wordpress.org/branches/4.9@43690 602fd350-edb4-49c9-b593-d223f7449a82

commit f73dcf0
Author: Adam Silverstein <adamsilverstein@git.wordpress.org>
Date:   Fri Oct 5 14:50:31 2018 +0000

    Try Gutenberg callout: improve formatting for Internet Explorer 11.

    ClassicPress note: Commit ignored except for minor cleanup.

    Correct an issue where the layout of the "Try Gutenberg" callout added in #41316 falls apart under IE11.

    Props kjellr, ianbelanger, pbiron, Luciano Croce, belcherj, ryansommers.
    Fixes #44742.

    git-svn-id: https://develop.svn.wordpress.org/branches/4.9@43674 602fd350-edb4-49c9-b593-d223f7449a82

commit 362e7eb
Author: Sergey Biryukov <sergeybiryukov@git.wordpress.org>
Date:   Mon Sep 24 20:04:56 2018 +0000

    General: PHP 7.3 throws an `E_WARNING` when using continue to target a switch.

    Applying continue to a switch is equivalent to using break and quite possibly, a continue targeting a higher level control structure is actually intended.

    To target the higher level control structure, a numeric argument has to be passed to continue. This fixes two cases in WordPress Core where this is currently happening.

    See: php/php-src#3364
    See: https://wiki.php.net/rfc/continue_on_switch_deprecation

    Props jrf.
    Merges [43653] to the 4.9 branch.
    Fixes #44543.

    git-svn-id: https://develop.svn.wordpress.org/branches/4.9@43656 602fd350-edb4-49c9-b593-d223f7449a82

commit d59f3d8
Author: Mike Schroder <mikeschroder@git.wordpress.org>
Date:   Tue Sep 18 22:01:25 2018 +0000

    Media: In WP_Image_Editor::make_image(), close previously opened output buffer if the file could not be created.

    In addition to the merge noted below, includes important brackets added in [42343].

    Props dhanendran, gnif, sergey.
    Merges [42695] and [42702] to the 4.9 branch.
    Fixes #43255.

    git-svn-id: https://develop.svn.wordpress.org/branches/4.9@43649 602fd350-edb4-49c9-b593-d223f7449a82

commit b46776d
Author: Sergey Biryukov <sergeybiryukov@git.wordpress.org>
Date:   Tue Sep 18 03:54:20 2018 +0000

    REST API: Support pagination, order, search and other common query parameters for revisions.

    The original REST API revisions controller relied on `wp_get_post_revisions()`, getting all revisions of a post without any possibility to restrict the result. This changeset replaces that function call with a proper `WP_Query` setup, replicating how `wp_get_post_revisions()` works while offering parameters to alter the default behavior.

    Props adamsilverstein, birgire, flixos90.
    Merges [43584-43586], [43647] to the 4.9 branch.
    Fixes #40510.

    git-svn-id: https://develop.svn.wordpress.org/branches/4.9@43648 602fd350-edb4-49c9-b593-d223f7449a82

commit 8c3eeee
Author: Sergey Biryukov <sergeybiryukov@git.wordpress.org>
Date:   Tue Sep 18 03:29:41 2018 +0000

    Tests: Improve coverage for REST API term meta registration.

    Introduce tests to validate that register_meta and register_term_meta work as expected in WP_REST_Terms_Controller.

    Props timmydcrawford.
    Merges [43567] to the 4.9 branch.
    See #39122.

    git-svn-id: https://develop.svn.wordpress.org/branches/4.9@43646 602fd350-edb4-49c9-b593-d223f7449a82

commit 3eb2845
Author: Sergey Biryukov <sergeybiryukov@git.wordpress.org>
Date:   Thu Sep 13 10:21:19 2018 +0000

    Docs: Correct `@since` value for `_wp_privacy_statuses()`.

    Fix typo in `@since` entry for `WP_Privacy_Policy_Content:add()`.

    Props dimadin.
    Merges [43638] to the 4.9 branch.
    Fixes #44915.

    git-svn-id: https://develop.svn.wordpress.org/branches/4.9@43639 602fd350-edb4-49c9-b593-d223f7449a82

commit 54462de
Author: Sergey Biryukov <sergeybiryukov@git.wordpress.org>
Date:   Thu Sep 13 09:52:47 2018 +0000

    REST API: Pass correct ID to `meta->update_value` to permit setting term meta during term creation.

    Props joehoyle.
    Merges [43636] to the 4.9 branch.
    Fixes #44834.

    git-svn-id: https://develop.svn.wordpress.org/branches/4.9@43637 602fd350-edb4-49c9-b593-d223f7449a82

commit 40e6a29
Author: Sergey Biryukov <sergeybiryukov@git.wordpress.org>
Date:   Thu Sep 6 07:50:29 2018 +0000

    Taxonomy: Introduce new hooks when registering/unregistering taxonomies for object types.

    Props soulseekah.
    Merges [43558] and [43631] to the 4.9 branch.
    Fixes #44733.

    git-svn-id: https://develop.svn.wordpress.org/branches/4.9@43632 602fd350-edb4-49c9-b593-d223f7449a82

commit 5923e83
Author: Sergey Biryukov <sergeybiryukov@git.wordpress.org>
Date:   Mon Sep 3 21:55:42 2018 +0000

    Tests: Introduce `Tests_HTTP_Functions::skipTestOnTimeout()`, mirroring the same `WP_HTTP_UnitTestCase` method.

    Merges [43512] to the 4.9 branch.
    Fixes #44613.

    git-svn-id: https://develop.svn.wordpress.org/branches/4.9@43626 602fd350-edb4-49c9-b593-d223f7449a82

commit cc9cbe0
Author: Sergey Biryukov <sergeybiryukov@git.wordpress.org>
Date:   Mon Sep 3 21:52:48 2018 +0000

    Tests: Use `WP_HTTP_UnitTestCase::skipTestOnTimeout()` in more HTTP tests.

    Adjust it to handle more types of timeouts, e.g. "Resolving timed out", "Connection timed out".

    Merges [43511] to the 4.9 branch.
    See #44613.

    git-svn-id: https://develop.svn.wordpress.org/branches/4.9@43625 602fd350-edb4-49c9-b593-d223f7449a82

commit 3f13fef
Author: Sergey Biryukov <sergeybiryukov@git.wordpress.org>
Date:   Mon Sep 3 21:46:48 2018 +0000

    Privacy: When clicking a confirmation link for a privacy request, return a `WP_Error` object if the link has expired.

    Returning a string caused a success message to be displayed instead of the correct error message.

    Props desrosj.
    Merges [43623] to the 4.9 branch.
    Fixes #44685.

    git-svn-id: https://develop.svn.wordpress.org/branches/4.9@43624 602fd350-edb4-49c9-b593-d223f7449a82

commit 8e65294
Author: Sergey Biryukov <sergeybiryukov@git.wordpress.org>
Date:   Mon Sep 3 21:25:53 2018 +0000

    Docs: Correct param documentation for `WP_Term_Query`.

    The description of `$meta_type` introduced in [40053] was incorrect.

    Props dlh.
    Merges [43559] to the 4.9 branch.
    Fixes #44608.

    git-svn-id: https://develop.svn.wordpress.org/branches/4.9@43621 602fd350-edb4-49c9-b593-d223f7449a82

commit 94699ba
Author: Sergey Biryukov <sergeybiryukov@git.wordpress.org>
Date:   Mon Sep 3 21:23:26 2018 +0000

    Taxonomy: Make sure `wp_list_categories()` correctly outputs term name of `0`.

    Props joyously, SergeyBiryukov.
    Merges [43605] to the 4.9 branch.
    Fixes #44872.

    git-svn-id: https://develop.svn.wordpress.org/branches/4.9@43620 602fd350-edb4-49c9-b593-d223f7449a82

commit 726f99a
Author: Sergey Biryukov <sergeybiryukov@git.wordpress.org>
Date:   Mon Sep 3 21:20:58 2018 +0000

    Customize: Safeguard a check on the `customize_validate_{$setting_id}` filter value to ensure it is a `WP_Error`.

    While the filter is documented to only support a `WP_Error`, it has been a common practice to return true in a validation function if no errors have occurred. This was already caught when the same filter was executed in `WP_Customize_Setting`, it was however missing in `WP_Customize_Manager::validate_setting_values()`.

    Props flixos90.
    Merges [43578] to the 4.9 branch.
    Fixes #44809.

    git-svn-id: https://develop.svn.wordpress.org/branches/4.9@43619 602fd350-edb4-49c9-b593-d223f7449a82

commit ec100d4
Author: Sergey Biryukov <sergeybiryukov@git.wordpress.org>
Date:   Mon Sep 3 21:16:27 2018 +0000

    Script loader: remove (PHP based) compression from `load-styles.php` and `load-scripts.php`. WIth the amount of scripts and stylesheets grown a lot over the years, it has become pretty slow and consumes a lot of server resources. Also, most servers are set to compress PHP output anyway.

    Props LucasRolff, azaozz.
    Merges [43580] to the 4.9 branch.
    Fixes #44815. See #43308.

    git-svn-id: https://develop.svn.wordpress.org/branches/4.9@43618 602fd350-edb4-49c9-b593-d223f7449a82

commit 21c48c2
Author: Sergey Biryukov <sergeybiryukov@git.wordpress.org>
Date:   Mon Sep 3 21:11:38 2018 +0000

    Posts, Post Types: Introduce `edit_post_{$post->post_type}` hook.

    The hook fires before the general `edit_post` hook and has the same parameters.

    It also complements the `save_post_{$post->post_type}` hook added in [25050].

    Props Mte90, garrett-eclipse.
    Merges [43535] and [43616] to the 4.9 branch.
    Fixes #34706.

    git-svn-id: https://develop.svn.wordpress.org/branches/4.9@43617 602fd350-edb4-49c9-b593-d223f7449a82

commit 7abbd0f
Author: Sergey Biryukov <sergeybiryukov@git.wordpress.org>
Date:   Mon Sep 3 21:03:12 2018 +0000

    Docs: Correct parameter type for `WP_Privacy_Policy_Content::notice()`.

    Props burhandodhy.
    Merges [43609] to the 4.9 branch.
    Fixes #44877.

    git-svn-id: https://develop.svn.wordpress.org/branches/4.9@43615 602fd350-edb4-49c9-b593-d223f7449a82

commit 5518be7
Author: Sergey Biryukov <sergeybiryukov@git.wordpress.org>
Date:   Mon Sep 3 21:00:16 2018 +0000

    Privacy: Ensure the user request email is sent in the requested user's locale (or the site's default locale if they are not a registered user) when the administrator creating the request uses a different locale.

    Props desrosj, Chouby, iandunn, lbenicio, birgire, earnjam, swissspidy, garrett-eclipse.
    Merges [43568] to the 4.9 branch.
    Fixes #43985.

    git-svn-id: https://develop.svn.wordpress.org/branches/4.9@43614 602fd350-edb4-49c9-b593-d223f7449a82

commit 7e2c480
Author: Sergey Biryukov <sergeybiryukov@git.wordpress.org>
Date:   Mon Sep 3 20:59:10 2018 +0000

    Tests: Add case for `wp_privacy_delete_old_export_files()`.

    Props allendav.
    Merges [43292] to the 4.9 branch.
    See #43546.

    git-svn-id: https://develop.svn.wordpress.org/branches/4.9@43613 602fd350-edb4-49c9-b593-d223f7449a82

commit f9c1452
Author: Sergey Biryukov <sergeybiryukov@git.wordpress.org>
Date:   Mon Sep 3 20:58:08 2018 +0000

    Tests: Add case for `wp_privacy_send_personal_data_export_email()`.

    Props birgire.
    Merges [43291] to the 4.9 branch.
    See #43546.

    git-svn-id: https://develop.svn.wordpress.org/branches/4.9@43612 602fd350-edb4-49c9-b593-d223f7449a82

commit 84854dc
Author: Sergey Biryukov <sergeybiryukov@git.wordpress.org>
Date:   Mon Sep 3 20:51:01 2018 +0000

    Customize: Pass missing parameter to dynamic `option_{$option}` filter in `WP_Customize_Widgets::capture_filter_pre_get_option()`.

    Props dlh.
    Fixes #44770.

    git-svn-id: https://develop.svn.wordpress.org/branches/4.9@43611 602fd350-edb4-49c9-b593-d223f7449a82

commit 0ecadb7
Author: Sergey Biryukov <sergeybiryukov@git.wordpress.org>
Date:   Mon Sep 3 20:49:20 2018 +0000

    Docs: Convert `@see` reference in `wp_checkdate()` DocBlock to `@link`.

    Props WiZZarD_.
    Merges [43599] to the 4.9 branch.
    Fixes #44866.

    git-svn-id: https://develop.svn.wordpress.org/branches/4.9@43610 602fd350-edb4-49c9-b593-d223f7449a82

commit c506642
Author: Peter Wilson <peterwilsoncc@git.wordpress.org>
Date:   Mon Sep 3 01:31:22 2018 +0000

    Twenty Sixteen: Add pre-connect resource hint for Google Fonts.

    When using Google Fonts, pre-connect to https://fonts.gstatic.com to improve the performance downloading the webfont files.

    Props westonruter.
    Merges [43606] to the 4.9 branch.
    Fixes #44668.

    git-svn-id: https://develop.svn.wordpress.org/branches/4.9@43607 602fd350-edb4-49c9-b593-d223f7449a82

commit 2cdf092
Author: John Blackbourn <johnbillion@git.wordpress.org>
Date:   Fri Aug 31 10:52:32 2018 +0000

    Media: Ensure the "Edit more details" link in the attachment details modal always points to the correct editing URL.

    Fixes #44620

    Merges [43601] to the 4.9 branch.

    git-svn-id: https://develop.svn.wordpress.org/branches/4.9@43602 602fd350-edb4-49c9-b593-d223f7449a82

commit e24f825
Author: Sergey Biryukov <sergeybiryukov@git.wordpress.org>
Date:   Fri Aug 31 06:28:27 2018 +0000

    Embeds: Avoid a JS error in `wp.receiveEmbedMessage` if `data` parameter is not set.

    Props dsifford, kadamwhite.
    Merges [43593] and [43597] to the 4.9 branch.
    Fixes #44832.

    git-svn-id: https://develop.svn.wordpress.org/branches/4.9@43600 602fd350-edb4-49c9-b593-d223f7449a82
nylen added a commit to ClassicPress/ClassicPress that referenced this pull request Dec 18, 2018
- Merges https://core.trac.wordpress.org/changeset/43600 / WordPress/wordpress-develop@216ff772 to ClassicPress.
- Merges https://core.trac.wordpress.org/changeset/43610 / WordPress/wordpress-develop@89caf3bd to ClassicPress.
- Merges https://core.trac.wordpress.org/changeset/43612 / WordPress/wordpress-develop@1da5a8ba to ClassicPress.
- Merges https://core.trac.wordpress.org/changeset/43613 / WordPress/wordpress-develop@90b39a69 to ClassicPress.
- Merges https://core.trac.wordpress.org/changeset/43615 / WordPress/wordpress-develop@6a09c56c to ClassicPress.
- Merges https://core.trac.wordpress.org/changeset/43618 / WordPress/wordpress-develop@0839d324 to ClassicPress.
- Merges https://core.trac.wordpress.org/changeset/43621 / WordPress/wordpress-develop@e4afee35 to ClassicPress.
- Merges https://core.trac.wordpress.org/changeset/43625 / WordPress/wordpress-develop@9e8090fc to ClassicPress.
- Merges https://core.trac.wordpress.org/changeset/43626 / WordPress/wordpress-develop@4c6175e8 to ClassicPress.
- Merges https://core.trac.wordpress.org/changeset/43637 / WordPress/wordpress-develop@e44849ec to ClassicPress.
- Merges https://core.trac.wordpress.org/changeset/43639 / WordPress/wordpress-develop@13bd9541 to ClassicPress.
- Merges https://core.trac.wordpress.org/changeset/43646 / WordPress/wordpress-develop@c50b216b to ClassicPress.
- Merges https://core.trac.wordpress.org/changeset/43649 / WordPress/wordpress-develop@830632f7 to ClassicPress.
- Merges https://core.trac.wordpress.org/changeset/43656 / WordPress/wordpress-develop@b297a030 to ClassicPress.
- Merges https://core.trac.wordpress.org/changeset/43989 / WordPress/wordpress-develop@ff58a699 to ClassicPress.
- Merges https://core.trac.wordpress.org/changeset/43997 / WordPress/wordpress-develop@4a807b3c to ClassicPress.
- Merges https://core.trac.wordpress.org/changeset/44020 / WordPress/wordpress-develop@17759410 to ClassicPress.
- Merges https://core.trac.wordpress.org/changeset/44024 / WordPress/wordpress-develop@7a7e1ad9 to ClassicPress.
- Merges https://core.trac.wordpress.org/changeset/44051 / WordPress/wordpress-develop@07c82a28 to ClassicPress.
- Merges https://core.trac.wordpress.org/changeset/44053 / WordPress/wordpress-develop@fb09f6d1 to ClassicPress.
- Merges https://core.trac.wordpress.org/changeset/44078 / WordPress/wordpress-develop@e908aa36 to ClassicPress.
- Fixes #282.
- Props @Pross.

Squashed commit of the following:

commit 18cba74
Author: James Nylen <jnylen@gmail.com>
Date:   Sun Dec 16 00:07:43 2018 -0500

    Improve description of new function

    The previous description implies a whitelist, which is not what the
    function code actually does.

commit 9d82cd7
Author: James Nylen <jnylen@gmail.com>
Date:   Sat Dec 15 23:51:31 2018 -0500

    Revert "Customize: Revert [43575] from the 4.9 branch."

    This reverts commit 8abdb45.

    ClassicPress note: The commit that was reverted here is the last commit
    we took from WP in the 4.9 branch, tagged as `LAST_WP_COMMIT`.  We'll
    keep it.

commit de76674
Author: James Nylen <jnylen@gmail.com>
Date:   Sat Dec 15 21:57:34 2018 -0500

    Change `@ since WP-5.0.1` to `WP-4.9.9`

    ClassicPress note: Sloppy patches

commit 8fd09b5
Author: Simon Prosser <pross@pross.org.uk>
Date:   Thu Dec 13 18:19:18 2018 +0000

    Prefix WP versions in comments.

commit 402d0fa
Author: Jeremy Felt <jeremyfelt@git.wordpress.org>
Date:   Thu Dec 13 02:10:55 2018 +0000

    Bump 4.9 branch to version 4.9.9.

    git-svn-id: https://develop.svn.wordpress.org/branches/4.9@44078 602fd350-edb4-49c9-b593-d223f7449a82

commit 5c89b3e
Author: Gary Pendergast <pento@git.wordpress.org>
Date:   Thu Dec 13 01:37:30 2018 +0000

    Editor: Remove unwanted fields before saving posts.

    The `meta_input`, `file`, and `guid` fields are not intended to be updated through user input.

    Merges [44047] to the 4.9 branch.

    git-svn-id: https://develop.svn.wordpress.org/branches/4.9@44053 602fd350-edb4-49c9-b593-d223f7449a82

commit 909f775
Author: Peter Wilson <peterwilsoncc@git.wordpress.org>
Date:   Thu Dec 13 01:32:07 2018 +0000

    Multisite: Validate activation links.

    Merges [44048] to the 4.9 branch.

    git-svn-id: https://develop.svn.wordpress.org/branches/4.9@44051 602fd350-edb4-49c9-b593-d223f7449a82

commit f395a38
Author: Peter Wilson <peterwilsoncc@git.wordpress.org>
Date:   Thu Dec 13 00:33:05 2018 +0000

    Multisite: Improve messaging for previously activated users.

    Ensure activation of a site is not attempted multiple times and users are shown the correct message if they follow the link a second time.

    Merges [44021] to the 4.9 branch.

    git-svn-id: https://develop.svn.wordpress.org/branches/4.9@44024 602fd350-edb4-49c9-b593-d223f7449a82

commit dc422da
Author: Ian Dunn <iandunn@git.wordpress.org>
Date:   Thu Dec 13 00:13:03 2018 +0000

    KSES: Make the URI attributes DRY.

    This commit introduces the `wp_kses_uri_attributes` function and filter. The function centralizes the list of attributes, in order to prevent inconsistency, and the filter provides a way for plugins to customize the attributes.

    Merges [44014] and [44017] to the `4.9` branch.

    git-svn-id: https://develop.svn.wordpress.org/branches/4.9@44020 602fd350-edb4-49c9-b593-d223f7449a82

commit a7431b3
Author: Gary Pendergast <pento@git.wordpress.org>
Date:   Wed Dec 12 23:16:14 2018 +0000

    KSES: Conditionally remove the `<form>` element from `$allowedposttags`.

    To avoid backwards compatibility issues, `<form>` is re-added if a custom filter has added the `<input>` or `<select>` elements to `$allowedposttags`.

    Merges [43994] to the 4.9 branch.

    git-svn-id: https://develop.svn.wordpress.org/branches/4.9@43997 602fd350-edb4-49c9-b593-d223f7449a82

commit 70fe725
Author: Jeremy Felt <jeremyfelt@git.wordpress.org>
Date:   Wed Dec 12 23:02:11 2018 +0000

    Media: Improve verification of MIME file types.

    Merges [43988] to the 4.9 branch.

    git-svn-id: https://develop.svn.wordpress.org/branches/4.9@43989 602fd350-edb4-49c9-b593-d223f7449a82

commit 0cccbbd
Author: Peter Wilson <peterwilsoncc@git.wordpress.org>
Date:   Thu Nov 29 21:20:40 2018 +0000

    Media: Revert [43602] from the 4.9 branch.

    Reverts changes to the "Edit more details" link in the attachment details modal.

    This is out of scope for 4.9.9 and will be re-introduced in 5.0.0.

    Fixes #44620.

    git-svn-id: https://develop.svn.wordpress.org/branches/4.9@43948 602fd350-edb4-49c9-b593-d223f7449a82

commit b9af4f8
Author: Sergey Biryukov <sergeybiryukov@git.wordpress.org>
Date:   Thu Oct 11 07:15:22 2018 +0000

    REST API: Revert [43648] from the 4.9 branch.

    This change is out of the 4.9.x scope, and will be reintroduced in 5.0.x.

    See #40510.

    git-svn-id: https://develop.svn.wordpress.org/branches/4.9@43715 602fd350-edb4-49c9-b593-d223f7449a82

commit 505bd98
Author: Sergey Biryukov <sergeybiryukov@git.wordpress.org>
Date:   Thu Oct 11 04:41:28 2018 +0000

    Taxonomy: Revert [43620] from the 4.9 branch.

    This change is out of the 4.9.x scope, and will be reintroduced in 5.0.x.

    See #44872.

    git-svn-id: https://develop.svn.wordpress.org/branches/4.9@43711 602fd350-edb4-49c9-b593-d223f7449a82

commit 93162a0
Author: Sergey Biryukov <sergeybiryukov@git.wordpress.org>
Date:   Thu Oct 11 04:22:05 2018 +0000

    Privacy: Revert [43624] from the 4.9 branch.

    This change is out of the 4.9.x scope, and will be reintroduced in 5.0.x.

    See #44685.

    git-svn-id: https://develop.svn.wordpress.org/branches/4.9@43708 602fd350-edb4-49c9-b593-d223f7449a82

commit 142741d
Author: Sergey Biryukov <sergeybiryukov@git.wordpress.org>
Date:   Thu Oct 11 04:17:00 2018 +0000

    Posts, Post Types: Revert [43617] from the 4.9 branch.

    This change is out of the 4.9.x scope, and will be reintroduced in 5.0.x.

    See #34706.

    git-svn-id: https://develop.svn.wordpress.org/branches/4.9@43707 602fd350-edb4-49c9-b593-d223f7449a82

commit 517b28a
Author: Sergey Biryukov <sergeybiryukov@git.wordpress.org>
Date:   Thu Oct 11 04:03:23 2018 +0000

    Privacy: Revert [43614] from the 4.9 branch.

    This change is out of the 4.9.x scope, and will be reintroduced in 5.0.x.

    See #43985.

    git-svn-id: https://develop.svn.wordpress.org/branches/4.9@43705 602fd350-edb4-49c9-b593-d223f7449a82

commit cdc8f36
Author: Sergey Biryukov <sergeybiryukov@git.wordpress.org>
Date:   Thu Oct 11 03:52:44 2018 +0000

    Customize: Revert [43619] from the 4.9 branch.

    This change is out of the 4.9.x scope, and will be reintroduced in 5.0.x.

    See #44809.

    git-svn-id: https://develop.svn.wordpress.org/branches/4.9@43702 602fd350-edb4-49c9-b593-d223f7449a82

commit b92ba75
Author: Sergey Biryukov <sergeybiryukov@git.wordpress.org>
Date:   Thu Oct 11 03:47:44 2018 +0000

    Customize: Revert [43611] from the 4.9 branch.

    This change is out of the 4.9.x scope, and will be reintroduced in 5.0.x.

    See #44770.

    git-svn-id: https://develop.svn.wordpress.org/branches/4.9@43701 602fd350-edb4-49c9-b593-d223f7449a82

commit 8abdb45
Author: Sergey Biryukov <sergeybiryukov@git.wordpress.org>
Date:   Thu Oct 11 03:40:50 2018 +0000

    Customize: Revert [43575] from the 4.9 branch.

    This change is out of the 4.9.x scope, and will be reintroduced in 5.0.x.

    See #44763.

    git-svn-id: https://develop.svn.wordpress.org/branches/4.9@43699 602fd350-edb4-49c9-b593-d223f7449a82

commit e910344
Author: Sergey Biryukov <sergeybiryukov@git.wordpress.org>
Date:   Thu Oct 11 03:29:54 2018 +0000

    Twenty Sixteen: Revert [43607] from the 4.9 branch.

    This change is out of the 4.9.x scope, and will be reintroduced in 5.1.x.

    See #44668.

    git-svn-id: https://develop.svn.wordpress.org/branches/4.9@43698 602fd350-edb4-49c9-b593-d223f7449a82

commit 6d37d84
Author: Boone Gorges <boonebgorges@git.wordpress.org>
Date:   Tue Oct 9 18:17:32 2018 +0000

    Revert [43632] from the 4.9 branch.

    These new hooks are not part of the 4.9.x scope, and will be reintroduced
    as part of 5.0.x.

    See #44733.

    git-svn-id: https://develop.svn.wordpress.org/branches/4.9@43690 602fd350-edb4-49c9-b593-d223f7449a82

commit f73dcf0
Author: Adam Silverstein <adamsilverstein@git.wordpress.org>
Date:   Fri Oct 5 14:50:31 2018 +0000

    Try Gutenberg callout: improve formatting for Internet Explorer 11.

    ClassicPress note: Commit ignored except for minor cleanup.

    Correct an issue where the layout of the "Try Gutenberg" callout added in #41316 falls apart under IE11.

    Props kjellr, ianbelanger, pbiron, Luciano Croce, belcherj, ryansommers.
    Fixes #44742.

    git-svn-id: https://develop.svn.wordpress.org/branches/4.9@43674 602fd350-edb4-49c9-b593-d223f7449a82

commit 362e7eb
Author: Sergey Biryukov <sergeybiryukov@git.wordpress.org>
Date:   Mon Sep 24 20:04:56 2018 +0000

    General: PHP 7.3 throws an `E_WARNING` when using continue to target a switch.

    Applying continue to a switch is equivalent to using break and quite possibly, a continue targeting a higher level control structure is actually intended.

    To target the higher level control structure, a numeric argument has to be passed to continue. This fixes two cases in WordPress Core where this is currently happening.

    See: php/php-src#3364
    See: https://wiki.php.net/rfc/continue_on_switch_deprecation

    Props jrf.
    Merges [43653] to the 4.9 branch.
    Fixes #44543.

    git-svn-id: https://develop.svn.wordpress.org/branches/4.9@43656 602fd350-edb4-49c9-b593-d223f7449a82

commit d59f3d8
Author: Mike Schroder <mikeschroder@git.wordpress.org>
Date:   Tue Sep 18 22:01:25 2018 +0000

    Media: In WP_Image_Editor::make_image(), close previously opened output buffer if the file could not be created.

    In addition to the merge noted below, includes important brackets added in [42343].

    Props dhanendran, gnif, sergey.
    Merges [42695] and [42702] to the 4.9 branch.
    Fixes #43255.

    git-svn-id: https://develop.svn.wordpress.org/branches/4.9@43649 602fd350-edb4-49c9-b593-d223f7449a82

commit b46776d
Author: Sergey Biryukov <sergeybiryukov@git.wordpress.org>
Date:   Tue Sep 18 03:54:20 2018 +0000

    REST API: Support pagination, order, search and other common query parameters for revisions.

    The original REST API revisions controller relied on `wp_get_post_revisions()`, getting all revisions of a post without any possibility to restrict the result. This changeset replaces that function call with a proper `WP_Query` setup, replicating how `wp_get_post_revisions()` works while offering parameters to alter the default behavior.

    Props adamsilverstein, birgire, flixos90.
    Merges [43584-43586], [43647] to the 4.9 branch.
    Fixes #40510.

    git-svn-id: https://develop.svn.wordpress.org/branches/4.9@43648 602fd350-edb4-49c9-b593-d223f7449a82

commit 8c3eeee
Author: Sergey Biryukov <sergeybiryukov@git.wordpress.org>
Date:   Tue Sep 18 03:29:41 2018 +0000

    Tests: Improve coverage for REST API term meta registration.

    Introduce tests to validate that register_meta and register_term_meta work as expected in WP_REST_Terms_Controller.

    Props timmydcrawford.
    Merges [43567] to the 4.9 branch.
    See #39122.

    git-svn-id: https://develop.svn.wordpress.org/branches/4.9@43646 602fd350-edb4-49c9-b593-d223f7449a82

commit 3eb2845
Author: Sergey Biryukov <sergeybiryukov@git.wordpress.org>
Date:   Thu Sep 13 10:21:19 2018 +0000

    Docs: Correct `@since` value for `_wp_privacy_statuses()`.

    Fix typo in `@since` entry for `WP_Privacy_Policy_Content:add()`.

    Props dimadin.
    Merges [43638] to the 4.9 branch.
    Fixes #44915.

    git-svn-id: https://develop.svn.wordpress.org/branches/4.9@43639 602fd350-edb4-49c9-b593-d223f7449a82

commit 54462de
Author: Sergey Biryukov <sergeybiryukov@git.wordpress.org>
Date:   Thu Sep 13 09:52:47 2018 +0000

    REST API: Pass correct ID to `meta->update_value` to permit setting term meta during term creation.

    Props joehoyle.
    Merges [43636] to the 4.9 branch.
    Fixes #44834.

    git-svn-id: https://develop.svn.wordpress.org/branches/4.9@43637 602fd350-edb4-49c9-b593-d223f7449a82

commit 40e6a29
Author: Sergey Biryukov <sergeybiryukov@git.wordpress.org>
Date:   Thu Sep 6 07:50:29 2018 +0000

    Taxonomy: Introduce new hooks when registering/unregistering taxonomies for object types.

    Props soulseekah.
    Merges [43558] and [43631] to the 4.9 branch.
    Fixes #44733.

    git-svn-id: https://develop.svn.wordpress.org/branches/4.9@43632 602fd350-edb4-49c9-b593-d223f7449a82

commit 5923e83
Author: Sergey Biryukov <sergeybiryukov@git.wordpress.org>
Date:   Mon Sep 3 21:55:42 2018 +0000

    Tests: Introduce `Tests_HTTP_Functions::skipTestOnTimeout()`, mirroring the same `WP_HTTP_UnitTestCase` method.

    Merges [43512] to the 4.9 branch.
    Fixes #44613.

    git-svn-id: https://develop.svn.wordpress.org/branches/4.9@43626 602fd350-edb4-49c9-b593-d223f7449a82

commit cc9cbe0
Author: Sergey Biryukov <sergeybiryukov@git.wordpress.org>
Date:   Mon Sep 3 21:52:48 2018 +0000

    Tests: Use `WP_HTTP_UnitTestCase::skipTestOnTimeout()` in more HTTP tests.

    Adjust it to handle more types of timeouts, e.g. "Resolving timed out", "Connection timed out".

    Merges [43511] to the 4.9 branch.
    See #44613.

    git-svn-id: https://develop.svn.wordpress.org/branches/4.9@43625 602fd350-edb4-49c9-b593-d223f7449a82

commit 3f13fef
Author: Sergey Biryukov <sergeybiryukov@git.wordpress.org>
Date:   Mon Sep 3 21:46:48 2018 +0000

    Privacy: When clicking a confirmation link for a privacy request, return a `WP_Error` object if the link has expired.

    Returning a string caused a success message to be displayed instead of the correct error message.

    Props desrosj.
    Merges [43623] to the 4.9 branch.
    Fixes #44685.

    git-svn-id: https://develop.svn.wordpress.org/branches/4.9@43624 602fd350-edb4-49c9-b593-d223f7449a82

commit 8e65294
Author: Sergey Biryukov <sergeybiryukov@git.wordpress.org>
Date:   Mon Sep 3 21:25:53 2018 +0000

    Docs: Correct param documentation for `WP_Term_Query`.

    The description of `$meta_type` introduced in [40053] was incorrect.

    Props dlh.
    Merges [43559] to the 4.9 branch.
    Fixes #44608.

    git-svn-id: https://develop.svn.wordpress.org/branches/4.9@43621 602fd350-edb4-49c9-b593-d223f7449a82

commit 94699ba
Author: Sergey Biryukov <sergeybiryukov@git.wordpress.org>
Date:   Mon Sep 3 21:23:26 2018 +0000

    Taxonomy: Make sure `wp_list_categories()` correctly outputs term name of `0`.

    Props joyously, SergeyBiryukov.
    Merges [43605] to the 4.9 branch.
    Fixes #44872.

    git-svn-id: https://develop.svn.wordpress.org/branches/4.9@43620 602fd350-edb4-49c9-b593-d223f7449a82

commit 726f99a
Author: Sergey Biryukov <sergeybiryukov@git.wordpress.org>
Date:   Mon Sep 3 21:20:58 2018 +0000

    Customize: Safeguard a check on the `customize_validate_{$setting_id}` filter value to ensure it is a `WP_Error`.

    While the filter is documented to only support a `WP_Error`, it has been a common practice to return true in a validation function if no errors have occurred. This was already caught when the same filter was executed in `WP_Customize_Setting`, it was however missing in `WP_Customize_Manager::validate_setting_values()`.

    Props flixos90.
    Merges [43578] to the 4.9 branch.
    Fixes #44809.

    git-svn-id: https://develop.svn.wordpress.org/branches/4.9@43619 602fd350-edb4-49c9-b593-d223f7449a82

commit ec100d4
Author: Sergey Biryukov <sergeybiryukov@git.wordpress.org>
Date:   Mon Sep 3 21:16:27 2018 +0000

    Script loader: remove (PHP based) compression from `load-styles.php` and `load-scripts.php`. WIth the amount of scripts and stylesheets grown a lot over the years, it has become pretty slow and consumes a lot of server resources. Also, most servers are set to compress PHP output anyway.

    Props LucasRolff, azaozz.
    Merges [43580] to the 4.9 branch.
    Fixes #44815. See #43308.

    git-svn-id: https://develop.svn.wordpress.org/branches/4.9@43618 602fd350-edb4-49c9-b593-d223f7449a82

commit 21c48c2
Author: Sergey Biryukov <sergeybiryukov@git.wordpress.org>
Date:   Mon Sep 3 21:11:38 2018 +0000

    Posts, Post Types: Introduce `edit_post_{$post->post_type}` hook.

    The hook fires before the general `edit_post` hook and has the same parameters.

    It also complements the `save_post_{$post->post_type}` hook added in [25050].

    Props Mte90, garrett-eclipse.
    Merges [43535] and [43616] to the 4.9 branch.
    Fixes #34706.

    git-svn-id: https://develop.svn.wordpress.org/branches/4.9@43617 602fd350-edb4-49c9-b593-d223f7449a82

commit 7abbd0f
Author: Sergey Biryukov <sergeybiryukov@git.wordpress.org>
Date:   Mon Sep 3 21:03:12 2018 +0000

    Docs: Correct parameter type for `WP_Privacy_Policy_Content::notice()`.

    Props burhandodhy.
    Merges [43609] to the 4.9 branch.
    Fixes #44877.

    git-svn-id: https://develop.svn.wordpress.org/branches/4.9@43615 602fd350-edb4-49c9-b593-d223f7449a82

commit 5518be7
Author: Sergey Biryukov <sergeybiryukov@git.wordpress.org>
Date:   Mon Sep 3 21:00:16 2018 +0000

    Privacy: Ensure the user request email is sent in the requested user's locale (or the site's default locale if they are not a registered user) when the administrator creating the request uses a different locale.

    Props desrosj, Chouby, iandunn, lbenicio, birgire, earnjam, swissspidy, garrett-eclipse.
    Merges [43568] to the 4.9 branch.
    Fixes #43985.

    git-svn-id: https://develop.svn.wordpress.org/branches/4.9@43614 602fd350-edb4-49c9-b593-d223f7449a82

commit 7e2c480
Author: Sergey Biryukov <sergeybiryukov@git.wordpress.org>
Date:   Mon Sep 3 20:59:10 2018 +0000

    Tests: Add case for `wp_privacy_delete_old_export_files()`.

    Props allendav.
    Merges [43292] to the 4.9 branch.
    See #43546.

    git-svn-id: https://develop.svn.wordpress.org/branches/4.9@43613 602fd350-edb4-49c9-b593-d223f7449a82

commit f9c1452
Author: Sergey Biryukov <sergeybiryukov@git.wordpress.org>
Date:   Mon Sep 3 20:58:08 2018 +0000

    Tests: Add case for `wp_privacy_send_personal_data_export_email()`.

    Props birgire.
    Merges [43291] to the 4.9 branch.
    See #43546.

    git-svn-id: https://develop.svn.wordpress.org/branches/4.9@43612 602fd350-edb4-49c9-b593-d223f7449a82

commit 84854dc
Author: Sergey Biryukov <sergeybiryukov@git.wordpress.org>
Date:   Mon Sep 3 20:51:01 2018 +0000

    Customize: Pass missing parameter to dynamic `option_{$option}` filter in `WP_Customize_Widgets::capture_filter_pre_get_option()`.

    Props dlh.
    Fixes #44770.

    git-svn-id: https://develop.svn.wordpress.org/branches/4.9@43611 602fd350-edb4-49c9-b593-d223f7449a82

commit 0ecadb7
Author: Sergey Biryukov <sergeybiryukov@git.wordpress.org>
Date:   Mon Sep 3 20:49:20 2018 +0000

    Docs: Convert `@see` reference in `wp_checkdate()` DocBlock to `@link`.

    Props WiZZarD_.
    Merges [43599] to the 4.9 branch.
    Fixes #44866.

    git-svn-id: https://develop.svn.wordpress.org/branches/4.9@43610 602fd350-edb4-49c9-b593-d223f7449a82

commit c506642
Author: Peter Wilson <peterwilsoncc@git.wordpress.org>
Date:   Mon Sep 3 01:31:22 2018 +0000

    Twenty Sixteen: Add pre-connect resource hint for Google Fonts.

    When using Google Fonts, pre-connect to https://fonts.gstatic.com to improve the performance downloading the webfont files.

    Props westonruter.
    Merges [43606] to the 4.9 branch.
    Fixes #44668.

    git-svn-id: https://develop.svn.wordpress.org/branches/4.9@43607 602fd350-edb4-49c9-b593-d223f7449a82

commit 2cdf092
Author: John Blackbourn <johnbillion@git.wordpress.org>
Date:   Fri Aug 31 10:52:32 2018 +0000

    Media: Ensure the "Edit more details" link in the attachment details modal always points to the correct editing URL.

    Fixes #44620

    Merges [43601] to the 4.9 branch.

    git-svn-id: https://develop.svn.wordpress.org/branches/4.9@43602 602fd350-edb4-49c9-b593-d223f7449a82

commit e24f825
Author: Sergey Biryukov <sergeybiryukov@git.wordpress.org>
Date:   Fri Aug 31 06:28:27 2018 +0000

    Embeds: Avoid a JS error in `wp.receiveEmbedMessage` if `data` parameter is not set.

    Props dsifford, kadamwhite.
    Merges [43593] and [43597] to the 4.9 branch.
    Fixes #44832.

    git-svn-id: https://develop.svn.wordpress.org/branches/4.9@43600 602fd350-edb4-49c9-b593-d223f7449a82
SpacePossum added a commit to PHP-CS-Fixer/PHP-CS-Fixer that referenced this pull request Jan 28, 2020
This PR was merged into the 2.17-dev branch.

Discussion
----------

SwitchContinueToBreakFixer - Introduction

Description of switch_continue_to_break rule.
Switch case must not be ended with `continue` but with `break`.

```diff
--- Original
+++ New
@@ -1,5 +1,5 @@
<?php
    switch ($foo) {
        case 1:
-           continue;
+           break;
    }
```

```diff
--- Original
+++ New
@@ -1,15 +1,15 @@
<?php
switch ($foo) {
    case 1:
        while($bar) {
            do {
-                continue 3;
+                break 3;
            } while(false);

            if ($foo + 1 > 3) {
                continue;
            }

-            continue 2;
+            break 2;
        }
}
```

@ see https://www.php.net/manual/en/migration73.incompatible.php#migration73.incompatible.core.continue-targeting-switch

https://wiki.php.net/rfc/continue_on_switch_deprecation

php/php-src#3364

Commits
-------

80f83b6 SwitchContinueToBreakFixer - Introduction
dikiyforester pushed a commit to AppThemes/wp-tests-lib that referenced this pull request Feb 4, 2021
… switch

Applying continue to a switch is equivalent to using break and quite possibly, a continue targeting a higher level control structure is actually intended.

To target the higher level control structure, a numeric argument has to be passed to continue. This fixes two cases in WordPress Core where this is currently happening.

See: php/php-src#3364
See: https://wiki.php.net/rfc/continue_on_switch_deprecation

Props jrf.
Fixes #44543.



git-svn-id: https://develop.svn.wordpress.org/trunk/tests/phpunit/includes@43653 602fd350-edb4-49c9-b593-d223f7449a82
VenusPR added a commit to VenusPR/Wordpress_Richard that referenced this pull request Mar 9, 2023
…a switch.

Applying continue to a switch is equivalent to using break and quite possibly, a continue targeting a higher level control structure is actually intended.

To target the higher level control structure, a numeric argument has to be passed to continue. This fixes two cases in WordPress Core where this is currently happening.

See: php/php-src#3364
See: https://wiki.php.net/rfc/continue_on_switch_deprecation

Props jrf.
Merges [43653] to the 5.0 branch.
Fixes #44543.
Built from https://develop.svn.wordpress.org/branches/5.0@43746


git-svn-id: http://core.svn.wordpress.org/branches/5.0@43575 1a063a9b-81f0-0310-95a4-ce76da25c4cd
VenusPR added a commit to VenusPR/Wordpress_Richard that referenced this pull request Mar 9, 2023
…a switch.

Applying continue to a switch is equivalent to using break and quite possibly, a continue targeting a higher level control structure is actually intended.

To target the higher level control structure, a numeric argument has to be passed to continue. This fixes two cases in WordPress Core where this is currently happening.

See: php/php-src#3364
See: https://wiki.php.net/rfc/continue_on_switch_deprecation

Props jrf.
Merges [43653] to the 4.9 branch.
Fixes #44543.
Built from https://develop.svn.wordpress.org/branches/4.9@43656


git-svn-id: http://core.svn.wordpress.org/branches/4.9@43485 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants