Automattic / Automattic/jetpack
Connection: compatibility issue when using Passwords Evolved plugin (PHP 8.1)
- Dominant language
- PHP
- Stars
- 1.8k
- Forks
- 898
- Avg merge
- 1d 18h
- Merged PRs (30d)
- 774
Description
### Impacted plugin
Jetpack
### Steps to Reproduce
1. Install [Passwords Evolved](https://wordpress.org/plugins/passwords-evolved/) plugin
2. Install Jetpack 10.7 - Connect - Select Free plan
3. Upgrade to Jetpack 10.8
4. Navigate o a dashboard or front end page
### A clear and concise description of what you expected to happen.
Everything to be as normal, no errors
### What actually happened
Page displays "Fatal error occurred on this site" (or similar) message created by WordPress Fatal Error handler.
### Other information
`PHP Fatal error: Uncaught InvalidArgumentException: Container doesn't have a value stored for the "password.generator" key. in /.../wp-content/plugins/passwords-evolved/src/DependencyInjection/Container.php:94
Stack trace:
#0 /.../wp-content/plugins/passwords-evolved/src/Plugin.php(79): PasswordsEvolved\DependencyInjection\Container->offsetGet()
#1 /.../wp-content/plugins/passwords-evolved/pluggable.php(59): PasswordsEvolved\Plugin->get_password_generator()
#2 /.../wp-content/plugins/jetpack/jetpack_vendor/automattic/jetpack-connection/src/class-client.php(132): wp_generate_password()
#3 /.../wp-content/plugins/jetpack/jetpack_vendor/automattic/jetpack-connection/src/class-client.php(37): Automattic\Jetpack\Connection\Client::build_signed_request()
#4 /.../wp-content/plugins/jetpack/jetpack_vendor/automattic/jetpack-connection/src/class-client.php(453): Automattic\Jetpack\Connection\Client::remote_request()
#5 /.../wp-content/plugins/jetpack/jetpack_vendor/automattic/jetpack-search/src/class-plan.php(51): Automattic\Jetpack\Connection\Client::wpcom_json_api_request_as_blog()
#6 /.../wp-content/plugins/jetpack/jetpack_vendor/automattic/jetpack-search/src/class-plan.php(67): Automattic\Jetpack\Search\Plan->get_plan_info_from_wpcom()
#7 /.../wp-content/plugins/jetpack/jetpack_vendor/automattic/jetpack-search/src/class-plan.php(71): Automattic\Jetpack\Search\Plan->get_plan_info()
#8 /.../wp-content/plugins/jetpack/jetpack_vendor/automattic/jetpack-search/src/class-plan.php(97): Automattic\Jetpack\Search\Plan->get_plan_info()
#9 /.../wp-content/plugins/jetpack/jetpack_vendor/automattic/jetpack-search/src/initializers/class-initializer.php(208): Automattic\Jetpack\Search\Plan->supports_search()
#10 /.../wp-content/plugins/jetpack/jetpack_vendor/automattic/jetpack-search/src/initializers/class-initializer.php(51): Automattic\Jetpack\Search\Initializer::is_search_supported()
#11 /.../wp-content/plugins/jetpack/jetpack_vendor/automattic/jetpack-config/src/class-config.php(233): Automattic\Jetpack\Search\Initializer::init()
#12 /.../wp-content/plugins/jetpack/jetpack_vendor/automattic/jetpack-config/src/class-config.php(169): Automattic\Jetpack\Config->enable_search()
#13 /.../wp-content/plugins/jetpack/jetpack_vendor/automattic/jetpack-config/src/class-config.php(114): Automattic\Jetpack\Config->ensure_feature()
#14 /.../wp-includes/class-wp-hook.php(307): Automattic\Jetpack\Config->on_plugins_loaded()
#15 /.../wp-includes/class-wp-hook.php(331): WP_Hook->apply_filters()
#16 /.../wp-includes/plugin.php(474): WP_Hook->do_action()
#17 /.../wp-settings.php(450): do_action()
#18 /../wp-config.php(118): require_once('/.../...')
#19 /.../wp-load.php(55): require_once('/.../...')
#20 /.../wp-admin/admin.php(34): require_once('/...')
#21 /.../wp-admin/index.php(10): require_once('/...')
#22 {main}
thrown in /.../wp-content/plugins/passwords-evolved/src/DependencyInjection/Container.php on line 94`
Same happened with update to Jetpack 10.1, bit later fixed. See https://github.com/Automattic/jetpack/issues/21165
### Operating System
Linux
### OS Version
_No response_
### Browser
Other / Not applicable
### Browser Version(s)
_No response_
Contributor guide
Assessment
This issue has not been assessed yet.