[wp-trac] [WordPress Trac] #64369: Disable sourceURL Comments

WordPress Trac noreply at wordpress.org
Fri Feb 20 03:08:44 UTC 2026


#64369: Disable sourceURL Comments
-------------------------------+-------------------------------------------
 Reporter:  anton7249          |       Owner:  (none)
     Type:  defect (bug)       |      Status:  new
 Priority:  normal             |   Milestone:  7.0
Component:  Script Loader      |     Version:  6.9
 Severity:  normal             |  Resolution:
 Keywords:  2nd-opinion has-   |     Focuses:  javascript, css, performance
  patch                        |
-------------------------------+-------------------------------------------

Comment (by peterwilsoncc):

 @westonruter @jonsurrell I've linked a [https://github.com/WordPress
 /wordpress-develop/pull/10984 pull request] to this ticket to make this
 change.

 As the unit test suite runs on the `-src` directory, the `SCRIPT_DEBUG`
 constant is defined as true by default, see this
 [https://github.com/WordPress/wordpress-
 develop/blob/a268866b06c4da267038875eee767df98e025def/src/wp-includes
 /default-constants.php#L121-L129 block of code in default-constants.php]

 This has allowed me to only modify files in the source code for the pull
 request but does mean the tests will fail if a developer sets the constant
 to false in their test config file.

 However, this is already the case as a lot of the script enqueuing tests
 already assume it is set to false and look for `min.js` extensions. If you
 set the constant to false and run `phpunit --filter
 test_various_strategy_dependency_chains` you'll see an example where the
 jQuery enqueues fail to return the expected result.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/64369#comment:13>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list