Code does not pass Drupal/DrupalPractice coding standards

Created on 20 April 2022, over 2 years ago
Updated 11 June 2024, 7 months ago

Problem/Motivation

Drupal module code should pass Drupal and Drupal Practice code standards

Steps to reproduce

Grab a copy of the module and run PHPCS with Drupal and DrupalPractice standards.

Proposed resolution

Update module to comply with Drupal and DrupalPractice coding standards. Patch coming soon.

Remaining tasks

Testing.

User interface changes

None

API changes

Using dependency injection rather than \Drupal calls.

Data model changes

None

πŸ“Œ Task
Status

Closed: outdated

Version

1.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States luke adams

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • First commit to issue fork.
  • Assigned to thakurnishant_06
  • Status changed to Needs work over 1 year ago
  • Tested 3276291-4.patch 3 patch applied cleanly but 3 errors still remains

    FILE: /opt/lampp/htdocs/testing/web/modules/contrib/visual_website_optimizer/visual_website_optimizer.help.inc
    --------------------------------------------------------------------------------------------------------------
    FOUND 2 ERRORS AFFECTING 2 LINES
    --------------------------------------------------------------------------------------------------------------
     15 | ERROR | [x] list(...) is forbidden, use [...] instead.
     55 | ERROR | [x] list(...) is forbidden, use [...] instead.
    
    FILE: /opt/lampp/htdocs/testing/web/modules/contrib/visual_website_optimizer/visual_website_optimizer.module
    --------------------------------------------------------------------------------------------------------------------
    FOUND 1 ERROR AFFECTING 1 LINE
    --------------------------------------------------------------------------------------------------------------------
     10 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\Core\Render\Markup.
    
  • Merge request !6fixed remaining errors β†’ (Closed) created by thakurnishant_06
  • Issue was unassigned.
  • Status changed to Needs review over 1 year ago
  • Created the MR6 and fixed all remaining errors.

  • Status changed to Postponed about 1 year ago
  • πŸ‡¦πŸ‡ΊAustralia elc

    Thank you for your effort, but unable to use this MR due to the code base moving on to add new features.

    To be able to have used this the MR needed to include multiple commits. ie. Keep the phpcbf run in it's own commit, manual fixes in their own commits, and then keep functional changes for another issue. This is the best aspect of MR over patches. It was much faster to just run phpcbf against the code base than picking through for usable parts.

    MR also includes functionality changes which cause breakages, removes features, removed documentation. CS must not made actual changes to the module.

    Unless I managed to miss any of the output of phpcs, this module should no longer have any issues. Postponing for now, but most likely closing this as outdated.

  • Status changed to Closed: outdated 7 months ago
  • πŸ‡¦πŸ‡ΊAustralia elc

    I noted earlier that there were functional changes included in these patches and MR. If there are any things that still need to be fixed, please open an issue for them.

    Closing this issue as outdated.

Production build 0.71.5 2024