You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This looks like a great plugin, thanks for putting in the time to make it.
I've installed on my development environment, however once I click checkout on the checkout page the following fatal error is thrown:
PHP Fatal error: Declaration of BrianHenryIE\Checkout_Rate_Limiter\WpOop\TransientCache\CachePool::get($key, $default = null) must be compatible with Psr\SimpleCache\CacheInterface::get(string $key, mixed $default = null): mixed in /srv/www/devsite/current/web/app/plugins/bh-wc-checkout-rate-limiter/vendor-prefixed/wp-oop/transient-cache/src/CachePool.php on line 93
Here's the logs
2022-11-23T10:05:23+00:00 DEBUG Checking 192.168.57.1 rate limit 2 per 60 seconds.
{"debug_backtrace":[{"file":"\/srv\/www\/devsite\/current\/web\/app\/plugins\/bh-wc-checkout-rate-limiter\/src\/WooCommerce\/class-ajax.php","lineNumber":78,"arguments":[],"applicationFrame":false,"method":"[top]","class":null}],"filters":["template_redirect","wc_ajax_checkout"]}
2022-11-23T10:05:23+00:00 ERROR Declaration of BrianHenryIE\Checkout_Rate_Limiter\WpOop\TransientCache\CachePool::get($key, $default = null) must be compatible with Psr\SimpleCache\CacheInterface::get(string $key, mixed $default = null): mixed
{"type":64,"message":"Declaration of BrianHenryIE\\Checkout_Rate_Limiter\\WpOop\\TransientCache\\CachePool::get($key, $default = null) must be compatible with Psr\\SimpleCache\\CacheInterface::get(string $key, mixed $default = null): mixed","file":"\/srv\/www\/devsite\/current\/web\/app\/plugins\/bh-wc-checkout-rate-limiter\/vendor-prefixed\/wp-oop\/transient-cache\/src\/CachePool.php","line":93,"debug_backtrace":[{"file":"\/srv\/www\/devsite\/current\/web\/app\/plugins\/bh-wc-checkout-rate-limiter\/vendor-prefixed\/brianhenryie\/bh-wp-logger\/src\/PHP\/class-php-shutdown-handler.php","lineNumber":87,"arguments":[],"applicationFrame":true,"method":"handle","class":"BrianHenryIE\\Checkout_Rate_Limiter\\WP_Logger\\PHP\\PHP_Shutdown_Handler"},{"file":"unknown","lineNumber":0,"arguments":[],"applicationFrame":false,"method":"[top]","class":null}],"filters":["template_redirect","wc_ajax_checkout"]}
Looks like it's due to the difference in some implementations, here's Psr\SimpleCache\CacheInterface:
public function get(string $key, mixed $default = null): mixed;
This is BrianHenryIE\Checkout_Rate_Limiter\WpOop\TransientCache\CachePool
public function get($key, $default = null)
In theory it should be a simple change of definitions.
I've another project BrianHenryIE/strauss which prefixes Composer packages' namespaces. I had intentionally excluded psr/* packages from prefixing since their purpose is interoperability. Maybe that's the wrong choice. I've made sure to prefix simple-cache in this project now. Thanks
Hello!
This looks like a great plugin, thanks for putting in the time to make it.
I've installed on my development environment, however once I click checkout on the checkout page the following fatal error is thrown:
Here's the logs
Looks like it's due to the difference in some implementations, here's Psr\SimpleCache\CacheInterface:
This is BrianHenryIE\Checkout_Rate_Limiter\WpOop\TransientCache\CachePool
In theory it should be a simple change of definitions.
Env details:
WC Version: 5.8.1
WP Version: 5.9.3
PHP Version: 8.0.17
The text was updated successfully, but these errors were encountered: