Wait for packagist, first
This commit is contained in:
parent
64928ccf7c
commit
d2be65d4ad
@ -7,6 +7,7 @@ php:
|
||||
|
||||
before_install:
|
||||
- echo "phar.readonly = 0" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini
|
||||
- tests/waitPackagist.php
|
||||
|
||||
script:
|
||||
- tests/makephar.sh
|
||||
|
@ -4,7 +4,7 @@
|
||||
"type": "project",
|
||||
"minimum-stability": "dev",
|
||||
"license": "AGPL-3.0-only",
|
||||
"homepage": "https://daniil.it/MadelineProto",
|
||||
"homepage": "https://docs.madelineproto.xyz",
|
||||
"keywords": ["telegram", "mtproto", "protocol", "bytes", "messenger", "client", "PHP", "video", "stickers", "audio", "files", "GB"],
|
||||
"conflict": {
|
||||
"krakjoe/pthreads-polyfill": "*"
|
||||
|
@ -19,7 +19,7 @@
|
||||
|
||||
namespace phpseclib\Math;
|
||||
|
||||
if (PHP_MAJOR_VERSION < 7 && !((\class_exists(\Phar::class) && \Phar::running()) || defined('TESTING_VERSIONS'))) {
|
||||
if (PHP_MAJOR_VERSION < 7 && !((\class_exists(\Phar::class) && \Phar::running()) || \defined('TESTING_VERSIONS'))) {
|
||||
throw new \Exception('MadelineProto requires php 7 to run natively, use phar.madelineproto.xyz to run on PHP 5.6');
|
||||
}
|
||||
if (\defined('HHVM_VERSION')) {
|
||||
|
@ -8,16 +8,18 @@ function returnMe($res)
|
||||
{
|
||||
return $res;
|
||||
}
|
||||
function __coalesce($ifNotNull, $then) {
|
||||
function __coalesce($ifNotNull, $then)
|
||||
{
|
||||
return $ifNotNull ? $ifNotNull : $then;
|
||||
}
|
||||
function __destructure($list, $value) {
|
||||
function __destructure($list, $value)
|
||||
{
|
||||
$res = [];
|
||||
foreach ($list as $key) {
|
||||
if (is_string($key)) {
|
||||
if (\is_string($key)) {
|
||||
$res []= $value[$key];
|
||||
} else {
|
||||
$res = array_merge($res, __destructure($key, $value[$key]));
|
||||
$res = \array_merge($res, __destructure($key, $value[$key]));
|
||||
}
|
||||
}
|
||||
return $res;
|
||||
|
10
tests/waitPackagist.php
Executable file
10
tests/waitPackagist.php
Executable file
@ -0,0 +1,10 @@
|
||||
#!/usr/bin/env php
|
||||
<?php
|
||||
|
||||
while (true) {
|
||||
$json = \json_decode(\file_get_contents('https://repo.packagist.org/p/danog/madelineproto.json'), true);
|
||||
if ($json["packages"]["danog/madelineproto"]["dev-".\getenv("TRAVIS_BRANCH")]["source"]["reference"] === \getenv('TRAVIS_COMMIT')) {
|
||||
return;
|
||||
}
|
||||
\sleep(1);
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user