Problem/Motivation
The Custom Menu Breadcrumbs module is currently not fully compatible with Drupal 11. The core_version_requirement needs to be updated, and any deprecated APIs or outdated PHP practices flagged by the upgrade_status tool must be addressed to ensure a smooth transition to the latest major version.
Steps to reproduce
- Install the module on a Drupal 11 ready environment.
- Run the
upgrade_statusanalysis on the module's codebase to expose deprecations.
Proposed resolution
- Update
custom_menu_breadcrumbs.info.ymlto allow Drupal 10 and 11 compatibility (^10 || ^11). - Resolve any core API deprecations (such as outdated service calls or routing methods) to align with Drupal 11 standards.
- Ensure modern PHP syntax and coding standards are applied where necessary.
Remaining tasks
Code review, testing, and merge.
User interface changes
None.
API changes
None.
Data model changes
None.
Issue fork custom_menu_breadcrumbs-3580203
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #3
vinodhini.e commentedHi, I applied the patch and tested the module on a Drupal 11.2.5 setup. I also ran the Upgrade Status report to verify compatibility.
The module is partially working, but a few issues were reported by Upgrade Status that still need to be addressed for full Drupal 11 compatibility:
Reported issues:
web/modules/contrib/custom_menu_breadcrumbs/custom_menu_breadcrumbs.module, Line : 21
→ Call to an undefined static method Drupal::url()
web/modules/contrib/custom_menu_breadcrumbs/src/Breadcrumb/CustomMenuBreadcrumbsBuilder.php, Line : 85
→ Unsafe usage of new static()
web/modules/contrib/custom_menu_breadcrumbs/src/Breadcrumb/CustomMenuBreadcrumbsBuilder.php, Line : 154
→ Call to an undefined method ::t()
web/modules/contrib/custom_menu_breadcrumbs/src/Form/Config.php, Line : 42
→ ConfigFormBase::__construct() invoked with incorrect parameters (1 given, 2 required)
web/modules/contrib/custom_menu_breadcrumbs/src/Form/Config.php, Line : 51
→ Unsafe usage of new static()
These issues need to be resolved to ensure full compatibility with Drupal 11. Thanks.
Comment #4
ion.eftodii commentedHi @vinodhini.e,
Thank you for testing.
Could you please re-test with the latest commit 927ea6d6 and see if it resolves the issues on your end?
Thanks for your help!
Comment #5
ion.eftodii commentedComment #6
vinodhini.e commentedHi @ion.eftodii,
I have re-tested the module using the latest commit 927ea6d6.
Thank you for the update and the fix!
Comment #7
ion.eftodii commentedComment #8
ion.eftodii commented