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
Deprecated: YoastSEO_Vendor\Symfony\Component\DependencyInjection\Container::__construct(): Implicitly marking parameter $parameterBag as nullable is deprecated in PHP 8.4
#21859
Open
2 of 11 tasks
bobbingwide opened this issue
Nov 23, 2024
· 2 comments
I've searched for any related issues and avoided creating a duplicate issue.
Please give us a description of what happened
This message is produced with PHP 8.4.1
Deprecated: YoastSEO_Vendor\Symfony\Component\DependencyInjection\Container::__construct(): Implicitly marking parameter $parameterBag as nullable is deprecated, the explicit nullable type must be used instead in C:\apache\htdocs\wordpress\wp-content\plugins\wordpress-seo\vendor_prefixed\symfony\dependency-injection\Container.php on line 60
To Reproduce
Step-by-step reproduction instructions
Switch to PHP 8.4.1
Ensure wordpress-seo is activated
run a WP-CLI command such as wp plugin status wordpress-seo
Notice several Deprecated messages... one of which is produced for WordPress SEO; the other 3 are from WP-CLI
Expected results
Plugin wordpress-seo details:
Name: Yoast SEO
Status: Active
Version: 23.9
Author: Team Yoast
Description: The first true all-in-one SEO solution for WordPress, including on-page content analysis, XML sitemaps and much more.
Actual results
C:\apache\htdocs\wordpress\wp-content\plugins\oik>wp plugin status wordpress-seo
Deprecated: WP_CLI\Runner::get_subcommand_suggestion(): Implicitly marking parameter $root_command as nullable is deprecated, the explicit nullable type must be used instead in phar://C:/d_drive/dos/wp-cli.phar/vendor/wp-cli/wp-cli/php/WP_CLI/Runner.php on line 1958
Deprecated: YoastSEO_Vendor\Symfony\Component\DependencyInjection\Container::__construct(): Implicitly marking parameter $parameterBag as nullable is deprecated, the explicit nullable type must be used instead in C:\apache\htdocs\wordpress\wp-content\plugins\wordpress-seo\vendor_prefixed\symfony\dependency-injection\Container.php on line 60
Deprecated: Mustache_Engine::loadSource(): Implicitly marking parameter $cache as nullable is deprecated, the explicit nullable type must be used instead in phar://C:/d_drive/dos/wp-cli.phar/vendor/mustache/mustache/src/Mustache/Engine.php on line 727
Deprecated: Mustache_Parser::buildTree(): Implicitly marking parameter $parent as nullable is deprecated, the explicit nullable type must be used instead in phar://C:/d_drive/dos/wp-cli.phar/vendor/mustache/mustache/src/Mustache/Parser.php on line 73
Plugin wordpress-seo details:
Name: Yoast SEO
Status: Active
Version: 23.9
Author: Team Yoast
Description: The first true all-in-one SEO solution for WordPress, including on-page content analysis, XML sitemaps and much more.
Screenshots, screen recording, code snippet
See output above.
Technical info
If relevant, which editor is affected (or editors):
Block Editor
Gutenberg Editor
Elementor Editor
Classic Editor
Other:
Which browser is affected (or browsers):
Chrome
Firefox
Safari
Other:
Used versions
Device you are using: Dell laptop
Operating system: Windows
PHP version: 8.4.1
WordPress version: 6.7.1
WordPress Theme: n/a
Yoast SEO version: 23.9
Gutenberg plugin version:
Elementor plugin version:
Classic Editor plugin version:
Relevant plugins in case of a bug:
For my environment the fix is easy.
Add a ? to line 60 of the file mentioned.
public function __construct(?\YoastSEO_Vendor\Symfony\Component\DependencyInjection\ParameterBag\ParameterBagInterface $parameterBag = null)
The text was updated successfully, but these errors were encountered:
I've received several other Deprecated messages that should also be addressed.
[23-Nov-2024 17:25:52 UTC] PHP Deprecated: YoastSEO_Vendor\League\OAuth2\Client\Provider\AbstractProvider::authorize(): Implicitly marking parameter $redirectHandler as nullable is deprecated, the explicit nullable type must be used instead in C:\apache\htdocs\wordpress\wp-content\plugins\wordpress-seo\vendor_prefixed\league\oauth2-client\src\Provider\AbstractProvider.php on line 416
[23-Nov-2024 17:25:52 UTC] PHP Deprecated: YoastSEO_Vendor\GuzzleHttp\Client::getConfig(): Implicitly marking parameter $option as nullable is deprecated, the explicit nullable type must be used instead in C:\apache\htdocs\wordpress\wp-content\plugins\wordpress-seo\vendor_prefixed\guzzlehttp\guzzle\src\Client.php on line 181
[23-Nov-2024 17:25:52 UTC] PHP Deprecated: YoastSEO_Vendor\GuzzleHttp\ClientInterface::getConfig(): Implicitly marking parameter $option as nullable is deprecated, the explicit nullable type must be used instead in C:\apache\htdocs\wordpress\wp-content\plugins\wordpress-seo\vendor_prefixed\guzzlehttp\guzzle\src\ClientInterface.php on line 77
As WP had added “beta support” for PHP 8.3 in version 6.4 and there are no mentions of 8.4 till now, the deprecation message for PHP 8.4 is expected. Our team will fix deprecated messages for PHP 8.4 when WP is fully compatible. As there are no mentions of PHP 8.4 within the WP document shared above, it may take some time.
If the issue occurs with PHP 8.3, please let us know.
josevarghese
changed the title
Deprecated: YoastSEO_Vendor\Symfony\Component\DependencyInjection\Container::__construct(): Implicitly marking parameter $parameterBag as nullable is deprecated
Deprecated: YoastSEO_Vendor\Symfony\Component\DependencyInjection\Container::__construct(): Implicitly marking parameter $parameterBag as nullable is deprecated in PHP 8.4
Nov 24, 2024
Please give us a description of what happened
This message is produced with PHP 8.4.1
Deprecated: YoastSEO_Vendor\Symfony\Component\DependencyInjection\Container::__construct(): Implicitly marking parameter $parameterBag as nullable is deprecated, the explicit nullable type must be used instead in C:\apache\htdocs\wordpress\wp-content\plugins\wordpress-seo\vendor_prefixed\symfony\dependency-injection\Container.php on line 60
To Reproduce
Step-by-step reproduction instructions
wp plugin status wordpress-seo
Expected results
Plugin wordpress-seo details:
Name: Yoast SEO
Status: Active
Version: 23.9
Author: Team Yoast
Description: The first true all-in-one SEO solution for WordPress, including on-page content analysis, XML sitemaps and much more.
Actual results
C:\apache\htdocs\wordpress\wp-content\plugins\oik>wp plugin status wordpress-seo
Deprecated: WP_CLI\Runner::get_subcommand_suggestion(): Implicitly marking parameter $root_command as nullable is deprecated, the explicit nullable type must be used instead in phar://C:/d_drive/dos/wp-cli.phar/vendor/wp-cli/wp-cli/php/WP_CLI/Runner.php on line 1958
Deprecated: YoastSEO_Vendor\Symfony\Component\DependencyInjection\Container::__construct(): Implicitly marking parameter $parameterBag as nullable is deprecated, the explicit nullable type must be used instead in C:\apache\htdocs\wordpress\wp-content\plugins\wordpress-seo\vendor_prefixed\symfony\dependency-injection\Container.php on line 60
Deprecated: Mustache_Engine::loadSource(): Implicitly marking parameter $cache as nullable is deprecated, the explicit nullable type must be used instead in phar://C:/d_drive/dos/wp-cli.phar/vendor/mustache/mustache/src/Mustache/Engine.php on line 727
Deprecated: Mustache_Parser::buildTree(): Implicitly marking parameter $parent as nullable is deprecated, the explicit nullable type must be used instead in phar://C:/d_drive/dos/wp-cli.phar/vendor/mustache/mustache/src/Mustache/Parser.php on line 73
Plugin wordpress-seo details:
Name: Yoast SEO
Status: Active
Version: 23.9
Author: Team Yoast
Description: The first true all-in-one SEO solution for WordPress, including on-page content analysis, XML sitemaps and much more.
Screenshots, screen recording, code snippet
See output above.
Technical info
Used versions
For my environment the fix is easy.
Add a ? to line 60 of the file mentioned.
The text was updated successfully, but these errors were encountered: