prettier / prettier/plugin-php

normalize case of built-in php function

Open
#928 1 comment 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

discussion
Dominant language
PHP
Stars
1.9k
Forks
139
PR merge metrics
No merged PRs in 30d

Description

Prettier 1.14.3

PHP Plugin 0.9.0

Input:

$var = MB_STRTOLOWER($class);

Output:

$var = MB_STRTOLOWER($class);

Expected behavior:

$var = mb_strtolower($class);

We can have list of built-in php function and normalize their case (convert to lowercase in many cases), but need discussion.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No file, test, or entry point is named. Start by locating the formatter logic for PHP function calls and any existing built-in-function handling, then review the issue's uppercase input and lowercase expected output. Done means the intended built-in functions are consistently normalized and covered by tests, with the scope decided.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
tooling
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.