Bug 459654 - PHP 7.2: Trailing Commas In Grouped Namespaces
Summary: PHP 7.2: Trailing Commas In Grouped Namespaces
Status: RESOLVED FIXED
Alias: None
Product: kdevelop
Classification: Applications
Component: Language Support: PHP (other bugs)
Version First Reported In: 5.9.220801
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: kdevelop-bugs-null
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-09-25 15:14 UTC by Heinz Wiesinger
Modified: 2023-07-16 12:25 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed/Implemented In: 5.12.230800
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Heinz Wiesinger 2022-09-25 15:14:01 UTC
PHP 7.2 added support for trailing commas in grouped namespace declarations:

https://wiki.php.net/rfc/list-syntax-trailing-commas
Comment 1 Heinz Wiesinger 2022-09-25 15:15:21 UTC
Relates to #411588, can probably be both implemented at once.
Comment 2 Heinz Wiesinger 2023-07-16 12:24:47 UTC
Git commit dca4ff7b506eec03b67f8207b447dd1291150371 by Heinz Wiesinger, on behalf of Hugues Mitonneau.
Committed on 16/07/2023 at 12:16.
Pushed by wiesinger into branch 'master'.

Syntax support for grouped namespaces

This is a first step to implement Grouped namespaces.

The syntax has been updated to parse Grouped namespaces without generating errors,
but declarations into grouped namespaces are not processed.

"Normal" use statements are still processed.
Related: bug 411588
CHANGELOG: Add partial support for PHP 7.0's grouped namespace syntax

Reviewers: pprkut

Reviewed By: pprkut

Subscribers: pprkut, kdevelop-devel

Tags: #kdevelop

Differential Revision: https://phabricator.kde.org/D29444

M  +10   -1    duchain/builders/declarationbuilder.cpp
M  +2    -1    duchain/builders/declarationbuilder.h
M  +1    -0    duchain/builders/typebuilder.cpp
M  +67   -23   duchain/builders/usebuilder.cpp
M  +15   -5    duchain/builders/usebuilder.h
M  +45   -0    duchain/helper.cpp
M  +10   -9    duchain/helper.h
M  +61   -3    parser/php.g

https://invent.kde.org/kdevelop/kdev-php/-/commit/dca4ff7b506eec03b67f8207b447dd1291150371
Comment 3 Heinz Wiesinger 2023-07-16 12:25:03 UTC
Git commit 566881bc9b0a138f4d0846e54cf2b4bedde8ff37 by Heinz Wiesinger.
Committed on 16/07/2023 at 12:16.
Pushed by wiesinger into branch 'master'.

Add unit tests for grouped namespaces
Related: bug 411588
FIXED-IN: 5.12.230800
CHANGELOG: Add support for PHP 7.2's trailing commas in grouped namespaces

M  +127  -0    duchain/tests/duchain.cpp
M  +4    -0    duchain/tests/duchain.h
M  +69   -0    duchain/tests/uses.cpp
M  +2    -0    duchain/tests/uses.h

https://invent.kde.org/kdevelop/kdev-php/-/commit/566881bc9b0a138f4d0846e54cf2b4bedde8ff37