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

Atoms is meant to give developers an easy and quick way to add small pieces of content to a site that an administrator can then freely change as they see fit. Of course there are many options for content already like nodes and other entities to fill out a page, but these are usually overkill when just talking about a text in a custom form or similar.

Project link

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

📌 Task
Status

Closed: duplicate

Component

module

Created by

🇩🇰Denmark LupusGr3y

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

Comments & Activities

  • Issue created by @LupusGr3y
  • Status changed to Closed: duplicate 10 months ago
  • Status changed to Active 9 months ago
  • 🇮🇹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 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 will not be changed by this application; 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 branch to review and the project name.

    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, even to leave a comment similar to the following one. Code Review Administrators will do some preliminary checks that are necessary before any change on the project files is suggested.
    • It is also preferable to wait before using a CLI tool to report what needs to be changed, especially because the comment left from Code Review Administrators suggests to use PHP_CodeSniffer. Before that, manual reviews should be done.
    • Reviewers should not copy-paste the output of a CLI tool. They should use a CLI tool only once per application. When they do that, they should later verify the code has been correctly changed; this means, for example, that adding a documentation comment that is not correct just to avoid to get a warning/error is not a correct change that should be reported in a further comment.
    • 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 .

    Remember to change status, when the project is ready to be reviewed, as the used status is telling reviewers not to review the project, yet

  • Status changed to Needs work 9 months ago
  • 🇮🇹Italy apaderno Brescia, 🇮🇹

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

    This application can only continue with another project where most of the commits (and preferable all the commits) have been done by LupusGr3y.

  • 🇮🇹Italy apaderno Brescia, 🇮🇹

    It was better to continue with the other application.

  • 🇩🇰Denmark LupusGr3y

    Huh? All of the commits have been done by me!

  • 🇩🇰Denmark LupusGr3y

    I assume you got confused by the branches of the previous atoms project. They are unrelated to the current project, but I am not allowed to delete them. But the 1.0.x branch is the one to look at.

  • 🇮🇹Italy apaderno Brescia, 🇮🇹

    On https://git.drupalcode.org/project/atoms/-/commits/1.0.x there are commits from Anton Staroverov (@anydigital).

  • Status changed to Needs review 9 months ago
  • 🇮🇹Italy apaderno Brescia, 🇮🇹

    The project has been rewritten from zero, I guess, basing on https://git.drupalcode.org/project/atoms/-/commit/4b0262a9d9d7750f84cc60....

  • 🇩🇰Denmark LupusGr3y

    Yes it has. I took over the namespace as the previous project has changed to a new name and the old was abandoned.

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

    Fix phpcs issues.

    phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml atoms/
    
    FILE: atoms/atoms.install
    ----------------------------------------------------------------------
    FOUND 2 ERRORS AFFECTING 1 LINE
    ----------------------------------------------------------------------
     118 | ERROR | [x] Expected newline after closing brace
     118 | ERROR | [x] Namespaced classes/interfaces/traits should be referenced with use statements
    ----------------------------------------------------------------------
    PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
    ----------------------------------------------------------------------
    
    
    FILE: atoms/src/AtomsStorage.php
    -----------------------------------------------------------------------------
    FOUND 0 ERRORS AND 6 WARNINGS AFFECTING 5 LINES
    -----------------------------------------------------------------------------
     135 | WARNING | Only string literals should be passed to t() where possible
     374 | WARNING | Only string literals should be passed to t() where possible
     473 | WARNING | Only string literals should be passed to t() where possible
     474 | WARNING | Only string literals should be passed to t() where possible
     507 | WARNING | Only string literals should be passed to t() where possible
     507 | WARNING | Only string literals should be passed to t() where possible
    -----------------------------------------------------------------------------
    
    
    FILE: atoms/src/Form/AtomsEditForm.php
    ----------------------------------------------------------------------
    FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
    ----------------------------------------------------------------------
     12 | WARNING | [x] Unused use statement
    ----------------------------------------------------------------------
    PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
    ----------------------------------------------------------------------
    
    
    FILE: atoms/src/Controller/AtomsController.php
    ------------------------------------------------------------------------------
    FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
    ------------------------------------------------------------------------------
     87 | WARNING | Only string literals should be passed to t() where possible
    ------------------------------------------------------------------------------
    
    
    FILE: atoms/src/Atom.php
    -----------------------------------------------------------------------------
    FOUND 0 ERRORS AND 5 WARNINGS AFFECTING 5 LINES
    -----------------------------------------------------------------------------
     331 | WARNING | Only string literals should be passed to t() where possible
     395 | WARNING | Only string literals should be passed to t() where possible
     427 | WARNING | Only string literals should be passed to t() where possible
     479 | WARNING | Only string literals should be passed to t() where possible
     585 | WARNING | Only string literals should be passed to t() where possible
    -----------------------------------------------------------------------------
  • Status changed to Needs review 9 months ago
  • 🇮🇹Italy apaderno Brescia, 🇮🇹

    In the src/Atom.php file, I do not see any call to t().

    What PHP_CodeSniffer reports should be understood and verified. Telling applicants that only string literals should be passed to t() when such method/function is not even called is just confusing. Furthermore, what should be said is that the first parameter passed to t() should be a literal string and that should be said when the used code is $message = t("Error message " . $error . "caused by " . $module), for example.

  • 🇩🇰Denmark LupusGr3y

    There are calls to t() in the module where it's not literals, but that's because the values originate from YAML files, and the sniffer also says "where possible". So my assumption is that it is done with a good cause.

  • 🇮🇹Italy apaderno Brescia, 🇮🇹

    I have not yet reviewed the project, so I cannot say which case is.
    If the YAML files contain user input, it is considered a security issue translating user input. Furthermore, the content of YAML files is translatable using a different method; their content should not be translated using t().

  • 🇩🇰Denmark LupusGr3y

    What is this different method for translating YAML files?

  • 🇩🇰Denmark LupusGr3y

    No, scratch that. The YamlDiscovery that core uses is a different YamlDiscovery than Atoms uses. Core uses it to produce plugin derivatives, while Atoms just needs the YAML data and that YamlDiscovery does not have support for marking keys as translatable.

    So there does not appear to be a way to avoid using t() or TranslatableMarkup directly without rewriting Atoms to use plugins for the atoms. Which could bring interesting new features, but also seems overkill just to make it do what it already does, but just through the other YamlDiscovery instead.

  • 🇩🇰Denmark LupusGr3y

    So... now what?

  • 🇩🇰Denmark LupusGr3y

    Okay, this complete lack of response and no idea of what happens next, if anything, is too stressful. I'm closing this application.

  • Status changed to Closed: won't fix 8 months ago
  • Status changed to Closed: duplicate 2 months ago
  • 🇮🇹Italy apaderno Brescia, 🇮🇹
Production build 0.69.0 2024