This enables developers to directly invoke the Composer instance of the `wordpressdevelop/php` container from their host machine, making it easier to call Composer-specific scripts: linting, formatting, etc.
Props paulbonneau, SirLouen.
Fixes#63912.
Built from https://develop.svn.wordpress.org/trunk@60803
git-svn-id: http://core.svn.wordpress.org/trunk@60139 1a063a9b-81f0-0310-95a4-ce76da25c4cd
PHP 8.5 deprecates the `__sleep()` and `__wakeup()` magic methods in favor of `__serialize()` and `__unserialize()`:
> `Deprecated: The __wakeup() serialization magic method has been deprecated. Implement __unserialize() instead (or in addition, if support for old PHP versions is necessary)`
For PHP < 7.4 compatibility, `__sleep()` and `__wakeup()` need to be kept for the time being.
This commit moves the logic of `__wakeup()` methods in core to `__unserialize()`, and turns the former into wrappers. WordPress core does not use `__sleep()` methods, so these are the only changes required.
Reference: [https://wiki.php.net/rfc/deprecations_php_8_5#deprecate_the_sleep_and_wakeup_magic_methods PHP RFC: Deprecations for PHP 8.5: Deprecate the __sleep() and __wakeup() magic methods].
Follow-up to [56835], [60787], [60795].
Props TobiasBg, tusharbharti, swissspidy, dmsnell, SergeyBiryukov.
Fixes#63962. See #63061.
Built from https://develop.svn.wordpress.org/trunk@60796
git-svn-id: http://core.svn.wordpress.org/trunk@60132 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This is the fourth in a series of patches to modernize and standardize UTF-8 handling.
`wp_check_invalid_utf8()` has long been dependent on the runtime configuration of the system running it. This has led to hard-to-diagnose issues with text containing invalid UTF-8. The function has also had an apparent defect since its inception: when requesting to strip invalid bytes it returns an empty string.
This patch updates the function to remove all dependency on the system running it. It defers to the `mbstring` extension if that’s available, falling back to the new UTF-8 scanning pipeline.
To support this work, `wp_scrub_utf8()` is created with a proper fallback so that the remaining logic inside of `wp_check_invalid_utf8()` can be minimized. The defect in this function has been fixed, but instead of stripping the invalid bytes it will replace them with the Unicode replacement character for stronger security guarantees.
Developed in https://github.com/WordPress/wordpress-develop/pull/9498
Discussed in https://core.trac.wordpress.org/ticket/63837
Follow-up to: [60768].
Props askapache, chriscct7, Cyrille37, desrosj, dmsnell, helen, jonsurrell, kitchin, miqrogroove, pbearne, shailu25.
Fixes#63837, #29717.
See #63863.
Built from https://develop.svn.wordpress.org/trunk@60793
git-svn-id: http://core.svn.wordpress.org/trunk@60129 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Add a block-agnostic version of the `block_bindings_supported_attributes_{$block_type}` filter first introduced in [60611].
This allows adding block bindings support for attributes of multiple different blocks in one go.
Follow-up to [60611].
Props bernhard-reiter.
See #62090.
Built from https://develop.svn.wordpress.org/trunk@60790
git-svn-id: http://core.svn.wordpress.org/trunk@60126 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This aims to avoid extra changes to database structure when type case is the only difference:
{{{
Changed type of wp_table.field from varchar(255) to VARCHAR(255)
}}}
Follow-up to [1575], [37532].
Props leewillis77, tristanleboss, lordspace, johnbillion, SergeyBiryukov.
Fixes#59481.
Built from https://develop.svn.wordpress.org/trunk@60789
git-svn-id: http://core.svn.wordpress.org/trunk@60125 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Add the `aria-haspopup` attribute and `aria-controls` on the Add Media button in the classic editor, so that screen reader users are notified about the behavior of the button.
Props alh0319, rishabhwp, joedolson.
Fixes#63973.
Built from https://develop.svn.wordpress.org/trunk@60786
git-svn-id: http://core.svn.wordpress.org/trunk@60122 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Rename the arguments in `comment_type()` to use underscore separators per coding standards and to add vowels for clarity.
"Pingback" and "Trackback" in the variable names are left unchanged as they are concatenated for display to site owners.
See #63168.
Built from https://develop.svn.wordpress.org/trunk@60779
git-svn-id: http://core.svn.wordpress.org/trunk@60115 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This aims to bring more consistency with the rest of core, and more closely mirrors the similar changes upstream to use `sys_get_temp_dir()`.
The potential `false` return value was not checked by the only caller in `Text_Diff_Engine_shell::diff()`.
Follow-up to [7747], [48464], [49185], [60776].
Props TimoTijhof, apermo, SergeyBiryukov.
Fixes#63711.
Built from https://develop.svn.wordpress.org/trunk@60777
git-svn-id: http://core.svn.wordpress.org/trunk@60113 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This is the third in a series of patches to modernize and standardize UTF-8 handling.
When the fallback UTF-8 validation code was added it was placed inside formatting.php; however, that validation logic can be reused for a number of related UTF-8 functions. To faciliate this it was moved into a new location and loaded early. This patch is follow-up to that first half, whereby the UTF-8 scanning logic forms its own new `_wp_scan_utf8()` function. This new UTF-8 scanner is a low-level function which forms a shared spec-compliant processing core to power multiple fallback functions and some new functionality as well.
Developed in https://github.com/WordPress/wordpress-develop/pull/9830
Discussed in https://core.trac.wordpress.org/ticket/63863
Follow-up to: [60743].
See #63863.
Built from https://develop.svn.wordpress.org/trunk@60768
git-svn-id: http://core.svn.wordpress.org/trunk@60104 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Because an exact version is pinned for `composer/ca-bundle`, the `composer update` command cannot update the dependency to the latest version. The command also does not work for a single dependency due to the fact that Composer has been configured not to generate a `composer.lock` file.
This updates the Grunt task to determine the new version using `composer outdated` before running `composer require composer/ca-bundle:NEW_VERSION --dev` to properly update the pinned version.
This also updates the build process test workflow to confirm that the certificate-related files under version control in `src/wp-includes/certificates` are up to date.
Props johnbillion.
Fixes#63939.
Built from https://develop.svn.wordpress.org/trunk@60765
git-svn-id: http://core.svn.wordpress.org/trunk@60101 1a063a9b-81f0-0310-95a4-ce76da25c4cd
The `WP_Tests_Image_Resize_UnitTestCase` class extends `WP_Image_UnitTestCase`, which already has a `wp_image_editors` filter performing the same action.
This also officially declares `$editor_engine` as a property in the base class.
Props mukesh27.
See #63167.
Built from https://develop.svn.wordpress.org/trunk@60763
git-svn-id: http://core.svn.wordpress.org/trunk@60099 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This is the second in a series of patches to modernize and standardize UTF-8 handling.
When the fallback UTF-8 validation code was added it was placed inside formatting.php; however, that validation logic can be reused for a number of related UTF-8 functions. To faciliate this it should move into a new location and be loaded early. This patch is the first half of doing that, whereby the original fallback function is moved unchanged to the `compat-utf8.php` module. The follow-up patch will abstract the UTF-8 scanning logic for reuse. Splitting this into a move and a separate change involves an extra step, but faciliates tracking the heritage of the code through the changes.
Developed in https://github.com/WordPress/wordpress-develop/pull/9825
Discussed in https://core.trac.wordpress.org/ticket/63863
Follow-up to: [60630].
See #63863.
Built from https://develop.svn.wordpress.org/trunk@60743
git-svn-id: http://core.svn.wordpress.org/trunk@60079 1a063a9b-81f0-0310-95a4-ce76da25c4cd
The updated PHP 8.4 and 8.3 containers are running Imagick 7 which is producing some test failures for AVIFs and PNGs with 1-bit transparency. This requires further investigation, possibly accompanied by more comprehensive testing across Imagick versions, so these tests are disabled for now.
Additional missing assertions have also been added which ensure an unexpected `WP_Error` instance correctly fails the test and is not passed to an image processing function.
Props johnbillion, siliconforks, desrosj, jorbin.
See #63932
Built from https://develop.svn.wordpress.org/trunk@60736
git-svn-id: http://core.svn.wordpress.org/trunk@60072 1a063a9b-81f0-0310-95a4-ce76da25c4cd
`esc_url()` will now prepend `https://` to the URL if it does not already contain a scheme and the first item in the `$protocols` array is `'https'`.
Follow-up to [5088], [6015], [13299], [33851], [60672].
Props sabernhardt, mkaz, rachelbaker, audrasjb, costdev, aksl95, johnbillion, pcarvalho, SergeyBiryukov.
Fixes#52886.
Built from https://develop.svn.wordpress.org/trunk@60734
git-svn-id: http://core.svn.wordpress.org/trunk@60070 1a063a9b-81f0-0310-95a4-ce76da25c4cd