Preload your sweet sweet code to opcache with a composer command, making your code faster to run.
WordPress Security Advisories. Add this package to prevent vulnerable WordPress packages from being installed.
A trivial but working polyfill for PHP 7.3 is_countable function. Supports PHP versions >= 5.3
A stop-watch and timer with start/stop/pause features and minimal human-friendly formatting.
A library providing an Array-Class to store and access data in a case-insensitive fashion, while maintaining the integrity and functionality of a regular array.
Build/Test Tooling: Use assertSame()
in Tests_Comment::test_update_comment_from_privileged_user_by_privileged_user().
Change from assertEquals()
to assertSame()
. Why? To ensure both the return value and data type match the expected results.
Follow-up to [c].
Props costdev, peterwilsoncc, mukesh27, ankitmaru. See #56800.
git-svn-id: https://develop.svn.wordpress.org/trunk@55466 602fd350-edb4-49c9-b593-d223f7449a82
Tests: Improve Tests_Media::test_wp_generate_attachment_metadata_doesnt_generate_sizes_for_150_square_image().
Changes:
from assertEquals()
to assertSame()
. Why? To ensure both the return value and data type match the expected results.
the expected height and width from string
to integer
data types. Why integer? getimagesize()
(within wp_getimagesize()
) will return an integer for both height and weight.
adds the ticket annotation.
adds assertion failure messages. Why? To denote which assertion failed, which aids in debugging efforts.
Follow-up to [55278].
Props costdev, peterwilsoncc, mukesh27, ankitmaru, hellofromTonya. See #56800, #57370.
git-svn-id: https://develop.svn.wordpress.org/trunk@55467 602fd350-edb4-49c9-b593-d223f7449a82
Tests: Use assertSame() in Tests_Theme_wpThemeJson.
Change from assertEquals() to assertSame(). Why? To ensure both the return value and data type match the expected results.
Follow-up to [55216].
Props costdev, peterwilsoncc, mukesh27, ankitmaru. See #56800, #57621.
git-svn-id: https://develop.svn.wordpress.org/trunk@55468 602fd350-edb4-49c9-b593-d223f7449a82
HTML API: Fix finding RCData and Script tag closers.
Fixes finding the following tag closers </script>
, </textarea>
, and </title>
in WP_HTML_Tag_Processor
.
Follow-up to [55407], [55203].
Props zieladam, dmsnell, hellofromTonya. Fixes #57852. See #57575.
git-svn-id: https://develop.svn.wordpress.org/trunk@55469 602fd350-edb4-49c9-b593-d223f7449a82
Media: improve display of cropped image in media editor.
Correctly display edits after you crop an image and return to the attachments page.
Prefer the full
over the large
size image on the edit image screen.
Props andy786, antpb, sanketchodavadiya, antonvlasenko, ironprogrammer. Fixes #55070.
git-svn-id: https://develop.svn.wordpress.org/trunk@55470 602fd350-edb4-49c9-b593-d223f7449a82
Build/Tests Tools: Add unit tests for Gallery blocks.
Introduces unit tests for the following blocks
Updates the unit tests for the following blocks to match the counterparts stored in the Gutenberg repository:
Modifies Tests_Blocks_Render::test_do_block_output()
to ignore white space at the end of lines to account for whitespace equivalence in HTML.
Props peterwilsoncc, isabel_brison, gziolo. Fixes #55571.
git-svn-id: https://develop.svn.wordpress.org/trunk@55471 602fd350-edb4-49c9-b593-d223f7449a82
Bundled Themes: Improve various globals documentation, as per docblock standards.
Props viralsampat, audrasjb, costdev. See #56792, #57069.
git-svn-id: https://develop.svn.wordpress.org/trunk@55472 602fd350-edb4-49c9-b593-d223f7449a82
Build/Test Tools: Check if the Docker is available when running npm run env:start
.
This aims to display a more helpful error message if the Docker service is not running.
Follow-up to [45783], [45819].
Props mkox, cnspecialcolor, pento, hasanuzzamanshamim, bgoewert, robinwpdeveloper, costdev, mukesh27. Fixes #51898.
git-svn-id: https://develop.svn.wordpress.org/trunk@55473 602fd350-edb4-49c9-b593-d223f7449a82
Media: Revert wp_ajax_save_attachment_updated
hook.
This changeset removes the wp_ajax_save_attachment_updated
hook by reverting [55106], [55111], and [55450], to give it more time for further discussions as there are still concerns about whether this hook is necessary.
Follow-up to [55106], [55111], [55450].
Props costdev, SergeyBiryukov, peterwilsoncc, azaozz. See #23148.
git-svn-id: https://develop.svn.wordpress.org/trunk@55474 602fd350-edb4-49c9-b593-d223f7449a82
Editor: Update @wordpress packages for 6.2 Beta 5.
Updates the @wordpress
packages to include the following changes:
block_core_navigation_get_most_recently_published_navigation()
WP_Theme_JSON_Resolver::get_merged_data()
References:
blocks/navigation-link.php
and blocks/navigation-submenu.php
]blocks/navigation.php
]Follow-up to [55441], [55440].
Props ntsekouras, mamaduka, gziolo, costdev, hellofromTonya. See #57471.
git-svn-id: https://develop.svn.wordpress.org/trunk@55475 602fd350-edb4-49c9-b593-d223f7449a82
Bundled Themes: Bump version numbers for WordPress 6.2.
In coordination with the release of 6.2, a new version of each bundled theme will also be released. This bumps the version of each theme to the following:
Props robinwpdeveloper, costdev, audrasjb, sabernhardt, desrosj. Fixes #57689.
git-svn-id: https://develop.svn.wordpress.org/trunk@55476 602fd350-edb4-49c9-b593-d223f7449a82
HTML API: Document shorthand usage of the next_tag().
Documents the shorthand usage, i.e. $this->next_tag( 'img' )
, of WP_HTML_Tag_Processor::next_tag()
.
Also includes table alignments and formatting adjustments in the class docs.
Follow-up to [55203], [55206].
Props zieladam, poena, dmsnell, costdev, hellofromTonya. Fixes #57863. See #57575.
git-svn-id: https://develop.svn.wordpress.org/trunk@55477 602fd350-edb4-49c9-b593-d223f7449a82
Bundled Themes: Add missing trailing /
in HelpHub links.
HelpHub links without trailing slashes with anchors present result in an unnecessary redirect.
These were introduced with the /
missing in [55476].
Props audrasjb. See #57689, #57726.
git-svn-id: https://develop.svn.wordpress.org/trunk@55478 602fd350-edb4-49c9-b593-d223f7449a82
Build/Test Tools: Update the URL for logging performance workflows.
This is a follow up to r55459, which fixes the hostname used for logging performance metrics by adding the correct www subdomain.
See #57687.
git-svn-id: https://develop.svn.wordpress.org/trunk@55479 602fd350-edb4-49c9-b593-d223f7449a82
WordPress 6.2 Beta 5.
git-svn-id: https://develop.svn.wordpress.org/trunk@55480 602fd350-edb4-49c9-b593-d223f7449a82
Post WordPress 6.2 Beta 5 version bump.
git-svn-id: https://develop.svn.wordpress.org/trunk@55481 602fd350-edb4-49c9-b593-d223f7449a82
Build/Test Tools: Remove all previously built files when running clean:files
.
Cleans old JS, CSS and Webpack files from /src so they are not automatically copied to /build when running grunt build
. Fixes errors that may be caused by copying outdated files and/or directories to /build.
Props: desrosj, isabel_brison, SergeyBiryukov, ironprogrammer, mukesh27, robinwpdeveloper, razthee007, costdev, peterwilsoncc, azaozz.
Fixes: #47749.
git-svn-id: https://develop.svn.wordpress.org/trunk@55484 602fd350-edb4-49c9-b593-d223f7449a82
Docs: Add missing 6.2.0 @since mention in get_the_privacy_policy_link()
.
Follow-up to #55261.
See #56792, #56345.
git-svn-id: https://develop.svn.wordpress.org/trunk@55485 602fd350-edb4-49c9-b593-d223f7449a82
Tests: Add a unit test for register_block_style_handle()
with an RTL locale.
The test ensures that the function loads RTL stylesheets when a locale with the right-to-left text direction is set.
Follow-up to [54330].
Props costdev, thomasplevy, audrasjb, mukesh27. Fixes #56797.
git-svn-id: https://develop.svn.wordpress.org/trunk@55486 602fd350-edb4-49c9-b593-d223f7449a82
Build/Test Tools: Update several GitHub Actions.
This updates three GitHub Actions to their latest versions:
shivammathur/setup-php
actions/cache
wow-actions/welcome
The welcome action now uses the GITHUB_TOKEN
by default, so it no longer needs to be passed manually.
See #57572.
git-svn-id: https://develop.svn.wordpress.org/trunk@55487 602fd350-edb4-49c9-b593-d223f7449a82
Updated to version 2023.2 (2023b)
Empty merge
Updated to version 2023.2 (2023b)
Empty merge
Updated to version 2023.2 (2023b)
Add me to the CODEOWNERS
Added myself to fpm, json, openssl and main. I have contributed or was looking to various parts in main even though I don't know every single file there. Happy to maintain it though.
Fix GH-8979: Possible Memory Leak with SSL-enabled MySQL connections
The stream context inside mysqlnd_vio::enable_ssl()
is leaking.
In particular: when php_stream_context_set()
get called the refcount
of context
is increased by 1, which means that context
will now
have a refcount of 2. Later on we remove the context from the stream
by calling php_stream_context_set(stream, NULL)
but that leaves our
context
with a refcount of 1, and therefore it's never destroyed.
In my test case this yielded a leak of 1456 bytes per connection
(but could be more depending on your settings ofc).
Annoyingly, Valgrind doesn't find it because the context is still
in the EG(regular_list)
and will thus be destroyed at the end of
the request. However, I still think this bug needs to be fixed because
as the users in the issue report already mentioned:
there can be long-running PHP scripts.
Fix it by decreasing the refcount to transfer the ownership.
Closes GH-10909.
Merge branch 'PHP-8.1' into PHP-8.2
Fix GH-10907: Unable to serialize processed SplFixedArrays in PHP 8.2.4
The properties table can also contain numeric entries after a rebuild of the table based on the array. Since the array can only contain numeric entries, and the properties table can contain a mix of both, we'll add the numeric entries from the array and only the string entries from the properties table. To implement this we simply check if the key from the properties table is a string.
Closes GH-10921.
Merge branch 'PHP-8.2'
Fix test for GH-10907 with output in different order for master branch
Fix phpGH-10648: add check function pointer into mbfl_encoding
Previously, mbstring used the same logic for encoding validation as for encoding conversion.
However, there are cases where we want to use different logic for validation and conversion. For example, if a string ends up with missing input required by the encoding, or if a character is input that is invalid as an encoding but can be converted, the conversion should succeed and the validation should fail.
To achieve this, a function pointer mb_check_fn has been added to struct mbfl_encoding to implement the logic used for validation. Also, added implementation of validation logic for UTF-7, UTF7-IMAP, ISO-2022-JP and JIS.
Merge branch 'PHP-8.2'
Update NEWS and UPGRADING to reflect changes in 0ce755be26
Fix compile errors caused by missing initializers in 0779950768
When I built and tested 0779950768 locally, the build was successful and all tests passed. However, in CI, some CI jobs are failing due to compile errors. Fix those.
Fix compile error in Windows CI job caused by 0779950768
In 6fc8d014df, pakutoma added some additional validation logic to mb_detect_encoding. Since the implementation of mb_detect_encoding has changed significantly between PHP 8.2 and 8.3, when merging this change down from PHP-8.2 into master, I had to port his code over to the new implementation in master.
However, I did this in a wrong way. In merge commit 0779950768, the ported code modifies a function argument (to mb_guess_encoding) which is marked 'const'. In the Windows CI job, MS VC++ rightly flags this as a compile error.
Adjust the code to accomplish the same thing, but without destructively modifying 'const' arguments.
[ci skip] Add myself to CODEOWNERS for mbstring
Fix phpGH-10648: add check function pointer into mbfl_encoding
Previously, mbstring used the same logic for encoding validation as for encoding conversion.
However, there are cases where we want to use different logic for validation and conversion. For example, if a string ends up with missing input required by the encoding, or if a character is input that is invalid as an encoding but can be converted, the conversion should succeed and the validation should fail.
To achieve this, a function pointer mb_check_fn has been added to struct mbfl_encoding to implement the logic used for validation. Also, added implementation of validation logic for UTF-7, UTF7-IMAP, ISO-2022-JP and JIS.
(The same change has already been made to PHP 8.2 and 8.3; see 6fc8d014df. This commit is backporting the change to PHP 8.1.)
Merge branch 'PHP-8.1' into PHP-8.2
Merge branch 'PHP-8.2'
Fix unescaped {TMP} variables in tests
On Windows {TMP} can return ~, which will result in a parse error
Merge branch 'PHP-8.2'
Use zend_result in ext/spl where appropriate (#10734)
Convert functions in spl_heap to return zend_result
Convert functions in spl_iterators to return zend_result
Add Windows GitHub actions build
Closes GH-10664
Merge branch 'PHP-8.1' into PHP-8.2
Merge branch 'PHP-8.2'
[skip ci] Skip failing mbstring test on Windows x86 32-bit
Fix missing readonly modification error with inc/dec in JIT
Closes GH-10746
Merge branch 'PHP-8.1' into PHP-8.2
Merge branch 'PHP-8.2'
Make error checks on encoding methods for docomo, kddi, sb consistent
Some places use an if check, which implicitly checks for a non-zero value, and some places use > 0. The > 0 is the correct one because at least some of those functions already use the CK() macro to return -1 on error. Because -1 != 0 this is wrongly interpreted as a success instead of a failure.
Use CK() macro to check the output function in mbfilter_unicode2sjis_emoji_sb()
Propagate error checks for mbfl_filt_conv_illegal_output()
Merge branch 'PHP-8.1' into PHP-8.2
Merge branch 'PHP-8.2'
Fix warning in run-tests when PHP compiled without generating phpdbg support. (#10745)
[skip ci] Skip failing readonly+clone tests for JIT for now
See implementation at GH-10748
fix: support for timeouts with ZTS on Linux (#10141)
[ci skip] NEWS
Merge branch 'PHP-8.1' into PHP-8.2
I think you can modify the plugin (and then turn off auto-updates) to add support for sha512 hashes. You will see password_verify
calls, which is about where the changes to allow sha512 would go.
Could you add the sha512 hash option?
Hi @NicolaPavan Thank you for your feature request and the PR. I wanted this plugin to use bcrypt and Argon2id hashing which are purposefully created for password hashing. They take a certain amount of computational power to thwart attempts of brute forcing.
All of the SHA variants (including SHA3/512) are checksum hashes, which are made to be fast as possible while being unique across a wide range of input values. This is not something we want in a hashed password.
The PR also seems to merge v2
branch with v1
, which I don't want to do, given v2 is a major upgrade from v1 with breaking changes.
Thank you.
PHPMailer v6.8.0 is released.
Diff: https://github.com/PHPMailer/PHPMailer/compare/v6.7...v6.8.0 Changelog: https://github.com/PHPMailer/PHPMailer/blob/master/changelog.md#version-680-march-6th-2023
Trac ticket: https://core.trac.wordpress.org/ticket/57873
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.
Themes: Adds outline CSS properties support in theme.json.
Adds the ability to define outline CSS properties for elements and blocks within theme.json
to render outline-color
, outline-offset
, outline-style
, and outline-width
styles.
Originally developed and tested in [https://github.com/WordPress/gutenberg/pull/43526 Gutenberg PR 43526].
Props onemaggie, hellofromTonya, audrasjb, ironprogrammer. Fixes #57354.
git-svn-id: https://develop.svn.wordpress.org/trunk@55008 602fd350-edb4-49c9-b593-d223f7449a82
Themes: Alphabetize the properties list in WP_Theme_JSON::VALID_STYLES
for consistency.
Follow-up to [53129], [54253], [55008].
See #57354.
git-svn-id: https://develop.svn.wordpress.org/trunk@55009 602fd350-edb4-49c9-b593-d223f7449a82
I18N: Change how WP_Textdomain_Registry
caches translation information.
WP_Textdomain_Registry
was introduced in [53874] and later adjusted in [54682] to store text domains and their language directory paths, addressing issues with just-in-time loading of textdomains when using locale switching and load_*_textdomain()
functions.
This change improves how the class stores information about all existing MO files on the site, addressing an issue where translations are not loaded after calling switch_to_locale()
.
Props johnbillion, ocean90, SergeyBiryukov. Fixes #57116.
git-svn-id: https://develop.svn.wordpress.org/trunk@55010 602fd350-edb4-49c9-b593-d223f7449a82
Code Modernization: Rename parameters that use reserved keywords in wp-includes/taxonomy.php
.
While using reserved PHP keywords as parameter name labels is allowed, in the context of function calls using named parameters in PHP 8.0+, this will easily lead to confusion. To avoid that, it is recommended not to use reserved keywords as function parameter names.
This commit:
$object
parameter to $object_type
in get_object_taxonomies()
.$parent
parameter to $parent_term
in:term_exists()
wp_check_term_hierarchy_for_loops()
Follow-up to [52946], [52996], [52997], [52998], [53003], [53014], [53029], [53039], [53116], [53117], [53137], [53174], [53184], [53185], [53192], [53193], [53198], [53203], [53207], [53215], [53216], [53220], [53230], [53232], [53236], [53239], [53240], [53242], [53243], [53245], [53246], [53257], [53269], [53270], [53271], [53272], [53273], [53274], [53275], [53276], [53277], [53281], [53283], [53284], [53285], [53287], [53364], [53365], [54927], [54929], [54930], [54931], [54932], [54933], [54938], [54943], [54944], [54945], [54946], [54947], [54948], [54950], [54951], [54952], [54956], [54959], [54960], [54961], [54962], [54964], [54965], [54969], [54970], [54971], [54972], [54996], [55000].
Props jrf, aristath, poena, justinahinon, SergeyBiryukov. See #56788.
git-svn-id: https://develop.svn.wordpress.org/trunk@55011 602fd350-edb4-49c9-b593-d223f7449a82
External Libraries: Update jQuery to 3.6.3.
Update the jQuery library from 3.6.1 to 3.6.3.
Props TobiasBg, naeemhaque, mukesh27, mgol. Fixes #57324.
git-svn-id: https://develop.svn.wordpress.org/trunk@55012 602fd350-edb4-49c9-b593-d223f7449a82
Code Modernization: Rename parameters that use reserved keywords in wp-includes/template.php
.
While using reserved PHP keywords as parameter name labels is allowed, in the context of function calls using named parameters in PHP 8.0+, this will easily lead to confusion. To avoid that, it is recommended not to use reserved keywords as function parameter names.
This commit renames the $require_once
parameter to $load_once
in:
locate_template()
load_template()
Follow-up to [52946], [52996], [52997], [52998], [53003], [53014], [53029], [53039], [53116], [53117], [53137], [53174], [53184], [53185], [53192], [53193], [53198], [53203], [53207], [53215], [53216], [53220], [53230], [53232], [53236], [53239], [53240], [53242], [53243], [53245], [53246], [53257], [53269], [53270], [53271], [53272], [53273], [53274], [53275], [53276], [53277], [53281], [53283], [53284], [53285], [53287], [53364], [53365], [54927], [54929], [54930], [54931], [54932], [54933], [54938], [54943], [54944], [54945], [54946], [54947], [54948], [54950], [54951], [54952], [54956], [54959], [54960], [54961], [54962], [54964], [54965], [54969], [54970], [54971], [54972], [54996], [55000], [55011].
Props jrf, aristath, poena, justinahinon, SergeyBiryukov. See #56788.
git-svn-id: https://develop.svn.wordpress.org/trunk@55013 602fd350-edb4-49c9-b593-d223f7449a82
Code Modernization: Rename parameters that use reserved keywords in wp-includes/theme.php
.
While using reserved PHP keywords as parameter name labels is allowed, in the context of function calls using named parameters in PHP 8.0+, this will easily lead to confusion. To avoid that, it is recommended not to use reserved keywords as function parameter names.
This commit:
$default
parameter to $default_value
in get_theme_mod()
.$include
parameter to $file
in require_if_theme_supports()
.Follow-up to [52946], [52996], [52997], [52998], [53003], [53014], [53029], [53039], [53116], [53117], [53137], [53174], [53184], [53185], [53192], [53193], [53198], [53203], [53207], [53215], [53216], [53220], [53230], [53232], [53236], [53239], [53240], [53242], [53243], [53245], [53246], [53257], [53269], [53270], [53271], [53272], [53273], [53274], [53275], [53276], [53277], [53281], [53283], [53284], [53285], [53287], [53364], [53365], [54927], [54929], [54930], [54931], [54932], [54933], [54938], [54943], [54944], [54945], [54946], [54947], [54948], [54950], [54951], [54952], [54956], [54959], [54960], [54961], [54962], [54964], [54965], [54969], [54970], [54971], [54972], [54996], [55000], [55011], [55013].
Props jrf, aristath, poena, justinahinon, SergeyBiryukov. See #56788.
git-svn-id: https://develop.svn.wordpress.org/trunk@55014 602fd350-edb4-49c9-b593-d223f7449a82
Code Modernization: Rename parameters that use reserved keywords in wp-includes/user.php
.
While using reserved PHP keywords as parameter name labels is allowed, in the context of function calls using named parameters in PHP 8.0+, this will easily lead to confusion. To avoid that, it is recommended not to use reserved keywords as function parameter names.
This commit renames the $global
parameter to $is_global
in:
update_user_option()
delete_user_option()
Follow-up to [52946], [52996], [52997], [52998], [53003], [53014], [53029], [53039], [53116], [53117], [53137], [53174], [53184], [53185], [53192], [53193], [53198], [53203], [53207], [53215], [53216], [53220], [53230], [53232], [53236], [53239], [53240], [53242], [53243], [53245], [53246], [53257], [53269], [53270], [53271], [53272], [53273], [53274], [53275], [53276], [53277], [53281], [53283], [53284], [53285], [53287], [53364], [53365], [54927], [54929], [54930], [54931], [54932], [54933], [54938], [54943], [54944], [54945], [54946], [54947], [54948], [54950], [54951], [54952], [54956], [54959], [54960], [54961], [54962], [54964], [54965], [54969], [54970], [54971], [54972], [54996], [55000], [55011], [55013], [55014].
Props jrf, aristath, poena, justinahinon, SergeyBiryukov. See #56788.
git-svn-id: https://develop.svn.wordpress.org/trunk@55015 602fd350-edb4-49c9-b593-d223f7449a82
Code Modernization: Rename parameters that use reserved keywords in phpunit/includes/abstract-testcase.php
.
While using reserved PHP keywords as parameter name labels is allowed, in the context of function calls using named parameters in PHP 8.0+, this will easily lead to confusion. To avoid that, it is recommended not to use reserved keywords as function parameter names.
This commit:
$function
parameter to $function_name
in:WP_UnitTestCase_Base::deprecated_function_run()
WP_UnitTestCase_Base::doing_it_wrong_run()
$object
parameter to $actual
in:WP_UnitTestCase_Base::assertEqualFields()
WP_UnitTestCase_Base::assertNonEmptyMultidimensionalArray()
Follow-up to [52946], [52996], [52997], [52998], [53003], [53014], [53029], [53039], [53116], [53117], [53137], [53174], [53184], [53185], [53192], [53193], [53198], [53203], [53207], [53215], [53216], [53220], [53230], [53232], [53236], [53239], [53240], [53242], [53243], [53245], [53246], [53257], [53269], [53270], [53271], [53272], [53273], [53274], [53275], [53276], [53277], [53281], [53283], [53284], [53285], [53287], [53364], [53365], [54927], [54929], [54930], [54931], [54932], [54933], [54938], [54943], [54944], [54945], [54946], [54947], [54948], [54950], [54951], [54952], [54956], [54959], [54960], [54961], [54962], [54964], [54965], [54969], [54970], [54971], [54972], [54996], [55000], [55011], [55013], [55014], [55015].
Props jrf, aristath, poena, justinahinon, SergeyBiryukov. See #56788.
git-svn-id: https://develop.svn.wordpress.org/trunk@55016 602fd350-edb4-49c9-b593-d223f7449a82
Code Modernization: Rename parameters that use reserved keywords in phpunit/includes/class-wp-test-stream.php
.
While using reserved PHP keywords as parameter name labels is allowed, in the context of function calls using named parameters in PHP 8.0+, this will easily lead to confusion. To avoid that, it is recommended not to use reserved keywords as function parameter names.
This commit renames the $var
parameter to $value
in WP_Test_Stream::stream_metadata()
.
Follow-up to [52946], [52996], [52997], [52998], [53003], [53014], [53029], [53039], [53116], [53117], [53137], [53174], [53184], [53185], [53192], [53193], [53198], [53203], [53207], [53215], [53216], [53220], [53230], [53232], [53236], [53239], [53240], [53242], [53243], [53245], [53246], [53257], [53269], [53270], [53271], [53272], [53273], [53274], [53275], [53276], [53277], [53281], [53283], [53284], [53285], [53287], [53364], [53365], [54927], [54929], [54930], [54931], [54932], [54933], [54938], [54943], [54944], [54945], [54946], [54947], [54948], [54950], [54951], [54952], [54956], [54959], [54960], [54961], [54962], [54964], [54965], [54969], [54970], [54971], [54972], [54996], [55000], [55011], [55013], [55014], [55015], [55016].
Props jrf, aristath, poena, justinahinon, SergeyBiryukov. See #56788.
git-svn-id: https://develop.svn.wordpress.org/trunk@55017 602fd350-edb4-49c9-b593-d223f7449a82
Docs: Remove the legacy example of passing a taxonomy to get_terms()
.
As of WordPress 4.5, taxonomies should be passed to get_terms()
via the taxonomy
argument in the $args
array:
{{{
$terms = get_terms( array(
'taxonomy' => 'post_tag',
'hide_empty' => false,
) );
}}}
The legacy way of passing a taxonomy via the function's first parameter was still mentioned in the documentation, causing some confusion.
This commit updates the function documentation to better highlight the currently recommended approach.
Follow-up to [36614].
Props ramon-fincken, sabernhardt, SergeyBiryukov. Fixes #57380.
git-svn-id: https://develop.svn.wordpress.org/trunk@55018 602fd350-edb4-49c9-b593-d223f7449a82
Tests: Bring some consistency to creating and updating objects in factory classes.
In various unit test factory classes, some of the create_object()
and update_object()
methods returned a WP_Error
object on failure, while a few others were documented to do so, but did not in practice, instead returning the value 0
or false
, or not accounting for a failure at all.
This commit aims to handle this in a consistent way by updating the methods to always return the object ID on success and a WP_Error
object on failure.
Includes:
@since
tags in some classes.Follow-up to [760/tests], [838/tests], [922/tests], [948/tests], [985/tests], [27178], [32659], [34855], [37563], [40968], [44497], [46262].
See #56793.
git-svn-id: https://develop.svn.wordpress.org/trunk@55019 602fd350-edb4-49c9-b593-d223f7449a82
Code Modernization: Rename parameters that use reserved keywords in phpunit/includes/class-wp-unittest-factory-for-thing.php
.
While using reserved PHP keywords as parameter name labels is allowed, in the context of function calls using named parameters in PHP 8.0+, this will easily lead to confusion. To avoid that, it is recommended not to use reserved keywords as function parameter names.
This commit renames the $function
parameter to $callback
in WP_UnitTest_Factory_For_Thing::callback()
.
Follow-up to [52946], [52996], [52997], [52998], [53003], [53014], [53029], [53039], [53116], [53117], [53137], [53174], [53184], [53185], [53192], [53193], [53198], [53203], [53207], [53215], [53216], [53220], [53230], [53232], [53236], [53239], [53240], [53242], [53243], [53245], [53246], [53257], [53269], [53270], [53271], [53272], [53273], [53274], [53275], [53276], [53277], [53281], [53283], [53284], [53285], [53287], [53364], [53365], [54927], [54929], [54930], [54931], [54932], [54933], [54938], [54943], [54944], [54945], [54946], [54947], [54948], [54950], [54951], [54952], [54956], [54959], [54960], [54961], [54962], [54964], [54965], [54969], [54970], [54971], [54972], [54996], [55000], [55011], [55013], [55014], [55015], [55016], [55017].
Props jrf, aristath, poena, justinahinon, SergeyBiryukov. See #56788.
git-svn-id: https://develop.svn.wordpress.org/trunk@55020 602fd350-edb4-49c9-b593-d223f7449a82
Code Modernization: Rename parameters that use reserved keywords in phpunit/includes/class-wp-unittest-factory-for-attachment.php
.
While using reserved PHP keywords as parameter name labels is allowed, in the context of function calls using named parameters in PHP 8.0+, this will easily lead to confusion. To avoid that, it is recommended not to use reserved keywords as function parameter names.
This commit:
$parent
parameter to $parent_post_id
in WP_UnitTest_Factory_For_Attachment::create_upload_object()
.$parent_post
parameter in wp_insert_attachment()
and WP_REST_Revisions_Controller::get_parent()
for consistency.Follow-up to [52946], [52996], [52997], [52998], [53003], [53014], [53029], [53039], [53116], [53117], [53137], [53174], [53184], [53185], [53192], [53193], [53198], [53203], [53207], [53215], [53216], [53220], [53230], [53232], [53236], [53239], [53240], [53242], [53243], [53245], [53246], [53257], [53269], [53270], [53271], [53272], [53273], [53274], [53275], [53276], [53277], [53281], [53283], [53284], [53285], [53287], [53364], [53365], [54927], [54929], [54930], [54931], [54932], [54933], [54938], [54943], [54944], [54945], [54946], [54947], [54948], [54950], [54951], [54952], [54956], [54959], [54960], [54961], [54962], [54964], [54965], [54969], [54970], [54971], [54972], [54996], [55000], [55011], [55013], [55014], [55015], [55016], [55017], [55020].
Props jrf, aristath, poena, justinahinon, SergeyBiryukov. See #56788.
git-svn-id: https://develop.svn.wordpress.org/trunk@55021 602fd350-edb4-49c9-b593-d223f7449a82
Coding Standards: Add visibility to Tests_Dependencies::test_enqueue_before_register()
.
Adds a public
visibility to a test where it was not explicitly specified. This continues the previous efforts to make sure visibility is declared on all methods.
Note: This will be enforced by WPCS 3.0.0.
Follow-up to [51919], [52009], [52010], [52338], [54889].
Props jrf. See #56791.
git-svn-id: https://develop.svn.wordpress.org/trunk@55022 602fd350-edb4-49c9-b593-d223f7449a82
Code Modernization: Rename parameters that use reserved keywords in phpunit/includes/functions.php
.
While using reserved PHP keywords as parameter name labels is allowed, in the context of function calls using named parameters in PHP 8.0+, this will easily lead to confusion. To avoid that, it is recommended not to use reserved keywords as function parameter names.
This commit renames the $function
parameter to $callback
in _test_filter_build_unique_id()
.
Follow-up to [52946], [52996], [52997], [52998], [53003], [53014], [53029], [53039], [53116], [53117], [53137], [53174], [53184], [53185], [53192], [53193], [53198], [53203], [53207], [53215], [53216], [53220], [53230], [53232], [53236], [53239], [53240], [53242], [53243], [53245], [53246], [53257], [53269], [53270], [53271], [53272], [53273], [53274], [53275], [53276], [53277], [53281], [53283], [53284], [53285], [53287], [53364], [53365], [54927], [54929], [54930], [54931], [54932], [54933], [54938], [54943], [54944], [54945], [54946], [54947], [54948], [54950], [54951], [54952], [54956], [54959], [54960], [54961], [54962], [54964], [54965], [54969], [54970], [54971], [54972], [54996], [55000], [55011], [55013], [55014], [55015], [55016], [55017], [55020], [55021].
Props jrf, aristath, poena, justinahinon, SergeyBiryukov. See #56788.
git-svn-id: https://develop.svn.wordpress.org/trunk@55023 602fd350-edb4-49c9-b593-d223f7449a82
Happy New Year! 🎄
Update copyright year to 2023 in license.txt
and bundled themes.
Follow-up to [18201], [23306], [28064], [36855], [36856], [39659], [40241], [42424], [46719], [46720], [47025], [47026], [49915], [52427].
git-svn-id: https://develop.svn.wordpress.org/trunk@55024 602fd350-edb4-49c9-b593-d223f7449a82
Tests: Update the terminology used for filter names in tests_add_filter()
.
This commit renames the $tag
and $function_to_add
parameters to match the add_filter()
function signature.
Includes:
$tag
parameter to $hook_name
.$function_to_add
parameter to $callback
.tests_add_filter()
and add_filter()
_test_filter_build_unique_id()
and _wp_filter_build_unique_id()
Follow-up to [760/tests], [38582], [43555], [46801], [50807], [52300], [53804], [53805], [55023].
See #56793.
git-svn-id: https://develop.svn.wordpress.org/trunk@55025 602fd350-edb4-49c9-b593-d223f7449a82
Networks and Sites: Mark required fields as such in New User Form.
This changeset adds required="required"
attributes to required form fields and uses wp_required_field_message()
and wp_required_field_indicator()
functions to improve the generated markup, and for better consistency with other required fields.
Props jackreichert, flixos90, afercia, sabernhardt. Fixes #38460.
git-svn-id: https://develop.svn.wordpress.org/trunk@55026 602fd350-edb4-49c9-b593-d223f7449a82
Code Modernization: Rename parameters that use reserved keywords in phpunit/includes/spy-rest-server.php
.
While using reserved PHP keywords as parameter name labels is allowed, in the context of function calls using named parameters in PHP 8.0+, this will easily lead to confusion. To avoid that, it is recommended not to use reserved keywords as function parameter names.
This commit renames the $namespace
parameter to $route_namespace
in Spy_REST_Server::register_route()
.
Follow-up to [52946], [52996], [52997], [52998], [53003], [53014], [53029], [53039], [53116], [53117], [53137], [53174], [53184], [53185], [53192], [53193], [53198], [53203], [53207], [53215], [53216], [53220], [53230], [53232], [53236], [53239], [53240], [53242], [53243], [53245], [53246], [53257], [53269], [53270], [53271], [53272], [53273], [53274], [53275], [53276], [53277], [53281], [53283], [53284], [53285], [53287], [53364], [53365], [54927], [54929], [54930], [54931], [54932], [54933], [54938], [54943], [54944], [54945], [54946], [54947], [54948], [54950], [54951], [54952], [54956], [54959], [54960], [54961], [54962], [54964], [54965], [54969], [54970], [54971], [54972], [54996], [55000], [55011], [55013], [55014], [55015], [55016], [55017], [55020], [55021], [55023].
Props jrf, aristath, poena, justinahinon, SergeyBiryukov. See #56788.
git-svn-id: https://develop.svn.wordpress.org/trunk@55027 602fd350-edb4-49c9-b593-d223f7449a82
Add PHP Core Round #9
Co-authored-by: Sergey Panteleev sergey@php.net
Lengthy commit list in Roundup 9
Fix Sebastian Bergmann link (#77)
Use Mastodon profile instead of Twitter
Corrected version PHP in Readme
Corrected links to email
Bump symfony/http-kernel from 4.4.43 to 4.4.50
Bumps symfony/http-kernel from 4.4.43 to 4.4.50.
updated-dependencies:
Signed-off-by: dependabot[bot] support@github.com
sockets updlite protocol support, with checksum coverage settings.
Close GH-10468
Fix type inference
Fixes oss-fuzz #55358
Merge branch 'PHP-8.1' into PHP-8.2
Merge branch 'PHP-8.2'
Fix resetting ZEND_GENERATOR_IN_FIBER flag
Signed-off-by: Bob Weinand bobwei9@hotmail.com
Merge branch 'PHP-8.1' into PHP-8.2
Merge branch 'PHP-8.2'
Look at executing generator for fiber destructor behaviour
Merge branch 'PHP-8.1' into PHP-8.2
Merge branch 'PHP-8.2'
Use bool and zend_result where it makes sense in sockets extension
Voidify php_sock_array_from_fd_set() as result is never used
Bring minimum precision inline with spprintf
The precision "minimum" for spprintf was changed in 3f23e6bca90545a180ac4dbc80712065b1281d74 with the cryptic comment "Enable 0 mode for echo/print". Since then the behaviour of spprintf and snprintf has not been the same. This results in some APIs handling precision differently than others, which then resulted in the following Xdebug issue: https://bugs.xdebug.org/view.php?id=2151
The "manpage" for snprinf says about precision:
An optional precision, in the form of a period ('.') followed by an
optional decimal digit string. Instead of a decimal digit string one
may write "*" or "*m$" (for some decimal integer m) to specify that the
precision is given in the next argument, or in the m-th argument, re‐
spectively, which must be of type int. If the precision is given as
just '.', the precision is taken to be zero. A negative precision is
taken as if the precision were omitted.
However, the snprintf implementation never supported this "negative precision", which is what PHP's default setting is in PG(precision). However, in 3f23e6bca90545a180ac4dbc80712065b1281d74 spprintf was made to support this.
Although this techinically can break BC, there is clearly a bug here, and I could not see any failing tests locally.
Fix GH-10152: Custom properties of Date's child classes are not serialised
Merge remote-tracking branch 'derickr/GH-10152-serialise-datetime' into PHP-8.2
Merge branch 'PHP-8.2'
Fixed GH-10447: 'p' format specifier does not yield 'Z' for 00:00
Merge remote-tracking branch 'derickr/GH-10447-p-format-specifier' into PHP-8.1
Merge branch 'PHP-8.1' into PHP-8.2
Merge branch 'PHP-8.2'
Refactor attributes values to use a list instead of an assoc array
Refactor attributes values to use a list instead of an assoc array