Fix 'Drupal.Semantics.FunctionT.NotLiteralString' coding standard

Created on 28 March 2020, about 4 years ago
Updated 21 June 2024, 4 days ago

Problem/Motivation

Part of 🌱 [meta] Fix PHP coding standards in core Active .
Sniff for coding standard is not implemented.

<rule ref="Drupal.Semantics.FunctionT.NotLiteralString"/>

Steps to reproduce

Proposed resolution

Add <rule ref="Drupal.Semantics.FunctionT.NotLiteralString"/> to phpcs.xml.dist
Add ignore lines where it can't be changed to using only literals. That is currently 70 lines.

Remaining tasks

Review
Commit

User interface changes

API changes

Data model changes

Release notes snippet

πŸ“Œ Task
Status

Needs review

Version

11.0 πŸ”₯

Component
OtherΒ  β†’

Last updated 36 minutes ago

Created by

πŸ‡¨πŸ‡³China jungle Chongqing, China

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.

Sign in to follow issues

Comments & Activities

Not all content is available!

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

  • @quietone opened merge request.
  • πŸ‡³πŸ‡ΏNew Zealand quietone New Zealand
  • Status changed to Needs review 13 days ago
  • πŸ‡³πŸ‡ΏNew Zealand quietone New Zealand
  • Status changed to RTBC 12 days ago
  • πŸ‡ΊπŸ‡ΈUnited States smustgrave

    This one seems straightforward as it's adding the ignore line.

  • Status changed to Needs work 9 days ago
  • πŸ‡¬πŸ‡§United Kingdom alexpott πŸ‡ͺπŸ‡ΊπŸŒ

    When I read the issue title I was like uhoh I hope I agree with the implementation of this rule by coder as some of coder's opinions are highly debatable. So I reviewed all the places where we are adding skips and I think this shows the value of the rule. There are things we would not have done in core if this rule was present - so that is great. However that means I think we should add follow-ups to address all these places where we are skipping the rule and should not be.

  • Status changed to Needs review 4 days ago
  • πŸ‡³πŸ‡ΏNew Zealand quietone New Zealand

    Made lots of followups and committed the suggestions made in the MR. Setting back to NR.

Production build 0.69.0 2024