- Issue created by @krishnamohan aadem
- πΊπΈUnited States Greg Boggs Portland Oregon
Drupal 9.5 is no longer supported software. To fix this warning please upgrade to Drupal 11.
A deprecation warning is triggered in Symfony when using the getRequestForPath() method in the Easy Breadcrumb module. The issue occurs because false is being passed to Symfony\Component\HttpFoundation\Request::create() instead of a valid array.
Steps to Reproduce:
Navigate to /admin/reports/memcache/default/testing-memcache.djl978.cfg.use1.cache.amazonaws.com:11211.
Observe the deprecation warning in the logs:
Deprecated function: Automatic conversion of false to array is deprecated in Symfony\Component\HttpFoundation\Request::create() (line 372 of /var/www/flex/vendor/symfony/http-foundation/Request.php).
Error Details:
File: Symfony\Component\HttpFoundation\Request.php
Line: 372
Trace:
Request::create('/admin/reports/memcache/default/testing-memcache.djl978.cfg.use1.cache.amazonaws.com:11211') (Line: 969)
EasyBreadcrumbBuilder->getRequestForPath('/admin/reports/memcache/default/testing-memcache.djl978.cfg.use1.cache.amazonaws.com:11211', Array) (Line: 509)
Root Cause:
The getRequestForPath() method is passing an invalid $exclude parameter or improperly handling $check_path, leading to the deprecation warning. Symfony 6.x and PHP 8 are stricter about types, and passing false instead of an array is no longer allowed.
Expected Behavior:
The getRequestForPath() method should ensure valid parameters ($check_path and $exclude) are passed to Request::create() to prevent the deprecation warning.
Environment:
Easy Breadcrumb Module Version: 2.0.8
Symfony Version: 6.x
PHP Version: 8.x
Drupal Version: 9.5.11
Proposed Solution:
Add validation for $check_path and $exclude in the build() method before passing them to getRequestForPath().
Ensure the getRequestForPath() method checks and normalizes input values.
Active
2.0
Code
Drupal 9.5 is no longer supported software. To fix this warning please upgrade to Drupal 11.