PHPCS errors on src/ directory

Created on 22 December 2021, almost 4 years ago
Updated 3 March 2023, over 2 years ago

Problem/Motivation

Child issue from https://www.drupal.org/project/gutenberg/issues/3255691 📌 [META] PHPCS errors on code Needs review
The idea here is to fix all phpcs errors/warnings from the files in the src/ directory.

Steps to reproduce

Open the Gutenberg module directory on your terminal and run the command: phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml src/ > phpcs_gutenber_src.txt. You should end up with a file like the one attached bellow.

Proposed resolution

Fix the errors either automatically or manually and create a patch.

📌 Task
Status

Needs work

Version

2.0

Component

Code

Created by

🇧🇷Brazil andregp

Live updates comments and jobs are added and updated live.
  • Coding standards

    It involves compliance with, or the content of coding standards. Requires broad community agreement.

  • Needs issue summary update

    Issue summaries save everyone time if they are kept up-to-date. See Update issue summary task instructions.

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.

  • 🇮🇹Italy apaderno Brescia, 🇮🇹

    The issue summary should always describe what the issue is trying to fix and, in the case, of coding standards issues, report which command has been used, which arguments have been used, and which report that command shown.

  • 🇮🇹Italy apaderno Brescia, 🇮🇹
  • 🇮🇳India indrapatil Bangalore
  • Status changed to Needs review over 2 years ago
  • 🇮🇳India indrapatil Bangalore
  • 🇮🇹Italy apaderno Brescia, 🇮🇹
  • Open on Drupal.org →
    Core: 9.5.x + Environment: PHP 7.4 & MySQL 5.7
    last update over 2 years ago
    Waiting for branch to pass
  • 🇮🇳India arpitk Indore

    Worked on fixing remaining issue after patch #25. fixed Drupal calls. Please review.

    Thanks!

  • 🇮🇳India Yashaswi18

    Tried applying the patch provided in #33, got the following error :

    git apply 3255698-33.patch -v
    Checking patch gutenberg.services.yml...
    Checking patch src/Ajax/UpdateMediaEntitiesCommand.php...
    Checking patch src/BlockProcessor/DuotoneProcessor.php...
    Checking patch src/BlockProcessor/OEmbedProcessor.php...
    Checking patch src/BlockProcessor/ReusableBlockProcessor.php...
    Checking patch src/BlocksRendererHelper.php...
    Checking patch src/Controller/BlocksController.php...
    Checking patch src/Controller/MediaController.php...
    Checking patch src/Controller/ReusableBlocksController.php...
    Checking patch src/Controller/SearchController.php...
    error: while searching for:
          return new JsonResponse([]);
        }
    
        $query = \Drupal::entityQuery('node');
        $query->condition('title', $search, 'CONTAINS')
          ->condition('status', 1)
          ->sort('created', 'DESC')
    
    error: patch failed: src/Controller/SearchController.php:35
    error: src/Controller/SearchController.php: patch does not apply
    Checking patch src/Controller/UtilsController.php...
    Checking patch src/DataProvider/BaseDataProvider.php...
    Checking patch src/DataProvider/FileEntityDataProvider.php...
    Checking patch src/DataProvider/MediaEntityDataProvider.php...
    Checking patch src/Discovery/BlockJsonDiscovery.php...
    Checking patch src/Form/BlockSettingsForm.php...
    Checking patch src/GutenbergElementInfoAlter.php...
    Checking patch src/GutenbergLibraryManager.php...
    Hunk #3 succeeded at 254 (offset 7 lines).
    Checking patch src/GutenbergMediaLibraryUiBuilder.php...
    Checking patch src/MappingFieldsHelper.php...
    Checking patch src/MediaSelectionProcessor/MediaSelectionProcessorInterface.php...
    Checking patch src/OEmbedResolver.php...
    Checking patch src/Parser/BlockParser.php...
    Checking patch src/Parser/BlockParserFrame.php...
    Checking patch src/Plugin/Filter/GutenbergFilter.php...
    Checking patch src/Plugin/GutenbergPlugin/DrupalImage.php...
    Checking patch src/ScanDir.php...
    Checking patch src/Service/MediaService.php...
    Hunk #8 succeeded at 476 (offset 2 lines).
    Checking patch src/TinyColor.php...
    
  • 🇷🇺Russia zniki.ru

    I think no changes to vendor folder needs to be made
    Please use command and ignore vendor folder.

    phpcs --standard=Drupal,DrupalPractice --extensions=php,inc,module,install,info,test,profile,theme modules/contrib/gutenberg/ --ignore=*/vendor/*
    

    I update IS.

  • Status changed to Needs work almost 2 years ago
  • First commit to issue fork.
  • Merge request !226Resolve #3255698 "Fix the issues" → (Open) created by jeremy1606
  • Pipeline finished with Canceled
    9 days ago
    Total: 100s
    #638536
  • Pipeline finished with Failed
    9 days ago
    Total: 337s
    #638537
  • Pipeline finished with Failed
    9 days ago
    #638557
  • Pipeline finished with Failed
    8 days ago
    Total: 359s
    #639234
  • Pipeline finished with Success
    2 days ago
    Total: 1073s
    #645590
Production build 0.71.5 2024