Release 5.0.40 - Report installs to composer
This commit is contained in:
parent
ec7ecf548e
commit
407ea6c290
BIN
madeline-5.0.40.phar
Normal file
BIN
madeline-5.0.40.phar
Normal file
Binary file not shown.
BIN
madeline.phar
BIN
madeline.phar
Binary file not shown.
19
phar.php
19
phar.php
@ -84,6 +84,25 @@ function ___install_madeline()
|
||||
if ($phar) {
|
||||
\file_put_contents('madeline.phar', $phar);
|
||||
\file_put_contents('madeline.phar.version', $release);
|
||||
|
||||
|
||||
$composer = \json_decode(\file_get_contents('phar://madeline.phar/vendor/composer/installed.json'), true);
|
||||
$postData = ['downloads' => []];
|
||||
foreach ($composer as $dep) {
|
||||
$postData['downloads'][] = [
|
||||
'name' => $dep['name'],
|
||||
'version' => $dep['version_normalized']
|
||||
];
|
||||
}
|
||||
$opts = ['http' =>
|
||||
[
|
||||
'method' => 'POST',
|
||||
'header' => ['Content-Type: application/json'],
|
||||
'content' => \json_encode($postData),
|
||||
'timeout' => 6,
|
||||
],
|
||||
];
|
||||
@\file_get_contents("https://packagist.org/downloads/", false, \stream_context_create($opts));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
2
release
2
release
@ -1 +1 @@
|
||||
995a48970426bf88a9f36427c0d35bc9ff6f23e9-
|
||||
f01871a0e8181cfc0056fa5efabc30309d06fd0d-
|
1
release-5.0.40
Normal file
1
release-5.0.40
Normal file
@ -0,0 +1 @@
|
||||
f01871a0e8181cfc0056fa5efabc30309d06fd0d-
|
Loading…
Reference in New Issue
Block a user