Skip to content

Commit

Permalink
Merge pull request #15 from TysonAndre/release-0.3.0
Browse files Browse the repository at this point in the history
Release 0.3.0 (support analyzing multiple php minor versions)
  • Loading branch information
TysonAndre authored Feb 26, 2018
2 parents d8508d9 + acfd7df commit ace624f
Show file tree
Hide file tree
Showing 6 changed files with 91 additions and 22 deletions.
17 changes: 13 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# PHP Phan (Analyzer)

[![Latest Release](https://vsmarketplacebadge.apphb.com/version-short/TysonAndre.php-phan.svg)](https://marketplace.visualstudio.com/items?itemName=TysonAndre.php-phan) [![Installs](https://vsmarketplacebadge.apphb.com/installs/TysonAndre.php-phan.svg)](https://marketplace.visualstudio.com/items?itemName=TysonAndre.php-phan) [![Rating](https://vsmarketplacebadge.apphb.com/rating-short/TysonAndre.php-phan.svg)](https://marketplace.visualstudio.com/items?itemName=TysonAndre.php-phan) [![Build Status](https://travis-ci.org/TysonAndre/vscode-php-phan.svg?branch=master)](https://travis-ci.org/TysonAndre/vscode-php-phan) [![Minimum PHP Version](https://img.shields.io/badge/php-%3E=7.1-8892BF.svg)](https://php.net/) [![Gitter](https://badges.gitter.im/phan/phan.svg)](https://gitter.im/phan/phan?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
[![Latest Release](https://vsmarketplacebadge.apphb.com/version-short/TysonAndre.php-phan.svg)](https://marketplace.visualstudio.com/items?itemName=TysonAndre.php-phan) [![Installs](https://vsmarketplacebadge.apphb.com/installs/TysonAndre.php-phan.svg)](https://marketplace.visualstudio.com/items?itemName=TysonAndre.php-phan) [![Rating](https://vsmarketplacebadge.apphb.com/rating-short/TysonAndre.php-phan.svg)](https://marketplace.visualstudio.com/items?itemName=TysonAndre.php-phan) [![Build Status](https://travis-ci.org/TysonAndre/vscode-php-phan.svg?branch=master)](https://travis-ci.org/TysonAndre/vscode-php-phan) [![Minimum PHP Version](https://img.shields.io/badge/php-%3E=7.0-8892BF.svg)](https://php.net/) [![Gitter](https://badges.gitter.im/phan/phan.svg)](https://gitter.im/phan/phan?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)

**Supports Unix/Linux.** As of version 0.2.0, this has experimental support for Windows (Not as fast or well tested).

Expand All @@ -21,7 +21,7 @@ However, bugs in this VS code extension (crashes, etc) or related to the languag

### Dependencies:

1. PHP 7.1+ must be installed.
1. PHP 7.0+ must be installed.
You can either add it to your PATH or set the `phan.executablePath` setting.
2. `pcntl` is recommended. (Available on Unix/Linux)
(Phan's Language Server Protocol support depends on `pcntl` module being installed, which is only available on those platforms)
Expand All @@ -47,8 +47,10 @@ Add these entries to your VSCode config (Open the menu at File > Preferences > S
// On windows, this would be a path such as "C:\\Users\\MyUser\\path\\to\\analyzed\\folder"
"phan.analyzedProjectDirectory": "/path/to/folder/to/analyze",

// Path to a php 7.1+ binary (preferably with the php-ast PECL extension installed and enabled)
// On windows, this would be "C:\\path\\to\\php-7.1-installation\\php.exe"
// Path to a php 7.0+ binary (preferably with the php-ast PECL extension installed and enabled)
// This should be as similar as possible as the php installation used to run Phan
// (Same php minor version, same extensions or phan internal stubs for extensions (excluding xdebug), etc.)
// On windows, this would be "C:\\path\\to\\php-7.0-installation\\php.exe"
"phan.phpExecutablePath": "/path/to/php7.1",

// Files which this should analyze
Expand Down Expand Up @@ -126,6 +128,13 @@ General troubleshooting advice:

## Release History

### 0.3.0 (2018-02-18)

- Add initial support for analyzing code for different php minor versions (PHP 7.0, 7.1, and 7.2).
Previously, this extension acted as though the codebase used php 7.1.
For best results, the PHP binary used to run Phan should be the same minor version as the PHP 7.x version used to run the codebase.
- See [Phan's NEWS](https://raw.githubusercontent.com/phan/phan/0.12.0/NEWS.md) for more details.

### 0.2.0 (2018-02-18)

- Allow running this extension without `pcntl` installed. (`pcntl` was not available for Windows)
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
"minimum-stability": "dev",
"prefer-stable": true,
"require": {
"phan/phan": "dev-master"
"phan/phan": "0.12.0"
}
}
81 changes: 71 additions & 10 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"license": "MIT",
"private": true,
"preview": false,
"version": "0.2.0",
"version": "0.3.0",
"engines": {
"vscode": "^1.16.0",
"os": [
Expand Down Expand Up @@ -55,7 +55,7 @@
"@types/semver": "^5.5.0",
"tslint": "^5.7.0",
"typescript": "^2.7.2",
"vsce": "^1.36.3",
"vsce": "^1.37.1",
"vscode": "^1.1.0"
},
"dependencies": {
Expand Down
1 change: 0 additions & 1 deletion src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,6 @@ async function checkPHPPcntlInstalled(context: vscode.ExtensionContext, phpExecu
return true;
}


function isFile(path: string): boolean {
try {
let stat = fs.statSync(path);
Expand Down

0 comments on commit ace624f

Please sign in to comment.