Commit 2938008651 for wordpress.org

commit 2938008651bc7305ea4f849e9681285ac4fa278b
Author: Weston Ruter <weston@xwp.co>
Date:   Sat Jan 3 07:17:31 2026 +0000

    Script Loader: Simplify data structure in `wp_default_packages_vendor()` to facilitate static analysis.

    This resolves two PHPStan level 7 issues: `offsetAccess.notFound` and `argument.type`.

    Follow-up to [44114].

    See #64238, #45065.

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


    git-svn-id: http://core.svn.wordpress.org/trunk@60737 1a063a9b-81f0-0310-95a4-ce76da25c4cd

diff --git a/wp-includes/script-loader.php b/wp-includes/script-loader.php
index c0108dc848..6408ff158a 100644
--- a/wp-includes/script-loader.php
+++ b/wp-includes/script-loader.php
@@ -88,21 +88,21 @@ function wp_default_packages_vendor( $scripts ) {
 	$suffix = wp_scripts_get_suffix();

 	$vendor_scripts = array(
-		'react',
-		'react-dom'         => array( 'react' ),
-		'react-jsx-runtime' => array( 'react' ),
-		'regenerator-runtime',
-		'moment',
-		'lodash',
-		'wp-polyfill-fetch',
-		'wp-polyfill-formdata',
-		'wp-polyfill-node-contains',
-		'wp-polyfill-url',
-		'wp-polyfill-dom-rect',
-		'wp-polyfill-element-closest',
-		'wp-polyfill-object-fit',
-		'wp-polyfill-inert',
-		'wp-polyfill',
+		'react'                       => array(),
+		'react-dom'                   => array( 'react' ),
+		'react-jsx-runtime'           => array( 'react' ),
+		'regenerator-runtime'         => array(),
+		'moment'                      => array(),
+		'lodash'                      => array(),
+		'wp-polyfill-fetch'           => array(),
+		'wp-polyfill-formdata'        => array(),
+		'wp-polyfill-node-contains'   => array(),
+		'wp-polyfill-url'             => array(),
+		'wp-polyfill-dom-rect'        => array(),
+		'wp-polyfill-element-closest' => array(),
+		'wp-polyfill-object-fit'      => array(),
+		'wp-polyfill-inert'           => array(),
+		'wp-polyfill'                 => array(),
 	);

 	$vendor_scripts_versions = array(
@@ -124,15 +124,13 @@ function wp_default_packages_vendor( $scripts ) {
 	);

 	foreach ( $vendor_scripts as $handle => $dependencies ) {
-		if ( is_string( $dependencies ) ) {
-			$handle       = $dependencies;
-			$dependencies = array();
-		}
-
-		$path    = "/wp-includes/js/dist/vendor/$handle$suffix.js";
-		$version = $vendor_scripts_versions[ $handle ];
-
-		$scripts->add( $handle, $path, $dependencies, $version, 1 );
+		$scripts->add(
+			$handle,
+			"/wp-includes/js/dist/vendor/$handle$suffix.js",
+			$dependencies,
+			$vendor_scripts_versions[ $handle ],
+			1
+		);
 	}

 	did_action( 'init' ) && $scripts->add_inline_script( 'lodash', 'window.lodash = _.noConflict();' );
diff --git a/wp-includes/version.php b/wp-includes/version.php
index b5c2f7f584..8d0117c0bd 100644
--- a/wp-includes/version.php
+++ b/wp-includes/version.php
@@ -16,7 +16,7 @@
  *
  * @global string $wp_version
  */
-$wp_version = '7.0-alpha-61424';
+$wp_version = '7.0-alpha-61425';

 /**
  * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.