[1.0.x] Devutils

Created on 10 April 2024, 7 months ago
Updated 6 September 2024, 2 months ago

DevUtils offers several utilities designed to facilitate development, optimizing specific tasks through its features. These include the ability to list the UUIDs of the entities by applying various filters, which allows efficient and accessible management of them. Plus, it makes it easy to clean up unused files, helping to keep your work environment organized and free of unnecessary clutter. Another significant functionality is its service that allows the import of specific module configurations, something especially useful for implementing configurations from updates.

Project link

https://www.drupal.org/project/devutils

📌 Task
Status

Needs work

Component

module

Created by

🇨🇺Cuba ReyRPB

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

Comments & Activities

  • Issue created by @ReyRPB
  • 🇮🇳India vishal.kadam Mumbai

    Thank you for applying!

    Please read Review process for security advisory coverage: What to expect for more details and Security advisory coverage application checklist to understand what reviewers look for. Tips for ensuring a smooth review gives some hints for a smoother review.

    The important notes are the following.

    • If you have not done it yet, you should run phpcs --standard=Drupal,DrupalPractice on the project, which alone fixes most of what reviewers would report.
    • For the time this application is open, only your commits are allowed.
    • The purpose of this application is giving you a new drupal.org role that allows you to opt projects into security advisory coverage, either projects you already created, or projects you will create. The project status won't be changed by this application and no other user will be able to opt projects into security advisory policy.
    • We only accept an application per user. If you change your mind about the project to use for this application, or it is necessary to use a different project for the application, please update the issue summary with the link to the correct project and the issue title with the project name and the branch to review.

    To the reviewers

    Please read How to review security advisory coverage applications , Application workflow , What to cover in an application review , and Tools to use for reviews .

    The important notes are the following.

    • It is preferable to wait for a Code Review Administrator before commenting on newly created applications. Code Review Administrators will do some preliminary checks that are necessary before any change on the project files is suggested.
    • Reviewers should show the output of a CLI tool only once per application.
    • It may be best to have the applicant fix things before further review.

    For new reviewers, I would also suggest to first read In which way the issue queue for coverage applications is different from other project queues .

  • Status changed to Needs work 7 months ago
  • 🇮🇳India vishal.kadam Mumbai

    1. Fix phpcs issues.

    phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml devutils/
    
    FILE: devutils/devutils.module
    ----------------------------------------------------------------------
    FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
    ----------------------------------------------------------------------
     8 | WARNING | [x] Unused use statement
    ----------------------------------------------------------------------
    PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
    ----------------------------------------------------------------------
    
    
    FILE: devutils/src/ConfigImport.php
    -------------------------------------------------------------------------------
    FOUND 1 ERROR AND 1 WARNING AFFECTING 2 LINES
    -------------------------------------------------------------------------------
     125 | WARNING | [ ] Line exceeds 80 characters; contains 81 characters
     220 | ERROR   | [x] Separate the @param and @throws sections by a blank line.
    -------------------------------------------------------------------------------
    PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
    -------------------------------------------------------------------------------
    
    
    FILE: devutils/src/Commands/DrushDevutilsCommands.php
    -------------------------------------------------------------------------------
    FOUND 1 ERROR AND 1 WARNING AFFECTING 1 LINE
    -------------------------------------------------------------------------------
     5 | WARNING | [x] Unused use statement
     5 | ERROR   | [x] Non-namespaced classes/interfaces/traits should not be referenced with use statements
    -------------------------------------------------------------------------------
    PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
    -------------------------------------------------------------------------------

    2. FILE: devutils.module

    /**
     * @file
     * Contains devutils.module.
     */

    The description for a .module file is Hook implementations for the [module name] module. where [module name] is the module name given in the .info.yml file.

    3. FILE: src/ConfigImport.php

      public function __construct(
        ConfigManagerInterface $config_manager,
        StorageInterface $config_storage,
        CacheBackendInterface $config_cache,
        ModuleHandlerInterface $module_handler,
        EventDispatcherInterface $event_dispatcher,
        LockBackendInterface $lock,
        TypedConfigManagerInterface $config_typed,
        ModuleInstallerInterface $module_installer,
        ThemeHandlerInterface $theme_handler,
        TranslationInterface $string_translation,
        ModuleExtensionList $module_extension_list,
        LoggerChannelFactoryInterface $logger_factory
      ) {

    FILE: src/Commands/DevutilsCommands.php

      public function devutils(
        string $entityType = 'node',
        string $filter = 'all',
        array $options = ['label' => FALSE]
      ) {

    FILE: src/Commands/DrushDevutilsCommands.php

      public function __construct(
        EntityTypeManagerInterface $entity_type_manager,
        DatabaseFileUsageBackend $file_usage
      ) {
      public function devutils(
        string $entityType = 'node',
        string $filter = 'all',
        array $options = ['label' => FALSE]
      ) {

    Drupal coding standards say function declarations are written on a single line, even if they exceed 80 characters.

    4. FILE: src/Commands/DevutilsCommands.php

      /**
       * DrushDevutilsCommands constructor.
       *
       * @param \Drupal\Core\Entity\EntityTypeManagerInterface $entity_type_manager
       *   The entity type manager service.
       * @param \Drupal\file\FileUsage\DatabaseFileUsageBackend $file_usage
       *   Service database file usage backend.
       */
      public function __construct(EntityTypeManagerInterface $entity_type_manager, DatabaseFileUsageBackend $file_usage) {
    

    FILE: src/Commands/DrushDevutilsCommands.php

      /**
       * DrushDevutilsCommands constructor.
       *
       * @param \Drupal\Core\Entity\EntityTypeManagerInterface $entity_type_manager
       *   The entity type manager service.
       * @param \Drupal\file\FileUsage\DatabaseFileUsageBackend $file_usage
       *   Service database file usage backend.
       */
      public function __construct(

    The documentation comment for constructors is not mandatory anymore, If it is given, the description must be Constructs a new [class name] object. where [class name] includes the class namespace.

  • Assigned to immaculatexavier
  • Issue was unassigned.
  • 🇮🇳India immaculatexavier

    Hi,
    Addressed #4, where the below fixes have been fixes
    2.phpcs issues.
    3. FILE: devutils.module - Fixed description
    4. FILE: src/Commands/DevutilsCommands.php, src/Commands/DrushDevutilsCommands.php - Fixed The documentation comment for constructors
    Attached the patch for the review

  • 🇮🇳India vishal.kadam Mumbai

    @immaculatexavier Reviewers only describe what needs to be changed; they don't provide patches to fix what reported in a review.

  • 🇮🇹Italy apaderno Brescia, 🇮🇹

    For these applications, we need a project where, in at least a branch, most of the commits (but preferably all the commits) have been done from the person who created the application.
    The purpose of these applications is reviewing a project to understand what the person who applies understands about writing secure code which follows the Drupal coding standards and correctly uses the Drupal API, not what all the project maintainers collectively understand about those points.

  • 🇮🇳India vishal.kadam Mumbai

    I am changing priority as per Issue priorities .

  • 🇮🇳India rushiraval

    This thread has been idle, in the needs work state with no activity for several months. Therefore, I am assuming that you are no longer pursuing this application. If you are no longer pursuing this application then I mark it as Closed (won't fix).

    If this is incorrect, and you are still pursuing this application, then please feel free to set the issue status to Needs work or Needs review, depending on the current status of your code.

  • 🇮🇹Italy apaderno Brescia, 🇮🇹
Production build 0.71.5 2024