Skip to content

Commit 32d939a

Browse files
authored
Merge pull request #14 from TysonAndre/update-70
Sync with Phan, support version 70 instead of 50
2 parents 42f16e0 + d788cda commit 32d939a

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+2315
-780
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
.*.swp
22
.*.swo
33
tags
4+
vendor/

.phan/config.php

+301-93
Large diffs are not rendered by default.

.travis.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
language: php
22

33
php:
4-
- 7.0
54
- 7.1
65
- 7.2
76
- 7.3
7+
- 7.4snapshot
88

99
dist: xenial
1010

@@ -22,7 +22,7 @@ install:
2222

2323
# Install phan separately because the tolerant-php-parser version may be behind.
2424
script:
25-
- composer create-project phan/phan=1.2.1 ~/phan-install; ~/phan-install/phan
25+
- composer create-project phan/phan=2.3.0 ~/phan-install; ~/phan-install/phan
2626
- ./test
2727

2828
branches:

README.md

+4-11
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,9 @@ Tolerant-PHP-Parser to php-ast
33

44
[![Build Status](https://travis-ci.org/TysonAndre/tolerant-php-parser-to-php-ast.svg?branch=master)](https://travis-ci.org/TysonAndre/tolerant-php-parser-to-php-ast)
55

6-
This project uses Microsoft/tolerant-php-parser to generate a tree with error tolerance, then converts from that tree to ast\Node: https://github.com/Microsoft/tolerant-php-parser/issues/113
6+
This project uses Microsoft/tolerant-php-parser to generate a tree with error tolerance, then converts from that tree to ast\Node from [php-ast](https://github.com/nikic/php-ast)
77

8-
This is 90% done. Current test cases pass, but some cases aren't yet tested.
9-
10-
- Still being ported from https://github.com/TysonAndre/php-parser-to-php-ast
11-
- The test suite is not yet comprehensive, may need to handle tokens
12-
13-
[Current Issues](https://github.com/TysonAndre/tolerant-php-parser-to-php-ast/issues/)
14-
15-
- The test suite this is based off of covers common cases for Phan, but edge cases still remain.
16-
See https://github.com/TysonAndre/tolerant-php-parser-to-php-ast/issues/4
8+
This release (0.1.0) supports AST version 70.
179

1810
Usage
1911
-----
@@ -28,11 +20,12 @@ Using it as an error-tolerant substitute for php-ast (e.g. for use in IDEs)
2820
- Omitting errors only handles some common cases that come up while editing a file.
2921
- Placeholders may change in the future.
3022
- [tests/ASTConverter/ErrorTolerantConversionTest.php](https://github.com/TysonAndre/tolerant-php-parser-to-php-ast/blob/master/tests/ASTConverter/ErrorTolerantConversionTest.php)
23+
- [Phan's](https://github.com/phan/phan) Language Server uses this code to do that.
3124

3225
Running unit tests
3326
------------------
3427

35-
To run unit tests, you must install [nikic/php-ast](https://github.com/nikic/php-ast) 0.1.5+ (for the expected results to be created).
28+
To run unit tests, you must install [nikic/php-ast](https://github.com/nikic/php-ast) 1.0.1+ (for the expected results to be created).
3629
You must also run `composer install` if you haven't already done so.
3730

3831
- Then run `vendor/bin/phpunit`

composer.json

+5-5
Original file line numberDiff line numberDiff line change
@@ -13,19 +13,19 @@
1313
"config": {
1414
"sort-packages": true,
1515
"platform": {
16-
"php": "7.0.24"
16+
"php": "7.1.28"
1717
}
1818
},
1919
"require": {
2020
"php": ">=7.0",
21-
"Microsoft/tolerant-php-parser": "0.0.16"
21+
"microsoft/tolerant-php-parser": "0.0.18"
2222
},
2323
"require-dev": {
24-
"phpunit/phpunit": "^6.4"
24+
"phpunit/phpunit": "^6.4",
25+
"phan/phan": "^2.3.0"
2526
},
2627
"suggest": {
27-
"ext-ast": "~0.1.5||~1.0.0",
28-
"phan/phan": "^1.2.1"
28+
"ext-ast": "~1.0.1"
2929
},
3030
"autoload": {
3131
"psr-4": {"TolerantASTConverter\\": "src/TolerantASTConverter"}

0 commit comments

Comments
 (0)