mirror of
https://gitee.com/hyperf/hyperf.git
synced 2024-12-02 03:37:44 +08:00
Fixed the scanner will missing the packages at require-dev of composer.json (#1223)
* Fix #686 * Update CHANGELOG.md
This commit is contained in:
parent
be471f537b
commit
0ebdb50a1a
@ -1,5 +1,9 @@
|
||||
# v1.1.14 - TBD
|
||||
|
||||
## Fixed
|
||||
|
||||
- [#1223](https://github.com/hyperf/hyperf/pull/1223) Fixed the scanner will missing the packages at require-dev of composer.json
|
||||
|
||||
# v1.1.13 - 2020-01-03
|
||||
|
||||
## Added
|
||||
|
@ -52,7 +52,9 @@ class Composer
|
||||
throw new \RuntimeException('composer.lock not found.');
|
||||
}
|
||||
self::$content = collect(json_decode(file_get_contents($path), true));
|
||||
foreach (self::$content->offsetGet('packages') ?? [] as $package) {
|
||||
$packages = self::$content->offsetGet('packages') ?? [];
|
||||
$packagesDev = self::$content->offsetGet('packages-dev') ?? [];
|
||||
foreach (array_merge($packages, $packagesDev) as $package) {
|
||||
$packageName = '';
|
||||
foreach ($package ?? [] as $key => $value) {
|
||||
if ($key === 'name') {
|
||||
|
Loading…
Reference in New Issue
Block a user