Skip to content

Commit 220bab8

Browse files
committed
Mark version 35 as deprecated
1 parent 0414087 commit 220bab8

10 files changed

+15
-10
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -476,7 +476,7 @@ Supported since 2017-01-18.
476476

477477
### 35 (supported)
478478

479-
Supported since 2016-08-04.
479+
Supported since 2016-08-04. Deprecated since 2017-07-19.
480480

481481
This version normalizes the AST to PHP 7.1 format.
482482

ast.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -620,7 +620,7 @@ static int ast_check_version(zend_long version) {
620620
zend_string *version_info;
621621

622622
if (ast_version_known(version)) {
623-
if (version == 30) {
623+
if (version == 30 || version == 35) {
624624
php_error_docref(NULL, E_DEPRECATED,
625625
"Version " ZEND_LONG_FMT " is deprecated", version);
626626
}

tests/array_destructuring_old.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ list(, $b) = $x;
1212
PHP;
1313

1414
echo ast_dump(ast\parse_code($code, $version=30)), "\n";
15-
echo ast_dump(ast\parse_code($code, $version=35));
15+
echo ast_dump(ast\parse_code($code, $version=50));
1616

1717
?>
1818
--EXPECTF--

tests/coalesce.phpt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@ echo ast_dump(ast\parse_code($code, $version=35)), "\n";
1414
echo ast_dump(ast\parse_code($code, $version=40)), "\n";
1515

1616
?>
17-
--EXPECT--
17+
--EXPECTF--
18+
Deprecated: ast\parse_code(): Version 35 is deprecated in %s on line %d
1819
AST_STMT_LIST
1920
0: AST_COALESCE
2021
left: AST_VAR

tests/multi_catch.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ try {
1515
PHP;
1616

1717
echo ast_dump(ast\parse_code($code, $version=30));
18-
echo ast_dump(ast\parse_code($code, $version=35));
18+
echo ast_dump(ast\parse_code($code, $version=50));
1919

2020
?>
2121
--EXPECTF--

tests/name_node.phpt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@ echo ast_dump(ast\parse_code($code, $version=35)), "\n";
1717
echo ast_dump(ast\parse_code($code, $version=40)), "\n";
1818

1919
?>
20-
--EXPECT--
20+
--EXPECTF--
21+
Deprecated: ast\parse_code(): Version 35 is deprecated in %s on line %d
2122
AST_STMT_LIST
2223
0: AST_CALL
2324
expr: AST_NAME

tests/nop_statements.phpt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@ echo ast_dump(ast\parse_code($code, $version=35)), "\n";
1616
echo ast_dump(ast\parse_code($code, $version=40)), "\n";
1717

1818
?>
19-
--EXPECT--
19+
--EXPECTF--
20+
Deprecated: ast\parse_code(): Version 35 is deprecated in %s on line %d
2021
AST_STMT_LIST
2122
0: AST_VAR
2223
name: "a"

tests/stmt_list.phpt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@ echo ast_dump(ast\parse_code($code, $version=35)), "\n";
1919
echo ast_dump(ast\parse_code($code, $version=40)), "\n";
2020

2121
?>
22-
--EXPECT--
22+
--EXPECTF--
23+
Deprecated: ast\parse_code(): Version 35 is deprecated in %s on line %d
2324
AST_STMT_LIST
2425
0: AST_WHILE
2526
cond: AST_VAR

tests/try_catch_finally.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ try {
1919
PHP;
2020

2121
echo ast_dump(ast\parse_code($code, $version=30)), "\n";
22-
echo ast_dump(ast\parse_code($code, $version=35)), "\n";
22+
echo ast_dump(ast\parse_code($code, $version=50)), "\n";
2323

2424
?>
2525
--EXPECTF--

tests/type_hints.phpt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@ echo ast_dump(ast\parse_code($code, $version=35)), "\n";
1717
echo ast_dump(ast\parse_code($code, $version=40)), "\n";
1818

1919
?>
20-
--EXPECT--
20+
--EXPECTF--
21+
Deprecated: ast\parse_code(): Version 35 is deprecated in %s on line %d
2122
AST_STMT_LIST
2223
0: AST_FUNC_DECL
2324
flags: 0

0 commit comments

Comments
 (0)