mirror of
https://gitee.com/hyperf/hyperf.git
synced 2024-12-02 03:37:44 +08:00
Update composer-json-fixer
This commit is contained in:
parent
1a3ddb2683
commit
029b3882e9
@ -33,13 +33,16 @@ foreach ($files as $file) {
|
|||||||
$configProviders = array_merge($configProviders, (array)$composerJson['extra']['hyperf']['config']);
|
$configProviders = array_merge($configProviders, (array)$composerJson['extra']['hyperf']['config']);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ksort($autoload);
|
ksort($autoload);
|
||||||
ksort($autoloadDev);
|
ksort($autoloadDev);
|
||||||
sort($configProviders);
|
sort($configProviders);
|
||||||
|
|
||||||
$json = json_decode(file_get_contents(__DIR__ . '/../composer.json'));
|
$json = json_decode(file_get_contents(__DIR__ . '/../composer.json'));
|
||||||
$json->autoload->{'psr-4'} = $autoload;
|
$json->autoload->{'psr-4'} = $autoload;
|
||||||
$json->{'autoload-dev'}->{'psr-4'} = $autoloadDev;
|
$json->{'autoload-dev'}->{'psr-4'} = $autoloadDev;
|
||||||
$json->extra->hyperf->config = $configProviders;
|
$json->extra->hyperf->config = $configProviders;
|
||||||
|
|
||||||
file_put_contents(
|
file_put_contents(
|
||||||
__DIR__ . '/../composer.json',
|
__DIR__ . '/../composer.json',
|
||||||
json_encode($json, JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES | JSON_PRETTY_PRINT)
|
json_encode($json, JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES | JSON_PRETTY_PRINT)
|
||||||
|
Loading…
Reference in New Issue
Block a user