WordPress / wordpress-playground

Run WordPress in the browser via WebAssembly PHP
https://w.org/playground/
GNU General Public License v2.0
1.6k stars 237 forks source link

Suppress unavoidable Deprecated notices - Networking #1598

Closed dd32 closed 4 weeks ago

dd32 commented 1 month ago

PHP Deprecated: Hook http_api_transports is deprecated since version 6.4.0 with no alternative available. in /wordpress/wp-includes/functions.php on line 135

This hook deprecation notice is thrown and is included in all the bug reports, gaining Playground no benefits.

Unfortunately we're forced to use this deprecated hook to ensure SSL operations work without the kitchen-sink bundled. See #1504 for background.

We should suppress this deprecated hook notice somehow until https://core.trac.wordpress.org/ticket/37708 is resolved.

bgrgicak commented 1 month ago

We should suppress this deprecated hook notice somehow

We could add a exclude list to the logger.

dd32 commented 1 month ago

I was hoping there was a filter (or hook context) on the deprecated_hook_trigger_error hook, but there ain't (unlike the doing_it_wrong_trigger_error hook which does pass context), so a logger exclude list sounds reasonable.

adamziel commented 4 weeks ago

We suppress other warnings and notices in set_error_handler here:

https://github.com/WordPress/wordpress-playground/blob/3afd9eb9baf58962af05b1b975d8812b61d65cb1/packages/playground/wordpress/src/index.ts#L90