[1.x] Decoupled Blocks: Twig

Created on 1 August 2023, about 1 year ago
Updated 27 September 2023, about 1 year ago

The Decoupled Blocks: Twig is a submodule of the Decoupled Blocks module. It allows to create blocks using regular Drupal stuff like twig templates and PHP classes with all its capabilities. These blocks are encapsulated into a folder with all the stuff needed for it. The blocks will be available for use on any UI capable of using blocks like Block Layout or Layout Builder.

The module provide some other features like a ComponentManager that allows to programatically create these blocks and support for translation files inside the encapsulated folder of the block.

Some additional documentation is still needed at the moment and I will be working on that during this week.

Project link

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

📌 Task
Status

Fixed

Component

module

Created by

🇦🇷Argentina emacoti

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

Comments & Activities

  • Issue created by @emacoti
  • 🇮🇹Italy apaderno Brescia, 🇮🇹

    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 smother 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 , What to cover in an application review , and Drupal.org security advisory coverage application workflow .
    Reviewer's task is describing what needs to be changed, not providing patches to fix what reported in a review.

  • Status changed to Needs work about 1 year ago
  • 🇮🇳India vinaymahale

    Please fix the below PHPCS issues:

    ---------------------------------------------------------------------------------------------------------------------------------------------------
    FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
    ---------------------------------------------------------------------------------------------------------------------------------------------------
     1 | WARNING | "core_version_requirement" property is missing in the info.yml file
    ---------------------------------------------------------------------------------------------------------------------------------------------------
    
    
    FILE: /pdb_twig/modules/pdb_twig_examples/components/twig_example_css_js/twig_example_css_js.info.yml
    --------------------------------------------------------------------------------------------------------------------------------------------
    FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
    --------------------------------------------------------------------------------------------------------------------------------------------
     1 | WARNING | "core_version_requirement" property is missing in the info.yml file
    --------------------------------------------------------------------------------------------------------------------------------------------
    
    
    FILE: /pdb_twig/modules/pdb_twig_examples/components/twig_example_class/twig_example_class.info.yml
    ------------------------------------------------------------------------------------------------------------------------------------------
    FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
    ------------------------------------------------------------------------------------------------------------------------------------------
     1 | WARNING | "core_version_requirement" property is missing in the info.yml file
    ------------------------------------------------------------------------------------------------------------------------------------------
    
    
    FILE: ...lampp81/htdocs/test_drupal_modules/pdb_twig/modules/pdb_twig_examples/components/twig_example_context_node/twig_example_context_node.info.yml
    ---------------------------------------------------------------------------------------------------------------------------------------------------
    FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
    ---------------------------------------------------------------------------------------------------------------------------------------------------
     1 | WARNING | "core_version_requirement" property is missing in the info.yml file
    ---------------------------------------------------------------------------------------------------------------------------------------------------
    
    
    FILE: /pdb_twig/src/Event/PdbTwigPreRenderAlterEvent.php
    -----------------------------------------------------------------------------------------------
    FOUND 1 ERROR AFFECTING 1 LINE
    -----------------------------------------------------------------------------------------------
     110 | ERROR | Type hint "array" missing for $class_instance
    -----------------------------------------------------------------------------------------------
    
  • 🇦🇷Argentina emacoti

    Thanks for the review @vinaymahale.

    About the "core_version_requirement" property is missing in the info.yml file, those are not actual extension like modules, those are yml file for the blocks and a custom discovery and parser will read and process them, thus making the core_version_requirement not needed. Would prefer to not add that not needed property in this case. Does that makes sense?

    Will fix the other one.

  • 🇦🇷Argentina emacoti

    ok just pushed the fix for this one

    FILE: /pdb_twig/src/Event/PdbTwigPreRenderAlterEvent.php
    -----------------------------------------------------------------------------------------------
    FOUND 1 ERROR AFFECTING 1 LINE
    -----------------------------------------------------------------------------------------------
     110 | ERROR | Type hint "array" missing for $class_instance
    -----------------------------------------------------------------------------------------------

    It was a mistake on the method documentation, had array but was object type instead.

  • Status changed to Needs review about 1 year ago
  • 🇮🇳India vinaymahale

    As per comment #4 yes that can be ignored. Other than that there are no more PHPCS issues.
    Let's wait for other reviewers.

  • 🇮🇳India vinaymahale

    I am changing priority as per Issue priorities

  • Status changed to RTBC about 1 year ago
  • 🇮🇳India vinaymahale

    No issues found
    Changing status to RTBC!

  • 🇮🇹Italy apaderno Brescia, 🇮🇹

    Thank you for your contribution! I am going to update your account.

    These are some recommended readings to help with excellent maintainership:

    You can find more contributors chatting on the Slack #contribute channel. So, come hang out and stay involved .
    Thank you, also, for your patience with the review process.
    Anyone is welcome to participate in the review process. Please consider reviewing other projects that are pending review . I encourage you to learn more about that process and join the group of reviewers.

  • Assigned to apaderno
  • Status changed to Fixed about 1 year ago
  • 🇮🇹Italy apaderno Brescia, 🇮🇹
  • 🇦🇷Argentina emacoti

    Thank you! I will keep that in mind and try to participate and review other projects.

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

Production build 0.71.5 2024