php / php/php-src

error formatting inconsistency regarding spaces

オープン
#15,857 コメント 3 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

Category: Engine Feature Status: Verified
主要言語
C
スター
40.4k
フォーク
8.2k
平均マージ
2日 13時間
マージ済み PR(30日)
96

説明

Description

running automated tests in private repo, I recently noticed that some error messages contain more spaces then other
(macos vs. ubuntu github action)

The following code:

<?php

function subtract_no_lint($m { // intentional syntax error
}

Resulted in this output: (note 2 spaces after Parse error:)

Parse error:  syntax error, unexpected token "{", expecting ")" in does-not-lint.php on line 3

But I expected this output instead: (note 1 space after Parse error:)

Parse error: syntax error, unexpected token "{", expecting ")" in does-not-lint.php on line 3

I saw similar differences in the php-src testsuite, see e.g.

grafik
PHP Version

8.3.11

Operating System

ubuntu / macos

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

does-not-lint.php に示されている構文エラーと、関連する php-src の testsuite のケースから始め、Ubuntu と macOS での出力を比較します。パーサーエラーテキストがどこでフォーマットされているかを追跡し、プラットフォーム間でスペースが一貫するように関連するテストを更新します。

索引モデルが issue の本文から書いたものです。

評価

領域
compilers
issue の種類
バグ
難易度
4/5
見積もり時間
3〜5日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
35/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。