prettier / prettier/plugin-php

___PSEUDO_INLINE_PLACEHOLDER___ added to EOD string

Open
#2,087 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Prettier 2.7.1

PHP Plugin 0.19.1

# Options (if any):
printWidth: 120

Input:

    const liftDataWithInlineRanges = <<<EOD
<?xml version="1.0" encoding="UTF-8" ?>
<?oxygen RNGSchema="lift.rng" type="xml"?>
<?blueprint schema="lift.rng"?>

<lift version="0.13" producer="LexiquePro.3.6">
...

Output:

    const liftDataWithInlineRanges = <<<EOD
<?xml version="1.0" encoding="UTF-8" ?>
___PSEUDO_INLINE_PLACEHOLDER___<?oxygen RNGSchema="lift.rng" type="xml"?>
___PSEUDO_INLINE_PLACEHOLDER___<?blueprint schema="lift.rng"?>

<lift version="0.13" producer="LexiquePro.3.6">
...

Expected behavior:
No ___PSEUDO_INLINE_PLACEHOLDER___ strings getting added to the output.

Original code: https://github.com/sillsdev/web-languageforge/blob/e32600219a99030914cad7d4a9a430058800a4ea/test/php/model/languageforge/lexicon/Import/LiftImportTest.php#L1623

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

Start by reproducing the reported PHP heredoc formatting with Prettier 2.7.1 and PHP Plugin 0.19.1, using the input and expected output in this issue. Inspect the plugin's handling of heredoc content containing XML processing instructions and determine why placeholder strings appear; done means formatting no longer adds PSEUDO_INLINE_PLACEHOLDER to the output and the regression is covered by a test.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.