Use JetBrains PHPStorm stubs from packagist (#264)
* Use JetBrains PHPStorm stubs from packagist * Fix pathabort-traversal v4.2.3
parent
47b5b6709c
commit
d8823bc7dc
|
@ -36,27 +36,9 @@
|
||||||
"webmozart/path-util": "^2.3",
|
"webmozart/path-util": "^2.3",
|
||||||
"webmozart/glob": "^4.1",
|
"webmozart/glob": "^4.1",
|
||||||
"sabre/uri": "^2.0",
|
"sabre/uri": "^2.0",
|
||||||
"JetBrains/phpstorm-stubs": "dev-master",
|
"jetbrains/phpstorm-stubs": "dev-master",
|
||||||
"composer/composer": "^1.3"
|
"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",
|
"minimum-stability": "dev",
|
||||||
"prefer-stable": true,
|
"prefer-stable": true,
|
||||||
"autoload": {
|
"autoload": {
|
||||||
|
|
|
@ -33,14 +33,14 @@ class ComposerScripts
|
||||||
$definitionResolver = new DefinitionResolver($index);
|
$definitionResolver = new DefinitionResolver($index);
|
||||||
|
|
||||||
$stubsLocation = null;
|
$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)) {
|
if (file_exists($dir)) {
|
||||||
$stubsLocation = Path::canonicalize($dir);
|
$stubsLocation = Path::canonicalize($dir);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!$stubsLocation) {
|
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");
|
$uris = yield $finder->find("$stubsLocation/**/*.php");
|
||||||
|
|
Loading…
Reference in New Issue