prettier / prettier/plugin-php
Class Constants Types PHP 8.3 support
Open
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 1.9k
- Forks
- 139
- PR merge metrics
- No merged PRs in 30d
Description
Is there a plan to support new 8.3 version? The following code is correct, but prettier says not.
class Foo
{
public const string PHP_VERSION = "8.3";
}
SyntaxError: Parse Error : syntax error, unexpected 'PHP_VERSION' (T_STRING), expecting '='
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the reported PHP 8.3 class-constant example and tracing the parser or formatter path that rejects its typed declaration. The work is done when the snippet parses and formats successfully without the reported syntax error, with a regression test covering it.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100