Problem/Motivation

I see that the module follows very old PHP standard practices, for example it doesn't follow the function return type hinting, among other features that need to be added

More information about Drupal's coding standards

Steps to reproduce

Look into the module's source code, it is using outdated PHP practices.

Proposed resolution

Upgrade the module follow recent standard practices for writing more robust PHP code.

Remaining tasks

N/A

User interface changes

N/A

API changes

N/A

Data model changes

N/A

Command icon 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

danrod created an issue. See original summary.

danrod’s picture

Issue tags: +Novice
yusuf_khan’s picture

Assigned: Unassigned » yusuf_khan

working on it

yusuf_khan’s picture

Status: Active » Needs review

please review https://git.drupalcode.org/issue/languages_dropdown-3581165/-/tree/35811... -
@danrod Please review this branch , as im not sure which need to compared

Created merge request with coding standards improvements:

PHPCS: 0 errors
PHPStan: 0 errors
Added return type hints
Added dependency injection

The PHPUnit test failures are pre-existing and unrelated to these changes.

yusuf_khan’s picture

Assigned: yusuf_khan » Unassigned
danrod’s picture

The tests are failing, would you have some time to review?
Setting this to "Needs Work".

danrod’s picture

Status: Needs review » Needs work

jerech made their first commit to this issue’s fork.

jerech’s picture

Status: Needs work » Needs review

Refactored the module to support Drupal 11 hook attributes and PHPUnit 11 requirements. All functional tests are now passing, config schema issues are resolved, and code standards (PHPCS/PHPStan) are met. Ready for review.

danrod’s picture

Assigned: Unassigned » danrod
danrod’s picture

Tested this on a D11 instance with a BS5 theme and works as expected, I'll move it to RTBC and backport it to 3.0.x.

Thanks a lot to everyone involved on this.

danrod’s picture

Status: Needs review » Reviewed & tested by the community
danrod’s picture

Status: Reviewed & tested by the community » Fixed

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

danrod’s picture

Assigned: danrod » Unassigned

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.