Problem/Motivation
The module uses deprecated APIs and doesn't fully comply with Drupal coding standards, making it incompatible with Drupal 10 and harder to maintain. Updating the code will ensure Drupal 10 compatibility and improve overall code quality.
Steps to reproduce
1. Install and enable the module on a Drupal 10 site.
2. Run the **Upgrade Status** module or use the `drupal-check` command-line tool.
3. Review the list of deprecated APIs and compatibility issues.
4. Run `phpcs` with `Drupal` and `DrupalPractice` standards to identify coding standard violations.
Proposed resolution
- Replace all deprecated APIs with their recommended Drupal 10 alternatives.
- Refactor code to comply with Drupal and PSR-12 coding standards.
- Update the `.info.yml` file to include:
- Ensure all changes maintain existing functionality.
- Provide a patch or merge request with the above updates.
core_version_requirement: ^8 || ^9 || ^10
Issue fork cart_item_count-3538716
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 #4
akashkumar07 commentedHi @Vinodhini
There are couple of small changes required related to coding standard in the MR.
Thanks!
Comment #5
vinodhini.e commentedHi @akashkumar07,
I've updated the constructor parameter details and verified the code with PHPCS — no warnings or errors were reported.
Please review and let me know if anything else needs to be addressed.
Thanks..
Comment #6
akashkumar07 commentedComment #7
akashkumar07 commentedThanks @vinodhinie
I have verified the changes. LGTM!
Comment #9
akashkumar07 commentedComment #10
akashkumar07 commented