nikic/php-ast

PHP 8.3 compatibility

Closed this issue · 2 comments

Running test suite against 8.3.0RC1 (final API)
4 failed tests

TEST 63/82 [tests/php81_enums.phpt]
========DIFF========
--
                                 const: "FOO"
                             docComment: null
                     attributes: null
069+                 0: null
             attributes: null
             __declId: 0
         1: AST_CLASS
072-         flags: CLASS_FINAL | CLASS_ENUM (%d)
073-         name: "NoValue"
074-         docComment: null
075-         extends: null
076-         implements: null
077-         stmts: AST_STMT_LIST
078-             0: AST_ENUM_CASE
079-                 name: "FOO"
080-                 expr: null
081-                 docComment: "/** Case doc comment */"
082-                 attributes: AST_ATTRIBUTE_LIST
083-                     0: AST_ATTRIBUTE_GROUP
084-                         0: AST_ATTRIBUTE
085-                             class: AST_NAME
086-                                 flags: NAME_NOT_FQ (%d)
087-                                 name: "OtherAttribute"
088-                             args: AST_ARG_LIST
089-         attributes: AST_ATTRIBUTE_LIST
090-             0: AST_ATTRIBUTE_GROUP
091-                 0: AST_ATTRIBUTE
092-                     class: AST_NAME
093-                         flags: NAME_NOT_FQ (%d)
094-                         name: "MyAttribute"
095-                     args: AST_ARG_LIST
096-                         0: 1
097-         __declId: 1
098- AST_STMT_LIST
099-     0: AST_CLASS
100-         flags: CLASS_FINAL | CLASS_ENUM (%d)
101-         name: "HasValue"
102-         docComment: null
103-         extends: null
104-         implements: null
105-         stmts: AST_STMT_LIST
106-             0: AST_ENUM_CASE
107-                 name: "FOO"
108-                 expr: 42
109-                 docComment: null
110-                 attributes: null
111-             1: AST_CLASS_CONST_GROUP
112-                 flags: MODIFIER_PUBLIC (%d)
113-                 const: AST_CLASS_CONST_DECL
114-                     0: AST_CONST_ELEM
115-                         name: "FOO_ALIAS"
116-                         value: AST_CLASS_CONST
117-                             class: AST_NAME
118-                                 flags: NAME_NOT_FQ (%d)
119-                                 name: "self"
120-                             const: "FOO"
121-                         docComment: null
122-                 attributes: null
             flags: CLASS_FINAL | CLASS_ENUM (%d)
             name: "NoValue"
             docComment: null
--
                                 const: "FOO"
                             docComment: null
                     attributes: null
124+                 0: null
             attributes: null
             type: AST_TYPE
                 flags: TYPE_LONG (%d)
--
========DONE========
FAIL Enums in php 8.1 [tests/php81_enums.phpt] 

TEST 64/82 [tests/php81_final_class_const.phpt]
========DIFF========
--
                             value: 1
                             docComment: null
                     attributes: null
030+                 0: null
             attributes: null
             __declId: 0
========DONE========
FAIL Final class constants [tests/php81_final_class_const.phpt] 

TEST 8/82 [tests/attributes_02.phpt]
========DIFF========
--
                                     flags: NAME_NOT_FQ (%d)
                                     name: "Attr3"
                                 args: null
095+                 0: null
                 2: AST_METHOD
                     flags: MODIFIER_PUBLIC | MODIFIER_STATIC (%d)
                     name: "hasAttribute"
--
========DONE========
FAIL Attributes in PHP 8.0 on classes [tests/attributes_02.phpt] 

========DIFF========
--
                             value: 1
                             docComment: "/** Doc A */"
                     attributes: null
016+                 0: null
                 1: AST_CLASS_CONST_GROUP
017-                 flags: MODIFIER_PROTECTED (%d)
018-                 const: AST_CLASS_CONST_DECL
019-                     0: AST_CONST_ELEM
020-                         name: "E"
021-                         value: 5
022-                         docComment: "/** Doc E */"
023-                     1: AST_CONST_ELEM
024-                         name: "F"
025-                         value: 6
026-                         docComment: "/** Doc F */"
027-                 attributes: null
                     flags: MODIFIER_PROTECTED (%d)
                     const: AST_CLASS_CONST_DECL
                         0: AST_CONST_ELEM
--
                             value: 6
                             docComment: "/** Doc F */"
                     attributes: null
029+                 0: null
             attributes: null
             __declId: 0
========DONE========
FAIL Class constants in AST version 80 [tests/class_consts_80.phpt] 

nikic commented

Fixed in master.

nikic commented

And released as 1.1.1.