1
0
Fork 0

Use JetBrains PHPStorm stubs from packagist (#264)

* Use JetBrains PHPStorm stubs from packagist

* Fix path
abort-traversal v4.2.3
Felix Becker 2017-01-30 11:55:13 +01:00 committed by GitHub
parent 47b5b6709c
commit d8823bc7dc
2 changed files with 3 additions and 21 deletions

View File

@ -36,27 +36,9 @@
"webmozart/path-util": "^2.3",
"webmozart/glob": "^4.1",
"sabre/uri": "^2.0",
"JetBrains/phpstorm-stubs": "dev-master",
"jetbrains/phpstorm-stubs": "dev-master",
"composer/composer": "^1.3"
},
"repositories": [
{
"type": "package",
"package": {
"name": "JetBrains/phpstorm-stubs",
"version": "dev-master",
"dist": {
"url": "https://github.com/JetBrains/phpstorm-stubs/archive/master.zip",
"type": "zip"
},
"source": {
"url": "https://github.com/JetBrains/phpstorm-stubs",
"type": "git",
"reference": "master"
}
}
}
],
"minimum-stability": "dev",
"prefer-stable": true,
"autoload": {

View File

@ -33,14 +33,14 @@ class ComposerScripts
$definitionResolver = new DefinitionResolver($index);
$stubsLocation = null;
foreach ([__DIR__ . '/../../../JetBrains/phpstorm-stubs', __DIR__ . '/../vendor/JetBrains/phpstorm-stubs'] as $dir) {
foreach ([__DIR__ . '/../../../jetbrains/phpstorm-stubs', __DIR__ . '/../vendor/jetbrains/phpstorm-stubs'] as $dir) {
if (file_exists($dir)) {
$stubsLocation = Path::canonicalize($dir);
break;
}
}
if (!$stubsLocation) {
throw new \Exception('JetBrains/phpstorm-stubs package not found');
throw new \Exception('jetbrains/phpstorm-stubs package not found');
}
$uris = yield $finder->find("$stubsLocation/**/*.php");