Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support new PHP 8.3 syntaxes #106

Open
5 of 7 tasks
jrfnl opened this issue Nov 24, 2023 · 9 comments
Open
5 of 7 tasks

Support new PHP 8.3 syntaxes #106

jrfnl opened this issue Nov 24, 2023 · 9 comments

Comments

@jrfnl
Copy link
Member

jrfnl commented Nov 24, 2023

PHP 8.3 includes the following new syntaxes for which it should be verified if the Tokenizer needs updates and/or whether any sniffs need updates:

To Do

Done

@jrfnl jrfnl self-assigned this Nov 24, 2023
@jrfnl jrfnl pinned this issue Nov 24, 2023
@jrfnl jrfnl changed the title Tokenizer: support new PHP 8.3 syntaxes Support new PHP 8.3 syntaxes Nov 24, 2023
frank9999 added a commit to frank9999/UltimateWarfare that referenced this issue Jan 2, 2024
@leitommi
Copy link

leitommi commented Jan 8, 2024

Is there any news on this? Dependencies seem to be released.

@jrfnl
Copy link
Member Author

jrfnl commented Jan 9, 2024

@leitommi What dependencies are you talking about ?

@leitommi
Copy link

leitommi commented Jan 9, 2024

I mean these PR-s are merged that were marked as "Blocked until":
#49
#78

I am mostly interested in typed class constants that were introduced in php 8.3.

Currently following code:

class A
{
  const int $MY_VAL;
}

produces following error, with phpcs 3.8.0:

phpcs: Generic.NamingConventions.UpperCaseConstantName.ClassConstantNotUpperCase: Class constants must be uppercase; expected INT but found int

@jrfnl
Copy link
Member Author

jrfnl commented Feb 1, 2024

For whoever cares - PR #309 is open adding tokenizer support for readonly anonymous classes and PR #321 adding tokenizer support for typed class constants.

Once those two are merged, support can be added to individual sniffs (and yes, the commits for this are ready and waiting).

@jrfnl
Copy link
Member Author

jrfnl commented Feb 8, 2024

The following three PRs have been opened to add support for PHP 8.3 typed class constants to various sniffs:

Testing of these PRs would be appreciated.

@FabianKoestring
Copy link

The following three PRs have been opened to add support for PHP 8.3 typed class constants to various sniffs:

Testing of these PRs would be appreciated.

Everything works as expected for me.✌️👍 When can we expect a release?

@KeldorDE
Copy link

KeldorDE commented Feb 9, 2024

The following three PRs have been opened to add support for PHP 8.3 typed class constants to various sniffs:

Testing of these PRs would be appreciated.

I can also confirm that everything is working correctly. 👍

@jrfnl
Copy link
Member Author

jrfnl commented Feb 9, 2024

@FabianKoestring @KeldorDE Thank you both for testing. Unless something unexpected happens, I'm hoping to release the 3.9.0 version towards the end of next week.

@jrfnl
Copy link
Member Author

jrfnl commented Feb 16, 2024

Version 3.9.0 has been tagged & released.

I'm leaving this issue open for now as the last bullet still needs to be investigated, though I don't really expect any issues with that syntax, but I'd rather be sure.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants