[wp-trac] [WordPress Trac] #57844: Tests/Script Loader: Run build step in PHP Unit test actions.

WordPress Trac noreply at wordpress.org
Thu Mar 2 04:00:26 UTC 2023


#57844: Tests/Script Loader: Run build step in PHP Unit test actions.
------------------------------+-------------------------
 Reporter:  peterwilsoncc     |      Owner:  (none)
     Type:  defect (bug)      |     Status:  new
 Priority:  normal            |  Milestone:  6.2
Component:  Build/Test Tools  |    Version:
 Severity:  normal            |   Keywords:  needs-patch
  Focuses:                    |
------------------------------+-------------------------
 The files `src/wp-includes/assets/script-loader-react-*.php` are created
 during the NPM build and included within the script loader.

 Unlike `src/wp-includes/assets/script-loader-packages.min.php`, these
 files are not included in the commit when updating WordPress packages.

 As a result the PHP Unit actions are now throwing warnings due to the
 missing files:

 {{{
 Warning: include(/var/www/src/wp-includes/assets/script-loader-react-
 refresh-entry.php): failed to open stream: No such file or directory in
 /var/www/src/wp-includes/script-loader.php on line 243
 Warning: include(): Failed opening '/var/www/src/wp-includes/assets
 /script-loader-react-refresh-entry.php' for inclusion
 (include_path='.:/usr/local/lib/php') in /var/www/src/wp-includes/script-
 loader.php on line 243
 Warning: include(/var/www/src/wp-includes/assets/script-loader-
 packages.php): failed to open stream: No such file or directory in
 /var/www/src/wp-includes/script-loader.php on line 278
 Warning: include(): Failed opening '/var/www/src/wp-includes/assets
 /script-loader-packages.php' for inclusion
 (include_path='.:/usr/local/lib/php') in /var/www/src/wp-includes/script-
 loader.php on line 278
 Warning: Invalid argument supplied for foreach() in /var/www/src/wp-
 includes/script-loader.php on line 280
 }}}

 To resolve this, an `npm run build:dev` will need to be included in the
 phpunit actions.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/57844>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list