feat(php): php 8.4 support (#6741)

* chore(php): update maintainers

* feat(php): update php rules, highlight imported functions/consts

* feat(php): indent inside property hooks

* chore: update php and php_only revision
This commit is contained in:
Caleb White 2024-08-18 05:30:04 -05:00 committed by GitHub
parent 24ddf60d68
commit ec8776ed9e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 85 additions and 13 deletions

View file

@ -221,10 +221,26 @@
(name) @type
(qualified_name
(name) @type)
alias: (name) @type.definition
])
(namespace_aliasing_clause
(name) @type.definition)
(namespace_use_clause
type: "function"
[
(name) @function
(qualified_name
(name) @function)
alias: (name) @function
])
(namespace_use_clause
type: "const"
[
(name) @constant
(qualified_name
(name) @constant)
alias: (name) @constant
])
(class_interface_clause
[
@ -369,9 +385,8 @@
name: (namespace_name
(name) @module))
(namespace_name_as_prefix
(namespace_name
(name) @module))
(namespace_name
(name) @module)
; Attributes
(attribute_list) @attribute

View file

@ -13,12 +13,13 @@
(match_block)
(case_statement)
(default_statement)
(property_hook_list)
] @indent.begin
(return_statement
[
(object_creation_expression)
(anonymous_function_creation_expression)
(anonymous_function)
(arrow_function)
(match_expression)
]) @indent.dedent
@ -49,6 +50,9 @@
(return_statement
";" @indent.end)
(property_hook_list
"}" @indent.end)
(ERROR
"(" @indent.align
.

View file

@ -12,7 +12,7 @@
name: (name) @local.definition.function) @local.scope
(#set! definition.function.scope "parent"))
(anonymous_function_creation_expression
(anonymous_function
(anonymous_function_use_clause
(variable_name
(name) @local.definition.var))) @local.scope