Skip to content

Allow trailing comma for function use and parameter lists#664

Open
mkornaukhov wants to merge 5 commits intoVKCOM:masterfrom
mkornaukhov:mkornaukhov03_trailing_comma
Open

Allow trailing comma for function use and parameter lists#664
mkornaukhov wants to merge 5 commits intoVKCOM:masterfrom
mkornaukhov:mkornaukhov03_trailing_comma

Conversation

@mkornaukhov
Copy link
Contributor

@mkornaukhov mkornaukhov commented Oct 31, 2022

Support PHP8 feature.
Main issue: #290
Previous attempt: #308
I didn't rebase because of merge conflict.

@mkornaukhov mkornaukhov force-pushed the mkornaukhov03_trailing_comma branch from 1be3414 to 6c012c8 Compare October 31, 2022 22:30
@quasilyte
Copy link
Contributor

quasilyte commented Nov 2, 2022

Hi!

I would suggest adding the tests.

  1. One test should fail for the incorrect syntax combinations. Two trailing commas, etc. See @kphp-should-fail annotations in tests/phpt/
  2. Another test should check that trailing commas work as expected (@ok test).

Basically, this feature should work when it works in PHP and fail to compile when it's not a valid syntax for PHP. You may look at the PHP pull request for an inspiration. It probably includes some tests.

See the docs for more info about contributing (how to run tests, etc.)

Or you can ask the questions here.
For Russian-speaking contributors I would suggest a Telegram chat: https://t.me/kphp_chat

@Danil42Russia Danil42Russia added the PHP8 PHP8 feature label Nov 3, 2022
@mkornaukhov mkornaukhov force-pushed the mkornaukhov03_trailing_comma branch from 6c012c8 to 1f5cfa1 Compare November 28, 2022 08:05
@mkornaukhov
Copy link
Contributor Author

Please check

@mkornaukhov mkornaukhov force-pushed the mkornaukhov03_trailing_comma branch from a7fe9c3 to f452192 Compare February 8, 2023 09:56
@mkornaukhov mkornaukhov requested review from quasilyte and tolk-vm and removed request for tolk-vm February 8, 2023 16:11
@mkornaukhov mkornaukhov force-pushed the mkornaukhov03_trailing_comma branch 3 times, most recently from f5937ec to 8f78498 Compare February 15, 2023 16:53
@mkornaukhov mkornaukhov force-pushed the mkornaukhov03_trailing_comma branch from 8f78498 to 19abded Compare February 21, 2023 12:23
@mkornaukhov mkornaukhov requested a review from drdzyk February 27, 2023 12:50
@Tsygankov-Slava Tsygankov-Slava mentioned this pull request Jul 3, 2023
44 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

PHP8 PHP8 feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants