Opened 6 months ago
Last modified 3 weeks ago
#62124 assigned enhancement
wp_parse_url() - code update for performance and removal of now unnecessary code fix
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | Future Release | Priority: | normal |
Severity: | trivial | Version: | 6.7 |
Component: | HTTP API | Keywords: | has-patch has-unit-tests |
Focuses: | performance | Cc: |
Description
The current code of wp_parse_url() is fixing an issue of the native PHP function parse_url() in the PHP version around 5.2~5.4+. With the oldest currently supported PHP version this fix is not necessary. I propose a very simple code solution that does the same job but 25% faster on average in a real-world scenario. It passes all unit tests and in half of the time.
Functions _get_component_from_parsed_url_array()
and _wp_translate_php_url_constant_to_key()
probably can be removed but they are inside unit tests and I'm not experienced enough to know how to deprecate them. In WP core codebase there are no references to any of them.
I made a commit on GitHub with my solution https://github.com/WordPress/wordpress-develop/commit/325e3b6d01fc3182205b2fbb0794b06c56db533c
Change History (15)
This ticket was mentioned in Slack in #core-performance by mukeshpanchal27. View the logs.
4 months ago
This ticket was mentioned in PR #7743 on WordPress/wordpress-develop by @wpseeddoctor.
4 months ago
#3
Update wp_parse_url() for performance and legacy code removal
With the current supported PHP, it's no longer necessary to use this function's code to mitigate PHP incompatibility. This change aims to remove the legacy fix and improve performance.
Functions "_get_component_from_parsed_url_array()" and "_wp_translate_php_url_constant_to_key()" are not required for the new version of the function
Trac ticket:
https://core.trac.wordpress.org/ticket/62124
#4
in reply to:
↑ 2
;
follow-up:
↓ 5
@
4 months ago
Hi,
here is the pull request: https://github.com/WordPress/wordpress-develop/pull/7743
Replying to pbearne:
@wpseeddoctor can you please create a pull request for this code?
So we can see if the tests run OK
#5
in reply to:
↑ 4
@
4 months ago
Replying to wpseeddoctor:
Hi,
here is the pull request: https://github.com/WordPress/wordpress-develop/pull/7743
Replying to pbearne:
@wpseeddoctor can you please create a pull request for this code?
So we can see if the tests run OK
Thank you
There are few whitespace issues https://github.com/WordPress/wordpress-develop/pull/7743/files that it would great if you can fix
the good news is nothing has broken
Performance Test Results All numbers are median values over 2 repetitions with 20 iterations each. Note: Due to the nature of how GitHub Actions work, some variance in the results is expected. Admin › Locale: en_US ┌─────────┬───────────────────┬────────────┬────────────┬───────────┬──────────┬─────────────────────┬───────────┐ │ (index) │ Metric │ Before │ After │ Diff abs. │ Diff % │ STD │ MAD │ ├─────────┼───────────────────┼────────────┼────────────┼───────────┼──────────┼─────────────────────┼───────────┤ │ 0 │ 'timeToFirstByte' │ '28.90 ms' │ '29.00 ms' │ '0.10 ms' │ '0.34 %' │ '1.32 ms' │ '0.70 ms' │ │ 1 │ 'wpTotal' │ '26.02 ms' │ '26.33 ms' │ '0.30 ms' │ '1.16 %' │ '1.26 ms' │ '0.63 ms' │ │ 2 │ 'wpMemoryUsage' │ '3.57 MB' │ '3.57 MB' │ '0.00 MB' │ '0.01 %' │ '0.00 MB' │ '0.00 MB' │ │ 3 │ 'wpDbQueries' │ 2 │ 2 │ 0 │ '0.00 %' │ 0.31224989991991986 │ 0 │ │ 4 │ 'wpExtObjCache' │ 'yes' │ 'yes' │ '' │ '' │ '' │ '' │ └─────────┴───────────────────┴────────────┴────────────┴───────────┴──────────┴─────────────────────┴───────────┘ Admin › Locale: de_DE ┌─────────┬───────────────────┬────────────┬────────────┬────────────┬───────────┬─────────────────────┬───────────┐ │ (index) │ Metric │ Before │ After │ Diff abs. │ Diff % │ STD │ MAD │ ├─────────┼───────────────────┼────────────┼────────────┼────────────┼───────────┼─────────────────────┼───────────┤ │ 0 │ 'timeToFirstByte' │ '33.95 ms' │ '32.00 ms' │ '-1.95 ms' │ '-6.09 %' │ '8.80 ms' │ '1.00 ms' │ │ 1 │ 'wpTotal' │ '28.63 ms' │ '28.50 ms' │ '-0.13 ms' │ '-0.46 %' │ '6.75 ms' │ '1.88 ms' │ │ 2 │ 'wpMemoryUsage' │ '3.84 MB' │ '3.84 MB' │ '0.00 MB' │ '0.06 %' │ '0.27 MB' │ '0.27 MB' │ │ 3 │ 'wpDbQueries' │ 2 │ 2 │ 0 │ '0.00 %' │ 0.22220486043288945 │ 0 │ │ 4 │ 'wpExtObjCache' │ 'yes' │ 'yes' │ '' │ '' │ '' │ '' │ └─────────┴───────────────────┴────────────┴────────────┴────────────┴───────────┴─────────────────────┴───────────┘ Front End › Theme: twentytwentyone, Locale: en_US ┌─────────┬──────────────────────────┬─────────────┬─────────────┬────────────┬───────────┬───────────┬───────────┐ │ (index) │ Metric │ Before │ After │ Diff abs. │ Diff % │ STD │ MAD │ ├─────────┼──────────────────────────┼─────────────┼─────────────┼────────────┼───────────┼───────────┼───────────┤ │ 0 │ 'timeToFirstByte' │ '41.65 ms' │ '42.60 ms' │ '0.95 ms' │ '2.23 %' │ '3.29 ms' │ '1.65 ms' │ │ 1 │ 'largestContentfulPaint' │ '129.00 ms' │ '127.65 ms' │ '-1.35 ms' │ '-1.06 %' │ '9.42 ms' │ '4.65 ms' │ │ 2 │ 'lcpMinusTtfb' │ '85.40 ms' │ '84.35 ms' │ '-1.05 ms' │ '-1.24 %' │ '7.32 ms' │ '3.90 ms' │ │ 3 │ 'wpBeforeTemplate' │ '11.25 ms' │ '11.44 ms' │ '0.19 ms' │ '1.66 %' │ '1.41 ms' │ '0.93 ms' │ │ 4 │ 'wpTemplate' │ '27.52 ms' │ '27.46 ms' │ '-0.06 ms' │ '-0.24 %' │ '2.60 ms' │ '0.65 ms' │ │ 5 │ 'wpTotal' │ '38.91 ms' │ '39.73 ms' │ '0.81 ms' │ '2.05 %' │ '3.22 ms' │ '1.47 ms' │ │ 6 │ 'wpMemoryUsage' │ '3.52 MB' │ '3.52 MB' │ '0.00 MB' │ '0.01 %' │ '0.02 MB' │ '0.00 MB' │ │ 7 │ 'wpDbQueries' │ 0 │ 0 │ '' │ '' │ '' │ '' │ │ 8 │ 'wpExtObjCache' │ 'yes' │ 'yes' │ '' │ '' │ '' │ '' │ └─────────┴──────────────────────────┴─────────────┴─────────────┴────────────┴───────────┴───────────┴───────────┘ Front End › Theme: twentytwentyone, Locale: de_DE ┌─────────┬──────────────────────────┬─────────────┬─────────────┬────────────┬───────────┬───────────┬───────────┐ │ (index) │ Metric │ Before │ After │ Diff abs. │ Diff % │ STD │ MAD │ ├─────────┼──────────────────────────┼─────────────┼─────────────┼────────────┼───────────┼───────────┼───────────┤ │ 0 │ 'timeToFirstByte' │ '42.80 ms' │ '42.65 ms' │ '-0.15 ms' │ '-0.35 %' │ '1.50 ms' │ '0.75 ms' │ │ 1 │ 'largestContentfulPaint' │ '130.25 ms' │ '129.15 ms' │ '-1.10 ms' │ '-0.85 %' │ '7.09 ms' │ '3.80 ms' │ │ 2 │ 'lcpMinusTtfb' │ '86.10 ms' │ '86.60 ms' │ '0.50 ms' │ '0.58 %' │ '6.98 ms' │ '4.25 ms' │ │ 3 │ 'wpBeforeTemplate' │ '12.03 ms' │ '12.04 ms' │ '0.01 ms' │ '0.04 %' │ '1.36 ms' │ '1.04 ms' │ │ 4 │ 'wpTemplate' │ '27.58 ms' │ '27.51 ms' │ '-0.07 ms' │ '-0.27 %' │ '1.94 ms' │ '0.52 ms' │ │ 5 │ 'wpTotal' │ '39.81 ms' │ '39.91 ms' │ '0.10 ms' │ '0.25 %' │ '2.50 ms' │ '1.26 ms' │ │ 6 │ 'wpMemoryUsage' │ '3.72 MB' │ '3.75 MB' │ '0.04 MB' │ '0.96 %' │ '0.17 MB' │ '0.11 MB' │ │ 7 │ 'wpDbQueries' │ 0 │ 0 │ '' │ '' │ '' │ '' │ │ 8 │ 'wpExtObjCache' │ 'yes' │ 'yes' │ '' │ '' │ '' │ '' │ └─────────┴──────────────────────────┴─────────────┴─────────────┴────────────┴───────────┴───────────┴───────────┘ Front End › Theme: twentytwentythree, Locale: en_US ┌─────────┬──────────────────────────┬─────────────┬─────────────┬────────────┬───────────┬───────────┬───────────┐ │ (index) │ Metric │ Before │ After │ Diff abs. │ Diff % │ STD │ MAD │ ├─────────┼──────────────────────────┼─────────────┼─────────────┼────────────┼───────────┼───────────┼───────────┤ │ 0 │ 'timeToFirstByte' │ '50.00 ms' │ '50.20 ms' │ '0.20 ms' │ '0.40 %' │ '2.56 ms' │ '0.85 ms' │ │ 1 │ 'largestContentfulPaint' │ '124.00 ms' │ '124.60 ms' │ '0.60 ms' │ '0.48 %' │ '5.19 ms' │ '2.85 ms' │ │ 2 │ 'lcpMinusTtfb' │ '72.65 ms' │ '73.05 ms' │ '0.40 ms' │ '0.55 %' │ '3.88 ms' │ '1.85 ms' │ │ 3 │ 'wpBeforeTemplate' │ '13.37 ms' │ '13.64 ms' │ '0.27 ms' │ '1.98 %' │ '2.27 ms' │ '1.79 ms' │ │ 4 │ 'wpTemplate' │ '28.07 ms' │ '28.16 ms' │ '0.09 ms' │ '0.34 %' │ '2.90 ms' │ '1.36 ms' │ │ 5 │ 'wpTotal' │ '41.84 ms' │ '41.36 ms' │ '-0.49 ms' │ '-1.18 %' │ '4.61 ms' │ '2.71 ms' │ │ 6 │ 'wpMemoryUsage' │ '3.86 MB' │ '3.86 MB' │ '0.00 MB' │ '0.01 %' │ '0.38 MB' │ '0.35 MB' │ │ 7 │ 'wpDbQueries' │ 0 │ 0 │ '' │ '' │ '' │ '' │ │ 8 │ 'wpExtObjCache' │ 'yes' │ 'yes' │ '' │ '' │ '' │ '' │ └─────────┴──────────────────────────┴─────────────┴─────────────┴────────────┴───────────┴───────────┴───────────┘ Front End › Theme: twentytwentythree, Locale: de_DE ┌─────────┬──────────────────────────┬─────────────┬─────────────┬────────────┬───────────┬───────────┬───────────┐ │ (index) │ Metric │ Before │ After │ Diff abs. │ Diff % │ STD │ MAD │ ├─────────┼──────────────────────────┼─────────────┼─────────────┼────────────┼───────────┼───────────┼───────────┤ │ 0 │ 'timeToFirstByte' │ '51.75 ms' │ '52.00 ms' │ '0.25 ms' │ '0.48 %' │ '2.43 ms' │ '1.15 ms' │ │ 1 │ 'largestContentfulPaint' │ '127.25 ms' │ '125.00 ms' │ '-2.25 ms' │ '-1.80 %' │ '4.24 ms' │ '2.80 ms' │ │ 2 │ 'lcpMinusTtfb' │ '74.10 ms' │ '72.55 ms' │ '-1.55 ms' │ '-2.14 %' │ '4.02 ms' │ '1.65 ms' │ │ 3 │ 'wpBeforeTemplate' │ '14.73 ms' │ '14.57 ms' │ '-0.16 ms' │ '-1.10 %' │ '2.71 ms' │ '2.13 ms' │ │ 4 │ 'wpTemplate' │ '31.27 ms' │ '31.18 ms' │ '-0.09 ms' │ '-0.27 %' │ '2.92 ms' │ '2.36 ms' │ │ 5 │ 'wpTotal' │ '46.53 ms' │ '46.44 ms' │ '-0.10 ms' │ '-0.22 %' │ '5.16 ms' │ '4.78 ms' │ │ 6 │ 'wpMemoryUsage' │ '4.14 MB' │ '4.14 MB' │ '0.00 MB' │ '0.00 %' │ '0.51 MB' │ '0.44 MB' │ │ 7 │ 'wpDbQueries' │ 0 │ 0 │ '' │ '' │ '' │ '' │ │ 8 │ 'wpExtObjCache' │ 'yes' │ 'yes' │ '' │ '' │ '' │ '' │ └─────────┴──────────────────────────┴─────────────┴─────────────┴────────────┴───────────┴───────────┴───────────┘ Front End › Theme: twentytwentyfour, Locale: en_US ┌─────────┬──────────────────────────┬─────────────┬─────────────┬────────────┬───────────┬────────────┬───────────┐ │ (index) │ Metric │ Before │ After │ Diff abs. │ Diff % │ STD │ MAD │ ├─────────┼──────────────────────────┼─────────────┼─────────────┼────────────┼───────────┼────────────┼───────────┤ │ 0 │ 'timeToFirstByte' │ '77.95 ms' │ '78.40 ms' │ '0.45 ms' │ '0.57 %' │ '2.50 ms' │ '1.30 ms' │ │ 1 │ 'largestContentfulPaint' │ '201.45 ms' │ '200.30 ms' │ '-1.15 ms' │ '-0.57 %' │ '9.32 ms' │ '3.20 ms' │ │ 2 │ 'lcpMinusTtfb' │ '122.55 ms' │ '122.35 ms' │ '-0.20 ms' │ '-0.16 %' │ '8.15 ms' │ '3.05 ms' │ │ 3 │ 'wpBeforeTemplate' │ '14.98 ms' │ '15.11 ms' │ '0.13 ms' │ '0.86 %' │ '2.64 ms' │ '1.80 ms' │ │ 4 │ 'wpTemplate' │ '31.75 ms' │ '31.88 ms' │ '0.13 ms' │ '0.41 %' │ '12.11 ms' │ '3.89 ms' │ │ 5 │ 'wpTotal' │ '47.59 ms' │ '47.52 ms' │ '-0.06 ms' │ '-0.14 %' │ '13.38 ms' │ '6.43 ms' │ │ 6 │ 'wpMemoryUsage' │ '4.42 MB' │ '4.42 MB' │ '0.00 MB' │ '0.01 %' │ '0.48 MB' │ '0.41 MB' │ │ 7 │ 'wpDbQueries' │ 0 │ 0 │ '' │ '' │ '' │ '' │ │ 8 │ 'wpExtObjCache' │ 'yes' │ 'yes' │ '' │ '' │ '' │ '' │ └─────────┴──────────────────────────┴─────────────┴─────────────┴────────────┴───────────┴────────────┴───────────┘ Front End › Theme: twentytwentyfour, Locale: de_DE ┌─────────┬──────────────────────────┬─────────────┬─────────────┬────────────┬───────────┬────────────┬───────────┐ │ (index) │ Metric │ Before │ After │ Diff abs. │ Diff % │ STD │ MAD │ ├─────────┼──────────────────────────┼─────────────┼─────────────┼────────────┼───────────┼────────────┼───────────┤ │ 0 │ 'timeToFirstByte' │ '81.00 ms' │ '80.20 ms' │ '-0.80 ms' │ '-1.00 %' │ '2.14 ms' │ '1.35 ms' │ │ 1 │ 'largestContentfulPaint' │ '203.90 ms' │ '205.35 ms' │ '1.45 ms' │ '0.71 %' │ '5.40 ms' │ '3.70 ms' │ │ 2 │ 'lcpMinusTtfb' │ '123.15 ms' │ '125.00 ms' │ '1.85 ms' │ '1.48 %' │ '5.06 ms' │ '3.95 ms' │ │ 3 │ 'wpBeforeTemplate' │ '15.52 ms' │ '15.70 ms' │ '0.18 ms' │ '1.12 %' │ '2.75 ms' │ '1.83 ms' │ │ 4 │ 'wpTemplate' │ '32.18 ms' │ '32.34 ms' │ '0.16 ms' │ '0.51 %' │ '14.26 ms' │ '4.88 ms' │ │ 5 │ 'wpTotal' │ '48.65 ms' │ '49.03 ms' │ '0.38 ms' │ '0.79 %' │ '15.84 ms' │ '9.28 ms' │ │ 6 │ 'wpMemoryUsage' │ '4.54 MB' │ '4.55 MB' │ '0.01 MB' │ '0.13 %' │ '0.51 MB' │ '0.34 MB' │ │ 7 │ 'wpDbQueries' │ 0 │ 0 │ '' │ '' │ '' │ '' │ │ 8 │ 'wpExtObjCache' │ 'yes' │ 'yes' │ '' │ '' │ '' │ '' │ └─────────┴──────────────────────────┴─────────────┴─────────────┴────────────┴───────────┴────────────┴───────────┘
#6
in reply to:
↑ 2
@
4 months ago
@pbearne errors have been rectified and all tests ran OK.
Replying to pbearne:
@wpseeddoctor can you please create a pull request for this code?
So we can see if the tests run OK
#7
@
6 weeks ago
- Milestone changed from Awaiting Review to 6.8
- Owner set to pbearne
- Status changed from new to assigned
This ticket was mentioned in Slack in #core-performance by flixos90. View the logs.
3 weeks ago
#9
@
3 weeks ago
here is how you deprecate a function
- @deprecated 6.8.0 * */
function _get_component_from_parsed_url_array( $url_parts, $component = -1 ) {
_deprecated_function( FUNCTION, '6.8.0' );
#10
@
3 weeks ago
Deprecated functions moved to https://github.com/WpSpeedDoctor/wordpress-develop/blob/patch-1/src/wp-includes/deprecated.php
This ticket was mentioned in Slack in #core by audrasjb. View the logs.
3 weeks ago
#12
@
3 weeks ago
- Milestone changed from 6.8 to Future Release
As per today's bug scrub: It appears this ticket is still needs some work. As 6.8 beta 1 is very close, I'm moving it to Future Release. Feel free to move it back to 6.8 if it can be committed by Monday.
#13
@
3 weeks ago
@pbearne Can you help me understand where it's stuck?
After I moved deprecated functions into another file, tests broke, but I can't see any issues and I can't see if there is a log what exactly went wrong with those tests.
#14
@
3 weeks ago
@wpseeddoctor I don't know
@audrasjb do you know what is left to be done on this ticket?
#15
@
3 weeks ago
Here are the failing unit tests from the PR:
There were 16 failures: 1) Tests_HTTP_HTTP::test_get_component_from_parsed_url_array with data set #0 ('http://example.com/', -1, array('http', 'example.com', '/')) Failed asserting that null is identical to Array &0 ( 'scheme' => 'http' 'host' => 'example.com' 'path' => '/' ). /var/www/tests/phpunit/tests/http/http.php:343 phpvfscomposer:///var/www/vendor/phpunit/phpunit/phpunit:97 /var/www/vendor/bin/phpunit:118 2) Tests_HTTP_HTTP::test_get_component_from_parsed_url_array with data set #1 ('http://example.com/', -1, array('http', 'example.com', '/')) Failed asserting that null is identical to Array &0 ( 'scheme' => 'http' 'host' => 'example.com' 'path' => '/' ). /var/www/tests/phpunit/tests/http/http.php:343 phpvfscomposer:///var/www/vendor/phpunit/phpunit/phpunit:97 /var/www/vendor/bin/phpunit:118 3) Tests_HTTP_HTTP::test_get_component_from_parsed_url_array with data set #2 ('http://example.com/', 1, 'example.com') Failed asserting that null is identical to 'example.com'. /var/www/tests/phpunit/tests/http/http.php:343 phpvfscomposer:///var/www/vendor/phpunit/phpunit/phpunit:97 /var/www/vendor/bin/phpunit:118 4) Tests_HTTP_HTTP::test_get_component_from_parsed_url_array with data set #3 ('http://example.com/', 3, null) Unexpected deprecation notice for _get_component_from_parsed_url_array. Function _get_component_from_parsed_url_array is deprecated since version 6.8.0 with no alternative available. Failed asserting that an array is empty. /var/www/tests/phpunit/includes/abstract-testcase.php:643 /var/www/tests/phpunit/includes/abstract-testcase.php:655 /var/www/vendor/yoast/phpunit-polyfills/src/TestCases/TestCasePHPUnitGte8.php:88 phpvfscomposer:///var/www/vendor/phpunit/phpunit/phpunit:97 /var/www/vendor/bin/phpunit:118 5) Tests_HTTP_HTTP::test_get_component_from_parsed_url_array with data set #4 ('http:///example.com', -1, false) Failed asserting that null is identical to false. /var/www/tests/phpunit/tests/http/http.php:343 phpvfscomposer:///var/www/vendor/phpunit/phpunit/phpunit:97 /var/www/vendor/bin/phpunit:118 6) Tests_HTTP_HTTP::test_get_component_from_parsed_url_array with data set #5 ('http:///example.com', 1, null) Unexpected deprecation notice for _get_component_from_parsed_url_array. Function _get_component_from_parsed_url_array is deprecated since version 6.8.0 with no alternative available. Failed asserting that an array is empty. /var/www/tests/phpunit/includes/abstract-testcase.php:643 /var/www/tests/phpunit/includes/abstract-testcase.php:655 /var/www/vendor/yoast/phpunit-polyfills/src/TestCases/TestCasePHPUnitGte8.php:88 phpvfscomposer:///var/www/vendor/phpunit/phpunit/phpunit:97 /var/www/vendor/bin/phpunit:118 7) Tests_HTTP_HTTP::test_wp_translate_php_url_constant_to_key with data set #0 (0, 'scheme') Failed asserting that null is identical to 'scheme'. /var/www/tests/phpunit/tests/http/http.php:383 phpvfscomposer:///var/www/vendor/phpunit/phpunit/phpunit:97 /var/www/vendor/bin/phpunit:118 8) Tests_HTTP_HTTP::test_wp_translate_php_url_constant_to_key with data set #1 (1, 'host') Failed asserting that null is identical to 'host'. /var/www/tests/phpunit/tests/http/http.php:383 phpvfscomposer:///var/www/vendor/phpunit/phpunit/phpunit:97 /var/www/vendor/bin/phpunit:118 9) Tests_HTTP_HTTP::test_wp_translate_php_url_constant_to_key with data set #2 (2, 'port') Failed asserting that null is identical to 'port'. /var/www/tests/phpunit/tests/http/http.php:383 phpvfscomposer:///var/www/vendor/phpunit/phpunit/phpunit:97 /var/www/vendor/bin/phpunit:118 10) Tests_HTTP_HTTP::test_wp_translate_php_url_constant_to_key with data set #3 (3, 'user') Failed asserting that null is identical to 'user'. /var/www/tests/phpunit/tests/http/http.php:383 phpvfscomposer:///var/www/vendor/phpunit/phpunit/phpunit:97 /var/www/vendor/bin/phpunit:118 11) Tests_HTTP_HTTP::test_wp_translate_php_url_constant_to_key with data set #4 (4, 'pass') Failed asserting that null is identical to 'pass'. /var/www/tests/phpunit/tests/http/http.php:383 phpvfscomposer:///var/www/vendor/phpunit/phpunit/phpunit:97 /var/www/vendor/bin/phpunit:118 12) Tests_HTTP_HTTP::test_wp_translate_php_url_constant_to_key with data set #5 (5, 'path') Failed asserting that null is identical to 'path'. /var/www/tests/phpunit/tests/http/http.php:383 phpvfscomposer:///var/www/vendor/phpunit/phpunit/phpunit:97 /var/www/vendor/bin/phpunit:118 13) Tests_HTTP_HTTP::test_wp_translate_php_url_constant_to_key with data set #6 (6, 'query') Failed asserting that null is identical to 'query'. /var/www/tests/phpunit/tests/http/http.php:383 phpvfscomposer:///var/www/vendor/phpunit/phpunit/phpunit:97 /var/www/vendor/bin/phpunit:118 14) Tests_HTTP_HTTP::test_wp_translate_php_url_constant_to_key with data set #7 (7, 'fragment') Failed asserting that null is identical to 'fragment'. /var/www/tests/phpunit/tests/http/http.php:383 phpvfscomposer:///var/www/vendor/phpunit/phpunit/phpunit:97 /var/www/vendor/bin/phpunit:118 15) Tests_HTTP_HTTP::test_wp_translate_php_url_constant_to_key with data set #8 ('something', false) Failed asserting that null is identical to false. /var/www/tests/phpunit/tests/http/http.php:383 phpvfscomposer:///var/www/vendor/phpunit/phpunit/phpunit:97 /var/www/vendor/bin/phpunit:118 16) Tests_HTTP_HTTP::test_wp_translate_php_url_constant_to_key with data set #9 ('/var/www/src/', false) Failed asserting that null is identical to false. /var/www/tests/phpunit/tests/http/http.php:383 phpvfscomposer:///var/www/vendor/phpunit/phpunit/phpunit:97 /var/www/vendor/bin/phpunit:118
@wpseeddoctor can you please create a pull request for this code?
So we can see if the tests run OK