From e74cd109ad31d7c06539c1328be392eff4385b93 Mon Sep 17 00:00:00 2001 From: Alexander Pankratov Date: Tue, 23 Nov 2021 01:29:41 +0300 Subject: [PATCH 001/270] Fix: ensure env not erased --- bootstrap.php | 9 +- composer.lock | 162 ++++++++++++++++++++-------------- docker/php/conf.d/opcache.ini | 2 +- 3 files changed, 106 insertions(+), 67 deletions(-) diff --git a/bootstrap.php b/bootstrap.php index ced925d..6193c41 100644 --- a/bootstrap.php +++ b/bootstrap.php @@ -39,7 +39,14 @@ } //Dont use copy because of docker symlinks $envContent = file_get_contents($envPathExample); - file_put_contents($envPath, $envContent); + if (strlen($envContent) > 0) { + $result = file_put_contents($envPath, $envContent); + if (!$result) { + throw new RuntimeException("Cant write file: {$envPath}"); + } + } else { + throw new RuntimeException("Cant read file: {$envPathExample}"); + } } Dotenv\Dotenv::createImmutable(ROOT_DIR, $envFile)->load(); diff --git a/composer.lock b/composer.lock index d10118e..5fee6f7 100644 --- a/composer.lock +++ b/composer.lock @@ -642,16 +642,16 @@ }, { "name": "amphp/http-client-cookies", - "version": "v1.1.0", + "version": "v1.2.0", "source": { "type": "git", "url": "https://github.com/amphp/http-client-cookies.git", - "reference": "cd9ccc4d9106fef3f2a2bc10946108dbc62572c5" + "reference": "ab7e498bb6c4e389e2b9880727d6470997189d87" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/amphp/http-client-cookies/zipball/cd9ccc4d9106fef3f2a2bc10946108dbc62572c5", - "reference": "cd9ccc4d9106fef3f2a2bc10946108dbc62572c5", + "url": "https://api.github.com/repos/amphp/http-client-cookies/zipball/ab7e498bb6c4e389e2b9880727d6470997189d87", + "reference": "ab7e498bb6c4e389e2b9880727d6470997189d87", "shasum": "" }, "require": { @@ -665,10 +665,10 @@ "psr/http-message": "^1.0" }, "conflict": { - "amphp/file": "<1 || >=2" + "amphp/file": "<1 || >=3" }, "require-dev": { - "amphp/file": "^1", + "amphp/file": "^2", "amphp/http-server": "dev-master", "amphp/php-cs-fixer-config": "dev-master", "amphp/phpunit-util": "^1.1", @@ -707,7 +707,7 @@ ], "support": { "issues": "https://github.com/amphp/http-client-cookies/issues", - "source": "https://github.com/amphp/http-client-cookies/tree/master" + "source": "https://github.com/amphp/http-client-cookies/tree/v1.2.0" }, "funding": [ { @@ -715,7 +715,7 @@ "type": "github" } ], - "time": "2020-03-03T16:53:42+00:00" + "time": "2021-10-21T20:53:46+00:00" }, { "name": "amphp/http-server", @@ -1088,16 +1088,16 @@ }, { "name": "amphp/parallel", - "version": "v1.4.0", + "version": "v1.4.1", "source": { "type": "git", "url": "https://github.com/amphp/parallel.git", - "reference": "2c1039bf7ca137eae4d954b14c09a7535d7d4e1c" + "reference": "fbc128383c1ffb3823866f71b88d8c4722a25ce9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/amphp/parallel/zipball/2c1039bf7ca137eae4d954b14c09a7535d7d4e1c", - "reference": "2c1039bf7ca137eae4d954b14c09a7535d7d4e1c", + "url": "https://api.github.com/repos/amphp/parallel/zipball/fbc128383c1ffb3823866f71b88d8c4722a25ce9", + "reference": "fbc128383c1ffb3823866f71b88d8c4722a25ce9", "shasum": "" }, "require": { @@ -1150,9 +1150,15 @@ ], "support": { "issues": "https://github.com/amphp/parallel/issues", - "source": "https://github.com/amphp/parallel/tree/master" + "source": "https://github.com/amphp/parallel/tree/v1.4.1" }, - "time": "2020-04-27T15:12:37+00:00" + "funding": [ + { + "url": "https://github.com/amphp", + "type": "github" + } + ], + "time": "2021-10-25T19:16:02+00:00" }, { "name": "amphp/parser", @@ -1346,16 +1352,16 @@ }, { "name": "amphp/redis", - "version": "v1.0.5", + "version": "v1.0.6", "source": { "type": "git", "url": "https://github.com/amphp/redis.git", - "reference": "b8910b1051b128105f0724b5c95c34db30bd1d45" + "reference": "1eade91c18aecd4708ea35e2d745a71e8a5c1354" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/amphp/redis/zipball/b8910b1051b128105f0724b5c95c34db30bd1d45", - "reference": "b8910b1051b128105f0724b5c95c34db30bd1d45", + "url": "https://api.github.com/repos/amphp/redis/zipball/1eade91c18aecd4708ea35e2d745a71e8a5c1354", + "reference": "1eade91c18aecd4708ea35e2d745a71e8a5c1354", "shasum": "" }, "require": { @@ -1401,7 +1407,7 @@ ], "support": { "issues": "https://github.com/amphp/redis/issues", - "source": "https://github.com/amphp/redis/tree/v1.0.5" + "source": "https://github.com/amphp/redis/tree/v1.0.6" }, "funding": [ { @@ -1409,7 +1415,7 @@ "type": "github" } ], - "time": "2021-10-12T18:38:52+00:00" + "time": "2021-10-18T15:18:29+00:00" }, { "name": "amphp/serialization", @@ -1659,16 +1665,16 @@ }, { "name": "amphp/sync", - "version": "v1.4.0", + "version": "v1.4.2", "source": { "type": "git", "url": "https://github.com/amphp/sync.git", - "reference": "613047ac54c025aa800a9cde5b05c3add7327ed4" + "reference": "85ab06764f4f36d63b1356b466df6111cf4b89cf" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/amphp/sync/zipball/613047ac54c025aa800a9cde5b05c3add7327ed4", - "reference": "613047ac54c025aa800a9cde5b05c3add7327ed4", + "url": "https://api.github.com/repos/amphp/sync/zipball/85ab06764f4f36d63b1356b466df6111cf4b89cf", + "reference": "85ab06764f4f36d63b1356b466df6111cf4b89cf", "shasum": "" }, "require": { @@ -1715,9 +1721,15 @@ ], "support": { "issues": "https://github.com/amphp/sync/issues", - "source": "https://github.com/amphp/sync/tree/v1.4.0" + "source": "https://github.com/amphp/sync/tree/v1.4.2" }, - "time": "2020-05-07T18:57:50+00:00" + "funding": [ + { + "url": "https://github.com/amphp", + "type": "github" + } + ], + "time": "2021-10-25T18:29:10+00:00" }, { "name": "amphp/websocket", @@ -2335,12 +2347,12 @@ "source": { "type": "git", "url": "https://github.com/danog/MadelineProto.git", - "reference": "04a2f1b0219fd6d7f5658a9030f4750f5bf25374" + "reference": "3e77a5be2d2ee82285ef88c71b064b7da0db2166" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/danog/MadelineProto/zipball/04a2f1b0219fd6d7f5658a9030f4750f5bf25374", - "reference": "04a2f1b0219fd6d7f5658a9030f4750f5bf25374", + "url": "https://api.github.com/repos/danog/MadelineProto/zipball/3e77a5be2d2ee82285ef88c71b064b7da0db2166", + "reference": "3e77a5be2d2ee82285ef88c71b064b7da0db2166", "shasum": "" }, "require": { @@ -2446,7 +2458,7 @@ "type": "github" } ], - "time": "2021-10-14T22:31:47+00:00" + "time": "2021-11-22T22:25:43+00:00" }, { "name": "danog/magicalserializer", @@ -2495,18 +2507,21 @@ }, { "name": "danog/primemodule", - "version": "1.0.6", + "version": "1.0.7", "source": { "type": "git", "url": "https://github.com/danog/PrimeModule.git", - "reference": "34f41ddc2d77aa96d6bd435513bcf516dbfa78b5" + "reference": "371cf2521dc665875cac5765259240c0666de69c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/danog/PrimeModule/zipball/34f41ddc2d77aa96d6bd435513bcf516dbfa78b5", - "reference": "34f41ddc2d77aa96d6bd435513bcf516dbfa78b5", + "url": "https://api.github.com/repos/danog/PrimeModule/zipball/371cf2521dc665875cac5765259240c0666de69c", + "reference": "371cf2521dc665875cac5765259240c0666de69c", "shasum": "" }, + "require": { + "php": ">=7.0" + }, "suggest": { "ext-primemodule": "Install the native C++ extension for extremely fast factorization (https://github.com/danog/PrimeModule-ext)" }, @@ -2529,9 +2544,9 @@ "description": "Prime module capable of doing prime factorization of huge numbers very quickly.\"", "support": { "issues": "https://github.com/danog/PrimeModule/issues", - "source": "https://github.com/danog/PrimeModule/tree/1.0.6" + "source": "https://github.com/danog/PrimeModule/tree/1.0.7" }, - "time": "2021-09-05T18:55:40+00:00" + "time": "2021-10-24T16:51:03+00:00" }, { "name": "danog/tg-file-decoder", @@ -3914,12 +3929,12 @@ "source": { "type": "git", "url": "https://github.com/Roave/SecurityAdvisories.git", - "reference": "0488e161600117fc3a0d72397dad154729002f54" + "reference": "40581b6c391cffa5d211ac1659ea9cffc6dc2b13" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Roave/SecurityAdvisories/zipball/0488e161600117fc3a0d72397dad154729002f54", - "reference": "0488e161600117fc3a0d72397dad154729002f54", + "url": "https://api.github.com/repos/Roave/SecurityAdvisories/zipball/40581b6c391cffa5d211ac1659ea9cffc6dc2b13", + "reference": "40581b6c391cffa5d211ac1659ea9cffc6dc2b13", "shasum": "" }, "conflict": { @@ -3932,6 +3947,7 @@ "amphp/http": "<1.0.1", "amphp/http-client": ">=4,<4.4", "api-platform/core": ">=2.2,<2.2.10|>=2.3,<2.3.6", + "area17/twill": "<=2.5.2", "asymmetricrypt/asymmetricrypt": ">=0,<9.9.99", "aws/aws-sdk-php": ">=3,<3.2.1", "bagisto/bagisto": "<0.1.5", @@ -3943,23 +3959,26 @@ "bolt/bolt": "<3.7.2", "bolt/core": "<4.1.13", "brightlocal/phpwhois": "<=4.2.5", - "buddypress/buddypress": "<5.1.2", + "buddypress/buddypress": "<7.2.1", "bugsnag/bugsnag-laravel": ">=2,<2.0.2", "cachethq/cachet": "<2.5.1", "cakephp/cakephp": ">=1.3,<1.3.18|>=2,<2.4.99|>=2.5,<2.5.99|>=2.6,<2.6.12|>=2.7,<2.7.6|>=3,<3.5.18|>=3.6,<3.6.15|>=3.7,<3.7.7", + "cardgate/magento2": "<2.0.33", "cart2quote/module-quotation": ">=4.1.6,<=4.4.5|>=5,<5.4.4", "cartalyst/sentry": "<=2.1.6", + "catfan/medoo": "<1.7.5", "centreon/centreon": "<20.10.7", "cesnet/simplesamlphp-module-proxystatistics": "<3.1", "codeception/codeception": "<3.1.3|>=4,<4.1.22", "codeigniter/framework": "<=3.0.6", "codiad/codiad": "<=2.8.4", - "composer/composer": "<1.10.22|>=2-alpha.1,<2.0.13", + "composer/composer": "<1.10.23|>=2-alpha.1,<2.1.9", + "concrete5/concrete5": "<8.5.5", "contao-components/mediaelement": ">=2.14.2,<2.21.1", "contao/core": ">=2,<3.5.39", "contao/core-bundle": ">=4,<4.4.56|>=4.5,<4.9.18|>=4.10,<4.11.7|= 4.10.0", "contao/listing-bundle": ">=4,<4.4.8", - "craftcms/cms": "<3.6.7", + "craftcms/cms": "<3.7.14", "croogo/croogo": "<3.0.7", "datadog/dd-trace": ">=0.30,<0.30.2", "david-garcia/phpwhois": "<=4.3.1", @@ -3968,7 +3987,7 @@ "doctrine/annotations": ">=1,<1.2.7", "doctrine/cache": ">=1,<1.3.2|>=1.4,<1.4.2", "doctrine/common": ">=2,<2.4.3|>=2.5,<2.5.1", - "doctrine/dbal": ">=2,<2.0.8|>=2.1,<2.1.2", + "doctrine/dbal": ">=2,<2.0.8|>=2.1,<2.1.2|>=3,<3.1.4", "doctrine/doctrine-bundle": "<1.5.2", "doctrine/doctrine-module": "<=0.7.1", "doctrine/mongodb-odm": ">=1,<1.0.2", @@ -3999,7 +4018,7 @@ "ezsystems/platform-ui-assets-bundle": ">=4.2,<4.2.3", "ezsystems/repository-forms": ">=2.3,<2.3.2.1", "ezyang/htmlpurifier": "<4.1.1", - "facade/ignition": "<1.16.14|>=2,<2.4.2|>=2.5,<2.5.2", + "facade/ignition": "<1.16.15|>=2,<2.4.2|>=2.5,<2.5.2", "feehi/cms": "<=2.1.1", "feehi/feehicms": "<=0.1.3", "firebase/php-jwt": "<2", @@ -4017,28 +4036,31 @@ "friendsoftypo3/mediace": ">=7.6.2,<7.6.5", "froala/wysiwyg-editor": "<3.2.7", "fuel/core": "<1.8.1", - "getgrav/grav": "<1.7.21", - "getkirby/cms": "<=3.5.6", + "getgrav/grav": "<=1.7.24", + "getkirby/cms": "<3.5.8", "getkirby/panel": "<2.5.14", "gilacms/gila": "<=1.11.4", + "globalpayments/php-sdk": "<2", "gos/web-socket-bundle": "<1.10.4|>=2,<2.6.1|>=3,<3.3", "gree/jose": "<=2.2", "gregwar/rst": "<1.0.3", - "grumpydictator/firefly-iii": "<5.6.1", + "grumpydictator/firefly-iii": "<5.6.3", "guzzlehttp/guzzle": ">=4-rc.2,<4.2.4|>=5,<5.3.1|>=6,<6.2.1", "helloxz/imgurl": "<=2.31", + "hjue/justwriting": "<=1", + "hov/jobfair": "<1.0.13|>=2,<2.0.2", "ibexa/post-install": "<=1.0.4", "icecoder/icecoder": "<=8", "illuminate/auth": ">=4,<4.0.99|>=4.1,<=4.1.31|>=4.2,<=4.2.22|>=5,<=5.0.35|>=5.1,<=5.1.46|>=5.2,<=5.2.45|>=5.3,<=5.3.31|>=5.4,<=5.4.36|>=5.5,<5.5.10", "illuminate/cookie": ">=4,<=4.0.11|>=4.1,<=4.1.99999|>=4.2,<=4.2.99999|>=5,<=5.0.99999|>=5.1,<=5.1.99999|>=5.2,<=5.2.99999|>=5.3,<=5.3.99999|>=5.4,<=5.4.99999|>=5.5,<=5.5.49|>=5.6,<=5.6.99999|>=5.7,<=5.7.99999|>=5.8,<=5.8.99999|>=6,<6.18.31|>=7,<7.22.4", - "illuminate/database": "<6.20.26|>=7,<8.40", + "illuminate/database": "<6.20.26|>=7,<7.30.5|>=8,<8.40", "illuminate/encryption": ">=4,<=4.0.11|>=4.1,<=4.1.31|>=4.2,<=4.2.22|>=5,<=5.0.35|>=5.1,<=5.1.46|>=5.2,<=5.2.45|>=5.3,<=5.3.31|>=5.4,<=5.4.36|>=5.5,<5.5.40|>=5.6,<5.6.15", "illuminate/view": ">=7,<7.1.2", "impresscms/impresscms": "<=1.4.2", "in2code/femanager": "<5.5.1|>=6,<6.3.1", "intelliants/subrion": "<=4.2.1", "ivankristianto/phpwhois": "<=4.3", - "james-heinrich/getid3": "<1.9.9", + "james-heinrich/getid3": "<1.9.21", "joomla/archive": "<1.1.10", "joomla/session": "<1.3.1", "jsmitty12/phpwhois": "<5.1", @@ -4048,14 +4070,15 @@ "kreait/firebase-php": ">=3.2,<3.8.1", "la-haute-societe/tcpdf": "<6.2.22", "laminas/laminas-http": "<2.14.2", - "laravel/framework": "<6.20.26|>=7,<8.40", + "laravel/framework": "<6.20.26|>=7,<7.30.5|>=8,<8.40", "laravel/socialite": ">=1,<1.0.99|>=2,<2.0.10", "lavalite/cms": "<=5.8", "lcobucci/jwt": ">=3.4,<3.4.6|>=4,<4.0.4|>=4.1,<4.1.5", "league/commonmark": "<0.18.3", "league/flysystem": "<1.1.4|>=2,<2.1.1", "lexik/jwt-authentication-bundle": "<2.10.7|>=2.11,<2.11.3", - "librenms/librenms": "<21.1", + "librenms/librenms": "<=21.10.2", + "limesurvey/limesurvey": "<3.27.19", "livewire/livewire": ">2.2.4,<2.2.6", "lms/routes": "<2.1.1", "localizationteam/l10nmgr": "<7.4|>=8,<8.7|>=9,<9.2", @@ -4066,11 +4089,14 @@ "marcwillmann/turn": "<0.3.3", "mautic/core": "<4|= 2.13.1", "mediawiki/core": ">=1.27,<1.27.6|>=1.29,<1.29.3|>=1.30,<1.30.2|>=1.31,<1.31.9|>=1.32,<1.32.6|>=1.32.99,<1.33.3|>=1.33.99,<1.34.3|>=1.34.99,<1.35", + "microweber/microweber": "<1.2.8", "miniorange/miniorange-saml": "<1.4.3", "mittwald/typo3_forum": "<1.2.1", + "modx/revolution": "<2.8", "monolog/monolog": ">=1.8,<1.12", - "moodle/moodle": "<3.5.17|>=3.7,<3.7.9|>=3.8,<3.8.8|>=3.9,<3.9.5|>=3.10,<3.10.2", + "moodle/moodle": "<3.5.17|>=3.7,<3.7.9|>=3.8,<3.8.8|>=3.9,<3.9.5|>=3.10-beta,<3.10.2", "namshi/jose": "<2.2", + "neoan3-apps/template": "<1.1.1", "neos/flow": ">=1,<1.0.4|>=1.1,<1.1.1|>=2,<2.0.1|>=2.3,<2.3.16|>=3,<3.0.12|>=3.1,<3.1.10|>=3.2,<3.2.13|>=3.3,<3.3.13|>=4,<4.0.6", "neos/form": ">=1.2,<4.3.3|>=5,<5.0.9|>=5.1,<5.1.3", "neos/neos": ">=1.1,<1.1.3|>=1.2,<1.2.13|>=2,<2.0.4|>=2.3,<2.9.99|>=3,<3.0.20|>=3.1,<3.1.18|>=3.2,<3.2.14|>=3.3,<3.3.23|>=4,<4.0.17|>=4.1,<4.1.16|>=4.2,<4.2.12|>=4.3,<4.3.3", @@ -4083,16 +4109,16 @@ "nzo/url-encryptor-bundle": ">=4,<4.3.2|>=5,<5.0.1", "october/backend": "<1.1.2", "october/cms": "= 1.1.1|= 1.0.471|= 1.0.469|>=1.0.319,<1.0.469", - "october/october": ">=1.0.319,<1.0.466", + "october/october": ">=1.0.319,<1.0.466|>=2.1,<2.1.12", "october/rain": "<1.0.472|>=1.1,<1.1.2", - "october/system": "<1.0.472|>=1.1.1,<1.1.5", + "october/system": "<1.0.472|>=1.1.1,<1.1.5|>=2.1,<2.1.12", "onelogin/php-saml": "<2.10.4", "oneup/uploader-bundle": "<1.9.3|>=2,<2.1.5", "opencart/opencart": "<=3.0.3.2", "openid/php-openid": "<2.3", "openmage/magento-lts": "<19.4.15|>=20,<20.0.13", "orchid/platform": ">=9,<9.4.4", - "oro/crm": ">=1.7,<1.7.4", + "oro/crm": ">=1.7,<1.7.4|>=3.1,<4.1.17|>=4.2,<4.2.7", "oro/platform": ">=1.7,<1.7.4", "padraic/humbug_get_contents": "<1.1.2", "pagarme/pagarme-php": ">=0,<3", @@ -4101,6 +4127,7 @@ "passbolt/passbolt_api": "<2.11", "paypal/merchant-sdk-php": "<3.12", "pear/archive_tar": "<1.4.14", + "pegasus/google-for-jobs": "<1.5.1|>=2,<2.1.1", "personnummer/personnummer": "<3.0.2", "phanan/koel": "<5.1.4", "phpfastcache/phpfastcache": "<6.1.5|>=7,<7.1.2|>=8,<8.0.7", @@ -4122,10 +4149,11 @@ "prestashop/productcomments": ">=4,<4.2.1", "prestashop/ps_emailsubscription": "<2.6.1", "prestashop/ps_facetedsearch": "<3.4.1", + "prestashop/ps_linklist": "<3.1", "privatebin/privatebin": "<1.2.2|>=1.3,<1.3.2", "propel/propel": ">=2-alpha.1,<=2-alpha.7", "propel/propel1": ">=1,<=1.7.1", - "pterodactyl/panel": "<0.7.19|>=1-rc.0,<=1-rc.6", + "pterodactyl/panel": "<1.6.6", "pusher/pusher-php-server": "<2.2.1", "pwweb/laravel-core": "<=0.3.6-beta", "rainlab/debugbar-plugin": "<3.1", @@ -4139,15 +4167,15 @@ "shopware/core": "<=6.4.3", "shopware/platform": "<=6.4.3", "shopware/production": "<=6.3.5.2", - "shopware/shopware": "<5.6.10", - "showdoc/showdoc": "<=2.9.8", - "silverstripe/admin": ">=1.0.3,<1.0.4|>=1.1,<1.1.1", + "shopware/shopware": "<5.7.6", + "showdoc/showdoc": "<=2.9.12", + "silverstripe/admin": "<4.8.1", "silverstripe/assets": ">=1,<1.4.7|>=1.5,<1.5.2", "silverstripe/cms": "<4.3.6|>=4.4,<4.4.4", "silverstripe/comments": ">=1.3,<1.9.99|>=2,<2.9.99|>=3,<3.1.1", "silverstripe/forum": "<=0.6.1|>=0.7,<=0.7.3", "silverstripe/framework": "<4.7.4", - "silverstripe/graphql": "<=3.5|>=4-alpha.1,<4-alpha.2", + "silverstripe/graphql": "<3.5.2|>=4-alpha.1,<4-alpha.2", "silverstripe/registry": ">=2.1,<2.1.2|>=2.2,<2.2.1", "silverstripe/restfulserver": ">=1,<1.0.9|>=2,<2.0.4", "silverstripe/subsites": ">=2,<2.1.1", @@ -4160,19 +4188,21 @@ "simplito/elliptic-php": "<1.0.6", "slim/slim": "<2.6", "smarty/smarty": "<3.1.39", + "snipe/snipe-it": "<=5.3.1", "socalnick/scn-social-auth": "<1.15.2", "socialiteproviders/steam": "<1.1", "spoonity/tcpdf": "<6.2.22", "squizlabs/php_codesniffer": ">=1,<2.8.1|>=3,<3.0.1", - "ssddanbrown/bookstack": "<0.29.2", + "ssddanbrown/bookstack": "<21.0.3", "stormpath/sdk": ">=0,<9.9.99", "studio-42/elfinder": "<2.1.59", "subrion/cms": "<=4.2.1", - "sulu/sulu": "<1.6.41|>=2,<2.0.10|>=2.1,<2.1.1", + "sulu/sulu": "<1.6.43|>=2,<2.0.10|>=2.1,<2.1.1", "swiftmailer/swiftmailer": ">=4,<5.4.5", "sylius/admin-bundle": ">=1,<1.0.17|>=1.1,<1.1.9|>=1.2,<1.2.2", "sylius/grid": ">=1,<1.1.19|>=1.2,<1.2.18|>=1.3,<1.3.13|>=1.4,<1.4.5|>=1.5,<1.5.1", "sylius/grid-bundle": ">=1,<1.1.19|>=1.2,<1.2.18|>=1.3,<1.3.13|>=1.4,<1.4.5|>=1.5,<1.5.1", + "sylius/paypal-plugin": ">=1,<1.2.4|>=1.3,<1.3.1", "sylius/resource-bundle": "<1.3.14|>=1.4,<1.4.7|>=1.5,<1.5.2|>=1.6,<1.6.4", "sylius/sylius": "<1.6.9|>=1.7,<1.7.9|>=1.8,<1.8.3|>=1.9,<1.9.5", "symbiote/silverstripe-multivaluefield": ">=3,<3.0.99", @@ -4213,15 +4243,16 @@ "thelia/backoffice-default-template": ">=2.1,<2.1.2", "thelia/thelia": ">=2.1-beta.1,<2.1.3", "theonedemon/phpwhois": "<=4.2.5", + "tinymce/tinymce": "<5.10", "titon/framework": ">=0,<9.9.99", "topthink/think": "<=6.0.9", "topthink/thinkphp": "<=3.2.3", "tribalsystems/zenario": "<8.8.53370", "truckersmp/phpwhois": "<=4.3.1", "twig/twig": "<1.38|>=2,<2.7", - "typo3/cms": ">=6.2,<6.2.30|>=7,<7.6.32|>=8,<8.7.38|>=9,<9.5.29|>=10,<10.4.19|>=11,<11.3.2", + "typo3/cms": ">=6.2,<6.2.30|>=7,<7.6.32|>=8,<8.7.38|>=9,<9.5.29|>=10,<10.4.19|>=11,<11.5", "typo3/cms-backend": ">=7,<=7.6.50|>=8,<=8.7.39|>=9,<=9.5.24|>=10,<=10.4.13|>=11,<=11.1", - "typo3/cms-core": ">=6.2,<=6.2.56|>=7,<=7.6.52|>=8,<=8.7.41|>=9,<9.5.29|>=10,<10.4.19|>=11,<11.3.2", + "typo3/cms-core": ">=6.2,<=6.2.56|>=7,<=7.6.52|>=8,<=8.7.41|>=9,<9.5.29|>=10,<10.4.19|>=11,<11.5", "typo3/cms-form": ">=8,<=8.7.39|>=9,<=9.5.24|>=10,<=10.4.13|>=11,<=11.1", "typo3/flow": ">=1,<1.0.4|>=1.1,<1.1.1|>=2,<2.0.1|>=2.3,<2.3.16|>=3,<3.0.12|>=3.1,<3.1.10|>=3.2,<3.2.13|>=3.3,<3.3.13|>=4,<4.0.6", "typo3/neos": ">=1.1,<1.1.3|>=1.2,<1.2.13|>=2,<2.0.4|>=2.3,<2.3.99|>=3,<3.0.20|>=3.1,<3.1.18|>=3.2,<3.2.14|>=3.3,<3.3.23|>=4,<4.0.17|>=4.1,<4.1.16|>=4.2,<4.2.12|>=4.3,<4.3.3", @@ -4234,6 +4265,7 @@ "verot/class.upload.php": "<=1.0.3|>=2,<=2.0.4", "vrana/adminer": "<4.7.9", "wallabag/tcpdf": "<6.2.22", + "wanglelecc/laracms": "<=1.0.3", "web-auth/webauthn-framework": ">=3.3,<3.3.4", "webcoast/deferred-image-processing": "<1.0.2", "wikimedia/parsoid": "<0.12.2", @@ -4311,7 +4343,7 @@ "type": "tidelift" } ], - "time": "2021-09-30T18:03:50+00:00" + "time": "2021-11-19T21:12:46+00:00" } ], "aliases": [], diff --git a/docker/php/conf.d/opcache.ini b/docker/php/conf.d/opcache.ini index 916f26d..14ef174 100644 --- a/docker/php/conf.d/opcache.ini +++ b/docker/php/conf.d/opcache.ini @@ -8,4 +8,4 @@ opcache.validate_timestamps=1 opcache.revalidate_freq=0 opcache.huge_code_pages=1 opcache.jit_buffer_size=100M -opcache.jit=1205 \ No newline at end of file +opcache.jit=function \ No newline at end of file From 3f36382c4e7073d28e92a35344e1db87936258b2 Mon Sep 17 00:00:00 2001 From: Alexander Pankratov Date: Fri, 26 Nov 2021 01:04:44 +0300 Subject: [PATCH 002/270] Update libs --- composer.json | 8 ++++---- composer.lock | 56 +++++++++++++++++++++++---------------------------- 2 files changed, 29 insertions(+), 35 deletions(-) diff --git a/composer.json b/composer.json index 0eacc6a..025099f 100644 --- a/composer.json +++ b/composer.json @@ -1,18 +1,18 @@ { "name": "xtrime-ru/telegramapiserver", - "description": "Fast, simple, async php telegram client and parser: MadelineProto + Amp HTTP Server", + "description": "Fast, simple, async php telegram client and parser: MadelineProto + Amphp HTTP Server", "type": "project", "homepage": "https://tg.i-c-a.su/", "license": "MIT", - "keywords": ["telegram", "mtproto", "protocol", "client", "PHP", "amphp", "async", "daemon", "coroutine", "parser", "micro-service"], + "keywords": ["telegram", "mtproto", "client", "PHP", "amphp", "async", "daemon", "coroutine", "parser", "micro-service", "madelineproto"], "require": { - "php": ">=7.4", + "php": ">=8.0", "ext-json": "*", "ext-mbstring": "*", "ext-pcntl": "*", "amphp/http-server": "^2", "amphp/http-server-router": "^1", - "amphp/websocket-server": "dev-master", + "amphp/websocket-server": "^2", "amphp/websocket-client": "^1", "amphp/http-client": "^4", "vlucas/phpdotenv": "^4", diff --git a/composer.lock b/composer.lock index 5fee6f7..47a87b8 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "a66edfdcf351e52d84f6f49ff5cc1d6b", + "content-hash": "b323c83194c4e8b4be1e6fcd840a76a9", "packages": [ { "name": "amphp/amp", @@ -1888,16 +1888,16 @@ }, { "name": "amphp/websocket-server", - "version": "dev-master", + "version": "v2.0.0", "source": { "type": "git", "url": "https://github.com/amphp/websocket-server.git", - "reference": "f5e27858f2b9a37e909a3d96b50ab3420842e5b1" + "reference": "5cb850e9681a9e551635b946fdb1fa2372a8abe8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/amphp/websocket-server/zipball/f5e27858f2b9a37e909a3d96b50ab3420842e5b1", - "reference": "f5e27858f2b9a37e909a3d96b50ab3420842e5b1", + "url": "https://api.github.com/repos/amphp/websocket-server/zipball/5cb850e9681a9e551635b946fdb1fa2372a8abe8", + "reference": "5cb850e9681a9e551635b946fdb1fa2372a8abe8", "shasum": "" }, "require": { @@ -1923,7 +1923,6 @@ "suggest": { "ext-zlib": "Required for compression" }, - "default-branch": true, "type": "library", "autoload": { "psr-4": { @@ -1960,15 +1959,9 @@ ], "support": { "issues": "https://github.com/amphp/websocket-server/issues", - "source": "https://github.com/amphp/websocket-server/tree/master" + "source": "https://github.com/amphp/websocket-server/tree/v2.0.0" }, - "funding": [ - { - "url": "https://github.com/amphp", - "type": "github" - } - ], - "time": "2020-07-08T17:10:06+00:00" + "time": "2020-07-01T17:08:20+00:00" }, { "name": "amphp/windows-registry", @@ -2347,12 +2340,12 @@ "source": { "type": "git", "url": "https://github.com/danog/MadelineProto.git", - "reference": "3e77a5be2d2ee82285ef88c71b064b7da0db2166" + "reference": "5e536e16cd24bbc0eca11dc3585356cfc02c4999" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/danog/MadelineProto/zipball/3e77a5be2d2ee82285ef88c71b064b7da0db2166", - "reference": "3e77a5be2d2ee82285ef88c71b064b7da0db2166", + "url": "https://api.github.com/repos/danog/MadelineProto/zipball/5e536e16cd24bbc0eca11dc3585356cfc02c4999", + "reference": "5e536e16cd24bbc0eca11dc3585356cfc02c4999", "shasum": "" }, "require": { @@ -2458,7 +2451,7 @@ "type": "github" } ], - "time": "2021-11-22T22:25:43+00:00" + "time": "2021-11-25T21:57:23+00:00" }, { "name": "danog/magicalserializer", @@ -3929,12 +3922,12 @@ "source": { "type": "git", "url": "https://github.com/Roave/SecurityAdvisories.git", - "reference": "40581b6c391cffa5d211ac1659ea9cffc6dc2b13" + "reference": "6f99479932347855a56d07958f3ac52e8261dda3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Roave/SecurityAdvisories/zipball/40581b6c391cffa5d211ac1659ea9cffc6dc2b13", - "reference": "40581b6c391cffa5d211ac1659ea9cffc6dc2b13", + "url": "https://api.github.com/repos/Roave/SecurityAdvisories/zipball/6f99479932347855a56d07958f3ac52e8261dda3", + "reference": "6f99479932347855a56d07958f3ac52e8261dda3", "shasum": "" }, "conflict": { @@ -3974,6 +3967,7 @@ "codiad/codiad": "<=2.8.4", "composer/composer": "<1.10.23|>=2-alpha.1,<2.1.9", "concrete5/concrete5": "<8.5.5", + "concrete5/core": "<8.5.7", "contao-components/mediaelement": ">=2.14.2,<2.21.1", "contao/core": ">=2,<3.5.39", "contao/core-bundle": ">=4,<4.4.56|>=4.5,<4.9.18|>=4.10,<4.11.7|= 4.10.0", @@ -4065,6 +4059,7 @@ "joomla/session": "<1.3.1", "jsmitty12/phpwhois": "<5.1", "kazist/phpwhois": "<=4.2.6", + "kevinpapst/kimai2": "<1.16.2", "kitodo/presentation": "<3.1.2", "klaviyo/magento2-extension": ">=1,<3", "kreait/firebase-php": ">=3.2,<3.8.1", @@ -4164,8 +4159,8 @@ "scheb/two-factor-bundle": ">=0,<3.26|>=4,<4.11", "sensiolabs/connect": "<4.2.3", "serluck/phpwhois": "<=4.2.6", - "shopware/core": "<=6.4.3", - "shopware/platform": "<=6.4.3", + "shopware/core": "<=6.4.6", + "shopware/platform": "<=6.4.6", "shopware/production": "<=6.3.5.2", "shopware/shopware": "<5.7.6", "showdoc/showdoc": "<=2.9.12", @@ -4188,7 +4183,7 @@ "simplito/elliptic-php": "<1.0.6", "slim/slim": "<2.6", "smarty/smarty": "<3.1.39", - "snipe/snipe-it": "<=5.3.1", + "snipe/snipe-it": "<5.3.2", "socalnick/scn-social-auth": "<1.15.2", "socialiteproviders/steam": "<1.1", "spoonity/tcpdf": "<6.2.22", @@ -4215,7 +4210,7 @@ "symfony/form": ">=2.3,<2.3.35|>=2.4,<2.6.12|>=2.7,<2.7.50|>=2.8,<2.8.49|>=3,<3.4.20|>=4,<4.0.15|>=4.1,<4.1.9|>=4.2,<4.2.1", "symfony/framework-bundle": ">=2,<2.3.18|>=2.4,<2.4.8|>=2.5,<2.5.2|>=2.7,<2.7.51|>=2.8,<2.8.50|>=3,<3.4.26|>=4,<4.1.12|>=4.2,<4.2.7", "symfony/http-foundation": ">=2,<2.8.52|>=3,<3.4.35|>=4,<4.2.12|>=4.3,<4.3.8|>=4.4,<4.4.7|>=5,<5.0.7", - "symfony/http-kernel": ">=2,<2.8.52|>=3,<3.4.35|>=4,<4.2.12|>=4.3,<4.4.13|>=5,<5.1.5", + "symfony/http-kernel": ">=2,<2.8.52|>=3,<3.4.35|>=4,<4.2.12|>=4.3,<4.4.13|>=5,<5.1.5|>=5.2,<5.3.12", "symfony/intl": ">=2.7,<2.7.38|>=2.8,<2.8.31|>=3,<3.2.14|>=3.3,<3.3.13", "symfony/maker-bundle": ">=1.27,<1.29.2|>=1.30,<1.31.1", "symfony/mime": ">=4.3,<4.3.8", @@ -4225,13 +4220,13 @@ "symfony/proxy-manager-bridge": ">=2.7,<2.7.51|>=2.8,<2.8.50|>=3,<3.4.26|>=4,<4.1.12|>=4.2,<4.2.7", "symfony/routing": ">=2,<2.0.19", "symfony/security": ">=2,<2.7.51|>=2.8,<3.4.49|>=4,<4.4.24|>=5,<5.2.8", - "symfony/security-bundle": ">=2,<2.7.48|>=2.8,<2.8.41|>=3,<3.3.17|>=3.4,<3.4.11|>=4,<4.0.11", + "symfony/security-bundle": ">=2,<2.7.48|>=2.8,<2.8.41|>=3,<3.3.17|>=3.4,<3.4.11|>=4,<4.0.11|>=5.3,<5.3.12", "symfony/security-core": ">=2.4,<2.6.13|>=2.7,<2.7.9|>=2.7.30,<2.7.32|>=2.8,<3.4.49|>=4,<4.4.24|>=5,<5.2.9", "symfony/security-csrf": ">=2.4,<2.7.48|>=2.8,<2.8.41|>=3,<3.3.17|>=3.4,<3.4.11|>=4,<4.0.11", "symfony/security-guard": ">=2.8,<3.4.48|>=4,<4.4.23|>=5,<5.2.8", "symfony/security-http": ">=2.3,<2.3.41|>=2.4,<2.7.51|>=2.8,<3.4.48|>=4,<4.4.23|>=5,<5.2.8|>=5.3,<5.3.2", - "symfony/serializer": ">=2,<2.0.11", - "symfony/symfony": ">=2,<3.4.49|>=4,<4.4.24|>=5,<5.2.9|>=5.3,<5.3.2", + "symfony/serializer": ">=2,<2.0.11|>=4.1,<4.4.35|>=5,<5.3.12", + "symfony/symfony": ">=2,<3.4.49|>=4,<4.4.35|>=5,<5.3.12", "symfony/translation": ">=2,<2.0.17", "symfony/validator": ">=2,<2.0.24|>=2.1,<2.1.12|>=2.2,<2.2.5|>=2.3,<2.3.3", "symfony/var-exporter": ">=4.2,<4.2.12|>=4.3,<4.3.8", @@ -4343,20 +4338,19 @@ "type": "tidelift" } ], - "time": "2021-11-19T21:12:46+00:00" + "time": "2021-11-24T20:15:37+00:00" } ], "aliases": [], "minimum-stability": "dev", "stability-flags": { - "amphp/websocket-server": 20, "danog/madelineproto": 20, "roave/security-advisories": 20 }, "prefer-stable": true, "prefer-lowest": false, "platform": { - "php": ">=7.4", + "php": ">=8.0", "ext-json": "*", "ext-mbstring": "*", "ext-pcntl": "*" From 76a1c8bd9998515560aa170302036fae64532860 Mon Sep 17 00:00:00 2001 From: Alexander Pankratov Date: Fri, 26 Nov 2021 01:05:37 +0300 Subject: [PATCH 003/270] Multiplatform Docker build: arm64, amd64 --- bin/docker-build.sh | 5 +++++ bin/docker-exec.sh | 2 +- bin/docker-logs.sh | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) create mode 100755 bin/docker-build.sh diff --git a/bin/docker-build.sh b/bin/docker-build.sh new file mode 100755 index 0000000..e595790 --- /dev/null +++ b/bin/docker-build.sh @@ -0,0 +1,5 @@ +#!/usr/bin/env bash + +SCRIPT_DIR="$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )" + +docker buildx build --platform linux/amd64,linux/arm64 -t xtrime/telegram-api-server:latest --push "$SCRIPT_DIR/../" \ No newline at end of file diff --git a/bin/docker-exec.sh b/bin/docker-exec.sh index fd2552c..94360ff 100755 --- a/bin/docker-exec.sh +++ b/bin/docker-exec.sh @@ -1,3 +1,3 @@ -#!/bin/bash +#!/usr/bin/env bash docker exec -it telegram-api-server /bin/bash \ No newline at end of file diff --git a/bin/docker-logs.sh b/bin/docker-logs.sh index aa53e6f..af897f8 100755 --- a/bin/docker-logs.sh +++ b/bin/docker-logs.sh @@ -1,3 +1,3 @@ -#!/bin/bash +#!/usr/bin/env bash docker logs telegram-api-server --follow \ No newline at end of file From 394b66c43420074d50de5c53fed1af80650aea6d Mon Sep 17 00:00:00 2001 From: Alexander Pankratov Date: Fri, 26 Nov 2021 01:06:29 +0300 Subject: [PATCH 004/270] Feat: Add PrimeModule lib in Docker to assist key generation --- Dockerfile | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Dockerfile b/Dockerfile index 0869142..15c2275 100644 --- a/Dockerfile +++ b/Dockerfile @@ -11,6 +11,12 @@ RUN apt-get update && apt-get upgrade -y \ && mkdir -p /usr/src/php/ext/ && cd /usr/src/php/ext/ \ && pecl bundle ev \ && docker-php-ext-install -j$(nproc) ev \ + # Install PrimeModule for AuthKey generation speedup + && git clone https://github.com/danog/PrimeModule-ext \ + && cd PrimeModule-ext && make -j$(nproc) \ + && make install \ + && cd ../ \ + && rm -rf PrimeModule-ext/ \ # Install composer && chmod +x /usr/local/bin/docker-compose-wait \ && curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer \ From d2b66eae0beceb2aedd896a85a4ea5737506ae82 Mon Sep 17 00:00:00 2001 From: Alexander Pankratov Date: Fri, 3 Dec 2021 22:39:38 +0300 Subject: [PATCH 005/270] Update to Madeline v7 to support updated Telegram API --- composer.lock | 42 ++++++++++++++++++++++-------------------- src/Client.php | 2 +- 2 files changed, 23 insertions(+), 21 deletions(-) diff --git a/composer.lock b/composer.lock index 47a87b8..207d019 100644 --- a/composer.lock +++ b/composer.lock @@ -1733,16 +1733,16 @@ }, { "name": "amphp/websocket", - "version": "v1.0.1", + "version": "v1.0.2", "source": { "type": "git", "url": "https://github.com/amphp/websocket.git", - "reference": "6752ecfcb4deba23b95ab3fbd0d427326fcac564" + "reference": "d0e61e3e34ac09ec230ae0eff2b8beaf8f83a8f9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/amphp/websocket/zipball/6752ecfcb4deba23b95ab3fbd0d427326fcac564", - "reference": "6752ecfcb4deba23b95ab3fbd0d427326fcac564", + "url": "https://api.github.com/repos/amphp/websocket/zipball/d0e61e3e34ac09ec230ae0eff2b8beaf8f83a8f9", + "reference": "d0e61e3e34ac09ec230ae0eff2b8beaf8f83a8f9", "shasum": "" }, "require": { @@ -1800,7 +1800,7 @@ ], "support": { "issues": "https://github.com/amphp/websocket/issues", - "source": "https://github.com/amphp/websocket/tree/v1.0.1" + "source": "https://github.com/amphp/websocket/tree/v1.0.2" }, "funding": [ { @@ -1808,7 +1808,7 @@ "type": "github" } ], - "time": "2020-11-13T05:54:54+00:00" + "time": "2021-10-26T14:32:35+00:00" }, { "name": "amphp/websocket-client", @@ -2340,12 +2340,12 @@ "source": { "type": "git", "url": "https://github.com/danog/MadelineProto.git", - "reference": "5e536e16cd24bbc0eca11dc3585356cfc02c4999" + "reference": "1c285ba908ae3d11127f2bdb362e139bc9e5ed19" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/danog/MadelineProto/zipball/5e536e16cd24bbc0eca11dc3585356cfc02c4999", - "reference": "5e536e16cd24bbc0eca11dc3585356cfc02c4999", + "url": "https://api.github.com/repos/danog/MadelineProto/zipball/1c285ba908ae3d11127f2bdb362e139bc9e5ed19", + "reference": "1c285ba908ae3d11127f2bdb362e139bc9e5ed19", "shasum": "" }, "require": { @@ -2378,7 +2378,7 @@ "ext-xml": "*", "ext-zlib": "*", "league/uri": "^6", - "php": ">=8.0", + "php-64bit": ">=8.0", "psr/http-factory": "^1.0", "psr/log": "^1", "symfony/polyfill-mbstring": "*", @@ -2393,7 +2393,8 @@ "danog/phpdoc": "^0.1.7", "ext-ctype": "*", "phabel/phabel": "^1", - "phpdocumentor/reflection-docblock": "^5.2" + "phpdocumentor/reflection-docblock": "^5.2", + "phpunit/phpunit": "^9" }, "suggest": { "ext-libtgvoip": "Install the php-libtgvoip extension to make phone calls (https://github.com/danog/php-libtgvoip)", @@ -2451,7 +2452,7 @@ "type": "github" } ], - "time": "2021-11-25T21:57:23+00:00" + "time": "2021-12-03T19:33:45+00:00" }, { "name": "danog/magicalserializer", @@ -3922,12 +3923,12 @@ "source": { "type": "git", "url": "https://github.com/Roave/SecurityAdvisories.git", - "reference": "6f99479932347855a56d07958f3ac52e8261dda3" + "reference": "344cf93f6b42a7bcd6169654b64fb953a5a85bea" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Roave/SecurityAdvisories/zipball/6f99479932347855a56d07958f3ac52e8261dda3", - "reference": "6f99479932347855a56d07958f3ac52e8261dda3", + "url": "https://api.github.com/repos/Roave/SecurityAdvisories/zipball/344cf93f6b42a7bcd6169654b64fb953a5a85bea", + "reference": "344cf93f6b42a7bcd6169654b64fb953a5a85bea", "shasum": "" }, "conflict": { @@ -3946,7 +3947,7 @@ "bagisto/bagisto": "<0.1.5", "barrelstrength/sprout-base-email": "<1.2.7", "barrelstrength/sprout-forms": "<3.9", - "baserproject/basercms": "<=4.5", + "baserproject/basercms": "<4.5.4", "billz/raspap-webgui": "<=2.6.6", "bk2k/bootstrap-package": ">=7.1,<7.1.2|>=8,<8.0.8|>=9,<9.0.4|>=9.1,<9.1.3|>=10,<10.0.10|>=11,<11.0.3", "bolt/bolt": "<3.7.2", @@ -4002,10 +4003,11 @@ "ezsystems/ezdemo-ls-extension": ">=5.4,<5.4.2.1", "ezsystems/ezfind-ls": ">=5.3,<5.3.6.1|>=5.4,<5.4.11.1|>=2017.12,<2017.12.0.1", "ezsystems/ezplatform": "<=1.13.6|>=2,<=2.5.24", - "ezsystems/ezplatform-admin-ui": ">=1.3,<1.3.5|>=1.4,<1.4.6", + "ezsystems/ezplatform-admin-ui": ">=1.3,<1.3.5|>=1.4,<1.4.6|>=1.5,<=1.5.25", "ezsystems/ezplatform-admin-ui-assets": ">=4,<4.2.1|>=5,<5.0.1|>=5.1,<5.1.1", "ezsystems/ezplatform-kernel": "<=1.2.5|>=1.3,<=1.3.1", "ezsystems/ezplatform-rest": ">=1.2,<=1.2.2|>=1.3,<1.3.8", + "ezsystems/ezplatform-richtext": ">=2.3,<=2.3.7", "ezsystems/ezplatform-user": ">=1,<1.0.1", "ezsystems/ezpublish-kernel": "<=6.13.8.1|>=7,<=7.5.15.1", "ezsystems/ezpublish-legacy": "<=2017.12.7.3|>=2018.6,<=2019.3.5.1", @@ -4023,7 +4025,7 @@ "fooman/tcpdf": "<6.2.22", "forkcms/forkcms": "<=5.9.2", "fossar/tcpdf-parser": "<6.2.22", - "francoisjacquet/rosariosis": "<6.5.1", + "francoisjacquet/rosariosis": "<8.1.1", "friendsofsymfony/oauth2-php": "<1.3", "friendsofsymfony/rest-bundle": ">=1.2,<1.2.2", "friendsofsymfony/user-bundle": ">=1.2,<1.3.5", @@ -4188,7 +4190,7 @@ "socialiteproviders/steam": "<1.1", "spoonity/tcpdf": "<6.2.22", "squizlabs/php_codesniffer": ">=1,<2.8.1|>=3,<3.0.1", - "ssddanbrown/bookstack": "<21.0.3", + "ssddanbrown/bookstack": "<21.11.2", "stormpath/sdk": ">=0,<9.9.99", "studio-42/elfinder": "<2.1.59", "subrion/cms": "<=4.2.1", @@ -4338,7 +4340,7 @@ "type": "tidelift" } ], - "time": "2021-11-24T20:15:37+00:00" + "time": "2021-12-02T18:18:00+00:00" } ], "aliases": [], diff --git a/src/Client.php b/src/Client.php index bacb055..f92cd1d 100644 --- a/src/Client.php +++ b/src/Client.php @@ -135,7 +135,7 @@ function() { { //Disable logging to stdout $logLevel = Logger::getInstance()->minLevelIndex; - Logger::getInstance()->minLevelIndex = Logger::$levels[LogLevel::EMERGENCY]; + Logger::getInstance()->minLevelIndex = Logger::$levels[LogLevel::ERROR]; $instance->echo("Authorizing session: {$name}\n"); yield $instance->start(); From f66f26dc745d4e577603797b8a2a5fce74cecd28 Mon Sep 17 00:00:00 2001 From: Alexander Pankratov Date: Sun, 12 Dec 2021 02:44:44 +0300 Subject: [PATCH 006/270] Feat: MadelineProto v7 support --- composer.json | 2 +- composer.lock | 246 ++++++++++++++++---------------- server.php | 2 + src/Migrations/StartUpFixes.php | 11 ++ 4 files changed, 138 insertions(+), 123 deletions(-) create mode 100644 src/Migrations/StartUpFixes.php diff --git a/composer.json b/composer.json index 025099f..290ecf6 100644 --- a/composer.json +++ b/composer.json @@ -16,7 +16,7 @@ "amphp/websocket-client": "^1", "amphp/http-client": "^4", "vlucas/phpdotenv": "^4", - "danog/madelineproto":"dev-ipc_off", + "danog/madelineproto":"master", "amphp/http-server-form-parser": "^1.1" }, "require-dev": { diff --git a/composer.lock b/composer.lock index 207d019..8813887 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "b323c83194c4e8b4be1e6fcd840a76a9", + "content-hash": "a2e280bd5b97a40c3fa3d51c67f7e10a", "packages": [ { "name": "amphp/amp", @@ -2336,16 +2336,16 @@ }, { "name": "danog/madelineproto", - "version": "dev-ipc_off", + "version": "dev-master", "source": { "type": "git", "url": "https://github.com/danog/MadelineProto.git", - "reference": "1c285ba908ae3d11127f2bdb362e139bc9e5ed19" + "reference": "cb7399b24ca6f15a60b2f30b54edb08735051822" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/danog/MadelineProto/zipball/1c285ba908ae3d11127f2bdb362e139bc9e5ed19", - "reference": "1c285ba908ae3d11127f2bdb362e139bc9e5ed19", + "url": "https://api.github.com/repos/danog/MadelineProto/zipball/cb7399b24ca6f15a60b2f30b54edb08735051822", + "reference": "cb7399b24ca6f15a60b2f30b54edb08735051822", "shasum": "" }, "require": { @@ -2367,7 +2367,6 @@ "danog/magicalserializer": "^1.0", "danog/primemodule": "^1", "danog/tg-file-decoder": "^0.1", - "danog/tgseclib": "^3", "erusev/parsedown": "^1.7", "ext-dom": "*", "ext-fileinfo": "*", @@ -2379,6 +2378,7 @@ "ext-zlib": "*", "league/uri": "^6", "php-64bit": ">=8.0", + "phpseclib/phpseclib": "^3", "psr/http-factory": "^1.0", "psr/log": "^1", "symfony/polyfill-mbstring": "*", @@ -2394,12 +2394,16 @@ "ext-ctype": "*", "phabel/phabel": "^1", "phpdocumentor/reflection-docblock": "^5.2", - "phpunit/phpunit": "^9" + "phpunit/phpunit": "^9", + "roave/security-advisories": "dev-latest" }, "suggest": { + "ext-gmp": "Install the gmp extension for faster crypto", "ext-libtgvoip": "Install the php-libtgvoip extension to make phone calls (https://github.com/danog/php-libtgvoip)", + "ext-openssl": "Install the openssl extension for faster crypto", "ext-pdo": "Install pdo extension to support database used as cache" }, + "default-branch": true, "type": "project", "extra": { "phabel": { @@ -2444,7 +2448,7 @@ ], "support": { "issues": "https://github.com/danog/MadelineProto/issues", - "source": "https://github.com/danog/MadelineProto/tree/ipc_off" + "source": "https://github.com/danog/MadelineProto/tree/7.0.12" }, "funding": [ { @@ -2452,7 +2456,7 @@ "type": "github" } ], - "time": "2021-12-03T19:33:45+00:00" + "time": "2021-12-10T19:06:29+00:00" }, { "name": "danog/magicalserializer", @@ -2605,118 +2609,6 @@ ], "time": "2021-08-14T15:11:43+00:00" }, - { - "name": "danog/tgseclib", - "version": "3.0.1", - "source": { - "type": "git", - "url": "https://github.com/danog/tgseclib.git", - "reference": "17df55ae63bd6839971e0bee27e94e998bebb16f" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/danog/tgseclib/zipball/17df55ae63bd6839971e0bee27e94e998bebb16f", - "reference": "17df55ae63bd6839971e0bee27e94e998bebb16f", - "shasum": "" - }, - "require": { - "paragonie/constant_time_encoding": "^1|^2", - "paragonie/random_compat": "^1.4|^2.0", - "php": ">=5.6.1" - }, - "require-dev": { - "phing/phing": "~2.7", - "phpunit/phpunit": "^4.8.35|^5.7|^6.0", - "sami/sami": "~2.0", - "squizlabs/php_codesniffer": "~2.0" - }, - "suggest": { - "ext-gmp": "Install the GMP (GNU Multiple Precision) extension in order to speed up arbitrary precision integer arithmetic operations.", - "ext-libsodium": "SSH2/SFTP can make use of some algorithms provided by the libsodium-php extension.", - "ext-mcrypt": "Install the Mcrypt extension in order to speed up a few other cryptographic operations.", - "ext-openssl": "Install the OpenSSL extension in order to speed up a wide variety of cryptographic operations." - }, - "type": "library", - "autoload": { - "files": [ - "phpseclib/bootstrap.php" - ], - "psr-4": { - "tgseclib\\": "phpseclib/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Jim Wigginton", - "email": "terrafrost@php.net", - "role": "Lead Developer" - }, - { - "name": "Patrick Monnerat", - "email": "pm@datasphere.ch", - "role": "Developer" - }, - { - "name": "Andreas Fischer", - "email": "bantu@phpbb.com", - "role": "Developer" - }, - { - "name": "Hans-Jürgen Petrich", - "email": "petrich@tronic-media.com", - "role": "Developer" - }, - { - "name": "Graham Campbell", - "email": "graham@alt-three.com", - "role": "Developer" - } - ], - "description": "PHP Secure Communications Library (+Telegram-specific AES IGE primitives) - Pure-PHP implementations of RSA, AES, SSH2, SFTP, X.509 etc.", - "homepage": "http://phpseclib.sourceforge.net", - "keywords": [ - "BigInteger", - "aes", - "asn.1", - "asn1", - "blowfish", - "crypto", - "cryptography", - "encryption", - "rsa", - "security", - "sftp", - "signature", - "signing", - "ssh", - "twofish", - "x.509", - "x509" - ], - "support": { - "issues": "https://github.com/danog/tgseclib/issues", - "source": "https://github.com/danog/tgseclib/tree/3.0.1" - }, - "funding": [ - { - "url": "https://github.com/terrafrost", - "type": "github" - }, - { - "url": "https://www.patreon.com/phpseclib", - "type": "patreon" - }, - { - "url": "https://tidelift.com/funding/github/packagist/phpseclib/phpseclib", - "type": "tidelift" - } - ], - "time": "2020-11-07T20:12:19+00:00" - }, { "name": "daverandom/libdns", "version": "v2.0.2", @@ -3439,6 +3331,117 @@ ], "time": "2021-08-28T21:27:29+00:00" }, + { + "name": "phpseclib/phpseclib", + "version": "3.0.12", + "source": { + "type": "git", + "url": "https://github.com/phpseclib/phpseclib.git", + "reference": "89bfb45bd8b1abc3b37e910d57f5dbd3174f40fb" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpseclib/phpseclib/zipball/89bfb45bd8b1abc3b37e910d57f5dbd3174f40fb", + "reference": "89bfb45bd8b1abc3b37e910d57f5dbd3174f40fb", + "shasum": "" + }, + "require": { + "paragonie/constant_time_encoding": "^1|^2", + "paragonie/random_compat": "^1.4|^2.0|^9.99.99", + "php": ">=5.6.1" + }, + "require-dev": { + "phing/phing": "~2.7", + "phpunit/phpunit": "^5.7|^6.0|^9.4", + "squizlabs/php_codesniffer": "~2.0" + }, + "suggest": { + "ext-gmp": "Install the GMP (GNU Multiple Precision) extension in order to speed up arbitrary precision integer arithmetic operations.", + "ext-libsodium": "SSH2/SFTP can make use of some algorithms provided by the libsodium-php extension.", + "ext-mcrypt": "Install the Mcrypt extension in order to speed up a few other cryptographic operations.", + "ext-openssl": "Install the OpenSSL extension in order to speed up a wide variety of cryptographic operations." + }, + "type": "library", + "autoload": { + "files": [ + "phpseclib/bootstrap.php" + ], + "psr-4": { + "phpseclib3\\": "phpseclib/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jim Wigginton", + "email": "terrafrost@php.net", + "role": "Lead Developer" + }, + { + "name": "Patrick Monnerat", + "email": "pm@datasphere.ch", + "role": "Developer" + }, + { + "name": "Andreas Fischer", + "email": "bantu@phpbb.com", + "role": "Developer" + }, + { + "name": "Hans-Jürgen Petrich", + "email": "petrich@tronic-media.com", + "role": "Developer" + }, + { + "name": "Graham Campbell", + "email": "graham@alt-three.com", + "role": "Developer" + } + ], + "description": "PHP Secure Communications Library - Pure-PHP implementations of RSA, AES, SSH2, SFTP, X.509 etc.", + "homepage": "http://phpseclib.sourceforge.net", + "keywords": [ + "BigInteger", + "aes", + "asn.1", + "asn1", + "blowfish", + "crypto", + "cryptography", + "encryption", + "rsa", + "security", + "sftp", + "signature", + "signing", + "ssh", + "twofish", + "x.509", + "x509" + ], + "support": { + "issues": "https://github.com/phpseclib/phpseclib/issues", + "source": "https://github.com/phpseclib/phpseclib/tree/3.0.12" + }, + "funding": [ + { + "url": "https://github.com/terrafrost", + "type": "github" + }, + { + "url": "https://www.patreon.com/phpseclib", + "type": "patreon" + }, + { + "url": "https://tidelift.com/funding/github/packagist/phpseclib/phpseclib", + "type": "tidelift" + } + ], + "time": "2021-11-28T23:46:03+00:00" + }, { "name": "psr/http-factory", "version": "1.0.1", @@ -4346,7 +4349,6 @@ "aliases": [], "minimum-stability": "dev", "stability-flags": { - "danog/madelineproto": 20, "roave/security-advisories": 20 }, "prefer-stable": true, diff --git a/server.php b/server.php index 15b642b..34a64a7 100644 --- a/server.php +++ b/server.php @@ -3,6 +3,7 @@ use TelegramApiServer\Config; use TelegramApiServer\Files; use TelegramApiServer\Migrations\SessionsMigration; +use TelegramApiServer\Migrations\StartUpFixes; use TelegramApiServer\Migrations\SwooleToAmpMigration; use TelegramApiServer\Server\Fork; use TelegramApiServer\Server\HealthCheck; @@ -69,6 +70,7 @@ SessionsMigration::move(); SwooleToAmpMigration::check(); +StartUpFixes::fix(); $mainProcessPid = getmypid(); if (Config::getInstance()->get('health_check.enabled')) { diff --git a/src/Migrations/StartUpFixes.php b/src/Migrations/StartUpFixes.php new file mode 100644 index 0000000..bbd78e7 --- /dev/null +++ b/src/Migrations/StartUpFixes.php @@ -0,0 +1,11 @@ + Date: Sun, 12 Dec 2021 03:00:00 +0300 Subject: [PATCH 007/270] Feat: pass args to build script --- bin/docker-build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/docker-build.sh b/bin/docker-build.sh index e595790..592185c 100755 --- a/bin/docker-build.sh +++ b/bin/docker-build.sh @@ -2,4 +2,4 @@ SCRIPT_DIR="$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )" -docker buildx build --platform linux/amd64,linux/arm64 -t xtrime/telegram-api-server:latest --push "$SCRIPT_DIR/../" \ No newline at end of file +docker buildx build --platform linux/amd64,linux/arm64 -t xtrime/telegram-api-server:latest "$@" --push "$SCRIPT_DIR/../" \ No newline at end of file From c4718c0fec6b8e6986b4bbbdd3324f0325eaeeea Mon Sep 17 00:00:00 2001 From: Alexander Pankratov Date: Sun, 12 Dec 2021 05:11:47 +0300 Subject: [PATCH 008/270] Fix: properly stop session --- src/Client.php | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Client.php b/src/Client.php index f92cd1d..367a8b9 100644 --- a/src/Client.php +++ b/src/Client.php @@ -88,6 +88,7 @@ public function removeSession(string $session): void if (!empty($instance->API)) { $instance->unsetEventHandler(); $instance->stop(); + $instance->API->unreference(); } unset($instance); gc_collect_cycles(); From a64c8d25b4766e61f49f9d5df0523f52b53ae8e6 Mon Sep 17 00:00:00 2001 From: Alexander Pankratov Date: Sun, 2 Jan 2022 02:54:01 +0300 Subject: [PATCH 009/270] Update madelineProto --- composer.lock | 189 ++++++++++++++++++++++++++------------------------ 1 file changed, 99 insertions(+), 90 deletions(-) diff --git a/composer.lock b/composer.lock index 8813887..f53e04b 100644 --- a/composer.lock +++ b/composer.lock @@ -326,35 +326,36 @@ }, { "name": "amphp/file", - "version": "v1.0.2", + "version": "v2.0.2", "source": { "type": "git", "url": "https://github.com/amphp/file.git", - "reference": "54dcef2a3e38f445ae78ea44ff12c95738e46420" + "reference": "3d3d084b81a5322d203e11617f7cbe3ea16c40ca" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/amphp/file/zipball/54dcef2a3e38f445ae78ea44ff12c95738e46420", - "reference": "54dcef2a3e38f445ae78ea44ff12c95738e46420", + "url": "https://api.github.com/repos/amphp/file/zipball/3d3d084b81a5322d203e11617f7cbe3ea16c40ca", + "reference": "3d3d084b81a5322d203e11617f7cbe3ea16c40ca", "shasum": "" }, "require": { - "amphp/amp": "^2.2", - "amphp/byte-stream": "^1.6.1", - "amphp/parallel": "^1.2", + "amphp/amp": "^2.5.2", + "amphp/byte-stream": "^1.8.1", + "amphp/parallel": "^1.4", + "amphp/sync": "^1.4", "php": ">=7.1" }, "require-dev": { "amphp/php-cs-fixer-config": "dev-master", "amphp/phpunit-util": "^1.1", - "ext-eio": "^2", + "ext-eio": "^2 || ^3", "ext-uv": "^0.3 || ^0.2", - "phpunit/phpunit": "^8 || ^7" + "phpunit/phpunit": "^9 || ^8 || ^7" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.x-dev" + "dev-master": "2.x-dev" } }, "autoload": { @@ -398,7 +399,7 @@ ], "support": { "issues": "https://github.com/amphp/file/issues", - "source": "https://github.com/amphp/file/tree/v1.0.2" + "source": "https://github.com/amphp/file/tree/v2.0.2" }, "funding": [ { @@ -406,7 +407,7 @@ "type": "github" } ], - "time": "2020-07-14T15:15:32+00:00" + "time": "2021-09-20T04:35:03+00:00" }, { "name": "amphp/hpack", @@ -719,16 +720,16 @@ }, { "name": "amphp/http-server", - "version": "v2.1.4", + "version": "v2.1.5", "source": { "type": "git", "url": "https://github.com/amphp/http-server.git", - "reference": "681b35866e6f9b90072b0202d331618915391df8" + "reference": "70456948a96778abd6462e96bb07759ab958d6c5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/amphp/http-server/zipball/681b35866e6f9b90072b0202d331618915391df8", - "reference": "681b35866e6f9b90072b0202d331618915391df8", + "url": "https://api.github.com/repos/amphp/http-server/zipball/70456948a96778abd6462e96bb07759ab958d6c5", + "reference": "70456948a96778abd6462e96bb07759ab958d6c5", "shasum": "" }, "require": { @@ -741,7 +742,7 @@ "league/uri": "^6", "php": ">=7.2", "psr/http-message": "^1", - "psr/log": "^1" + "psr/log": "^1|^2|^3" }, "require-dev": { "amphp/http-client": "^4", @@ -805,7 +806,7 @@ ], "support": { "issues": "https://github.com/amphp/http-server/issues", - "source": "https://github.com/amphp/http-server/tree/v2.1.4" + "source": "https://github.com/amphp/http-server/tree/v2.1.5" }, "funding": [ { @@ -813,7 +814,7 @@ "type": "github" } ], - "time": "2021-08-23T14:19:34+00:00" + "time": "2021-12-14T23:24:42+00:00" }, { "name": "amphp/http-server-form-parser", @@ -1022,16 +1023,16 @@ }, { "name": "amphp/mysql", - "version": "v2.1.1", + "version": "v2.1.2", "source": { "type": "git", "url": "https://github.com/amphp/mysql.git", - "reference": "f14d62f52aa1ecd47827bcf36b14026d7d0209d5" + "reference": "d0b9a618b45ad3a10452a3860056db76a6930a75" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/amphp/mysql/zipball/f14d62f52aa1ecd47827bcf36b14026d7d0209d5", - "reference": "f14d62f52aa1ecd47827bcf36b14026d7d0209d5", + "url": "https://api.github.com/repos/amphp/mysql/zipball/d0b9a618b45ad3a10452a3860056db76a6930a75", + "reference": "d0b9a618b45ad3a10452a3860056db76a6930a75", "shasum": "" }, "require": { @@ -1076,7 +1077,7 @@ "description": "Asynchronous MySQL client for PHP based on Amp.", "support": { "issues": "https://github.com/amphp/mysql/issues", - "source": "https://github.com/amphp/mysql/tree/v2.1.1" + "source": "https://github.com/amphp/mysql/tree/v2.1.2" }, "funding": [ { @@ -1084,7 +1085,7 @@ "type": "github" } ], - "time": "2021-02-04T17:10:15+00:00" + "time": "2021-12-01T17:38:48+00:00" }, { "name": "amphp/parallel", @@ -1217,16 +1218,16 @@ }, { "name": "amphp/postgres", - "version": "v1.4.2", + "version": "v1.4.3", "source": { "type": "git", "url": "https://github.com/amphp/postgres.git", - "reference": "71d192507faa0705ffc9b592180fc6474c614556" + "reference": "f52cc35ef02ee4ad709083e0432c2288d4df7de0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/amphp/postgres/zipball/71d192507faa0705ffc9b592180fc6474c614556", - "reference": "71d192507faa0705ffc9b592180fc6474c614556", + "url": "https://api.github.com/repos/amphp/postgres/zipball/f52cc35ef02ee4ad709083e0432c2288d4df7de0", + "reference": "f52cc35ef02ee4ad709083e0432c2288d4df7de0", "shasum": "" }, "require": { @@ -1275,7 +1276,7 @@ ], "support": { "issues": "https://github.com/amphp/postgres/issues", - "source": "https://github.com/amphp/postgres/tree/v1.4.2" + "source": "https://github.com/amphp/postgres/tree/v1.4.3" }, "funding": [ { @@ -1283,20 +1284,20 @@ "type": "github" } ], - "time": "2021-09-20T04:28:59+00:00" + "time": "2021-12-04T16:46:00+00:00" }, { "name": "amphp/process", - "version": "v1.1.2", + "version": "v1.1.3", "source": { "type": "git", "url": "https://github.com/amphp/process.git", - "reference": "3d36327bf9b4c158cf3010f8f65c00854ec3a8b7" + "reference": "f09e3ed3b0a953ccbfff1140f12be4a884f0aa83" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/amphp/process/zipball/3d36327bf9b4c158cf3010f8f65c00854ec3a8b7", - "reference": "3d36327bf9b4c158cf3010f8f65c00854ec3a8b7", + "url": "https://api.github.com/repos/amphp/process/zipball/f09e3ed3b0a953ccbfff1140f12be4a884f0aa83", + "reference": "f09e3ed3b0a953ccbfff1140f12be4a884f0aa83", "shasum": "" }, "require": { @@ -1340,7 +1341,7 @@ "homepage": "https://github.com/amphp/process", "support": { "issues": "https://github.com/amphp/process/issues", - "source": "https://github.com/amphp/process/tree/v1.1.2" + "source": "https://github.com/amphp/process/tree/v1.1.3" }, "funding": [ { @@ -1348,7 +1349,7 @@ "type": "github" } ], - "time": "2021-10-08T15:55:53+00:00" + "time": "2021-12-17T19:09:33+00:00" }, { "name": "amphp/redis", @@ -2340,19 +2341,19 @@ "source": { "type": "git", "url": "https://github.com/danog/MadelineProto.git", - "reference": "cb7399b24ca6f15a60b2f30b54edb08735051822" + "reference": "a05e11c1ff519de920d383d46dd2e95f4989398f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/danog/MadelineProto/zipball/cb7399b24ca6f15a60b2f30b54edb08735051822", - "reference": "cb7399b24ca6f15a60b2f30b54edb08735051822", + "url": "https://api.github.com/repos/danog/MadelineProto/zipball/a05e11c1ff519de920d383d46dd2e95f4989398f", + "reference": "a05e11c1ff519de920d383d46dd2e95f4989398f", "shasum": "" }, "require": { "amphp/amp": "^2", "amphp/byte-stream": "^1", "amphp/dns": "^1", - "amphp/file": "^1", + "amphp/file": "^2", "amphp/http-client": "^4", "amphp/http-client-cookies": "^1", "amphp/log": "^1.1", @@ -2395,7 +2396,8 @@ "phabel/phabel": "^1", "phpdocumentor/reflection-docblock": "^5.2", "phpunit/phpunit": "^9", - "roave/security-advisories": "dev-latest" + "roave/security-advisories": "dev-latest", + "symfony/yaml": "^6.0" }, "suggest": { "ext-gmp": "Install the gmp extension for faster crypto", @@ -2448,7 +2450,7 @@ ], "support": { "issues": "https://github.com/danog/MadelineProto/issues", - "source": "https://github.com/danog/MadelineProto/tree/7.0.12" + "source": "https://github.com/danog/MadelineProto/tree/master" }, "funding": [ { @@ -2456,7 +2458,7 @@ "type": "github" } ], - "time": "2021-12-10T19:06:29+00:00" + "time": "2022-01-01T19:49:33+00:00" }, { "name": "danog/magicalserializer", @@ -3210,33 +3212,29 @@ }, { "name": "paragonie/random_compat", - "version": "v2.0.20", + "version": "v9.99.100", "source": { "type": "git", "url": "https://github.com/paragonie/random_compat.git", - "reference": "0f1f60250fccffeaf5dda91eea1c018aed1adc2a" + "reference": "996434e5492cb4c3edcb9168db6fbb1359ef965a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/paragonie/random_compat/zipball/0f1f60250fccffeaf5dda91eea1c018aed1adc2a", - "reference": "0f1f60250fccffeaf5dda91eea1c018aed1adc2a", + "url": "https://api.github.com/repos/paragonie/random_compat/zipball/996434e5492cb4c3edcb9168db6fbb1359ef965a", + "reference": "996434e5492cb4c3edcb9168db6fbb1359ef965a", "shasum": "" }, "require": { - "php": ">=5.2.0" + "php": ">= 7" }, "require-dev": { - "phpunit/phpunit": "4.*|5.*" + "phpunit/phpunit": "4.*|5.*", + "vimeo/psalm": "^1" }, "suggest": { "ext-libsodium": "Provides a modern crypto API that can be used to generate random bytes." }, "type": "library", - "autoload": { - "files": [ - "lib/random.php" - ] - }, "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" @@ -3260,20 +3258,20 @@ "issues": "https://github.com/paragonie/random_compat/issues", "source": "https://github.com/paragonie/random_compat" }, - "time": "2021-04-17T09:33:01+00:00" + "time": "2020-10-15T08:29:30+00:00" }, { "name": "phpoption/phpoption", - "version": "1.8.0", + "version": "1.8.1", "source": { "type": "git", "url": "https://github.com/schmittjoh/php-option.git", - "reference": "5455cb38aed4523f99977c4a12ef19da4bfe2a28" + "reference": "eab7a0df01fe2344d172bff4cd6dbd3f8b84ad15" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/schmittjoh/php-option/zipball/5455cb38aed4523f99977c4a12ef19da4bfe2a28", - "reference": "5455cb38aed4523f99977c4a12ef19da4bfe2a28", + "url": "https://api.github.com/repos/schmittjoh/php-option/zipball/eab7a0df01fe2344d172bff4cd6dbd3f8b84ad15", + "reference": "eab7a0df01fe2344d172bff4cd6dbd3f8b84ad15", "shasum": "" }, "require": { @@ -3281,7 +3279,7 @@ }, "require-dev": { "bamarni/composer-bin-plugin": "^1.4.1", - "phpunit/phpunit": "^6.5.14 || ^7.0.20 || ^8.5.19 || ^9.5.8" + "phpunit/phpunit": "^6.5.14 || ^7.5.20 || ^8.5.19 || ^9.5.8" }, "type": "library", "extra": { @@ -3301,11 +3299,13 @@ "authors": [ { "name": "Johannes M. Schmitt", - "email": "schmittjoh@gmail.com" + "email": "schmittjoh@gmail.com", + "homepage": "https://github.com/schmittjoh" }, { "name": "Graham Campbell", - "email": "hello@gjcampbell.co.uk" + "email": "hello@gjcampbell.co.uk", + "homepage": "https://github.com/GrahamCampbell" } ], "description": "Option Type for PHP", @@ -3317,7 +3317,7 @@ ], "support": { "issues": "https://github.com/schmittjoh/php-option/issues", - "source": "https://github.com/schmittjoh/php-option/tree/1.8.0" + "source": "https://github.com/schmittjoh/php-option/tree/1.8.1" }, "funding": [ { @@ -3329,7 +3329,7 @@ "type": "tidelift" } ], - "time": "2021-08-28T21:27:29+00:00" + "time": "2021-12-04T23:24:31+00:00" }, { "name": "phpseclib/phpseclib", @@ -3844,16 +3844,16 @@ }, { "name": "vlucas/phpdotenv", - "version": "v4.2.1", + "version": "v4.2.2", "source": { "type": "git", "url": "https://github.com/vlucas/phpdotenv.git", - "reference": "d38f4d1edcbe32515a0ad593cbd4c858e337263c" + "reference": "77e974614d2ead521f18069dccc571696f52b8dc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/vlucas/phpdotenv/zipball/d38f4d1edcbe32515a0ad593cbd4c858e337263c", - "reference": "d38f4d1edcbe32515a0ad593cbd4c858e337263c", + "url": "https://api.github.com/repos/vlucas/phpdotenv/zipball/77e974614d2ead521f18069dccc571696f52b8dc", + "reference": "77e974614d2ead521f18069dccc571696f52b8dc", "shasum": "" }, "require": { @@ -3889,11 +3889,13 @@ "authors": [ { "name": "Graham Campbell", - "email": "hello@gjcampbell.co.uk" + "email": "hello@gjcampbell.co.uk", + "homepage": "https://github.com/GrahamCampbell" }, { "name": "Vance Lucas", - "email": "vance@vancelucas.com" + "email": "vance@vancelucas.com", + "homepage": "https://github.com/vlucas" } ], "description": "Loads environment variables from `.env` to `getenv()`, `$_ENV` and `$_SERVER` automagically.", @@ -3904,7 +3906,7 @@ ], "support": { "issues": "https://github.com/vlucas/phpdotenv/issues", - "source": "https://github.com/vlucas/phpdotenv/tree/v4.2.1" + "source": "https://github.com/vlucas/phpdotenv/tree/v4.2.2" }, "funding": [ { @@ -3916,7 +3918,7 @@ "type": "tidelift" } ], - "time": "2021-10-02T19:17:08+00:00" + "time": "2021-12-12T23:07:53+00:00" } ], "packages-dev": [ @@ -3926,12 +3928,12 @@ "source": { "type": "git", "url": "https://github.com/Roave/SecurityAdvisories.git", - "reference": "344cf93f6b42a7bcd6169654b64fb953a5a85bea" + "reference": "31d9d9e2977ae7d796d82271be09e46f4bdf41b3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Roave/SecurityAdvisories/zipball/344cf93f6b42a7bcd6169654b64fb953a5a85bea", - "reference": "344cf93f6b42a7bcd6169654b64fb953a5a85bea", + "url": "https://api.github.com/repos/Roave/SecurityAdvisories/zipball/31d9d9e2977ae7d796d82271be09e46f4bdf41b3", + "reference": "31d9d9e2977ae7d796d82271be09e46f4bdf41b3", "shasum": "" }, "conflict": { @@ -3944,7 +3946,7 @@ "amphp/http": "<1.0.1", "amphp/http-client": ">=4,<4.4", "api-platform/core": ">=2.2,<2.2.10|>=2.3,<2.3.6", - "area17/twill": "<=2.5.2", + "area17/twill": "<1.2.5|>=2,<2.5.3", "asymmetricrypt/asymmetricrypt": ">=0,<9.9.99", "aws/aws-sdk-php": ">=3,<3.2.1", "bagisto/bagisto": "<0.1.5", @@ -3997,6 +3999,7 @@ "drupal/drupal": ">=7,<7.80|>=8,<8.9.16|>=9,<9.1.12|>=9.2,<9.2.4", "dweeves/magmi": "<=0.7.24", "ecodev/newsletter": "<=4", + "elgg/elgg": "<3.3.23|>=4,<4.0.5", "endroid/qr-code-bundle": "<3.4.2", "enshrined/svg-sanitize": "<0.13.1", "erusev/parsedown": "<1.7.2", @@ -4043,7 +4046,7 @@ "gos/web-socket-bundle": "<1.10.4|>=2,<2.6.1|>=3,<3.3", "gree/jose": "<=2.2", "gregwar/rst": "<1.0.3", - "grumpydictator/firefly-iii": "<5.6.3", + "grumpydictator/firefly-iii": "<5.6.5", "guzzlehttp/guzzle": ">=4-rc.2,<4.2.4|>=5,<5.3.1|>=6,<6.2.1", "helloxz/imgurl": "<=2.31", "hjue/justwriting": "<=1", @@ -4054,30 +4057,31 @@ "illuminate/cookie": ">=4,<=4.0.11|>=4.1,<=4.1.99999|>=4.2,<=4.2.99999|>=5,<=5.0.99999|>=5.1,<=5.1.99999|>=5.2,<=5.2.99999|>=5.3,<=5.3.99999|>=5.4,<=5.4.99999|>=5.5,<=5.5.49|>=5.6,<=5.6.99999|>=5.7,<=5.7.99999|>=5.8,<=5.8.99999|>=6,<6.18.31|>=7,<7.22.4", "illuminate/database": "<6.20.26|>=7,<7.30.5|>=8,<8.40", "illuminate/encryption": ">=4,<=4.0.11|>=4.1,<=4.1.31|>=4.2,<=4.2.22|>=5,<=5.0.35|>=5.1,<=5.1.46|>=5.2,<=5.2.45|>=5.3,<=5.3.31|>=5.4,<=5.4.36|>=5.5,<5.5.40|>=5.6,<5.6.15", - "illuminate/view": ">=7,<7.1.2", + "illuminate/view": "<6.20.42|>=7,<7.30.6|>=8,<8.75", "impresscms/impresscms": "<=1.4.2", "in2code/femanager": "<5.5.1|>=6,<6.3.1", "intelliants/subrion": "<=4.2.1", "ivankristianto/phpwhois": "<=4.3", + "jackalope/jackalope-doctrine-dbal": "<1.7.4", "james-heinrich/getid3": "<1.9.21", "joomla/archive": "<1.1.10", "joomla/session": "<1.3.1", "jsmitty12/phpwhois": "<5.1", "kazist/phpwhois": "<=4.2.6", - "kevinpapst/kimai2": "<1.16.2", + "kevinpapst/kimai2": "<1.16.7", "kitodo/presentation": "<3.1.2", "klaviyo/magento2-extension": ">=1,<3", "kreait/firebase-php": ">=3.2,<3.8.1", "la-haute-societe/tcpdf": "<6.2.22", "laminas/laminas-http": "<2.14.2", - "laravel/framework": "<6.20.26|>=7,<7.30.5|>=8,<8.40", + "laravel/framework": "<6.20.42|>=7,<7.30.6|>=8,<8.75", "laravel/socialite": ">=1,<1.0.99|>=2,<2.0.10", "lavalite/cms": "<=5.8", "lcobucci/jwt": ">=3.4,<3.4.6|>=4,<4.0.4|>=4.1,<4.1.5", "league/commonmark": "<0.18.3", "league/flysystem": "<1.1.4|>=2,<2.1.1", "lexik/jwt-authentication-bundle": "<2.10.7|>=2.11,<2.11.3", - "librenms/librenms": "<=21.10.2", + "librenms/librenms": "<=21.11", "limesurvey/limesurvey": "<3.27.19", "livewire/livewire": ">2.2.4,<2.2.6", "lms/routes": "<2.1.1", @@ -4137,15 +4141,17 @@ "phpoffice/phpexcel": "<1.8.2", "phpoffice/phpspreadsheet": "<1.16", "phpseclib/phpseclib": "<2.0.31|>=3,<3.0.7", + "phpservermon/phpservermon": "<=3.5.2", "phpunit/phpunit": ">=4.8.19,<4.8.28|>=5.0.10,<5.6.3", "phpwhois/phpwhois": "<=4.2.5", "phpxmlrpc/extras": "<0.6.1", - "pimcore/pimcore": "<10.1.3", - "pocketmine/pocketmine-mp": "<3.15.4", + "pimcore/pimcore": "<10.2.6", + "pocketmine/pocketmine-mp": "<4.0.3", "pressbooks/pressbooks": "<5.18", "prestashop/autoupgrade": ">=4,<4.10.1", "prestashop/contactform": ">1.0.1,<4.3", "prestashop/gamification": "<2.3.2", + "prestashop/prestashop": ">=1.7.5,<=1.7.8.1", "prestashop/productcomments": ">=4,<4.2.1", "prestashop/ps_emailsubscription": "<2.6.1", "prestashop/ps_facetedsearch": "<3.4.1", @@ -4157,6 +4163,7 @@ "pusher/pusher-php-server": "<2.2.1", "pwweb/laravel-core": "<=0.3.6-beta", "rainlab/debugbar-plugin": "<3.1", + "remdex/livehelperchat": "<=3.90", "rmccue/requests": ">=1.6,<1.8", "robrichards/xmlseclibs": "<3.0.4", "sabberworm/php-css-parser": ">=1,<1.0.1|>=2,<2.0.1|>=3,<3.0.1|>=4,<4.0.1|>=5,<5.0.9|>=5.1,<5.1.3|>=5.2,<5.2.1|>=6,<6.0.2|>=7,<7.0.4|>=8,<8.0.1|>=8.1,<8.1.1|>=8.2,<8.2.1|>=8.3,<8.3.1", @@ -4168,8 +4175,8 @@ "shopware/platform": "<=6.4.6", "shopware/production": "<=6.3.5.2", "shopware/shopware": "<5.7.6", - "showdoc/showdoc": "<=2.9.12", - "silverstripe/admin": "<4.8.1", + "showdoc/showdoc": "<=2.9.13", + "silverstripe/admin": ">=1,<1.8.1", "silverstripe/assets": ">=1,<1.4.7|>=1.5,<1.5.2", "silverstripe/cms": "<4.3.6|>=4.4,<4.4.4", "silverstripe/comments": ">=1.3,<1.9.99|>=2,<2.9.99|>=3,<3.1.1", @@ -4188,16 +4195,16 @@ "simplito/elliptic-php": "<1.0.6", "slim/slim": "<2.6", "smarty/smarty": "<3.1.39", - "snipe/snipe-it": "<5.3.2", + "snipe/snipe-it": "<5.3.5", "socalnick/scn-social-auth": "<1.15.2", "socialiteproviders/steam": "<1.1", "spoonity/tcpdf": "<6.2.22", "squizlabs/php_codesniffer": ">=1,<2.8.1|>=3,<3.0.1", - "ssddanbrown/bookstack": "<21.11.2", + "ssddanbrown/bookstack": "<21.11.3", "stormpath/sdk": ">=0,<9.9.99", "studio-42/elfinder": "<2.1.59", "subrion/cms": "<=4.2.1", - "sulu/sulu": "<1.6.43|>=2,<2.0.10|>=2.1,<2.1.1", + "sulu/sulu": "= 2.4.0-RC1|<1.6.44|>=2,<2.2.18|>=2.3,<2.3.8", "swiftmailer/swiftmailer": ">=4,<5.4.5", "sylius/admin-bundle": ">=1,<1.0.17|>=1.1,<1.1.9|>=1.2,<1.2.2", "sylius/grid": ">=1,<1.1.19|>=1.2,<1.2.18|>=1.3,<1.3.13|>=1.4,<1.4.5|>=1.5,<1.5.1", @@ -4245,6 +4252,7 @@ "theonedemon/phpwhois": "<=4.2.5", "tinymce/tinymce": "<5.10", "titon/framework": ">=0,<9.9.99", + "topthink/framework": "<6.0.9", "topthink/think": "<=6.0.9", "topthink/thinkphp": "<=3.2.3", "tribalsystems/zenario": "<8.8.53370", @@ -4271,6 +4279,7 @@ "wikimedia/parsoid": "<0.12.2", "willdurand/js-translation-bundle": "<2.1.1", "wp-cli/wp-cli": "<2.5", + "yetiforce/yetiforce-crm": "<=6.3", "yidashi/yii2cmf": "<=2", "yii2mod/yii2-cms": "<1.9.2", "yiisoft/yii": ">=1.1.14,<1.1.15", @@ -4343,7 +4352,7 @@ "type": "tidelift" } ], - "time": "2021-12-02T18:18:00+00:00" + "time": "2021-12-22T21:13:38+00:00" } ], "aliases": [], From 9ece773cf4f60402ed06aaac076c63a38f1ecab9 Mon Sep 17 00:00:00 2001 From: Mirmuxsin Khamroev <58307677+Mirmuxsin@users.noreply.github.com> Date: Mon, 17 Jan 2022 08:26:59 +0500 Subject: [PATCH 010/270] Update README.md fixed docker running command on background --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index fdbd9b8..8c1ac8c 100644 --- a/README.md +++ b/README.md @@ -123,7 +123,7 @@ Fast, simple, async php telegram api server: * copy message from one channel to another (not repost): `http://127.0.0.1:9503/api/copyMessages/?data[from_peer]=@xtrime&data[to_peer]=@xtrime&data[id][0]=1` ## Run in background -* Docker: `docker compose up -d` +* Docker: `docker-compose up -d` Docker will monitor and restart containers. * Manual: 1. Use [http://supervisord.org](supervisor) to monitor and restart swoole/amphp servers. From 06461e98f6c68a0cf717c3b54598f3d5e22738a6 Mon Sep 17 00:00:00 2001 From: Alexander Pankratov Date: Sat, 12 Feb 2022 03:51:12 +0300 Subject: [PATCH 011/270] Update madelineProto --- composer.json | 4 +- composer.lock | 331 +++++++++++++++++++++++++++----------------------- 2 files changed, 179 insertions(+), 156 deletions(-) diff --git a/composer.json b/composer.json index 290ecf6..135e74a 100644 --- a/composer.json +++ b/composer.json @@ -6,7 +6,7 @@ "license": "MIT", "keywords": ["telegram", "mtproto", "client", "PHP", "amphp", "async", "daemon", "coroutine", "parser", "micro-service", "madelineproto"], "require": { - "php": ">=8.0", + "php": "~8.0", "ext-json": "*", "ext-mbstring": "*", "ext-pcntl": "*", @@ -16,7 +16,7 @@ "amphp/websocket-client": "^1", "amphp/http-client": "^4", "vlucas/phpdotenv": "^4", - "danog/madelineproto":"master", + "danog/madelineproto":"^7", "amphp/http-server-form-parser": "^1.1" }, "require-dev": { diff --git a/composer.lock b/composer.lock index f53e04b..1657484 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "a2e280bd5b97a40c3fa3d51c67f7e10a", + "content-hash": "8e965c1e0661507c1b33ca570d87846f", "packages": [ { "name": "amphp/amp", @@ -128,12 +128,12 @@ } }, "autoload": { - "psr-4": { - "Amp\\ByteStream\\": "lib" - }, "files": [ "lib/functions.php" - ] + ], + "psr-4": { + "Amp\\ByteStream\\": "lib" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -269,12 +269,12 @@ }, "type": "library", "autoload": { - "psr-4": { - "Amp\\Dns\\": "lib" - }, "files": [ "lib/functions.php" - ] + ], + "psr-4": { + "Amp\\Dns\\": "lib" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -326,16 +326,16 @@ }, { "name": "amphp/file", - "version": "v2.0.2", + "version": "v2.0.3", "source": { "type": "git", "url": "https://github.com/amphp/file.git", - "reference": "3d3d084b81a5322d203e11617f7cbe3ea16c40ca" + "reference": "013f592f3ece1440bcf8ce8a223147f8487d69d2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/amphp/file/zipball/3d3d084b81a5322d203e11617f7cbe3ea16c40ca", - "reference": "3d3d084b81a5322d203e11617f7cbe3ea16c40ca", + "url": "https://api.github.com/repos/amphp/file/zipball/013f592f3ece1440bcf8ce8a223147f8487d69d2", + "reference": "013f592f3ece1440bcf8ce8a223147f8487d69d2", "shasum": "" }, "require": { @@ -359,12 +359,12 @@ } }, "autoload": { - "psr-4": { - "Amp\\File\\": "src" - }, "files": [ "src/functions.php" - ] + ], + "psr-4": { + "Amp\\File\\": "src" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -399,7 +399,7 @@ ], "support": { "issues": "https://github.com/amphp/file/issues", - "source": "https://github.com/amphp/file/tree/v2.0.2" + "source": "https://github.com/amphp/file/tree/v2.0.3" }, "funding": [ { @@ -407,7 +407,7 @@ "type": "github" } ], - "time": "2021-09-20T04:35:03+00:00" + "time": "2022-02-08T17:57:37+00:00" }, { "name": "amphp/hpack", @@ -594,12 +594,12 @@ } }, "autoload": { - "psr-4": { - "Amp\\Http\\Client\\": "src" - }, "files": [ "src/Internal/functions.php" - ] + ], + "psr-4": { + "Amp\\Http\\Client\\": "src" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -764,14 +764,14 @@ } }, "autoload": { - "psr-4": { - "Amp\\Http\\Server\\": "src" - }, "files": [ "src/Middleware/functions.php", "src/functions.php", "src/Server.php" - ] + ], + "psr-4": { + "Amp\\Http\\Server\\": "src" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -1053,12 +1053,12 @@ }, "type": "library", "autoload": { - "psr-4": { - "Amp\\Mysql\\": "src" - }, "files": [ "src/functions.php" - ] + ], + "psr-4": { + "Amp\\Mysql\\": "src" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -1117,14 +1117,14 @@ }, "type": "library", "autoload": { - "psr-4": { - "Amp\\Parallel\\": "lib" - }, "files": [ "lib/Context/functions.php", "lib/Sync/functions.php", "lib/Worker/functions.php" - ] + ], + "psr-4": { + "Amp\\Parallel\\": "lib" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -1312,12 +1312,12 @@ }, "type": "library", "autoload": { - "psr-4": { - "Amp\\Process\\": "lib" - }, "files": [ "lib/functions.php" - ] + ], + "psr-4": { + "Amp\\Process\\": "lib" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -1353,16 +1353,16 @@ }, { "name": "amphp/redis", - "version": "v1.0.6", + "version": "v1.0.7", "source": { "type": "git", "url": "https://github.com/amphp/redis.git", - "reference": "1eade91c18aecd4708ea35e2d745a71e8a5c1354" + "reference": "90aa4f50d7889a880d15e6e4a504b398e16faa82" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/amphp/redis/zipball/1eade91c18aecd4708ea35e2d745a71e8a5c1354", - "reference": "1eade91c18aecd4708ea35e2d745a71e8a5c1354", + "url": "https://api.github.com/repos/amphp/redis/zipball/90aa4f50d7889a880d15e6e4a504b398e16faa82", + "reference": "90aa4f50d7889a880d15e6e4a504b398e16faa82", "shasum": "" }, "require": { @@ -1380,12 +1380,12 @@ }, "type": "library", "autoload": { - "psr-4": { - "Amp\\Redis\\": "src" - }, "files": [ "src/functions.php" - ] + ], + "psr-4": { + "Amp\\Redis\\": "src" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -1408,7 +1408,7 @@ ], "support": { "issues": "https://github.com/amphp/redis/issues", - "source": "https://github.com/amphp/redis/tree/v1.0.6" + "source": "https://github.com/amphp/redis/tree/v1.0.7" }, "funding": [ { @@ -1416,7 +1416,7 @@ "type": "github" } ], - "time": "2021-10-18T15:18:29+00:00" + "time": "2022-01-11T16:03:42+00:00" }, { "name": "amphp/serialization", @@ -1512,13 +1512,13 @@ } }, "autoload": { - "psr-4": { - "Amp\\Socket\\": "src" - }, "files": [ "src/functions.php", "src/Internal/functions.php" - ] + ], + "psr-4": { + "Amp\\Socket\\": "src" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -1689,13 +1689,13 @@ }, "type": "library", "autoload": { - "psr-4": { - "Amp\\Sync\\": "src" - }, "files": [ "src/functions.php", "src/ConcurrentIterator/functions.php" - ] + ], + "psr-4": { + "Amp\\Sync\\": "src" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -1764,12 +1764,12 @@ }, "type": "library", "autoload": { - "psr-4": { - "Amp\\Websocket\\": "src" - }, "files": [ "src/functions.php" - ] + ], + "psr-4": { + "Amp\\Websocket\\": "src" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -1846,12 +1846,12 @@ }, "type": "library", "autoload": { - "psr-4": { - "Amp\\Websocket\\Client\\": "src" - }, "files": [ "src/functions.php" - ] + ], + "psr-4": { + "Amp\\Websocket\\Client\\": "src" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -2337,16 +2337,16 @@ }, { "name": "danog/madelineproto", - "version": "dev-master", + "version": "7.0.56.9999", "source": { "type": "git", "url": "https://github.com/danog/MadelineProto.git", - "reference": "a05e11c1ff519de920d383d46dd2e95f4989398f" + "reference": "0a41cd87484f2e27b713ad4c2992a3d0471d9496" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/danog/MadelineProto/zipball/a05e11c1ff519de920d383d46dd2e95f4989398f", - "reference": "a05e11c1ff519de920d383d46dd2e95f4989398f", + "url": "https://api.github.com/repos/danog/MadelineProto/zipball/0a41cd87484f2e27b713ad4c2992a3d0471d9496", + "reference": "0a41cd87484f2e27b713ad4c2992a3d0471d9496", "shasum": "" }, "require": { @@ -2405,7 +2405,6 @@ "ext-openssl": "Install the openssl extension for faster crypto", "ext-pdo": "Install pdo extension to support database used as cache" }, - "default-branch": true, "type": "project", "extra": { "phabel": { @@ -2413,14 +2412,14 @@ } }, "autoload": { - "psr-4": { - "danog\\MadelineProto\\": "src/danog/MadelineProto" - }, "files": [ "src/BigIntegor.php", "src/YieldReturnValue.php", "src/polyfill.php" - ] + ], + "psr-4": { + "danog\\MadelineProto\\": "src/danog/MadelineProto" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -2450,7 +2449,7 @@ ], "support": { "issues": "https://github.com/danog/MadelineProto/issues", - "source": "https://github.com/danog/MadelineProto/tree/master" + "source": "https://github.com/danog/MadelineProto/tree/7.0.56.9999" }, "funding": [ { @@ -2458,7 +2457,7 @@ "type": "github" } ], - "time": "2022-01-01T19:49:33+00:00" + "time": "2022-01-02T10:44:18+00:00" }, { "name": "danog/magicalserializer", @@ -2550,16 +2549,16 @@ }, { "name": "danog/tg-file-decoder", - "version": "0.1.8", + "version": "0.1.9", "source": { "type": "git", "url": "https://github.com/danog/tg-file-decoder.git", - "reference": "336d0bd69f3eb0592fab7c3e934cdd0e4a8acf61" + "reference": "6ff8389fc7365fee8db51d5142ca7261c43b99c2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/danog/tg-file-decoder/zipball/336d0bd69f3eb0592fab7c3e934cdd0e4a8acf61", - "reference": "336d0bd69f3eb0592fab7c3e934cdd0e4a8acf61", + "url": "https://api.github.com/repos/danog/tg-file-decoder/zipball/6ff8389fc7365fee8db51d5142ca7261c43b99c2", + "reference": "6ff8389fc7365fee8db51d5142ca7261c43b99c2", "shasum": "" }, "require": { @@ -2571,12 +2570,12 @@ }, "type": "project", "autoload": { - "psr-4": { - "danog\\Decoder\\": "src/" - }, "files": [ "src/type.php" - ] + ], + "psr-4": { + "danog\\Decoder\\": "src/" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -2601,7 +2600,7 @@ ], "support": { "issues": "https://github.com/danog/tg-file-decoder/issues", - "source": "https://github.com/danog/tg-file-decoder/tree/0.1.8" + "source": "https://github.com/danog/tg-file-decoder/tree/0.1.9" }, "funding": [ { @@ -2609,7 +2608,7 @@ "type": "github" } ], - "time": "2021-08-14T15:11:43+00:00" + "time": "2022-02-09T13:10:06+00:00" }, { "name": "daverandom/libdns", @@ -3115,12 +3114,12 @@ }, "type": "library", "autoload": { - "psr-4": { - "FastRoute\\": "src/" - }, "files": [ "src/functions.php" - ] + ], + "psr-4": { + "FastRoute\\": "src/" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -3145,16 +3144,16 @@ }, { "name": "paragonie/constant_time_encoding", - "version": "v2.4.0", + "version": "v2.5.0", "source": { "type": "git", "url": "https://github.com/paragonie/constant_time_encoding.git", - "reference": "f34c2b11eb9d2c9318e13540a1dbc2a3afbd939c" + "reference": "9229e15f2e6ba772f0c55dd6986c563b937170a8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/paragonie/constant_time_encoding/zipball/f34c2b11eb9d2c9318e13540a1dbc2a3afbd939c", - "reference": "f34c2b11eb9d2c9318e13540a1dbc2a3afbd939c", + "url": "https://api.github.com/repos/paragonie/constant_time_encoding/zipball/9229e15f2e6ba772f0c55dd6986c563b937170a8", + "reference": "9229e15f2e6ba772f0c55dd6986c563b937170a8", "shasum": "" }, "require": { @@ -3208,7 +3207,7 @@ "issues": "https://github.com/paragonie/constant_time_encoding/issues", "source": "https://github.com/paragonie/constant_time_encoding" }, - "time": "2020-12-06T15:14:20+00:00" + "time": "2022-01-17T05:32:27+00:00" }, { "name": "paragonie/random_compat", @@ -3333,16 +3332,16 @@ }, { "name": "phpseclib/phpseclib", - "version": "3.0.12", + "version": "3.0.13", "source": { "type": "git", "url": "https://github.com/phpseclib/phpseclib.git", - "reference": "89bfb45bd8b1abc3b37e910d57f5dbd3174f40fb" + "reference": "1443ab79364eea48665fa8c09ac67f37d1025f7e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpseclib/phpseclib/zipball/89bfb45bd8b1abc3b37e910d57f5dbd3174f40fb", - "reference": "89bfb45bd8b1abc3b37e910d57f5dbd3174f40fb", + "url": "https://api.github.com/repos/phpseclib/phpseclib/zipball/1443ab79364eea48665fa8c09ac67f37d1025f7e", + "reference": "1443ab79364eea48665fa8c09ac67f37d1025f7e", "shasum": "" }, "require": { @@ -3424,7 +3423,7 @@ ], "support": { "issues": "https://github.com/phpseclib/phpseclib/issues", - "source": "https://github.com/phpseclib/phpseclib/tree/3.0.12" + "source": "https://github.com/phpseclib/phpseclib/tree/3.0.13" }, "funding": [ { @@ -3440,7 +3439,7 @@ "type": "tidelift" } ], - "time": "2021-11-28T23:46:03+00:00" + "time": "2022-01-30T08:50:05+00:00" }, { "name": "psr/http-factory", @@ -3602,21 +3601,24 @@ }, { "name": "symfony/polyfill-ctype", - "version": "v1.23.0", + "version": "v1.24.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-ctype.git", - "reference": "46cd95797e9df938fdd2b03693b5fca5e64b01ce" + "reference": "30885182c981ab175d4d034db0f6f469898070ab" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/46cd95797e9df938fdd2b03693b5fca5e64b01ce", - "reference": "46cd95797e9df938fdd2b03693b5fca5e64b01ce", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/30885182c981ab175d4d034db0f6f469898070ab", + "reference": "30885182c981ab175d4d034db0f6f469898070ab", "shasum": "" }, "require": { "php": ">=7.1" }, + "provide": { + "ext-ctype": "*" + }, "suggest": { "ext-ctype": "For best performance" }, @@ -3661,7 +3663,7 @@ "portable" ], "support": { - "source": "https://github.com/symfony/polyfill-ctype/tree/v1.23.0" + "source": "https://github.com/symfony/polyfill-ctype/tree/v1.24.0" }, "funding": [ { @@ -3677,25 +3679,28 @@ "type": "tidelift" } ], - "time": "2021-02-19T12:13:01+00:00" + "time": "2021-10-20T20:35:02+00:00" }, { "name": "symfony/polyfill-mbstring", - "version": "v1.23.1", + "version": "v1.24.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "9174a3d80210dca8daa7f31fec659150bbeabfc6" + "reference": "0abb51d2f102e00a4eefcf46ba7fec406d245825" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/9174a3d80210dca8daa7f31fec659150bbeabfc6", - "reference": "9174a3d80210dca8daa7f31fec659150bbeabfc6", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/0abb51d2f102e00a4eefcf46ba7fec406d245825", + "reference": "0abb51d2f102e00a4eefcf46ba7fec406d245825", "shasum": "" }, "require": { "php": ">=7.1" }, + "provide": { + "ext-mbstring": "*" + }, "suggest": { "ext-mbstring": "For best performance" }, @@ -3741,7 +3746,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.23.1" + "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.24.0" }, "funding": [ { @@ -3757,20 +3762,20 @@ "type": "tidelift" } ], - "time": "2021-05-27T12:26:48+00:00" + "time": "2021-11-30T18:21:41+00:00" }, { "name": "symfony/polyfill-php80", - "version": "v1.23.1", + "version": "v1.24.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php80.git", - "reference": "1100343ed1a92e3a38f9ae122fc0eb21602547be" + "reference": "57b712b08eddb97c762a8caa32c84e037892d2e9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/1100343ed1a92e3a38f9ae122fc0eb21602547be", - "reference": "1100343ed1a92e3a38f9ae122fc0eb21602547be", + "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/57b712b08eddb97c762a8caa32c84e037892d2e9", + "reference": "57b712b08eddb97c762a8caa32c84e037892d2e9", "shasum": "" }, "require": { @@ -3787,12 +3792,12 @@ } }, "autoload": { - "psr-4": { - "Symfony\\Polyfill\\Php80\\": "" - }, "files": [ "bootstrap.php" ], + "psr-4": { + "Symfony\\Polyfill\\Php80\\": "" + }, "classmap": [ "Resources/stubs" ] @@ -3824,7 +3829,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php80/tree/v1.23.1" + "source": "https://github.com/symfony/polyfill-php80/tree/v1.24.0" }, "funding": [ { @@ -3840,7 +3845,7 @@ "type": "tidelift" } ], - "time": "2021-07-28T13:41:28+00:00" + "time": "2021-09-13T13:58:33+00:00" }, { "name": "vlucas/phpdotenv", @@ -3928,23 +3933,24 @@ "source": { "type": "git", "url": "https://github.com/Roave/SecurityAdvisories.git", - "reference": "31d9d9e2977ae7d796d82271be09e46f4bdf41b3" + "reference": "a74c203357d9b250a4019bc18e9a23a050e16bef" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Roave/SecurityAdvisories/zipball/31d9d9e2977ae7d796d82271be09e46f4bdf41b3", - "reference": "31d9d9e2977ae7d796d82271be09e46f4bdf41b3", + "url": "https://api.github.com/repos/Roave/SecurityAdvisories/zipball/a74c203357d9b250a4019bc18e9a23a050e16bef", + "reference": "a74c203357d9b250a4019bc18e9a23a050e16bef", "shasum": "" }, "conflict": { "3f/pygmentize": "<1.2", - "adodb/adodb-php": "<5.20.12", + "adodb/adodb-php": "<=5.20.20|>=5.21,<=5.21.3", "akaunting/akaunting": "<2.1.13", "alterphp/easyadmin-extension-bundle": ">=1.2,<1.2.11|>=1.3,<1.3.1", "amazing/media2click": ">=1,<1.3.3", "amphp/artax": "<1.0.6|>=2,<2.0.6", "amphp/http": "<1.0.1", "amphp/http-client": ">=4,<4.4", + "anchorcms/anchor-cms": "<=0.12.7", "api-platform/core": ">=2.2,<2.2.10|>=2.3,<2.3.6", "area17/twill": "<1.2.5|>=2,<2.5.3", "asymmetricrypt/asymmetricrypt": ">=0,<9.9.99", @@ -3957,11 +3963,13 @@ "bk2k/bootstrap-package": ">=7.1,<7.1.2|>=8,<8.0.8|>=9,<9.0.4|>=9.1,<9.1.3|>=10,<10.0.10|>=11,<11.0.3", "bolt/bolt": "<3.7.2", "bolt/core": "<4.1.13", + "bottelet/flarepoint": "<2.2.1", "brightlocal/phpwhois": "<=4.2.5", "buddypress/buddypress": "<7.2.1", "bugsnag/bugsnag-laravel": ">=2,<2.0.2", + "bytefury/crater": "<6.0.2", "cachethq/cachet": "<2.5.1", - "cakephp/cakephp": ">=1.3,<1.3.18|>=2,<2.4.99|>=2.5,<2.5.99|>=2.6,<2.6.12|>=2.7,<2.7.6|>=3,<3.5.18|>=3.6,<3.6.15|>=3.7,<3.7.7", + "cakephp/cakephp": "<4.0.6", "cardgate/magento2": "<2.0.33", "cart2quote/module-quotation": ">=4.1.6,<=4.4.5|>=5,<5.4.4", "cartalyst/sentry": "<=2.1.6", @@ -3970,13 +3978,14 @@ "cesnet/simplesamlphp-module-proxystatistics": "<3.1", "codeception/codeception": "<3.1.3|>=4,<4.1.22", "codeigniter/framework": "<=3.0.6", + "codeigniter4/framework": "<4.1.8", "codiad/codiad": "<=2.8.4", "composer/composer": "<1.10.23|>=2-alpha.1,<2.1.9", "concrete5/concrete5": "<8.5.5", "concrete5/core": "<8.5.7", "contao-components/mediaelement": ">=2.14.2,<2.21.1", "contao/core": ">=2,<3.5.39", - "contao/core-bundle": ">=4,<4.4.56|>=4.5,<4.9.18|>=4.10,<4.11.7|= 4.10.0", + "contao/core-bundle": "<4.9.18|>=4.10,<4.11.7|= 4.10.0", "contao/listing-bundle": ">=4,<4.4.8", "craftcms/cms": "<3.7.14", "croogo/croogo": "<3.0.7", @@ -3993,13 +4002,13 @@ "doctrine/mongodb-odm": ">=1,<1.0.2", "doctrine/mongodb-odm-bundle": ">=2,<3.0.1", "doctrine/orm": ">=2,<2.4.8|>=2.5,<2.5.1|>=2.8.3,<2.8.4", - "dolibarr/dolibarr": "<14|>= 3.3.beta1, < 13.0.2", + "dolibarr/dolibarr": "<=14.0.5|>= 3.3.beta1, < 13.0.2", "dompdf/dompdf": ">=0.6,<0.6.2", "drupal/core": ">=7,<7.80|>=8,<8.9.16|>=9,<9.1.12|>=9.2,<9.2.4", "drupal/drupal": ">=7,<7.80|>=8,<8.9.16|>=9,<9.1.12|>=9.2,<9.2.4", "dweeves/magmi": "<=0.7.24", "ecodev/newsletter": "<=4", - "elgg/elgg": "<3.3.23|>=4,<4.0.5", + "elgg/elgg": "<3.3.24|>=4,<4.0.5", "endroid/qr-code-bundle": "<3.4.2", "enshrined/svg-sanitize": "<0.13.1", "erusev/parsedown": "<1.7.2", @@ -4015,7 +4024,7 @@ "ezsystems/ezplatform-rest": ">=1.2,<=1.2.2|>=1.3,<1.3.8", "ezsystems/ezplatform-richtext": ">=2.3,<=2.3.7", "ezsystems/ezplatform-user": ">=1,<1.0.1", - "ezsystems/ezpublish-kernel": "<=6.13.8.1|>=7,<=7.5.15.1", + "ezsystems/ezpublish-kernel": "<=6.13.8.1|>=7,<7.5.26", "ezsystems/ezpublish-legacy": "<=2017.12.7.3|>=2018.6,<=2019.3.5.1", "ezsystems/platform-ui-assets-bundle": ">=4.2,<4.2.3", "ezsystems/repository-forms": ">=2.3,<2.3.2.1", @@ -4038,21 +4047,24 @@ "friendsoftypo3/mediace": ">=7.6.2,<7.6.5", "froala/wysiwyg-editor": "<3.2.7", "fuel/core": "<1.8.1", - "getgrav/grav": "<=1.7.24", + "gaoming13/wechat-php-sdk": "<=1.10.2", + "getgrav/grav": "<1.7.28", "getkirby/cms": "<3.5.8", "getkirby/panel": "<2.5.14", "gilacms/gila": "<=1.11.4", "globalpayments/php-sdk": "<2", + "google/protobuf": "<3.15", "gos/web-socket-bundle": "<1.10.4|>=2,<2.6.1|>=3,<3.3", "gree/jose": "<=2.2", "gregwar/rst": "<1.0.3", "grumpydictator/firefly-iii": "<5.6.5", "guzzlehttp/guzzle": ">=4-rc.2,<4.2.4|>=5,<5.3.1|>=6,<6.2.1", "helloxz/imgurl": "<=2.31", + "hillelcoren/invoice-ninja": "<5.3.35", "hjue/justwriting": "<=1", "hov/jobfair": "<1.0.13|>=2,<2.0.2", "ibexa/post-install": "<=1.0.4", - "icecoder/icecoder": "<=8", + "icecoder/icecoder": "<=8.1", "illuminate/auth": ">=4,<4.0.99|>=4.1,<=4.1.31|>=4.2,<=4.2.22|>=5,<=5.0.35|>=5.1,<=5.1.46|>=5.2,<=5.2.45|>=5.3,<=5.3.31|>=5.4,<=5.4.36|>=5.5,<5.5.10", "illuminate/cookie": ">=4,<=4.0.11|>=4.1,<=4.1.99999|>=4.2,<=4.2.99999|>=5,<=5.0.99999|>=5.1,<=5.1.99999|>=5.2,<=5.2.99999|>=5.3,<=5.3.99999|>=5.4,<=5.4.99999|>=5.5,<=5.5.49|>=5.6,<=5.6.99999|>=5.7,<=5.7.99999|>=5.8,<=5.8.99999|>=6,<6.18.31|>=7,<7.22.4", "illuminate/database": "<6.20.26|>=7,<7.30.5|>=8,<8.40", @@ -4066,6 +4078,7 @@ "james-heinrich/getid3": "<1.9.21", "joomla/archive": "<1.1.10", "joomla/session": "<1.3.1", + "jsdecena/laracom": "<2.0.9", "jsmitty12/phpwhois": "<5.1", "kazist/phpwhois": "<=4.2.6", "kevinpapst/kimai2": "<1.16.7", @@ -4073,9 +4086,11 @@ "klaviyo/magento2-extension": ">=1,<3", "kreait/firebase-php": ">=3.2,<3.8.1", "la-haute-societe/tcpdf": "<6.2.22", + "laminas/laminas-form": "<2.17.1|>=3,<3.0.2|>=3.1,<3.1.1", "laminas/laminas-http": "<2.14.2", "laravel/framework": "<6.20.42|>=7,<7.30.6|>=8,<8.75", "laravel/socialite": ">=1,<1.0.99|>=2,<2.0.10", + "latte/latte": "<2.10.8", "lavalite/cms": "<=5.8", "lcobucci/jwt": ">=3.4,<3.4.6|>=4,<4.0.4|>=4.1,<4.1.5", "league/commonmark": "<0.18.3", @@ -4083,6 +4098,7 @@ "lexik/jwt-authentication-bundle": "<2.10.7|>=2.11,<2.11.3", "librenms/librenms": "<=21.11", "limesurvey/limesurvey": "<3.27.19", + "livehelperchat/livehelperchat": "<=3.91", "livewire/livewire": ">2.2.4,<2.2.6", "lms/routes": "<2.1.1", "localizationteam/l10nmgr": "<7.4|>=8,<8.7|>=9,<9.2", @@ -4093,18 +4109,20 @@ "marcwillmann/turn": "<0.3.3", "mautic/core": "<4|= 2.13.1", "mediawiki/core": ">=1.27,<1.27.6|>=1.29,<1.29.3|>=1.30,<1.30.2|>=1.31,<1.31.9|>=1.32,<1.32.6|>=1.32.99,<1.33.3|>=1.33.99,<1.34.3|>=1.34.99,<1.35", - "microweber/microweber": "<1.2.8", + "microweber/microweber": "<1.2.11", "miniorange/miniorange-saml": "<1.4.3", "mittwald/typo3_forum": "<1.2.1", "modx/revolution": "<2.8", "monolog/monolog": ">=1.8,<1.12", - "moodle/moodle": "<3.5.17|>=3.7,<3.7.9|>=3.8,<3.8.8|>=3.9,<3.9.5|>=3.10-beta,<3.10.2", + "moodle/moodle": "<3.9.11|>=3.10-beta,<3.10.8|>=3.11,<3.11.5", + "mustache/mustache": ">=2,<2.14.1", "namshi/jose": "<2.2", "neoan3-apps/template": "<1.1.1", "neos/flow": ">=1,<1.0.4|>=1.1,<1.1.1|>=2,<2.0.1|>=2.3,<2.3.16|>=3,<3.0.12|>=3.1,<3.1.10|>=3.2,<3.2.13|>=3.3,<3.3.13|>=4,<4.0.6", "neos/form": ">=1.2,<4.3.3|>=5,<5.0.9|>=5.1,<5.1.3", "neos/neos": ">=1.1,<1.1.3|>=1.2,<1.2.13|>=2,<2.0.4|>=2.3,<2.9.99|>=3,<3.0.20|>=3.1,<3.1.18|>=3.2,<3.2.14|>=3.3,<3.3.23|>=4,<4.0.17|>=4.1,<4.1.16|>=4.2,<4.2.12|>=4.3,<4.3.3", "neos/swiftmailer": ">=4.1,<4.1.99|>=5.4,<5.4.5", + "netgen/tagsbundle": ">=3.4,<3.4.11|>=4,<4.0.15", "nette/application": ">=2,<2.0.19|>=2.1,<2.1.13|>=2.2,<2.2.10|>=2.3,<2.3.14|>=2.4,<2.4.16|>=3,<3.0.6", "nette/nette": ">=2,<2.0.19|>=2.1,<2.1.13", "nilsteampassnet/teampass": "<=2.1.27.36", @@ -4115,7 +4133,7 @@ "october/cms": "= 1.1.1|= 1.0.471|= 1.0.469|>=1.0.319,<1.0.469", "october/october": ">=1.0.319,<1.0.466|>=2.1,<2.1.12", "october/rain": "<1.0.472|>=1.1,<1.1.2", - "october/system": "<1.0.472|>=1.1.1,<1.1.5|>=2.1,<2.1.12", + "october/system": "<1.0.473|>=1.1,<1.1.6|>=2.1,<2.1.12", "onelogin/php-saml": "<2.10.4", "oneup/uploader-bundle": "<1.9.3|>=2,<2.1.5", "opencart/opencart": "<=3.0.3.2", @@ -4123,7 +4141,7 @@ "openmage/magento-lts": "<19.4.15|>=20,<20.0.13", "orchid/platform": ">=9,<9.4.4", "oro/crm": ">=1.7,<1.7.4|>=3.1,<4.1.17|>=4.2,<4.2.7", - "oro/platform": ">=1.7,<1.7.4", + "oro/platform": ">=1.7,<1.7.4|>=3.1,<3.1.29|>=4.1,<4.1.17|>=4.2,<4.2.8", "padraic/humbug_get_contents": "<1.1.2", "pagarme/pagarme-php": ">=0,<3", "pagekit/pagekit": "<=1.0.18", @@ -4137,7 +4155,7 @@ "phpfastcache/phpfastcache": "<6.1.5|>=7,<7.1.2|>=8,<8.0.7", "phpmailer/phpmailer": "<6.5", "phpmussel/phpmussel": ">=1,<1.6", - "phpmyadmin/phpmyadmin": "<4.9.6|>=5,<5.0.3", + "phpmyadmin/phpmyadmin": "<4.9.8|>=5,<5.0.3|>=5.1,<5.1.2", "phpoffice/phpexcel": "<1.8.2", "phpoffice/phpspreadsheet": "<1.16", "phpseclib/phpseclib": "<2.0.31|>=3,<3.0.7", @@ -4145,13 +4163,13 @@ "phpunit/phpunit": ">=4.8.19,<4.8.28|>=5.0.10,<5.6.3", "phpwhois/phpwhois": "<=4.2.5", "phpxmlrpc/extras": "<0.6.1", - "pimcore/pimcore": "<10.2.6", - "pocketmine/pocketmine-mp": "<4.0.3", + "pimcore/pimcore": "<=10.3", + "pocketmine/pocketmine-mp": "<4.0.7", "pressbooks/pressbooks": "<5.18", "prestashop/autoupgrade": ">=4,<4.10.1", "prestashop/contactform": ">1.0.1,<4.3", "prestashop/gamification": "<2.3.2", - "prestashop/prestashop": ">=1.7.5,<=1.7.8.1", + "prestashop/prestashop": ">=1.7,<=1.7.8.2", "prestashop/productcomments": ">=4,<4.2.1", "prestashop/ps_emailsubscription": "<2.6.1", "prestashop/ps_facetedsearch": "<3.4.1", @@ -4159,11 +4177,12 @@ "privatebin/privatebin": "<1.2.2|>=1.3,<1.3.2", "propel/propel": ">=2-alpha.1,<=2-alpha.7", "propel/propel1": ">=1,<=1.7.1", - "pterodactyl/panel": "<1.6.6", + "pterodactyl/panel": "<1.7", + "ptrofimov/beanstalk_console": "<1.7.14", "pusher/pusher-php-server": "<2.2.1", "pwweb/laravel-core": "<=0.3.6-beta", "rainlab/debugbar-plugin": "<3.1", - "remdex/livehelperchat": "<=3.90", + "remdex/livehelperchat": "<3.93", "rmccue/requests": ">=1.6,<1.8", "robrichards/xmlseclibs": "<3.0.4", "sabberworm/php-css-parser": ">=1,<1.0.1|>=2,<2.0.1|>=3,<3.0.1|>=4,<4.0.1|>=5,<5.0.9|>=5.1,<5.1.3|>=5.2,<5.2.1|>=6,<6.0.2|>=7,<7.0.4|>=8,<8.0.1|>=8.1,<8.1.1|>=8.2,<8.2.1|>=8.3,<8.3.1", @@ -4174,14 +4193,14 @@ "shopware/core": "<=6.4.6", "shopware/platform": "<=6.4.6", "shopware/production": "<=6.3.5.2", - "shopware/shopware": "<5.7.6", - "showdoc/showdoc": "<=2.9.13", + "shopware/shopware": "<5.7.7", + "showdoc/showdoc": "<=2.10.2", "silverstripe/admin": ">=1,<1.8.1", "silverstripe/assets": ">=1,<1.4.7|>=1.5,<1.5.2", "silverstripe/cms": "<4.3.6|>=4.4,<4.4.4", "silverstripe/comments": ">=1.3,<1.9.99|>=2,<2.9.99|>=3,<3.1.1", "silverstripe/forum": "<=0.6.1|>=0.7,<=0.7.3", - "silverstripe/framework": "<4.7.4", + "silverstripe/framework": "<4.10.1", "silverstripe/graphql": "<3.5.2|>=4-alpha.1,<4-alpha.2", "silverstripe/registry": ">=2.1,<2.1.2|>=2.2,<2.2.1", "silverstripe/restfulserver": ">=1,<1.0.9|>=2,<2.0.4", @@ -4194,13 +4213,14 @@ "simplesamlphp/simplesamlphp-module-infocard": "<1.0.1", "simplito/elliptic-php": "<1.0.6", "slim/slim": "<2.6", - "smarty/smarty": "<3.1.39", - "snipe/snipe-it": "<5.3.5", + "smarty/smarty": "<3.1.43|>=4,<4.0.3", + "snipe/snipe-it": "<=5.3.7", "socalnick/scn-social-auth": "<1.15.2", "socialiteproviders/steam": "<1.1", + "spipu/html2pdf": "<5.2.4", "spoonity/tcpdf": "<6.2.22", "squizlabs/php_codesniffer": ">=1,<2.8.1|>=3,<3.0.1", - "ssddanbrown/bookstack": "<21.11.3", + "ssddanbrown/bookstack": "<21.12.1", "stormpath/sdk": ">=0,<9.9.99", "studio-42/elfinder": "<2.1.59", "subrion/cms": "<=4.2.1", @@ -4220,7 +4240,7 @@ "symfony/dependency-injection": ">=2,<2.0.17|>=2.7,<2.7.51|>=2.8,<2.8.50|>=3,<3.4.26|>=4,<4.1.12|>=4.2,<4.2.7", "symfony/error-handler": ">=4.4,<4.4.4|>=5,<5.0.4", "symfony/form": ">=2.3,<2.3.35|>=2.4,<2.6.12|>=2.7,<2.7.50|>=2.8,<2.8.49|>=3,<3.4.20|>=4,<4.0.15|>=4.1,<4.1.9|>=4.2,<4.2.1", - "symfony/framework-bundle": ">=2,<2.3.18|>=2.4,<2.4.8|>=2.5,<2.5.2|>=2.7,<2.7.51|>=2.8,<2.8.50|>=3,<3.4.26|>=4,<4.1.12|>=4.2,<4.2.7", + "symfony/framework-bundle": ">=2,<2.3.18|>=2.4,<2.4.8|>=2.5,<2.5.2|>=2.7,<2.7.51|>=2.8,<2.8.50|>=3,<3.4.26|>=4,<4.1.12|>=4.2,<4.2.7|>=5.3.14,<=5.3.14|>=5.4.3,<=5.4.3|>=6.0.3,<=6.0.3|= 6.0.3|= 5.4.3|= 5.3.14", "symfony/http-foundation": ">=2,<2.8.52|>=3,<3.4.35|>=4,<4.2.12|>=4.3,<4.3.8|>=4.4,<4.4.7|>=5,<5.0.7", "symfony/http-kernel": ">=2,<2.8.52|>=3,<3.4.35|>=4,<4.2.12|>=4.3,<4.4.13|>=5,<5.1.5|>=5.2,<5.3.12", "symfony/intl": ">=2.7,<2.7.38|>=2.8,<2.8.31|>=3,<3.2.14|>=3.3,<3.3.13", @@ -4238,7 +4258,7 @@ "symfony/security-guard": ">=2.8,<3.4.48|>=4,<4.4.23|>=5,<5.2.8", "symfony/security-http": ">=2.3,<2.3.41|>=2.4,<2.7.51|>=2.8,<3.4.48|>=4,<4.4.23|>=5,<5.2.8|>=5.3,<5.3.2", "symfony/serializer": ">=2,<2.0.11|>=4.1,<4.4.35|>=5,<5.3.12", - "symfony/symfony": ">=2,<3.4.49|>=4,<4.4.35|>=5,<5.3.12", + "symfony/symfony": ">=2,<3.4.49|>=4,<4.4.35|>=5,<5.3.12|>=5.3.14,<=5.3.14|>=5.4.3,<=5.4.3|>=6.0.3,<=6.0.3", "symfony/translation": ">=2,<2.0.17", "symfony/validator": ">=2,<2.0.24|>=2.1,<2.1.12|>=2.2,<2.2.5|>=2.3,<2.3.3", "symfony/var-exporter": ">=4.2,<4.2.12|>=4.3,<4.3.8", @@ -4247,6 +4267,7 @@ "t3/dce": ">=2.2,<2.6.2", "t3g/svg-sanitizer": "<1.0.3", "tecnickcom/tcpdf": "<6.2.22", + "terminal42/contao-tablelookupwizard": "<3.3.5", "thelia/backoffice-default-template": ">=2.1,<2.1.2", "thelia/thelia": ">=2.1-beta.1,<2.1.3", "theonedemon/phpwhois": "<=4.2.5", @@ -4257,7 +4278,7 @@ "topthink/thinkphp": "<=3.2.3", "tribalsystems/zenario": "<8.8.53370", "truckersmp/phpwhois": "<=4.3.1", - "twig/twig": "<1.38|>=2,<2.7", + "twig/twig": "<1.38|>=2,<2.14.11|>3,<3.3.8", "typo3/cms": ">=6.2,<6.2.30|>=7,<7.6.32|>=8,<8.7.38|>=9,<9.5.29|>=10,<10.4.19|>=11,<11.5", "typo3/cms-backend": ">=7,<=7.6.50|>=8,<=8.7.39|>=9,<=9.5.24|>=10,<=10.4.13|>=11,<=11.1", "typo3/cms-core": ">=6.2,<=6.2.56|>=7,<=7.6.52|>=8,<=8.7.41|>=9,<9.5.29|>=10,<10.4.19|>=11,<11.5", @@ -4268,6 +4289,8 @@ "typo3/swiftmailer": ">=4.1,<4.1.99|>=5.4,<5.4.5", "typo3fluid/fluid": ">=2,<2.0.8|>=2.1,<2.1.7|>=2.2,<2.2.4|>=2.3,<2.3.7|>=2.4,<2.4.4|>=2.5,<2.5.11|>=2.6,<2.6.10", "ua-parser/uap-php": "<3.8", + "unisharp/laravel-filemanager": "<=2.3", + "userfrosting/userfrosting": ">=0.3.1,<4.6.3", "usmanhalalit/pixie": "<1.0.3|>=2,<2.0.2", "vanilla/safecurl": "<0.9.2", "verot/class.upload.php": "<=1.0.3|>=2,<=2.0.4", @@ -4352,7 +4375,7 @@ "type": "tidelift" } ], - "time": "2021-12-22T21:13:38+00:00" + "time": "2022-02-11T21:12:37+00:00" } ], "aliases": [], @@ -4363,7 +4386,7 @@ "prefer-stable": true, "prefer-lowest": false, "platform": { - "php": ">=8.0", + "php": "~8.0", "ext-json": "*", "ext-mbstring": "*", "ext-pcntl": "*" From dd77c267188a49740af2a060a6bd1daeb5f96eb4 Mon Sep 17 00:00:00 2001 From: Alexander Pankratov Date: Mon, 14 Feb 2022 02:21:50 +0300 Subject: [PATCH 012/270] Use temporary madeline version --- composer.json | 2 +- composer.lock | 23 ++++++++++++----------- 2 files changed, 13 insertions(+), 12 deletions(-) diff --git a/composer.json b/composer.json index 135e74a..8176606 100644 --- a/composer.json +++ b/composer.json @@ -16,7 +16,7 @@ "amphp/websocket-client": "^1", "amphp/http-client": "^4", "vlucas/phpdotenv": "^4", - "danog/madelineproto":"^7", + "danog/madelineproto":"dev-TL136_min", "amphp/http-server-form-parser": "^1.1" }, "require-dev": { diff --git a/composer.lock b/composer.lock index 1657484..b39bd8c 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "8e965c1e0661507c1b33ca570d87846f", + "content-hash": "79ed0a2cbc19c8aeb832db5ca9e98976", "packages": [ { "name": "amphp/amp", @@ -2337,16 +2337,16 @@ }, { "name": "danog/madelineproto", - "version": "7.0.56.9999", + "version": "dev-TL136_min", "source": { "type": "git", "url": "https://github.com/danog/MadelineProto.git", - "reference": "0a41cd87484f2e27b713ad4c2992a3d0471d9496" + "reference": "92f577fbc41d9242c5830397db3780350efb5886" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/danog/MadelineProto/zipball/0a41cd87484f2e27b713ad4c2992a3d0471d9496", - "reference": "0a41cd87484f2e27b713ad4c2992a3d0471d9496", + "url": "https://api.github.com/repos/danog/MadelineProto/zipball/92f577fbc41d9242c5830397db3780350efb5886", + "reference": "92f577fbc41d9242c5830397db3780350efb5886", "shasum": "" }, "require": { @@ -2449,7 +2449,7 @@ ], "support": { "issues": "https://github.com/danog/MadelineProto/issues", - "source": "https://github.com/danog/MadelineProto/tree/7.0.56.9999" + "source": "https://github.com/danog/MadelineProto/tree/TL136_min" }, "funding": [ { @@ -2457,7 +2457,7 @@ "type": "github" } ], - "time": "2022-01-02T10:44:18+00:00" + "time": "2022-02-14T00:07:28+00:00" }, { "name": "danog/magicalserializer", @@ -3715,12 +3715,12 @@ } }, "autoload": { - "psr-4": { - "Symfony\\Polyfill\\Mbstring\\": "" - }, "files": [ "bootstrap.php" - ] + ], + "psr-4": { + "Symfony\\Polyfill\\Mbstring\\": "" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -4381,6 +4381,7 @@ "aliases": [], "minimum-stability": "dev", "stability-flags": { + "danog/madelineproto": 20, "roave/security-advisories": 20 }, "prefer-stable": true, From 7015691686d57cd3422567a498ab5a83f5d5f663 Mon Sep 17 00:00:00 2001 From: Alexander Pankratov Date: Sat, 19 Feb 2022 19:04:45 +0300 Subject: [PATCH 013/270] Disable id.telegrampwr.xyz requests --- composer.json | 16 ++++++++++++++-- composer.lock | 52 +++++++++++++++++++++++++-------------------------- 2 files changed, 40 insertions(+), 28 deletions(-) diff --git a/composer.json b/composer.json index 8176606..60013b6 100644 --- a/composer.json +++ b/composer.json @@ -4,7 +4,19 @@ "type": "project", "homepage": "https://tg.i-c-a.su/", "license": "MIT", - "keywords": ["telegram", "mtproto", "client", "PHP", "amphp", "async", "daemon", "coroutine", "parser", "micro-service", "madelineproto"], + "keywords": [ + "telegram", + "mtproto", + "client", + "PHP", + "amphp", + "async", + "daemon", + "coroutine", + "parser", + "micro-service", + "madelineproto" + ], "require": { "php": "~8.0", "ext-json": "*", @@ -16,7 +28,7 @@ "amphp/websocket-client": "^1", "amphp/http-client": "^4", "vlucas/phpdotenv": "^4", - "danog/madelineproto":"dev-TL136_min", + "danog/madelineproto": "dev-stable", "amphp/http-server-form-parser": "^1.1" }, "require-dev": { diff --git a/composer.lock b/composer.lock index b39bd8c..7c3fefd 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "79ed0a2cbc19c8aeb832db5ca9e98976", + "content-hash": "f87c30e005aa11fdd67268baea26e7cf", "packages": [ { "name": "amphp/amp", @@ -1245,13 +1245,13 @@ }, "type": "library", "autoload": { - "psr-4": { - "Amp\\Postgres\\": "src" - }, "files": [ "src/functions.php", "src/Internal/functions.php" - ] + ], + "psr-4": { + "Amp\\Postgres\\": "src" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -2337,16 +2337,16 @@ }, { "name": "danog/madelineproto", - "version": "dev-TL136_min", + "version": "dev-stable", "source": { "type": "git", "url": "https://github.com/danog/MadelineProto.git", - "reference": "92f577fbc41d9242c5830397db3780350efb5886" + "reference": "32b0cc5759f25bc64ae9073e9cd5ef5ebf8b5858" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/danog/MadelineProto/zipball/92f577fbc41d9242c5830397db3780350efb5886", - "reference": "92f577fbc41d9242c5830397db3780350efb5886", + "url": "https://api.github.com/repos/danog/MadelineProto/zipball/32b0cc5759f25bc64ae9073e9cd5ef5ebf8b5858", + "reference": "32b0cc5759f25bc64ae9073e9cd5ef5ebf8b5858", "shasum": "" }, "require": { @@ -2449,7 +2449,7 @@ ], "support": { "issues": "https://github.com/danog/MadelineProto/issues", - "source": "https://github.com/danog/MadelineProto/tree/TL136_min" + "source": "https://github.com/danog/MadelineProto/tree/stable" }, "funding": [ { @@ -2457,7 +2457,7 @@ "type": "github" } ], - "time": "2022-02-14T00:07:28+00:00" + "time": "2022-02-19T15:46:15+00:00" }, { "name": "danog/magicalserializer", @@ -2959,12 +2959,12 @@ } }, "autoload": { - "psr-4": { - "League\\Uri\\": "src" - }, "files": [ "src/functions_include.php" - ] + ], + "psr-4": { + "League\\Uri\\": "src" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -3933,12 +3933,12 @@ "source": { "type": "git", "url": "https://github.com/Roave/SecurityAdvisories.git", - "reference": "a74c203357d9b250a4019bc18e9a23a050e16bef" + "reference": "6ba1494c9aaa556dc45e13eaab644a280ad76558" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Roave/SecurityAdvisories/zipball/a74c203357d9b250a4019bc18e9a23a050e16bef", - "reference": "a74c203357d9b250a4019bc18e9a23a050e16bef", + "url": "https://api.github.com/repos/Roave/SecurityAdvisories/zipball/6ba1494c9aaa556dc45e13eaab644a280ad76558", + "reference": "6ba1494c9aaa556dc45e13eaab644a280ad76558", "shasum": "" }, "conflict": { @@ -3981,7 +3981,7 @@ "codeigniter4/framework": "<4.1.8", "codiad/codiad": "<=2.8.4", "composer/composer": "<1.10.23|>=2-alpha.1,<2.1.9", - "concrete5/concrete5": "<8.5.5", + "concrete5/concrete5": "<9", "concrete5/core": "<8.5.7", "contao-components/mediaelement": ">=2.14.2,<2.21.1", "contao/core": ">=2,<3.5.39", @@ -4010,7 +4010,7 @@ "ecodev/newsletter": "<=4", "elgg/elgg": "<3.3.24|>=4,<4.0.5", "endroid/qr-code-bundle": "<3.4.2", - "enshrined/svg-sanitize": "<0.13.1", + "enshrined/svg-sanitize": "<0.15", "erusev/parsedown": "<1.7.2", "ether/logs": "<3.0.4", "ezsystems/demobundle": ">=5.4,<5.4.6.1", @@ -4096,7 +4096,7 @@ "league/commonmark": "<0.18.3", "league/flysystem": "<1.1.4|>=2,<2.1.1", "lexik/jwt-authentication-bundle": "<2.10.7|>=2.11,<2.11.3", - "librenms/librenms": "<=21.11", + "librenms/librenms": "<22.2", "limesurvey/limesurvey": "<3.27.19", "livehelperchat/livehelperchat": "<=3.91", "livewire/livewire": ">2.2.4,<2.2.6", @@ -4163,7 +4163,7 @@ "phpunit/phpunit": ">=4.8.19,<4.8.28|>=5.0.10,<5.6.3", "phpwhois/phpwhois": "<=4.2.5", "phpxmlrpc/extras": "<0.6.1", - "pimcore/pimcore": "<=10.3", + "pimcore/pimcore": "<10.3.1", "pocketmine/pocketmine-mp": "<4.0.7", "pressbooks/pressbooks": "<5.18", "prestashop/autoupgrade": ">=4,<4.10.1", @@ -4214,7 +4214,7 @@ "simplito/elliptic-php": "<1.0.6", "slim/slim": "<2.6", "smarty/smarty": "<3.1.43|>=4,<4.0.3", - "snipe/snipe-it": "<=5.3.7", + "snipe/snipe-it": "<5.3.10", "socalnick/scn-social-auth": "<1.15.2", "socialiteproviders/steam": "<1.1", "spipu/html2pdf": "<5.2.4", @@ -4278,7 +4278,7 @@ "topthink/thinkphp": "<=3.2.3", "tribalsystems/zenario": "<8.8.53370", "truckersmp/phpwhois": "<=4.3.1", - "twig/twig": "<1.38|>=2,<2.14.11|>3,<3.3.8", + "twig/twig": "<1.38|>=2,<2.14.11|>=3,<3.3.8", "typo3/cms": ">=6.2,<6.2.30|>=7,<7.6.32|>=8,<8.7.38|>=9,<9.5.29|>=10,<10.4.19|>=11,<11.5", "typo3/cms-backend": ">=7,<=7.6.50|>=8,<=8.7.39|>=9,<=9.5.24|>=10,<=10.4.13|>=11,<=11.1", "typo3/cms-core": ">=6.2,<=6.2.56|>=7,<=7.6.52|>=8,<=8.7.41|>=9,<9.5.29|>=10,<10.4.19|>=11,<11.5", @@ -4375,7 +4375,7 @@ "type": "tidelift" } ], - "time": "2022-02-11T21:12:37+00:00" + "time": "2022-02-17T14:18:41+00:00" } ], "aliases": [], @@ -4393,5 +4393,5 @@ "ext-pcntl": "*" }, "platform-dev": [], - "plugin-api-version": "2.1.0" + "plugin-api-version": "2.2.0" } From b26f7f257938b012b603499a99a84c3a476b45cd Mon Sep 17 00:00:00 2001 From: Alexander Pankratov Date: Sun, 27 Mar 2022 19:32:25 +0300 Subject: [PATCH 014/270] Update readme --- README.md | 3 --- 1 file changed, 3 deletions(-) diff --git a/README.md b/README.md index 8c1ac8c..c623407 100644 --- a/README.md +++ b/README.md @@ -350,6 +350,3 @@ Full list of custom methods and their parameters available in [ApiExtensions cla * Author: [@xtrime](https://t.me/xtrime) * [MadelineProto and Amp Support Groups](https://t.me/pwrtelegramgroup) * Email: alexander(at)i-c-a.su -* Donations: - * BTC: `1BE1nitXgEAxg7A5tgec67ucNryQwusoiP` - * ETH: `0x0e2d369E28DCA2336803b9dE696eCDa50ff61e27` From 9dc3fc208a1ce012e1292ddc85307b6cdb457e2b Mon Sep 17 00:00:00 2001 From: Alexander Pankratov Date: Mon, 18 Apr 2022 01:32:29 +0300 Subject: [PATCH 015/270] php 8.1 support & reduce image size --- Dockerfile | 17 +- composer.json | 2 +- composer.lock | 297 ++++++++++++---------- docker-compose.yml | 7 +- src/Controllers/AbstractApiController.php | 5 +- 5 files changed, 177 insertions(+), 151 deletions(-) diff --git a/Dockerfile b/Dockerfile index 15c2275..45b44d1 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,7 @@ -FROM php:8.0-cli +FROM php:8.1-cli ADD https://github.com/ufoscout/docker-compose-wait/releases/download/2.9.0/wait /usr/local/bin/docker-compose-wait +ADD docker/php/conf.d/. "$PHP_INI_DIR/conf.d/" RUN apt-get update && apt-get upgrade -y \ && apt-get install apt-utils procps -y \ @@ -25,20 +26,6 @@ RUN apt-get update && apt-get upgrade -y \ && apt-get autoremove --purge -y && apt-get autoclean -y && apt-get clean -y \ && rm -rf /usr/src -COPY . /app -WORKDIR /app - -RUN cp -a docker/php/conf.d/. "$PHP_INI_DIR/conf.d/" \ - && composer install -o --no-dev \ - && composer clear - -#Creating symlink to save .env in volume -RUN mkdir /app/sessions && \ - touch '/app/sessions/.env.docker' && \ - ln -s '/app/sessions/.env.docker' '/app/.env.docker' - -VOLUME ["/app/sessions"] - EXPOSE 9503 ENTRYPOINT docker-compose-wait && nice -n 20 php server.php -e=.env.docker --docker -s=* \ No newline at end of file diff --git a/composer.json b/composer.json index 60013b6..148be50 100644 --- a/composer.json +++ b/composer.json @@ -18,7 +18,7 @@ "madelineproto" ], "require": { - "php": "~8.0", + "php": "~8.0|~8.1", "ext-json": "*", "ext-mbstring": "*", "ext-pcntl": "*", diff --git a/composer.lock b/composer.lock index 7c3fefd..944a106 100644 --- a/composer.lock +++ b/composer.lock @@ -4,20 +4,20 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "f87c30e005aa11fdd67268baea26e7cf", + "content-hash": "26fa6a95dadc934938c13f39976e5391", "packages": [ { "name": "amphp/amp", - "version": "v2.6.1", + "version": "v2.6.2", "source": { "type": "git", "url": "https://github.com/amphp/amp.git", - "reference": "c5fc66a78ee38d7ac9195a37bacaf940eb3f65ae" + "reference": "9d5100cebffa729aaffecd3ad25dc5aeea4f13bb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/amphp/amp/zipball/c5fc66a78ee38d7ac9195a37bacaf940eb3f65ae", - "reference": "c5fc66a78ee38d7ac9195a37bacaf940eb3f65ae", + "url": "https://api.github.com/repos/amphp/amp/zipball/9d5100cebffa729aaffecd3ad25dc5aeea4f13bb", + "reference": "9d5100cebffa729aaffecd3ad25dc5aeea4f13bb", "shasum": "" }, "require": { @@ -39,13 +39,13 @@ } }, "autoload": { - "psr-4": { - "Amp\\": "lib" - }, "files": [ "lib/functions.php", "lib/Internal/functions.php" - ] + ], + "psr-4": { + "Amp\\": "lib" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -70,7 +70,7 @@ } ], "description": "A non-blocking concurrency framework for PHP applications.", - "homepage": "http://amphp.org/amp", + "homepage": "https://amphp.org/amp", "keywords": [ "async", "asynchronous", @@ -85,7 +85,7 @@ "support": { "irc": "irc://irc.freenode.org/amphp", "issues": "https://github.com/amphp/amp/issues", - "source": "https://github.com/amphp/amp/tree/v2.6.1" + "source": "https://github.com/amphp/amp/tree/v2.6.2" }, "funding": [ { @@ -93,7 +93,7 @@ "type": "github" } ], - "time": "2021-09-23T18:43:08+00:00" + "time": "2022-02-20T17:52:18+00:00" }, { "name": "amphp/byte-stream", @@ -511,12 +511,12 @@ } }, "autoload": { - "psr-4": { - "Amp\\Http\\": "src" - }, "files": [ "src/functions.php" - ] + ], + "psr-4": { + "Amp\\Http\\": "src" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -845,12 +845,12 @@ }, "type": "library", "autoload": { - "psr-4": { - "Amp\\Http\\Server\\FormParser\\": "src" - }, "files": [ "src/functions.php" - ] + ], + "psr-4": { + "Amp\\Http\\Server\\FormParser\\": "src" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -983,12 +983,12 @@ }, "type": "library", "autoload": { - "psr-4": { - "Amp\\Log\\": "src" - }, "files": [ "src/functions.php" - ] + ], + "psr-4": { + "Amp\\Log\\": "src" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -1441,12 +1441,12 @@ }, "type": "library", "autoload": { - "psr-4": { - "Amp\\Serialization\\": "src" - }, "files": [ "src/functions.php" - ] + ], + "psr-4": { + "Amp\\Serialization\\": "src" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -1611,16 +1611,16 @@ }, { "name": "amphp/sql-common", - "version": "v1.1.2", + "version": "v1.1.3", "source": { "type": "git", "url": "https://github.com/amphp/sql-common.git", - "reference": "1c3b86970373d2ae00482300cae1442d4e9bd782" + "reference": "cab5f252916a7bf5c9dffa01736dfd9115e7f652" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/amphp/sql-common/zipball/1c3b86970373d2ae00482300cae1442d4e9bd782", - "reference": "1c3b86970373d2ae00482300cae1442d4e9bd782", + "url": "https://api.github.com/repos/amphp/sql-common/zipball/cab5f252916a7bf5c9dffa01736dfd9115e7f652", + "reference": "cab5f252916a7bf5c9dffa01736dfd9115e7f652", "shasum": "" }, "require": { @@ -1654,7 +1654,7 @@ ], "support": { "issues": "https://github.com/amphp/sql-common/issues", - "source": "https://github.com/amphp/sql-common/tree/v1.1.2" + "source": "https://github.com/amphp/sql-common/tree/v1.1.3" }, "funding": [ { @@ -1662,7 +1662,7 @@ "type": "github" } ], - "time": "2020-11-09T23:11:50+00:00" + "time": "2020-11-15T02:33:47+00:00" }, { "name": "amphp/sync", @@ -1734,16 +1734,16 @@ }, { "name": "amphp/websocket", - "version": "v1.0.2", + "version": "v1.0.3", "source": { "type": "git", "url": "https://github.com/amphp/websocket.git", - "reference": "d0e61e3e34ac09ec230ae0eff2b8beaf8f83a8f9" + "reference": "248e9dc1be0477932cd1788e5002b0aabf66f179" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/amphp/websocket/zipball/d0e61e3e34ac09ec230ae0eff2b8beaf8f83a8f9", - "reference": "d0e61e3e34ac09ec230ae0eff2b8beaf8f83a8f9", + "url": "https://api.github.com/repos/amphp/websocket/zipball/248e9dc1be0477932cd1788e5002b0aabf66f179", + "reference": "248e9dc1be0477932cd1788e5002b0aabf66f179", "shasum": "" }, "require": { @@ -1801,7 +1801,7 @@ ], "support": { "issues": "https://github.com/amphp/websocket/issues", - "source": "https://github.com/amphp/websocket/tree/v1.0.2" + "source": "https://github.com/amphp/websocket/tree/v1.0.3" }, "funding": [ { @@ -1809,20 +1809,20 @@ "type": "github" } ], - "time": "2021-10-26T14:32:35+00:00" + "time": "2022-04-11T23:45:31+00:00" }, { "name": "amphp/websocket-client", - "version": "v1.0.0", + "version": "v1.0.1", "source": { "type": "git", "url": "https://github.com/amphp/websocket-client.git", - "reference": "173b54137cdcd4288702f615f05c1029e613ba37" + "reference": "bcf5262e66abec420896a7893b7a08e9e2e655e8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/amphp/websocket-client/zipball/173b54137cdcd4288702f615f05c1029e613ba37", - "reference": "173b54137cdcd4288702f615f05c1029e613ba37", + "url": "https://api.github.com/repos/amphp/websocket-client/zipball/bcf5262e66abec420896a7893b7a08e9e2e655e8", + "reference": "bcf5262e66abec420896a7893b7a08e9e2e655e8", "shasum": "" }, "require": { @@ -1883,9 +1883,15 @@ ], "support": { "issues": "https://github.com/amphp/websocket-client/issues", - "source": "https://github.com/amphp/websocket-client/tree/v1.0.0" + "source": "https://github.com/amphp/websocket-client/tree/v1.0.1" }, - "time": "2020-07-05T17:36:04+00:00" + "funding": [ + { + "url": "https://github.com/amphp", + "type": "github" + } + ], + "time": "2022-03-10T09:54:59+00:00" }, { "name": "amphp/websocket-server", @@ -2174,12 +2180,12 @@ }, "type": "library", "autoload": { - "psr-4": { - "Amp\\Ipc\\": "lib" - }, "files": [ "lib/functions.php" - ] + ], + "psr-4": { + "Amp\\Ipc\\": "lib" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -2341,12 +2347,12 @@ "source": { "type": "git", "url": "https://github.com/danog/MadelineProto.git", - "reference": "32b0cc5759f25bc64ae9073e9cd5ef5ebf8b5858" + "reference": "25a509ff2e246983823297367eee86bc70c6e2b5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/danog/MadelineProto/zipball/32b0cc5759f25bc64ae9073e9cd5ef5ebf8b5858", - "reference": "32b0cc5759f25bc64ae9073e9cd5ef5ebf8b5858", + "url": "https://api.github.com/repos/danog/MadelineProto/zipball/25a509ff2e246983823297367eee86bc70c6e2b5", + "reference": "25a509ff2e246983823297367eee86bc70c6e2b5", "shasum": "" }, "require": { @@ -2449,7 +2455,7 @@ ], "support": { "issues": "https://github.com/danog/MadelineProto/issues", - "source": "https://github.com/danog/MadelineProto/tree/stable" + "source": "https://github.com/danog/MadelineProto/tree/7.0.59" }, "funding": [ { @@ -2457,7 +2463,7 @@ "type": "github" } ], - "time": "2022-02-19T15:46:15+00:00" + "time": "2022-02-28T16:31:32+00:00" }, { "name": "danog/magicalserializer", @@ -2633,12 +2639,12 @@ }, "type": "library", "autoload": { - "psr-4": { - "LibDNS\\": "src/" - }, "files": [ "src/functions.php" - ] + ], + "psr-4": { + "LibDNS\\": "src/" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -2995,16 +3001,16 @@ }, { "name": "monolog/monolog", - "version": "2.3.5", + "version": "2.5.0", "source": { "type": "git", "url": "https://github.com/Seldaek/monolog.git", - "reference": "fd4380d6fc37626e2f799f29d91195040137eba9" + "reference": "4192345e260f1d51b365536199744b987e160edc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Seldaek/monolog/zipball/fd4380d6fc37626e2f799f29d91195040137eba9", - "reference": "fd4380d6fc37626e2f799f29d91195040137eba9", + "url": "https://api.github.com/repos/Seldaek/monolog/zipball/4192345e260f1d51b365536199744b987e160edc", + "reference": "4192345e260f1d51b365536199744b987e160edc", "shasum": "" }, "require": { @@ -3026,7 +3032,7 @@ "phpstan/phpstan": "^0.12.91", "phpunit/phpunit": "^8.5", "predis/predis": "^1.1", - "rollbar/rollbar": "^1.3", + "rollbar/rollbar": "^1.3 || ^2 || ^3", "ruflin/elastica": ">=0.90@dev", "swiftmailer/swiftmailer": "^5.3|^6.0" }, @@ -3078,7 +3084,7 @@ ], "support": { "issues": "https://github.com/Seldaek/monolog/issues", - "source": "https://github.com/Seldaek/monolog/tree/2.3.5" + "source": "https://github.com/Seldaek/monolog/tree/2.5.0" }, "funding": [ { @@ -3090,7 +3096,7 @@ "type": "tidelift" } ], - "time": "2021-10-01T21:08:31+00:00" + "time": "2022-04-08T15:43:54+00:00" }, { "name": "nikic/fast-route", @@ -3332,16 +3338,16 @@ }, { "name": "phpseclib/phpseclib", - "version": "3.0.13", + "version": "3.0.14", "source": { "type": "git", "url": "https://github.com/phpseclib/phpseclib.git", - "reference": "1443ab79364eea48665fa8c09ac67f37d1025f7e" + "reference": "2f0b7af658cbea265cbb4a791d6c29a6613f98ef" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpseclib/phpseclib/zipball/1443ab79364eea48665fa8c09ac67f37d1025f7e", - "reference": "1443ab79364eea48665fa8c09ac67f37d1025f7e", + "url": "https://api.github.com/repos/phpseclib/phpseclib/zipball/2f0b7af658cbea265cbb4a791d6c29a6613f98ef", + "reference": "2f0b7af658cbea265cbb4a791d6c29a6613f98ef", "shasum": "" }, "require": { @@ -3350,9 +3356,7 @@ "php": ">=5.6.1" }, "require-dev": { - "phing/phing": "~2.7", - "phpunit/phpunit": "^5.7|^6.0|^9.4", - "squizlabs/php_codesniffer": "~2.0" + "phpunit/phpunit": "*" }, "suggest": { "ext-gmp": "Install the GMP (GNU Multiple Precision) extension in order to speed up arbitrary precision integer arithmetic operations.", @@ -3423,7 +3427,7 @@ ], "support": { "issues": "https://github.com/phpseclib/phpseclib/issues", - "source": "https://github.com/phpseclib/phpseclib/tree/3.0.13" + "source": "https://github.com/phpseclib/phpseclib/tree/3.0.14" }, "funding": [ { @@ -3439,7 +3443,7 @@ "type": "tidelift" } ], - "time": "2022-01-30T08:50:05+00:00" + "time": "2022-04-04T05:15:45+00:00" }, { "name": "psr/http-factory", @@ -3601,7 +3605,7 @@ }, { "name": "symfony/polyfill-ctype", - "version": "v1.24.0", + "version": "v1.25.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-ctype.git", @@ -3633,12 +3637,12 @@ } }, "autoload": { - "psr-4": { - "Symfony\\Polyfill\\Ctype\\": "" - }, "files": [ "bootstrap.php" - ] + ], + "psr-4": { + "Symfony\\Polyfill\\Ctype\\": "" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -3663,7 +3667,7 @@ "portable" ], "support": { - "source": "https://github.com/symfony/polyfill-ctype/tree/v1.24.0" + "source": "https://github.com/symfony/polyfill-ctype/tree/v1.25.0" }, "funding": [ { @@ -3683,7 +3687,7 @@ }, { "name": "symfony/polyfill-mbstring", - "version": "v1.24.0", + "version": "v1.25.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-mbstring.git", @@ -3746,7 +3750,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.24.0" + "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.25.0" }, "funding": [ { @@ -3766,16 +3770,16 @@ }, { "name": "symfony/polyfill-php80", - "version": "v1.24.0", + "version": "v1.25.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php80.git", - "reference": "57b712b08eddb97c762a8caa32c84e037892d2e9" + "reference": "4407588e0d3f1f52efb65fbe92babe41f37fe50c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/57b712b08eddb97c762a8caa32c84e037892d2e9", - "reference": "57b712b08eddb97c762a8caa32c84e037892d2e9", + "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/4407588e0d3f1f52efb65fbe92babe41f37fe50c", + "reference": "4407588e0d3f1f52efb65fbe92babe41f37fe50c", "shasum": "" }, "require": { @@ -3829,7 +3833,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php80/tree/v1.24.0" + "source": "https://github.com/symfony/polyfill-php80/tree/v1.25.0" }, "funding": [ { @@ -3845,7 +3849,7 @@ "type": "tidelift" } ], - "time": "2021-09-13T13:58:33+00:00" + "time": "2022-03-04T08:16:47+00:00" }, { "name": "vlucas/phpdotenv", @@ -3933,34 +3937,40 @@ "source": { "type": "git", "url": "https://github.com/Roave/SecurityAdvisories.git", - "reference": "6ba1494c9aaa556dc45e13eaab644a280ad76558" + "reference": "dad1e44d86f958c5be9c5f355c9554ce22f1b1a7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Roave/SecurityAdvisories/zipball/6ba1494c9aaa556dc45e13eaab644a280ad76558", - "reference": "6ba1494c9aaa556dc45e13eaab644a280ad76558", + "url": "https://api.github.com/repos/Roave/SecurityAdvisories/zipball/dad1e44d86f958c5be9c5f355c9554ce22f1b1a7", + "reference": "dad1e44d86f958c5be9c5f355c9554ce22f1b1a7", "shasum": "" }, "conflict": { "3f/pygmentize": "<1.2", + "admidio/admidio": "<4.1.9", "adodb/adodb-php": "<=5.20.20|>=5.21,<=5.21.3", "akaunting/akaunting": "<2.1.13", + "alextselegidis/easyappointments": "<1.4.3", "alterphp/easyadmin-extension-bundle": ">=1.2,<1.2.11|>=1.3,<1.3.1", "amazing/media2click": ">=1,<1.3.3", "amphp/artax": "<1.0.6|>=2,<2.0.6", "amphp/http": "<1.0.1", "amphp/http-client": ">=4,<4.4", "anchorcms/anchor-cms": "<=0.12.7", + "andreapollastri/cipi": "<=3.1.15", "api-platform/core": ">=2.2,<2.2.10|>=2.3,<2.3.6", + "appwrite/server-ce": "<0.11.1|>=0.12,<0.12.2", "area17/twill": "<1.2.5|>=2,<2.5.3", "asymmetricrypt/asymmetricrypt": ">=0,<9.9.99", "aws/aws-sdk-php": ">=3,<3.2.1", "bagisto/bagisto": "<0.1.5", "barrelstrength/sprout-base-email": "<1.2.7", "barrelstrength/sprout-forms": "<3.9", + "barryvdh/laravel-translation-manager": "<0.6.2", "baserproject/basercms": "<4.5.4", "billz/raspap-webgui": "<=2.6.6", "bk2k/bootstrap-package": ">=7.1,<7.1.2|>=8,<8.0.8|>=9,<9.0.4|>=9.1,<9.1.3|>=10,<10.0.10|>=11,<11.0.3", + "bmarshall511/wordpress_zero_spam": "<5.2.13", "bolt/bolt": "<3.7.2", "bolt/core": "<4.1.13", "bottelet/flarepoint": "<2.2.1", @@ -3978,7 +3988,7 @@ "cesnet/simplesamlphp-module-proxystatistics": "<3.1", "codeception/codeception": "<3.1.3|>=4,<4.1.22", "codeigniter/framework": "<=3.0.6", - "codeigniter4/framework": "<4.1.8", + "codeigniter4/framework": "<4.1.9", "codiad/codiad": "<=2.8.4", "composer/composer": "<1.10.23|>=2-alpha.1,<2.1.9", "concrete5/concrete5": "<9", @@ -3987,8 +3997,10 @@ "contao/core": ">=2,<3.5.39", "contao/core-bundle": "<4.9.18|>=4.10,<4.11.7|= 4.10.0", "contao/listing-bundle": ">=4,<4.4.8", - "craftcms/cms": "<3.7.14", + "contao/managed-edition": "<=1.5", + "craftcms/cms": "<3.7.29", "croogo/croogo": "<3.0.7", + "cuyz/valinor": ">=0.5,<0.7", "datadog/dd-trace": ">=0.30,<0.30.2", "david-garcia/phpwhois": "<=4.3.1", "derhansen/sf_event_mgt": "<4.3.1|>=5,<5.1.1", @@ -4002,12 +4014,13 @@ "doctrine/mongodb-odm": ">=1,<1.0.2", "doctrine/mongodb-odm-bundle": ">=2,<3.0.1", "doctrine/orm": ">=2,<2.4.8|>=2.5,<2.5.1|>=2.8.3,<2.8.4", - "dolibarr/dolibarr": "<=14.0.5|>= 3.3.beta1, < 13.0.2", - "dompdf/dompdf": ">=0.6,<0.6.2", - "drupal/core": ">=7,<7.80|>=8,<8.9.16|>=9,<9.1.12|>=9.2,<9.2.4", + "dolibarr/dolibarr": "<16|>= 3.3.beta1, < 13.0.2", + "dompdf/dompdf": "<1.2.1", + "drupal/core": ">=7,<7.88|>=8,<9.2.13|>=9.3,<9.3.6", "drupal/drupal": ">=7,<7.80|>=8,<8.9.16|>=9,<9.1.12|>=9.2,<9.2.4", "dweeves/magmi": "<=0.7.24", "ecodev/newsletter": "<=4", + "ectouch/ectouch": "<=2.7.2", "elgg/elgg": "<3.3.24|>=4,<4.0.5", "endroid/qr-code-bundle": "<3.4.2", "enshrined/svg-sanitize": "<0.15", @@ -4018,9 +4031,9 @@ "ezsystems/ezdemo-ls-extension": ">=5.4,<5.4.2.1", "ezsystems/ezfind-ls": ">=5.3,<5.3.6.1|>=5.4,<5.4.11.1|>=2017.12,<2017.12.0.1", "ezsystems/ezplatform": "<=1.13.6|>=2,<=2.5.24", - "ezsystems/ezplatform-admin-ui": ">=1.3,<1.3.5|>=1.4,<1.4.6|>=1.5,<=1.5.25", + "ezsystems/ezplatform-admin-ui": ">=1.3,<1.3.5|>=1.4,<1.4.6|>=1.5,<1.5.27", "ezsystems/ezplatform-admin-ui-assets": ">=4,<4.2.1|>=5,<5.0.1|>=5.1,<5.1.1", - "ezsystems/ezplatform-kernel": "<=1.2.5|>=1.3,<=1.3.1", + "ezsystems/ezplatform-kernel": "<=1.2.5|>=1.3,<1.3.12", "ezsystems/ezplatform-rest": ">=1.2,<=1.2.2|>=1.3,<1.3.8", "ezsystems/ezplatform-richtext": ">=2.3,<=2.3.7", "ezsystems/ezplatform-user": ">=1,<1.0.1", @@ -4032,13 +4045,14 @@ "facade/ignition": "<1.16.15|>=2,<2.4.2|>=2.5,<2.5.2", "feehi/cms": "<=2.1.1", "feehi/feehicms": "<=0.1.3", + "fenom/fenom": "<=2.12.1", "firebase/php-jwt": "<2", "flarum/core": ">=1,<=1.0.1", "flarum/sticky": ">=0.1-beta.14,<=0.1-beta.15", "flarum/tags": "<=0.1-beta.13", "fluidtypo3/vhs": "<5.1.1", "fooman/tcpdf": "<6.2.22", - "forkcms/forkcms": "<=5.9.2", + "forkcms/forkcms": "<5.11.1", "fossar/tcpdf-parser": "<6.2.22", "francoisjacquet/rosariosis": "<8.1.1", "friendsofsymfony/oauth2-php": "<1.3", @@ -4048,7 +4062,8 @@ "froala/wysiwyg-editor": "<3.2.7", "fuel/core": "<1.8.1", "gaoming13/wechat-php-sdk": "<=1.10.2", - "getgrav/grav": "<1.7.28", + "genix/cms": "<=1.1.11", + "getgrav/grav": "<1.7.31", "getkirby/cms": "<3.5.8", "getkirby/panel": "<2.5.14", "gilacms/gila": "<=1.11.4", @@ -4059,10 +4074,12 @@ "gregwar/rst": "<1.0.3", "grumpydictator/firefly-iii": "<5.6.5", "guzzlehttp/guzzle": ">=4-rc.2,<4.2.4|>=5,<5.3.1|>=6,<6.2.1", + "guzzlehttp/psr7": "<1.8.4|>=2,<2.1.1", "helloxz/imgurl": "<=2.31", "hillelcoren/invoice-ninja": "<5.3.35", "hjue/justwriting": "<=1", "hov/jobfair": "<1.0.13|>=2,<2.0.2", + "hyn/multi-tenant": ">=5.6,<5.7.2", "ibexa/post-install": "<=1.0.4", "icecoder/icecoder": "<=8.1", "illuminate/auth": ">=4,<4.0.99|>=4.1,<=4.1.31|>=4.2,<=4.2.22|>=5,<=5.0.35|>=5.1,<=5.1.46|>=5.2,<=5.2.45|>=5.3,<=5.3.31|>=5.4,<=5.4.36|>=5.5,<5.5.10", @@ -4070,13 +4087,16 @@ "illuminate/database": "<6.20.26|>=7,<7.30.5|>=8,<8.40", "illuminate/encryption": ">=4,<=4.0.11|>=4.1,<=4.1.31|>=4.2,<=4.2.22|>=5,<=5.0.35|>=5.1,<=5.1.46|>=5.2,<=5.2.45|>=5.3,<=5.3.31|>=5.4,<=5.4.36|>=5.5,<5.5.40|>=5.6,<5.6.15", "illuminate/view": "<6.20.42|>=7,<7.30.6|>=8,<8.75", - "impresscms/impresscms": "<=1.4.2", + "impresscms/impresscms": "<=1.4.3", "in2code/femanager": "<5.5.1|>=6,<6.3.1", "intelliants/subrion": "<=4.2.1", "ivankristianto/phpwhois": "<=4.3", "jackalope/jackalope-doctrine-dbal": "<1.7.4", "james-heinrich/getid3": "<1.9.21", - "joomla/archive": "<1.1.10", + "joomla/archive": "<1.1.12|>=2,<2.0.1", + "joomla/filesystem": "<1.6.2|>=2,<2.0.1", + "joomla/filter": "<1.4.4|>=2,<2.0.1", + "joomla/input": ">=2,<2.0.2", "joomla/session": "<1.3.1", "jsdecena/laracom": "<2.0.9", "jsmitty12/phpwhois": "<5.1", @@ -4088,7 +4108,9 @@ "la-haute-societe/tcpdf": "<6.2.22", "laminas/laminas-form": "<2.17.1|>=3,<3.0.2|>=3.1,<3.1.1", "laminas/laminas-http": "<2.14.2", + "laravel/fortify": "<1.11.1", "laravel/framework": "<6.20.42|>=7,<7.30.6|>=8,<8.75", + "laravel/laravel": "<=5.8.38", "laravel/socialite": ">=1,<1.0.99|>=2,<2.0.10", "latte/latte": "<2.10.8", "lavalite/cms": "<=5.8", @@ -4096,7 +4118,7 @@ "league/commonmark": "<0.18.3", "league/flysystem": "<1.1.4|>=2,<2.1.1", "lexik/jwt-authentication-bundle": "<2.10.7|>=2.11,<2.11.3", - "librenms/librenms": "<22.2", + "librenms/librenms": "<22.2.2", "limesurvey/limesurvey": "<3.27.19", "livehelperchat/livehelperchat": "<=3.91", "livewire/livewire": ">2.2.4,<2.2.6", @@ -4107,14 +4129,15 @@ "magento/magento1ee": ">=1,<1.14.4.3", "magento/product-community-edition": ">=2,<2.2.10|>=2.3,<2.3.2-p.2", "marcwillmann/turn": "<0.3.3", - "mautic/core": "<4|= 2.13.1", + "matyhtf/framework": "<3.0.6", + "mautic/core": "<4.2|= 2.13.1", "mediawiki/core": ">=1.27,<1.27.6|>=1.29,<1.29.3|>=1.30,<1.30.2|>=1.31,<1.31.9|>=1.32,<1.32.6|>=1.32.99,<1.33.3|>=1.33.99,<1.34.3|>=1.34.99,<1.35", - "microweber/microweber": "<1.2.11", + "microweber/microweber": "<1.3", "miniorange/miniorange-saml": "<1.4.3", "mittwald/typo3_forum": "<1.2.1", - "modx/revolution": "<2.8", + "modx/revolution": "<= 2.8.3-pl|<2.8", "monolog/monolog": ">=1.8,<1.12", - "moodle/moodle": "<3.9.11|>=3.10-beta,<3.10.8|>=3.11,<3.11.5", + "moodle/moodle": "<3.9.13|>=3.10-beta,<3.10.10|>=3.11,<3.11.6", "mustache/mustache": ">=2,<2.14.1", "namshi/jose": "<2.2", "neoan3-apps/template": "<1.1.1", @@ -4127,15 +4150,16 @@ "nette/nette": ">=2,<2.0.19|>=2.1,<2.1.13", "nilsteampassnet/teampass": "<=2.1.27.36", "nukeviet/nukeviet": "<4.3.4", - "nystudio107/craft-seomatic": "<3.3", + "nystudio107/craft-seomatic": "<3.4.12", "nzo/url-encryptor-bundle": ">=4,<4.3.2|>=5,<5.0.1", "october/backend": "<1.1.2", "october/cms": "= 1.1.1|= 1.0.471|= 1.0.469|>=1.0.319,<1.0.469", "october/october": ">=1.0.319,<1.0.466|>=2.1,<2.1.12", "october/rain": "<1.0.472|>=1.1,<1.1.2", - "october/system": "<1.0.473|>=1.1,<1.1.6|>=2.1,<2.1.12", + "october/system": "<1.0.475|>=1.1,<1.1.11|>=2,<2.1.27", "onelogin/php-saml": "<2.10.4", "oneup/uploader-bundle": "<1.9.3|>=2,<2.1.5", + "open-web-analytics/open-web-analytics": "<1.7.4", "opencart/opencart": "<=3.0.3.2", "openid/php-openid": "<2.3", "openmage/magento-lts": "<19.4.15|>=20,<20.0.13", @@ -4149,22 +4173,25 @@ "passbolt/passbolt_api": "<2.11", "paypal/merchant-sdk-php": "<3.12", "pear/archive_tar": "<1.4.14", + "pear/crypt_gpg": "<1.6.7", "pegasus/google-for-jobs": "<1.5.1|>=2,<2.1.1", "personnummer/personnummer": "<3.0.2", "phanan/koel": "<5.1.4", "phpfastcache/phpfastcache": "<6.1.5|>=7,<7.1.2|>=8,<8.0.7", "phpmailer/phpmailer": "<6.5", "phpmussel/phpmussel": ">=1,<1.6", - "phpmyadmin/phpmyadmin": "<4.9.8|>=5,<5.0.3|>=5.1,<5.1.2", - "phpoffice/phpexcel": "<1.8.2", + "phpmyadmin/phpmyadmin": "<5.1.3", + "phpoffice/phpexcel": "<1.8", "phpoffice/phpspreadsheet": "<1.16", "phpseclib/phpseclib": "<2.0.31|>=3,<3.0.7", "phpservermon/phpservermon": "<=3.5.2", - "phpunit/phpunit": ">=4.8.19,<4.8.28|>=5.0.10,<5.6.3", + "phpunit/phpunit": ">=4.8.19,<4.8.28|>=5,<5.6.3", "phpwhois/phpwhois": "<=4.2.5", "phpxmlrpc/extras": "<0.6.1", - "pimcore/pimcore": "<10.3.1", - "pocketmine/pocketmine-mp": "<4.0.7", + "pimcore/data-hub": "<1.2.4", + "pimcore/pimcore": "<10.4", + "pocketmine/bedrock-protocol": "<8.0.2", + "pocketmine/pocketmine-mp": "<4.2.4", "pressbooks/pressbooks": "<5.18", "prestashop/autoupgrade": ">=4,<4.10.1", "prestashop/contactform": ">1.0.1,<4.3", @@ -4174,7 +4201,7 @@ "prestashop/ps_emailsubscription": "<2.6.1", "prestashop/ps_facetedsearch": "<3.4.1", "prestashop/ps_linklist": "<3.1", - "privatebin/privatebin": "<1.2.2|>=1.3,<1.3.2", + "privatebin/privatebin": "<1.4", "propel/propel": ">=2-alpha.1,<=2-alpha.7", "propel/propel1": ">=1,<=1.7.1", "pterodactyl/panel": "<1.7", @@ -4182,26 +4209,29 @@ "pusher/pusher-php-server": "<2.2.1", "pwweb/laravel-core": "<=0.3.6-beta", "rainlab/debugbar-plugin": "<3.1", - "remdex/livehelperchat": "<3.93", + "remdex/livehelperchat": "<3.96", "rmccue/requests": ">=1.6,<1.8", "robrichards/xmlseclibs": "<3.0.4", + "rudloff/alltube": "<3.0.3", + "s-cart/s-cart": "<6.7.2", "sabberworm/php-css-parser": ">=1,<1.0.1|>=2,<2.0.1|>=3,<3.0.1|>=4,<4.0.1|>=5,<5.0.9|>=5.1,<5.1.3|>=5.2,<5.2.1|>=6,<6.0.2|>=7,<7.0.4|>=8,<8.0.1|>=8.1,<8.1.1|>=8.2,<8.2.1|>=8.3,<8.3.1", "sabre/dav": ">=1.6,<1.6.99|>=1.7,<1.7.11|>=1.8,<1.8.9", "scheb/two-factor-bundle": ">=0,<3.26|>=4,<4.11", "sensiolabs/connect": "<4.2.3", "serluck/phpwhois": "<=4.2.6", - "shopware/core": "<=6.4.6", - "shopware/platform": "<=6.4.6", + "shopware/core": "<=6.4.8.1", + "shopware/platform": "<=6.4.8.1", "shopware/production": "<=6.3.5.2", "shopware/shopware": "<5.7.7", - "showdoc/showdoc": "<=2.10.2", + "shopware/storefront": "<=6.4.8.1", + "showdoc/showdoc": "<2.10.4", "silverstripe/admin": ">=1,<1.8.1", "silverstripe/assets": ">=1,<1.4.7|>=1.5,<1.5.2", "silverstripe/cms": "<4.3.6|>=4.4,<4.4.4", "silverstripe/comments": ">=1.3,<1.9.99|>=2,<2.9.99|>=3,<3.1.1", "silverstripe/forum": "<=0.6.1|>=0.7,<=0.7.3", "silverstripe/framework": "<4.10.1", - "silverstripe/graphql": "<3.5.2|>=4-alpha.1,<4-alpha.2", + "silverstripe/graphql": "<3.5.2|>=4-alpha.1,<4-alpha.2|= 4.0.0-alpha1", "silverstripe/registry": ">=2.1,<2.1.2|>=2.2,<2.2.1", "silverstripe/restfulserver": ">=1,<1.0.9|>=2,<2.0.4", "silverstripe/subsites": ">=2,<2.1.1", @@ -4214,13 +4244,14 @@ "simplito/elliptic-php": "<1.0.6", "slim/slim": "<2.6", "smarty/smarty": "<3.1.43|>=4,<4.0.3", - "snipe/snipe-it": "<5.3.10", + "snipe/snipe-it": "<5.4.2|>= 6.0.0-RC-1, <= 6.0.0-RC-5", "socalnick/scn-social-auth": "<1.15.2", "socialiteproviders/steam": "<1.1", "spipu/html2pdf": "<5.2.4", "spoonity/tcpdf": "<6.2.22", "squizlabs/php_codesniffer": ">=1,<2.8.1|>=3,<3.0.1", - "ssddanbrown/bookstack": "<21.12.1", + "ssddanbrown/bookstack": "<22.2.3", + "statamic/cms": "<3.2.39|>=3.3,<3.3.2", "stormpath/sdk": ">=0,<9.9.99", "studio-42/elfinder": "<2.1.59", "subrion/cms": "<=4.2.1", @@ -4228,10 +4259,10 @@ "swiftmailer/swiftmailer": ">=4,<5.4.5", "sylius/admin-bundle": ">=1,<1.0.17|>=1.1,<1.1.9|>=1.2,<1.2.2", "sylius/grid": ">=1,<1.1.19|>=1.2,<1.2.18|>=1.3,<1.3.13|>=1.4,<1.4.5|>=1.5,<1.5.1", - "sylius/grid-bundle": ">=1,<1.1.19|>=1.2,<1.2.18|>=1.3,<1.3.13|>=1.4,<1.4.5|>=1.5,<1.5.1", + "sylius/grid-bundle": "<1.10.1", "sylius/paypal-plugin": ">=1,<1.2.4|>=1.3,<1.3.1", "sylius/resource-bundle": "<1.3.14|>=1.4,<1.4.7|>=1.5,<1.5.2|>=1.6,<1.6.4", - "sylius/sylius": "<1.6.9|>=1.7,<1.7.9|>=1.8,<1.8.3|>=1.9,<1.9.5", + "sylius/sylius": "<1.9.10|>=1.10,<1.10.11|>=1.11,<1.11.2", "symbiote/silverstripe-multivaluefield": ">=3,<3.0.99", "symbiote/silverstripe-queuedjobs": ">=3,<3.0.2|>=3.1,<3.1.4|>=4,<4.0.7|>=4.1,<4.1.2|>=4.2,<4.2.4|>=4.3,<4.3.3|>=4.4,<4.4.3|>=4.5,<4.5.1|>=4.6,<4.6.4", "symbiote/silverstripe-versionedfiles": "<=2.0.3", @@ -4256,7 +4287,7 @@ "symfony/security-core": ">=2.4,<2.6.13|>=2.7,<2.7.9|>=2.7.30,<2.7.32|>=2.8,<3.4.49|>=4,<4.4.24|>=5,<5.2.9", "symfony/security-csrf": ">=2.4,<2.7.48|>=2.8,<2.8.41|>=3,<3.3.17|>=3.4,<3.4.11|>=4,<4.0.11", "symfony/security-guard": ">=2.8,<3.4.48|>=4,<4.4.23|>=5,<5.2.8", - "symfony/security-http": ">=2.3,<2.3.41|>=2.4,<2.7.51|>=2.8,<3.4.48|>=4,<4.4.23|>=5,<5.2.8|>=5.3,<5.3.2", + "symfony/security-http": ">=2.3,<2.3.41|>=2.4,<2.7.51|>=2.8,<2.8.50|>=3,<3.4.26|>=4,<4.2.12|>=4.3,<4.3.8|>=4.4,<4.4.7|>=5,<5.0.7|>=5.1,<5.2.8|>=5.3,<5.3.2", "symfony/serializer": ">=2,<2.0.11|>=4.1,<4.4.35|>=5,<5.3.12", "symfony/symfony": ">=2,<3.4.49|>=4,<4.4.35|>=5,<5.3.12|>=5.3.14,<=5.3.14|>=5.4.3,<=5.4.3|>=6.0.3,<=6.0.3", "symfony/translation": ">=2,<2.0.17", @@ -4266,6 +4297,7 @@ "symfony/yaml": ">=2,<2.0.22|>=2.1,<2.1.7", "t3/dce": ">=2.2,<2.6.2", "t3g/svg-sanitizer": "<1.0.3", + "tastyigniter/tastyigniter": "<3.3", "tecnickcom/tcpdf": "<6.2.22", "terminal42/contao-tablelookupwizard": "<3.3.5", "thelia/backoffice-default-template": ">=2.1,<2.1.2", @@ -4276,7 +4308,7 @@ "topthink/framework": "<6.0.9", "topthink/think": "<=6.0.9", "topthink/thinkphp": "<=3.2.3", - "tribalsystems/zenario": "<8.8.53370", + "tribalsystems/zenario": "<9.2.55826", "truckersmp/phpwhois": "<=4.3.1", "twig/twig": "<1.38|>=2,<2.14.11|>=3,<3.3.8", "typo3/cms": ">=6.2,<6.2.30|>=7,<7.6.32|>=8,<8.7.38|>=9,<9.5.29|>=10,<10.4.19|>=11,<11.5", @@ -4294,7 +4326,7 @@ "usmanhalalit/pixie": "<1.0.3|>=2,<2.0.2", "vanilla/safecurl": "<0.9.2", "verot/class.upload.php": "<=1.0.3|>=2,<=2.0.4", - "vrana/adminer": "<4.7.9", + "vrana/adminer": "<4.8.1", "wallabag/tcpdf": "<6.2.22", "wanglelecc/laracms": "<=1.0.3", "web-auth/webauthn-framework": ">=3.3,<3.3.4", @@ -4302,6 +4334,9 @@ "wikimedia/parsoid": "<0.12.2", "willdurand/js-translation-bundle": "<2.1.1", "wp-cli/wp-cli": "<2.5", + "wpanel/wpanel4-cms": "<=4.3.1", + "wwbn/avideo": "<=11.6", + "yeswiki/yeswiki": "<4.1", "yetiforce/yetiforce-crm": "<=6.3", "yidashi/yii2cmf": "<=2", "yii2mod/yii2-cms": "<1.9.2", @@ -4375,7 +4410,7 @@ "type": "tidelift" } ], - "time": "2022-02-17T14:18:41+00:00" + "time": "2022-04-14T16:08:49+00:00" } ], "aliases": [], @@ -4387,11 +4422,11 @@ "prefer-stable": true, "prefer-lowest": false, "platform": { - "php": "~8.0", + "php": "~8.1", "ext-json": "*", "ext-mbstring": "*", "ext-pcntl": "*" }, "platform-dev": [], - "plugin-api-version": "2.2.0" + "plugin-api-version": "2.3.0" } diff --git a/docker-compose.yml b/docker-compose.yml index c252e6f..dd13fcd 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,7 +1,10 @@ -version: '3.5' +version: '2.4' services: telegram-api-server: image: xtrime/telegram-api-server:latest + build: + context: . + dockerfile: Dockerfile container_name: telegram-api-server restart: unless-stopped ports: @@ -19,7 +22,7 @@ services: max-size: "1024k" max-file: "2" mysql: - image: mariadb:10.6 + image: mariadb:10.7 container_name: telegram-api-server-mysql restart: unless-stopped ports: diff --git a/src/Controllers/AbstractApiController.php b/src/Controllers/AbstractApiController.php index 72d6476..db88db2 100644 --- a/src/Controllers/AbstractApiController.php +++ b/src/Controllers/AbstractApiController.php @@ -15,6 +15,7 @@ use TelegramApiServer\Logger; use TelegramApiServer\MadelineProtoExtensions\ApiExtensions; use TelegramApiServer\MadelineProtoExtensions\SystemApiExtensions; +use function mb_strpos; abstract class AbstractApiController { @@ -65,7 +66,7 @@ public function __construct(Request $request, string $extensionClass) /** * @param Request $request - * @return ResourceInputStream|string + * @return \Generator|Response|string * @throws \Throwable */ public function process() @@ -202,7 +203,7 @@ private function setError(\Throwable $e): self /** * Кодирует ответ в нужный формат: json * - * @return string|ResourceInputStream + * @return Response|string * @throws \Throwable */ private function getResponse() From afc83e3fb83b85906ff977bd1a387b5c8c6bdbeb Mon Sep 17 00:00:00 2001 From: Alexander Pankratov Date: Mon, 18 Apr 2022 01:50:39 +0300 Subject: [PATCH 016/270] Fix php8.1 deprecation notices --- src/Controllers/AbstractApiController.php | 2 +- src/MadelineProtoExtensions/ApiExtensions.php | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/Controllers/AbstractApiController.php b/src/Controllers/AbstractApiController.php index db88db2..3db94b5 100644 --- a/src/Controllers/AbstractApiController.php +++ b/src/Controllers/AbstractApiController.php @@ -85,7 +85,7 @@ public function process() private function resolveRequest(): \Generator { $query = $this->request->getUri()->getQuery(); - $contentType = $this->request->getHeader('Content-Type'); + $contentType = (string)$this->request->getHeader('Content-Type'); parse_str($query, $get); diff --git a/src/MadelineProtoExtensions/ApiExtensions.php b/src/MadelineProtoExtensions/ApiExtensions.php index 3e00fd3..28825b3 100644 --- a/src/MadelineProtoExtensions/ApiExtensions.php +++ b/src/MadelineProtoExtensions/ApiExtensions.php @@ -115,8 +115,11 @@ private static function hasMedia(array $message = [], bool $allowWebPage = false return true; } - public function formatMessage(string $message = null, array $entities = []): ?string + public function formatMessage(?string $message = null, array $entities = []): ?string { + if ($message === null) { + return null; + } $html = [ 'messageEntityItalic' => '%s', 'messageEntityBold' => '%s', From f76913409d079de779c937c95d7b65d971f6dfa7 Mon Sep 17 00:00:00 2001 From: Alexander Pankratov Date: Mon, 16 May 2022 00:28:51 +0300 Subject: [PATCH 017/270] Update madelineProto --- composer.lock | 109 ++++++++++++++++++++++++++++++-------------------- 1 file changed, 65 insertions(+), 44 deletions(-) diff --git a/composer.lock b/composer.lock index 944a106..566a7b0 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "26fa6a95dadc934938c13f39976e5391", + "content-hash": "a0e9091df5fdf3da55db5aaa29b01fb5", "packages": [ { "name": "amphp/amp", @@ -818,16 +818,16 @@ }, { "name": "amphp/http-server-form-parser", - "version": "v1.1.4", + "version": "v1.1.5", "source": { "type": "git", "url": "https://github.com/amphp/http-server-form-parser.git", - "reference": "657d945ebc4d5a3b1ea7b1d25c52fb2fdb118f1d" + "reference": "b20cedbdcf87c19816e7f8cb4f992655599dad41" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/amphp/http-server-form-parser/zipball/657d945ebc4d5a3b1ea7b1d25c52fb2fdb118f1d", - "reference": "657d945ebc4d5a3b1ea7b1d25c52fb2fdb118f1d", + "url": "https://api.github.com/repos/amphp/http-server-form-parser/zipball/b20cedbdcf87c19816e7f8cb4f992655599dad41", + "reference": "b20cedbdcf87c19816e7f8cb4f992655599dad41", "shasum": "" }, "require": { @@ -885,9 +885,15 @@ ], "support": { "issues": "https://github.com/amphp/http-server-form-parser/issues", - "source": "https://github.com/amphp/http-server-form-parser/tree/master" + "source": "https://github.com/amphp/http-server-form-parser/tree/v1.1.5" }, - "time": "2020-03-24T20:17:15+00:00" + "funding": [ + { + "url": "https://github.com/amphp", + "type": "github" + } + ], + "time": "2022-04-11T13:31:54+00:00" }, { "name": "amphp/http-server-router", @@ -2347,12 +2353,12 @@ "source": { "type": "git", "url": "https://github.com/danog/MadelineProto.git", - "reference": "25a509ff2e246983823297367eee86bc70c6e2b5" + "reference": "1f55447a3ab19db44acce441685e31789de5ca6b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/danog/MadelineProto/zipball/25a509ff2e246983823297367eee86bc70c6e2b5", - "reference": "25a509ff2e246983823297367eee86bc70c6e2b5", + "url": "https://api.github.com/repos/danog/MadelineProto/zipball/1f55447a3ab19db44acce441685e31789de5ca6b", + "reference": "1f55447a3ab19db44acce441685e31789de5ca6b", "shasum": "" }, "require": { @@ -2409,8 +2415,10 @@ "ext-gmp": "Install the gmp extension for faster crypto", "ext-libtgvoip": "Install the php-libtgvoip extension to make phone calls (https://github.com/danog/php-libtgvoip)", "ext-openssl": "Install the openssl extension for faster crypto", - "ext-pdo": "Install pdo extension to support database used as cache" + "ext-pdo": "Install pdo extension to support database used as cache", + "ext-primemodule": "Install the primemodule FFI extension to make phone calls (https://prime.madelineproto.xyz)" }, + "default-branch": true, "type": "project", "extra": { "phabel": { @@ -2455,7 +2463,7 @@ ], "support": { "issues": "https://github.com/danog/MadelineProto/issues", - "source": "https://github.com/danog/MadelineProto/tree/7.0.59" + "source": "https://github.com/danog/MadelineProto/tree/stable" }, "funding": [ { @@ -2463,7 +2471,7 @@ "type": "github" } ], - "time": "2022-02-28T16:31:32+00:00" + "time": "2022-05-15T20:29:55+00:00" }, { "name": "danog/magicalserializer", @@ -3001,16 +3009,16 @@ }, { "name": "monolog/monolog", - "version": "2.5.0", + "version": "2.6.0", "source": { "type": "git", "url": "https://github.com/Seldaek/monolog.git", - "reference": "4192345e260f1d51b365536199744b987e160edc" + "reference": "247918972acd74356b0a91dfaa5adcaec069b6c0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Seldaek/monolog/zipball/4192345e260f1d51b365536199744b987e160edc", - "reference": "4192345e260f1d51b365536199744b987e160edc", + "url": "https://api.github.com/repos/Seldaek/monolog/zipball/247918972acd74356b0a91dfaa5adcaec069b6c0", + "reference": "247918972acd74356b0a91dfaa5adcaec069b6c0", "shasum": "" }, "require": { @@ -3023,18 +3031,23 @@ "require-dev": { "aws/aws-sdk-php": "^2.4.9 || ^3.0", "doctrine/couchdb": "~1.0@dev", - "elasticsearch/elasticsearch": "^7", + "elasticsearch/elasticsearch": "^7 || ^8", + "ext-json": "*", "graylog2/gelf-php": "^1.4.2", + "guzzlehttp/guzzle": "^7.4", + "guzzlehttp/psr7": "^2.2", "mongodb/mongodb": "^1.8", "php-amqplib/php-amqplib": "~2.4 || ^3", "php-console/php-console": "^3.1.3", - "phpspec/prophecy": "^1.6.1", + "phpspec/prophecy": "^1.15", "phpstan/phpstan": "^0.12.91", - "phpunit/phpunit": "^8.5", + "phpunit/phpunit": "^8.5.14", "predis/predis": "^1.1", "rollbar/rollbar": "^1.3 || ^2 || ^3", - "ruflin/elastica": ">=0.90@dev", - "swiftmailer/swiftmailer": "^5.3|^6.0" + "ruflin/elastica": "^7", + "swiftmailer/swiftmailer": "^5.3|^6.0", + "symfony/mailer": "^5.4 || ^6", + "symfony/mime": "^5.4 || ^6" }, "suggest": { "aws/aws-sdk-php": "Allow sending log messages to AWS services like DynamoDB", @@ -3084,7 +3097,7 @@ ], "support": { "issues": "https://github.com/Seldaek/monolog/issues", - "source": "https://github.com/Seldaek/monolog/tree/2.5.0" + "source": "https://github.com/Seldaek/monolog/tree/2.6.0" }, "funding": [ { @@ -3096,7 +3109,7 @@ "type": "tidelift" } ], - "time": "2022-04-08T15:43:54+00:00" + "time": "2022-05-10T09:36:00+00:00" }, { "name": "nikic/fast-route", @@ -3937,12 +3950,12 @@ "source": { "type": "git", "url": "https://github.com/Roave/SecurityAdvisories.git", - "reference": "dad1e44d86f958c5be9c5f355c9554ce22f1b1a7" + "reference": "2ed308386e65cafaadd54723f5b57775374c2ae8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Roave/SecurityAdvisories/zipball/dad1e44d86f958c5be9c5f355c9554ce22f1b1a7", - "reference": "dad1e44d86f958c5be9c5f355c9554ce22f1b1a7", + "url": "https://api.github.com/repos/Roave/SecurityAdvisories/zipball/2ed308386e65cafaadd54723f5b57775374c2ae8", + "reference": "2ed308386e65cafaadd54723f5b57775374c2ae8", "shasum": "" }, "conflict": { @@ -3972,14 +3985,14 @@ "bk2k/bootstrap-package": ">=7.1,<7.1.2|>=8,<8.0.8|>=9,<9.0.4|>=9.1,<9.1.3|>=10,<10.0.10|>=11,<11.0.3", "bmarshall511/wordpress_zero_spam": "<5.2.13", "bolt/bolt": "<3.7.2", - "bolt/core": "<4.1.13", + "bolt/core": "<=4.2", "bottelet/flarepoint": "<2.2.1", "brightlocal/phpwhois": "<=4.2.5", "buddypress/buddypress": "<7.2.1", "bugsnag/bugsnag-laravel": ">=2,<2.0.2", "bytefury/crater": "<6.0.2", "cachethq/cachet": "<2.5.1", - "cakephp/cakephp": "<4.0.6", + "cakephp/cakephp": "<3.10.3|>=4,<4.0.6", "cardgate/magento2": "<2.0.33", "cart2quote/module-quotation": ">=4.1.6,<=4.4.5|>=5,<5.4.4", "cartalyst/sentry": "<=2.1.6", @@ -3990,17 +4003,20 @@ "codeigniter/framework": "<=3.0.6", "codeigniter4/framework": "<4.1.9", "codiad/codiad": "<=2.8.4", - "composer/composer": "<1.10.23|>=2-alpha.1,<2.1.9", + "composer/composer": "<1.10.26|>=2-alpha.1,<2.2.12|>=2.3,<2.3.5", "concrete5/concrete5": "<9", "concrete5/core": "<8.5.7", "contao-components/mediaelement": ">=2.14.2,<2.21.1", + "contao/contao": ">=4,<4.4.56|>=4.5,<4.9.18|>=4.10,<4.11.7|>=4.13,<4.13.3", "contao/core": ">=2,<3.5.39", - "contao/core-bundle": "<4.9.18|>=4.10,<4.11.7|= 4.10.0", + "contao/core-bundle": "<4.9.18|>=4.10,<4.11.7|>=4.13,<4.13.3|= 4.10.0", "contao/listing-bundle": ">=4,<4.4.8", "contao/managed-edition": "<=1.5", "craftcms/cms": "<3.7.29", "croogo/croogo": "<3.0.7", "cuyz/valinor": ">=0.5,<0.7", + "czproject/git-php": "<4.0.3", + "darylldoyle/safe-svg": "<1.9.10", "datadog/dd-trace": ">=0.30,<0.30.2", "david-garcia/phpwhois": "<=4.3.1", "derhansen/sf_event_mgt": "<4.3.1|>=5,<5.1.1", @@ -4033,16 +4049,17 @@ "ezsystems/ezplatform": "<=1.13.6|>=2,<=2.5.24", "ezsystems/ezplatform-admin-ui": ">=1.3,<1.3.5|>=1.4,<1.4.6|>=1.5,<1.5.27", "ezsystems/ezplatform-admin-ui-assets": ">=4,<4.2.1|>=5,<5.0.1|>=5.1,<5.1.1", - "ezsystems/ezplatform-kernel": "<=1.2.5|>=1.3,<1.3.12", + "ezsystems/ezplatform-kernel": "<=1.2.5|>=1.3,<1.3.17", "ezsystems/ezplatform-rest": ">=1.2,<=1.2.2|>=1.3,<1.3.8", "ezsystems/ezplatform-richtext": ">=2.3,<=2.3.7", "ezsystems/ezplatform-user": ">=1,<1.0.1", - "ezsystems/ezpublish-kernel": "<=6.13.8.1|>=7,<7.5.26", + "ezsystems/ezpublish-kernel": "<=6.13.8.1|>=7,<7.5.28", "ezsystems/ezpublish-legacy": "<=2017.12.7.3|>=2018.6,<=2019.3.5.1", "ezsystems/platform-ui-assets-bundle": ">=4.2,<4.2.3", "ezsystems/repository-forms": ">=2.3,<2.3.2.1", "ezyang/htmlpurifier": "<4.1.1", "facade/ignition": "<1.16.15|>=2,<2.4.2|>=2.5,<2.5.2", + "facturascripts/facturascripts": "<2022.6", "feehi/cms": "<=2.1.1", "feehi/feehicms": "<=0.1.3", "fenom/fenom": "<=2.12.1", @@ -4060,6 +4077,7 @@ "friendsofsymfony/user-bundle": ">=1.2,<1.3.5", "friendsoftypo3/mediace": ">=7.6.2,<7.6.5", "froala/wysiwyg-editor": "<3.2.7", + "froxlor/froxlor": "<=0.10.22", "fuel/core": "<1.8.1", "gaoming13/wechat-php-sdk": "<=1.10.2", "genix/cms": "<=1.1.11", @@ -4080,6 +4098,7 @@ "hjue/justwriting": "<=1", "hov/jobfair": "<1.0.13|>=2,<2.0.2", "hyn/multi-tenant": ">=5.6,<5.7.2", + "ibexa/core": ">=4,<4.0.5|>=4.1,<4.1.2", "ibexa/post-install": "<=1.0.4", "icecoder/icecoder": "<=8.1", "illuminate/auth": ">=4,<4.0.99|>=4.1,<=4.1.31|>=4.2,<=4.2.22|>=5,<=5.0.35|>=5.1,<=5.1.46|>=5.2,<=5.2.45|>=5.3,<=5.3.31|>=5.4,<=5.4.36|>=5.5,<5.5.10", @@ -4124,6 +4143,7 @@ "livewire/livewire": ">2.2.4,<2.2.6", "lms/routes": "<2.1.1", "localizationteam/l10nmgr": "<7.4|>=8,<8.7|>=9,<9.2", + "luyadev/yii-helpers": "<1.2.1", "magento/community-edition": ">=2,<2.2.10|>=2.3,<2.3.3", "magento/magento1ce": "<1.9.4.3", "magento/magento1ee": ">=1,<1.14.4.3", @@ -4141,6 +4161,7 @@ "mustache/mustache": ">=2,<2.14.1", "namshi/jose": "<2.2", "neoan3-apps/template": "<1.1.1", + "neorazorx/facturascripts": "<2022.4", "neos/flow": ">=1,<1.0.4|>=1.1,<1.1.1|>=2,<2.0.1|>=2.3,<2.3.16|>=3,<3.0.12|>=3.1,<3.1.10|>=3.2,<3.2.13|>=3.3,<3.3.13|>=4,<4.0.6", "neos/form": ">=1.2,<4.3.3|>=5,<5.0.9|>=5.1,<5.1.3", "neos/neos": ">=1.1,<1.1.3|>=1.2,<1.2.13|>=2,<2.0.4|>=2.3,<2.9.99|>=3,<3.0.20|>=3.1,<3.1.18|>=3.2,<3.2.14|>=3.3,<3.3.23|>=4,<4.0.17|>=4.1,<4.1.16|>=4.2,<4.2.12|>=4.3,<4.3.3", @@ -4191,7 +4212,7 @@ "pimcore/data-hub": "<1.2.4", "pimcore/pimcore": "<10.4", "pocketmine/bedrock-protocol": "<8.0.2", - "pocketmine/pocketmine-mp": "<4.2.4", + "pocketmine/pocketmine-mp": "<4.2.9", "pressbooks/pressbooks": "<5.18", "prestashop/autoupgrade": ">=4,<4.10.1", "prestashop/contactform": ">1.0.1,<4.3", @@ -4209,7 +4230,7 @@ "pusher/pusher-php-server": "<2.2.1", "pwweb/laravel-core": "<=0.3.6-beta", "rainlab/debugbar-plugin": "<3.1", - "remdex/livehelperchat": "<3.96", + "remdex/livehelperchat": "<3.99", "rmccue/requests": ">=1.6,<1.8", "robrichards/xmlseclibs": "<3.0.4", "rudloff/alltube": "<3.0.3", @@ -4219,10 +4240,10 @@ "scheb/two-factor-bundle": ">=0,<3.26|>=4,<4.11", "sensiolabs/connect": "<4.2.3", "serluck/phpwhois": "<=4.2.6", - "shopware/core": "<=6.4.8.1", - "shopware/platform": "<=6.4.8.1", + "shopware/core": "<=6.4.9", + "shopware/platform": "<=6.4.9", "shopware/production": "<=6.3.5.2", - "shopware/shopware": "<5.7.7", + "shopware/shopware": "<5.7.9", "shopware/storefront": "<=6.4.8.1", "showdoc/showdoc": "<2.10.4", "silverstripe/admin": ">=1,<1.8.1", @@ -4244,7 +4265,7 @@ "simplito/elliptic-php": "<1.0.6", "slim/slim": "<2.6", "smarty/smarty": "<3.1.43|>=4,<4.0.3", - "snipe/snipe-it": "<5.4.2|>= 6.0.0-RC-1, <= 6.0.0-RC-5", + "snipe/snipe-it": "<5.4.3|>= 6.0.0-RC-1, <= 6.0.0-RC-5", "socalnick/scn-social-auth": "<1.15.2", "socialiteproviders/steam": "<1.1", "spipu/html2pdf": "<5.2.4", @@ -4356,10 +4377,10 @@ "zendframework/zend-crypt": ">=2,<2.4.9|>=2.5,<2.5.2", "zendframework/zend-db": ">=2,<2.0.99|>=2.1,<2.1.99|>=2.2,<2.2.10|>=2.3,<2.3.5", "zendframework/zend-developer-tools": ">=1.2.2,<1.2.3", - "zendframework/zend-diactoros": ">=1,<1.8.4", - "zendframework/zend-feed": ">=1,<2.10.3", + "zendframework/zend-diactoros": "<1.8.4", + "zendframework/zend-feed": "<2.10.3", "zendframework/zend-form": ">=2,<2.2.7|>=2.3,<2.3.1", - "zendframework/zend-http": ">=1,<2.8.1", + "zendframework/zend-http": "<2.8.1", "zendframework/zend-json": ">=2.1,<2.1.6|>=2.2,<2.2.6", "zendframework/zend-ldap": ">=2,<2.0.99|>=2.1,<2.1.99|>=2.2,<2.2.8|>=2.3,<2.3.3", "zendframework/zend-mail": ">=2,<2.4.11|>=2.5,<2.7.2", @@ -4410,7 +4431,7 @@ "type": "tidelift" } ], - "time": "2022-04-14T16:08:49+00:00" + "time": "2022-05-11T11:06:18+00:00" } ], "aliases": [], @@ -4422,7 +4443,7 @@ "prefer-stable": true, "prefer-lowest": false, "platform": { - "php": "~8.1", + "php": "~8.0|~8.1", "ext-json": "*", "ext-mbstring": "*", "ext-pcntl": "*" From bbfa7f07f0603c9d96cb4c9ad9185d348baa1770 Mon Sep 17 00:00:00 2001 From: Alexander Pankratov Date: Sun, 5 Jun 2022 01:21:08 +0300 Subject: [PATCH 018/270] Update websocket module & example --- composer.lock | 223 ++++++++++++++++++--------- examples/websocket-events.php | 19 ++- src/Controllers/EventsController.php | 20 +-- src/EventObservers/EventHandler.php | 5 +- 4 files changed, 176 insertions(+), 91 deletions(-) diff --git a/composer.lock b/composer.lock index 566a7b0..e2a373a 100644 --- a/composer.lock +++ b/composer.lock @@ -2353,12 +2353,12 @@ "source": { "type": "git", "url": "https://github.com/danog/MadelineProto.git", - "reference": "1f55447a3ab19db44acce441685e31789de5ca6b" + "reference": "725f75e1506d57dde94f00b91b22bd6693d69755" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/danog/MadelineProto/zipball/1f55447a3ab19db44acce441685e31789de5ca6b", - "reference": "1f55447a3ab19db44acce441685e31789de5ca6b", + "url": "https://api.github.com/repos/danog/MadelineProto/zipball/725f75e1506d57dde94f00b91b22bd6693d69755", + "reference": "725f75e1506d57dde94f00b91b22bd6693d69755", "shasum": "" }, "require": { @@ -2395,7 +2395,8 @@ "psr/http-factory": "^1.0", "psr/log": "^1", "symfony/polyfill-mbstring": "*", - "symfony/polyfill-php80": "^1.18" + "symfony/polyfill-php80": "^1.18", + "webmozart/assert": "^1.10" }, "conflict": { "ext-pthreads": "*", @@ -2412,11 +2413,11 @@ "symfony/yaml": "^6.0" }, "suggest": { + "ext-ffi": "Install the primemodule and FFI extensions to speed up MadelineProto (https://prime.madelineproto.xyz)", "ext-gmp": "Install the gmp extension for faster crypto", - "ext-libtgvoip": "Install the php-libtgvoip extension to make phone calls (https://github.com/danog/php-libtgvoip)", "ext-openssl": "Install the openssl extension for faster crypto", "ext-pdo": "Install pdo extension to support database used as cache", - "ext-primemodule": "Install the primemodule FFI extension to make phone calls (https://prime.madelineproto.xyz)" + "ext-primemodule": "Install the primemodule and FFI extensions to speed up MadelineProto (https://prime.madelineproto.xyz)" }, "default-branch": true, "type": "project", @@ -2428,7 +2429,6 @@ "autoload": { "files": [ "src/BigIntegor.php", - "src/YieldReturnValue.php", "src/polyfill.php" ], "psr-4": { @@ -2463,7 +2463,7 @@ ], "support": { "issues": "https://github.com/danog/MadelineProto/issues", - "source": "https://github.com/danog/MadelineProto/tree/stable" + "source": "https://github.com/danog/MadelineProto/tree/7.0.91.9999" }, "funding": [ { @@ -2471,7 +2471,7 @@ "type": "github" } ], - "time": "2022-05-15T20:29:55+00:00" + "time": "2022-06-04T19:23:34+00:00" }, { "name": "danog/magicalserializer", @@ -2520,25 +2520,33 @@ }, { "name": "danog/primemodule", - "version": "1.0.7", + "version": "1.0.10.9999", "source": { "type": "git", "url": "https://github.com/danog/PrimeModule.git", - "reference": "371cf2521dc665875cac5765259240c0666de69c" + "reference": "dadd3fa2693425f2b7feee5bb717d79b1af42b80" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/danog/PrimeModule/zipball/371cf2521dc665875cac5765259240c0666de69c", - "reference": "371cf2521dc665875cac5765259240c0666de69c", + "url": "https://api.github.com/repos/danog/PrimeModule/zipball/dadd3fa2693425f2b7feee5bb717d79b1af42b80", + "reference": "dadd3fa2693425f2b7feee5bb717d79b1af42b80", "shasum": "" }, "require": { - "php": ">=7.0" + "php": "^8.0" + }, + "require-dev": { + "phabel/phabel": "^1" }, "suggest": { - "ext-primemodule": "Install the native C++ extension for extremely fast factorization (https://github.com/danog/PrimeModule-ext)" + "ext-primemodule": "Install the native C++ extension for extremely fast factorization (https://prime.madelineproto.xyz)" }, "type": "library", + "extra": { + "phabel": { + "revision": 0 + } + }, "autoload": { "psr-0": { "danog\\": "lib/" @@ -2557,9 +2565,9 @@ "description": "Prime module capable of doing prime factorization of huge numbers very quickly.\"", "support": { "issues": "https://github.com/danog/PrimeModule/issues", - "source": "https://github.com/danog/PrimeModule/tree/1.0.7" + "source": "https://github.com/danog/PrimeModule/tree/1.0.10.9999" }, - "time": "2021-10-24T16:51:03+00:00" + "time": "2022-05-22T12:28:02+00:00" }, { "name": "danog/tg-file-decoder", @@ -2773,33 +2781,35 @@ }, { "name": "league/uri", - "version": "6.5.0", + "version": "6.6.0", "source": { "type": "git", "url": "https://github.com/thephpleague/uri.git", - "reference": "c68ca445abb04817d740ddd6d0b3551826ef0c5a" + "reference": "4147f19b9de3b5af6a258f35d7a0efbbf9963298" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thephpleague/uri/zipball/c68ca445abb04817d740ddd6d0b3551826ef0c5a", - "reference": "c68ca445abb04817d740ddd6d0b3551826ef0c5a", + "url": "https://api.github.com/repos/thephpleague/uri/zipball/4147f19b9de3b5af6a258f35d7a0efbbf9963298", + "reference": "4147f19b9de3b5af6a258f35d7a0efbbf9963298", "shasum": "" }, "require": { "ext-json": "*", "league/uri-interfaces": "^2.3", - "php": "^7.3 || ^8.0", + "php": "^7.4 || ^8.0", "psr/http-message": "^1.0" }, "conflict": { "league/uri-schemes": "^1.0" }, "require-dev": { - "friendsofphp/php-cs-fixer": "^2.19 || ^3.0", - "phpstan/phpstan": "^0.12.90", - "phpstan/phpstan-phpunit": "^0.12.22", - "phpstan/phpstan-strict-rules": "^0.12.11", - "phpunit/phpunit": "^8.0 || ^9.0", + "friendsofphp/php-cs-fixer": "^v3.3.2", + "php-http/psr7-integration-tests": "^1.1", + "phpstan/phpstan": "^1.2.0", + "phpstan/phpstan-deprecation-rules": "^1.0", + "phpstan/phpstan-phpunit": "^1.0.0", + "phpstan/phpstan-strict-rules": "^1.1.0", + "phpunit/phpunit": "^9.5.10", "psr/http-factory": "^1.0" }, "suggest": { @@ -2831,7 +2841,7 @@ } ], "description": "URI manipulation library", - "homepage": "http://uri.thephpleague.com", + "homepage": "https://uri.thephpleague.com", "keywords": [ "data-uri", "file-uri", @@ -2857,7 +2867,7 @@ "docs": "https://uri.thephpleague.com", "forum": "https://thephpleague.slack.com", "issues": "https://github.com/thephpleague/uri/issues", - "source": "https://github.com/thephpleague/uri/tree/6.5.0" + "source": "https://github.com/thephpleague/uri/tree/6.6.0" }, "funding": [ { @@ -2865,7 +2875,7 @@ "type": "github" } ], - "time": "2021-08-27T09:54:07+00:00" + "time": "2022-05-28T05:44:35+00:00" }, { "name": "league/uri-interfaces", @@ -3618,16 +3628,16 @@ }, { "name": "symfony/polyfill-ctype", - "version": "v1.25.0", + "version": "v1.26.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-ctype.git", - "reference": "30885182c981ab175d4d034db0f6f469898070ab" + "reference": "6fd1b9a79f6e3cf65f9e679b23af304cd9e010d4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/30885182c981ab175d4d034db0f6f469898070ab", - "reference": "30885182c981ab175d4d034db0f6f469898070ab", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/6fd1b9a79f6e3cf65f9e679b23af304cd9e010d4", + "reference": "6fd1b9a79f6e3cf65f9e679b23af304cd9e010d4", "shasum": "" }, "require": { @@ -3642,7 +3652,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.23-dev" + "dev-main": "1.26-dev" }, "thanks": { "name": "symfony/polyfill", @@ -3680,7 +3690,7 @@ "portable" ], "support": { - "source": "https://github.com/symfony/polyfill-ctype/tree/v1.25.0" + "source": "https://github.com/symfony/polyfill-ctype/tree/v1.26.0" }, "funding": [ { @@ -3696,20 +3706,20 @@ "type": "tidelift" } ], - "time": "2021-10-20T20:35:02+00:00" + "time": "2022-05-24T11:49:31+00:00" }, { "name": "symfony/polyfill-mbstring", - "version": "v1.25.0", + "version": "v1.26.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "0abb51d2f102e00a4eefcf46ba7fec406d245825" + "reference": "9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/0abb51d2f102e00a4eefcf46ba7fec406d245825", - "reference": "0abb51d2f102e00a4eefcf46ba7fec406d245825", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e", + "reference": "9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e", "shasum": "" }, "require": { @@ -3724,7 +3734,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.23-dev" + "dev-main": "1.26-dev" }, "thanks": { "name": "symfony/polyfill", @@ -3763,7 +3773,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.25.0" + "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.26.0" }, "funding": [ { @@ -3779,20 +3789,20 @@ "type": "tidelift" } ], - "time": "2021-11-30T18:21:41+00:00" + "time": "2022-05-24T11:49:31+00:00" }, { "name": "symfony/polyfill-php80", - "version": "v1.25.0", + "version": "v1.26.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php80.git", - "reference": "4407588e0d3f1f52efb65fbe92babe41f37fe50c" + "reference": "cfa0ae98841b9e461207c13ab093d76b0fa7bace" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/4407588e0d3f1f52efb65fbe92babe41f37fe50c", - "reference": "4407588e0d3f1f52efb65fbe92babe41f37fe50c", + "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/cfa0ae98841b9e461207c13ab093d76b0fa7bace", + "reference": "cfa0ae98841b9e461207c13ab093d76b0fa7bace", "shasum": "" }, "require": { @@ -3801,7 +3811,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.23-dev" + "dev-main": "1.26-dev" }, "thanks": { "name": "symfony/polyfill", @@ -3846,7 +3856,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php80/tree/v1.25.0" + "source": "https://github.com/symfony/polyfill-php80/tree/v1.26.0" }, "funding": [ { @@ -3862,7 +3872,7 @@ "type": "tidelift" } ], - "time": "2022-03-04T08:16:47+00:00" + "time": "2022-05-10T07:21:04+00:00" }, { "name": "vlucas/phpdotenv", @@ -3941,6 +3951,64 @@ } ], "time": "2021-12-12T23:07:53+00:00" + }, + { + "name": "webmozart/assert", + "version": "1.11.0", + "source": { + "type": "git", + "url": "https://github.com/webmozarts/assert.git", + "reference": "11cb2199493b2f8a3b53e7f19068fc6aac760991" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/webmozarts/assert/zipball/11cb2199493b2f8a3b53e7f19068fc6aac760991", + "reference": "11cb2199493b2f8a3b53e7f19068fc6aac760991", + "shasum": "" + }, + "require": { + "ext-ctype": "*", + "php": "^7.2 || ^8.0" + }, + "conflict": { + "phpstan/phpstan": "<0.12.20", + "vimeo/psalm": "<4.6.1 || 4.6.2" + }, + "require-dev": { + "phpunit/phpunit": "^8.5.13" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.10-dev" + } + }, + "autoload": { + "psr-4": { + "Webmozart\\Assert\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Bernhard Schussek", + "email": "bschussek@gmail.com" + } + ], + "description": "Assertions to validate method input/output with nice error messages.", + "keywords": [ + "assert", + "check", + "validate" + ], + "support": { + "issues": "https://github.com/webmozarts/assert/issues", + "source": "https://github.com/webmozarts/assert/tree/1.11.0" + }, + "time": "2022-06-03T18:03:27+00:00" } ], "packages-dev": [ @@ -3950,12 +4018,12 @@ "source": { "type": "git", "url": "https://github.com/Roave/SecurityAdvisories.git", - "reference": "2ed308386e65cafaadd54723f5b57775374c2ae8" + "reference": "e44f8ca7996a2573a10b7f1f8baff9c9caf7db09" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Roave/SecurityAdvisories/zipball/2ed308386e65cafaadd54723f5b57775374c2ae8", - "reference": "2ed308386e65cafaadd54723f5b57775374c2ae8", + "url": "https://api.github.com/repos/Roave/SecurityAdvisories/zipball/e44f8ca7996a2573a10b7f1f8baff9c9caf7db09", + "reference": "e44f8ca7996a2573a10b7f1f8baff9c9caf7db09", "shasum": "" }, "conflict": { @@ -3963,7 +4031,7 @@ "admidio/admidio": "<4.1.9", "adodb/adodb-php": "<=5.20.20|>=5.21,<=5.21.3", "akaunting/akaunting": "<2.1.13", - "alextselegidis/easyappointments": "<1.4.3", + "alextselegidis/easyappointments": "<=1.4.3", "alterphp/easyadmin-extension-bundle": ">=1.2,<1.2.11|>=1.3,<1.3.1", "amazing/media2click": ">=1,<1.3.3", "amphp/artax": "<1.0.6|>=2,<2.0.6", @@ -3988,6 +4056,7 @@ "bolt/core": "<=4.2", "bottelet/flarepoint": "<2.2.1", "brightlocal/phpwhois": "<=4.2.5", + "brotkrueml/codehighlight": "<2.7", "buddypress/buddypress": "<7.2.1", "bugsnag/bugsnag-laravel": ">=2,<2.0.2", "bytefury/crater": "<6.0.2", @@ -4012,7 +4081,7 @@ "contao/core-bundle": "<4.9.18|>=4.10,<4.11.7|>=4.13,<4.13.3|= 4.10.0", "contao/listing-bundle": ">=4,<4.4.8", "contao/managed-edition": "<=1.5", - "craftcms/cms": "<3.7.29", + "craftcms/cms": "<3.7.36", "croogo/croogo": "<3.0.7", "cuyz/valinor": ">=0.5,<0.7", "czproject/git-php": "<4.0.3", @@ -4049,25 +4118,27 @@ "ezsystems/ezplatform": "<=1.13.6|>=2,<=2.5.24", "ezsystems/ezplatform-admin-ui": ">=1.3,<1.3.5|>=1.4,<1.4.6|>=1.5,<1.5.27", "ezsystems/ezplatform-admin-ui-assets": ">=4,<4.2.1|>=5,<5.0.1|>=5.1,<5.1.1", - "ezsystems/ezplatform-kernel": "<=1.2.5|>=1.3,<1.3.17", + "ezsystems/ezplatform-kernel": "<=1.2.5|>=1.3,<1.3.19", "ezsystems/ezplatform-rest": ">=1.2,<=1.2.2|>=1.3,<1.3.8", "ezsystems/ezplatform-richtext": ">=2.3,<=2.3.7", "ezsystems/ezplatform-user": ">=1,<1.0.1", - "ezsystems/ezpublish-kernel": "<=6.13.8.1|>=7,<7.5.28", + "ezsystems/ezpublish-kernel": "<=6.13.8.1|>=7,<7.5.29", "ezsystems/ezpublish-legacy": "<=2017.12.7.3|>=2018.6,<=2019.3.5.1", "ezsystems/platform-ui-assets-bundle": ">=4.2,<4.2.3", "ezsystems/repository-forms": ">=2.3,<2.3.2.1", "ezyang/htmlpurifier": "<4.1.1", "facade/ignition": "<1.16.15|>=2,<2.4.2|>=2.5,<2.5.2", - "facturascripts/facturascripts": "<2022.6", + "facturascripts/facturascripts": "<2022.8", "feehi/cms": "<=2.1.1", "feehi/feehicms": "<=0.1.3", "fenom/fenom": "<=2.12.1", + "filegator/filegator": "<7.8", "firebase/php-jwt": "<2", "flarum/core": ">=1,<=1.0.1", "flarum/sticky": ">=0.1-beta.14,<=0.1-beta.15", "flarum/tags": "<=0.1-beta.13", "fluidtypo3/vhs": "<5.1.1", + "fof/upload": "<1.2.3", "fooman/tcpdf": "<6.2.22", "forkcms/forkcms": "<5.11.1", "fossar/tcpdf-parser": "<6.2.22", @@ -4081,7 +4152,7 @@ "fuel/core": "<1.8.1", "gaoming13/wechat-php-sdk": "<=1.10.2", "genix/cms": "<=1.1.11", - "getgrav/grav": "<1.7.31", + "getgrav/grav": "<1.7.33", "getkirby/cms": "<3.5.8", "getkirby/panel": "<2.5.14", "gilacms/gila": "<=1.11.4", @@ -4091,14 +4162,14 @@ "gree/jose": "<=2.2", "gregwar/rst": "<1.0.3", "grumpydictator/firefly-iii": "<5.6.5", - "guzzlehttp/guzzle": ">=4-rc.2,<4.2.4|>=5,<5.3.1|>=6,<6.2.1", + "guzzlehttp/guzzle": "<6.5.6|>=7,<7.4.3", "guzzlehttp/psr7": "<1.8.4|>=2,<2.1.1", - "helloxz/imgurl": "<=2.31", + "helloxz/imgurl": "= 2.31|<=2.31", "hillelcoren/invoice-ninja": "<5.3.35", "hjue/justwriting": "<=1", "hov/jobfair": "<1.0.13|>=2,<2.0.2", "hyn/multi-tenant": ">=5.6,<5.7.2", - "ibexa/core": ">=4,<4.0.5|>=4.1,<4.1.2", + "ibexa/core": ">=4,<4.0.7|>=4.1,<4.1.4", "ibexa/post-install": "<=1.0.4", "icecoder/icecoder": "<=8.1", "illuminate/auth": ">=4,<4.0.99|>=4.1,<=4.1.31|>=4.2,<=4.2.22|>=5,<=5.0.35|>=5.1,<=5.1.46|>=5.2,<=5.2.45|>=5.3,<=5.3.31|>=5.4,<=5.4.36|>=5.5,<5.5.10", @@ -4137,7 +4208,7 @@ "league/commonmark": "<0.18.3", "league/flysystem": "<1.1.4|>=2,<2.1.1", "lexik/jwt-authentication-bundle": "<2.10.7|>=2.11,<2.11.3", - "librenms/librenms": "<22.2.2", + "librenms/librenms": "<22.4", "limesurvey/limesurvey": "<3.27.19", "livehelperchat/livehelperchat": "<=3.91", "livewire/livewire": ">2.2.4,<2.2.6", @@ -4150,21 +4221,22 @@ "magento/product-community-edition": ">=2,<2.2.10|>=2.3,<2.3.2-p.2", "marcwillmann/turn": "<0.3.3", "matyhtf/framework": "<3.0.6", - "mautic/core": "<4.2|= 2.13.1", + "mautic/core": "<4.3|= 2.13.1", "mediawiki/core": ">=1.27,<1.27.6|>=1.29,<1.29.3|>=1.30,<1.30.2|>=1.31,<1.31.9|>=1.32,<1.32.6|>=1.32.99,<1.33.3|>=1.33.99,<1.34.3|>=1.34.99,<1.35", "microweber/microweber": "<1.3", "miniorange/miniorange-saml": "<1.4.3", "mittwald/typo3_forum": "<1.2.1", "modx/revolution": "<= 2.8.3-pl|<2.8", + "mojo42/jirafeau": "<4.4", "monolog/monolog": ">=1.8,<1.12", - "moodle/moodle": "<3.9.13|>=3.10-beta,<3.10.10|>=3.11,<3.11.6", + "moodle/moodle": "<4.0.1", "mustache/mustache": ">=2,<2.14.1", "namshi/jose": "<2.2", "neoan3-apps/template": "<1.1.1", "neorazorx/facturascripts": "<2022.4", "neos/flow": ">=1,<1.0.4|>=1.1,<1.1.1|>=2,<2.0.1|>=2.3,<2.3.16|>=3,<3.0.12|>=3.1,<3.1.10|>=3.2,<3.2.13|>=3.3,<3.3.13|>=4,<4.0.6", "neos/form": ">=1.2,<4.3.3|>=5,<5.0.9|>=5.1,<5.1.3", - "neos/neos": ">=1.1,<1.1.3|>=1.2,<1.2.13|>=2,<2.0.4|>=2.3,<2.9.99|>=3,<3.0.20|>=3.1,<3.1.18|>=3.2,<3.2.14|>=3.3,<3.3.23|>=4,<4.0.17|>=4.1,<4.1.16|>=4.2,<4.2.12|>=4.3,<4.3.3", + "neos/neos": ">=1.1,<1.1.3|>=1.2,<1.2.13|>=2,<2.0.4|>=2.3,<2.9.99|>=3,<3.0.20|>=3.1,<3.1.18|>=3.2,<3.2.14|>=3.3,<5.3.10|>=7,<7.0.9|>=7.1,<7.1.7|>=7.2,<7.2.6|>=7.3,<7.3.4|>=8,<8.0.2", "neos/swiftmailer": ">=4.1,<4.1.99|>=5.4,<5.4.5", "netgen/tagsbundle": ">=3.4,<3.4.11|>=4,<4.0.15", "nette/application": ">=2,<2.0.19|>=2.1,<2.1.13|>=2.2,<2.2.10|>=2.3,<2.3.14|>=2.4,<2.4.16|>=3,<3.0.6", @@ -4212,7 +4284,7 @@ "pimcore/data-hub": "<1.2.4", "pimcore/pimcore": "<10.4", "pocketmine/bedrock-protocol": "<8.0.2", - "pocketmine/pocketmine-mp": "<4.2.9", + "pocketmine/pocketmine-mp": "<4.2.10", "pressbooks/pressbooks": "<5.18", "prestashop/autoupgrade": ">=4,<4.10.1", "prestashop/contactform": ">1.0.1,<4.3", @@ -4234,7 +4306,8 @@ "rmccue/requests": ">=1.6,<1.8", "robrichards/xmlseclibs": "<3.0.4", "rudloff/alltube": "<3.0.3", - "s-cart/s-cart": "<6.7.2", + "s-cart/core": "<6.9", + "s-cart/s-cart": "<6.9", "sabberworm/php-css-parser": ">=1,<1.0.1|>=2,<2.0.1|>=3,<3.0.1|>=4,<4.0.1|>=5,<5.0.9|>=5.1,<5.1.3|>=5.2,<5.2.1|>=6,<6.0.2|>=7,<7.0.4|>=8,<8.0.1|>=8.1,<8.1.1|>=8.2,<8.2.1|>=8.3,<8.3.1", "sabre/dav": ">=1.6,<1.6.99|>=1.7,<1.7.11|>=1.8,<1.8.9", "scheb/two-factor-bundle": ">=0,<3.26|>=4,<4.11", @@ -4245,6 +4318,7 @@ "shopware/production": "<=6.3.5.2", "shopware/shopware": "<5.7.9", "shopware/storefront": "<=6.4.8.1", + "shopxo/shopxo": "<2.2.6", "showdoc/showdoc": "<2.10.4", "silverstripe/admin": ">=1,<1.8.1", "silverstripe/assets": ">=1,<1.4.7|>=1.5,<1.5.2", @@ -4264,8 +4338,8 @@ "simplesamlphp/simplesamlphp-module-infocard": "<1.0.1", "simplito/elliptic-php": "<1.0.6", "slim/slim": "<2.6", - "smarty/smarty": "<3.1.43|>=4,<4.0.3", - "snipe/snipe-it": "<5.4.3|>= 6.0.0-RC-1, <= 6.0.0-RC-5", + "smarty/smarty": "<3.1.45|>=4,<4.1.1", + "snipe/snipe-it": "<5.4.4|>= 6.0.0-RC-1, <= 6.0.0-RC-5", "socalnick/scn-social-auth": "<1.15.2", "socialiteproviders/steam": "<1.1", "spipu/html2pdf": "<5.2.4", @@ -4326,7 +4400,7 @@ "theonedemon/phpwhois": "<=4.2.5", "tinymce/tinymce": "<5.10", "titon/framework": ">=0,<9.9.99", - "topthink/framework": "<6.0.9", + "topthink/framework": "<6.0.12", "topthink/think": "<=6.0.9", "topthink/thinkphp": "<=3.2.3", "tribalsystems/zenario": "<9.2.55826", @@ -4355,10 +4429,11 @@ "wikimedia/parsoid": "<0.12.2", "willdurand/js-translation-bundle": "<2.1.1", "wp-cli/wp-cli": "<2.5", + "wp-graphql/wp-graphql": "<0.3.5", "wpanel/wpanel4-cms": "<=4.3.1", "wwbn/avideo": "<=11.6", "yeswiki/yeswiki": "<4.1", - "yetiforce/yetiforce-crm": "<=6.3", + "yetiforce/yetiforce-crm": "<6.4", "yidashi/yii2cmf": "<=2", "yii2mod/yii2-cms": "<1.9.2", "yiisoft/yii": ">=1.1.14,<1.1.15", @@ -4431,7 +4506,7 @@ "type": "tidelift" } ], - "time": "2022-05-11T11:06:18+00:00" + "time": "2022-06-03T23:04:18+00:00" } ], "aliases": [], diff --git a/examples/websocket-events.php b/examples/websocket-events.php index 3938133..36787a7 100644 --- a/examples/websocket-events.php +++ b/examples/websocket-events.php @@ -7,6 +7,7 @@ require 'vendor/autoload.php'; +use Amp\Loop; use Amp\Websocket\Client\Connection; use Amp\Websocket\Message; use function Amp\Websocket\Client\connect; @@ -20,15 +21,22 @@ 'url' => $options['url'] ?? $options['u'] ?? 'ws://127.0.0.1:9503/events', ]; -Amp\Loop::run(static function () use($options) { +Amp\Loop::run(static function () use ($options) { echo "Connecting to: {$options['url']}" . PHP_EOL; - while(true) { + while (true) { try { /** @var Connection $connection */ $connection = yield connect($options['url']); - $connection->onClose(static function() use($connection) { + $repeat = Loop::repeat(5_000, function () use ($connection) { + echo 'ping' . PHP_EOL; + yield $connection->send('ping'); + }); + + $connection->onClose(static function () use ($connection, &$repeat) { + Loop::cancel($repeat); + $repeat = null; printf("Connection closed. Reason: %s\n", $connection->getCloseReason()); }); @@ -36,9 +44,12 @@ while ($message = yield $connection->receive()) { /** @var Message $message */ $payload = yield $message->buffer(); - printf("Received event: %s\n", $payload); + printf("[%s] Received event: %s\n", date('Y-m-d H:i:s'), $payload); } } catch (\Throwable $e) { + if (!empty($repeat)) { + Loop::cancel($repeat); + } printf("Error: %s\n", $e->getMessage()); } yield new Amp\Delayed(500); diff --git a/src/Controllers/EventsController.php b/src/Controllers/EventsController.php index c5f0ba5..fb8b336 100644 --- a/src/Controllers/EventsController.php +++ b/src/Controllers/EventsController.php @@ -10,7 +10,7 @@ use Amp\Success; use Amp\Websocket\Client as WebsocketClient; use Amp\Websocket\Server\ClientHandler; -use Amp\Websocket\Server\Endpoint; +use Amp\Websocket\Server\Gateway; use Amp\Websocket\Server\Websocket as WebsocketServer; use TelegramApiServer\Client; use TelegramApiServer\EventObservers\EventObserver; @@ -22,10 +22,10 @@ class EventsController implements ClientHandler public static function getRouterCallback(): WebsocketServer { $class = new static(); - return new WebsocketServer($class); + return new WebsocketServer($class); } - public function handleHandshake(Endpoint $endpoint, Request $request, Response $response): Promise + public function handleHandshake(Gateway $gateway, Request $request, Response $response): Promise { try { $session = $request->getAttribute(Router::class)['session'] ?? null; @@ -35,17 +35,17 @@ public function handleHandshake(Endpoint $endpoint, Request $request, Response $ throw new \RuntimeException('No sessions available'); } } catch (\Throwable $e){ - return $endpoint->getErrorHandler()->handleError(Status::NOT_FOUND, $e->getMessage()); + return $gateway->getErrorHandler()->handleError(Status::NOT_FOUND, $e->getMessage()); } return new Success($response); } - public function handleClient(Endpoint $endpoint, WebsocketClient $client, Request $request, Response $response): Promise + public function handleClient(Gateway $gateway, WebsocketClient $client, Request $request, Response $response): Promise { - return call(static function() use($endpoint, $client, $request) { + return call(static function() use($gateway, $client, $request) { $requestedSession = $request->getAttribute(Router::class)['session'] ?? null; - yield from static::subscribeForUpdates($endpoint, $client, $requestedSession); + yield from static::subscribeForUpdates($gateway, $client, $requestedSession); while ($message = yield $client->receive()) { // Messages received on the connection are ignored and discarded. @@ -54,7 +54,7 @@ public function handleClient(Endpoint $endpoint, WebsocketClient $client, Reques }); } - private static function subscribeForUpdates(Endpoint $endpoint, WebsocketClient $client, ?string $requestedSession): \Generator + private static function subscribeForUpdates(Gateway $gateway, WebsocketClient $client, ?string $requestedSession): \Generator { $clientId = $client->getId(); @@ -65,7 +65,7 @@ private static function subscribeForUpdates(Endpoint $endpoint, WebsocketClient EventObserver::stopEventHandler($requestedSession); }); - EventObserver::addSubscriber($clientId, static function($update, ?string $session) use($endpoint, $clientId, $requestedSession) { + EventObserver::addSubscriber($clientId, static function($update, ?string $session) use($gateway, $clientId, $requestedSession) { if ($requestedSession && $session !== $requestedSession) { return; } @@ -78,7 +78,7 @@ private static function subscribeForUpdates(Endpoint $endpoint, WebsocketClient 'id' => null, ]; - $endpoint->multicast( + $gateway->multicast( json_encode( $update, JSON_THROW_ON_ERROR | diff --git a/src/EventObservers/EventHandler.php b/src/EventObservers/EventHandler.php index 7bc2ff0..5be4887 100644 --- a/src/EventObservers/EventHandler.php +++ b/src/EventObservers/EventHandler.php @@ -10,12 +10,11 @@ class EventHandler extends \danog\MadelineProto\EventHandler public static array $instances = []; private string $sessionName; - public function __construct(APIWrapper $MadelineProto) + public function onStart() { - $this->sessionName = Files::getSessionName($MadelineProto->session); + $this->sessionName = Files::getSessionName($this->API->wrapper->session); if (empty(static::$instances[$this->sessionName])) { static::$instances[$this->sessionName] = true; - parent::initInternal($MadelineProto); warning("Event observer CONSTRUCTED: {$this->sessionName}"); } } From 1bdd5b28a09f6c3344a5452be1c4f235d3137ef7 Mon Sep 17 00:00:00 2001 From: Alexander Pankratov Date: Sun, 5 Jun 2022 02:47:30 +0300 Subject: [PATCH 019/270] Move heartbeat ping to server and fix event handler shutdown --- examples/websocket-events.php | 17 +++-------------- src/Controllers/EventsController.php | 7 ++++++- src/EventObservers/EventHandler.php | 7 +------ src/EventObservers/EventObserver.php | 2 +- 4 files changed, 11 insertions(+), 22 deletions(-) diff --git a/examples/websocket-events.php b/examples/websocket-events.php index 36787a7..a7ae7e9 100644 --- a/examples/websocket-events.php +++ b/examples/websocket-events.php @@ -7,8 +7,7 @@ require 'vendor/autoload.php'; -use Amp\Loop; -use Amp\Websocket\Client\Connection; +use Amp\Websocket\Client\Rfc6455Connection; use Amp\Websocket\Message; use function Amp\Websocket\Client\connect; @@ -26,17 +25,10 @@ while (true) { try { - /** @var Connection $connection */ + /** @var Rfc6455Connection $connection */ $connection = yield connect($options['url']); - $repeat = Loop::repeat(5_000, function () use ($connection) { - echo 'ping' . PHP_EOL; - yield $connection->send('ping'); - }); - - $connection->onClose(static function () use ($connection, &$repeat) { - Loop::cancel($repeat); - $repeat = null; + $connection->onClose(static function () use ($connection) { printf("Connection closed. Reason: %s\n", $connection->getCloseReason()); }); @@ -47,9 +39,6 @@ printf("[%s] Received event: %s\n", date('Y-m-d H:i:s'), $payload); } } catch (\Throwable $e) { - if (!empty($repeat)) { - Loop::cancel($repeat); - } printf("Error: %s\n", $e->getMessage()); } yield new Amp\Delayed(500); diff --git a/src/Controllers/EventsController.php b/src/Controllers/EventsController.php index fb8b336..8df55ab 100644 --- a/src/Controllers/EventsController.php +++ b/src/Controllers/EventsController.php @@ -6,6 +6,7 @@ use Amp\Http\Server\Response; use Amp\Http\Server\Router; use Amp\Http\Status; +use Amp\Loop; use Amp\Promise; use Amp\Success; use Amp\Websocket\Client as WebsocketClient; @@ -18,6 +19,7 @@ class EventsController implements ClientHandler { + private const PING_INTERVAL_MS = 10_000; public static function getRouterCallback(): WebsocketServer { @@ -60,7 +62,10 @@ private static function subscribeForUpdates(Gateway $gateway, WebsocketClient $c yield EventObserver::startEventHandler($requestedSession); - $client->onClose(static function() use($clientId, $requestedSession) { + $pingLoop = Loop::repeat(self::PING_INTERVAL_MS, static fn () => yield $client->ping()); + + $client->onClose(static function() use($clientId, $requestedSession, $pingLoop) { + Loop::cancel($pingLoop); EventObserver::removeSubscriber($clientId); EventObserver::stopEventHandler($requestedSession); }); diff --git a/src/EventObservers/EventHandler.php b/src/EventObservers/EventHandler.php index 5be4887..cd95193 100644 --- a/src/EventObservers/EventHandler.php +++ b/src/EventObservers/EventHandler.php @@ -28,13 +28,8 @@ public function __destruct() warning("Event observer DESTRUCTED: {$this->sessionName}"); } - public function onAny($update): void + public function onAny($update) { - if (empty(static::$instances[$this->sessionName])) { - warning("unsetEventHandler: {$this->sessionName}"); - $this->unsetEventHandler(); - return; - } info("Received update from session: {$this->sessionName}"); EventObserver::notify($update, $this->sessionName); } diff --git a/src/EventObservers/EventObserver.php b/src/EventObservers/EventObserver.php index 18f133d..c3b4110 100644 --- a/src/EventObservers/EventObserver.php +++ b/src/EventObservers/EventObserver.php @@ -80,7 +80,7 @@ public static function stopEventHandler(?string $requestedSession = null, bool $ static::removeSessionClient($session); if (empty(static::$sessionClients[$session]) || $force) { warning("Stopping EventHandler: {$session}"); - /** @see \TelegramApiServer\EventObservers\EventHandler::onAny */ + Client::getInstance()->instances[$session]->unsetEventHandler(); unset(EventHandler::$instances[$session], static::$sessionClients[$session]); } } From 7a79b3256090a9c6fab2339630c7441b4e2eede0 Mon Sep 17 00:00:00 2001 From: Alexander Pankratov Date: Fri, 10 Jun 2022 15:22:15 +0300 Subject: [PATCH 020/270] Html conversion fix --- composer.lock | 54 ++++++++++--------- src/MadelineProtoExtensions/ApiExtensions.php | 13 +++-- 2 files changed, 34 insertions(+), 33 deletions(-) diff --git a/composer.lock b/composer.lock index e2a373a..ea847de 100644 --- a/composer.lock +++ b/composer.lock @@ -2353,12 +2353,12 @@ "source": { "type": "git", "url": "https://github.com/danog/MadelineProto.git", - "reference": "725f75e1506d57dde94f00b91b22bd6693d69755" + "reference": "931cb7f23199719ca80e9611f5f7a2cc438592e1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/danog/MadelineProto/zipball/725f75e1506d57dde94f00b91b22bd6693d69755", - "reference": "725f75e1506d57dde94f00b91b22bd6693d69755", + "url": "https://api.github.com/repos/danog/MadelineProto/zipball/931cb7f23199719ca80e9611f5f7a2cc438592e1", + "reference": "931cb7f23199719ca80e9611f5f7a2cc438592e1", "shasum": "" }, "require": { @@ -2463,7 +2463,7 @@ ], "support": { "issues": "https://github.com/danog/MadelineProto/issues", - "source": "https://github.com/danog/MadelineProto/tree/7.0.91.9999" + "source": "https://github.com/danog/MadelineProto/tree/stable" }, "funding": [ { @@ -2471,7 +2471,7 @@ "type": "github" } ], - "time": "2022-06-04T19:23:34+00:00" + "time": "2022-06-07T16:40:19+00:00" }, { "name": "danog/magicalserializer", @@ -3019,16 +3019,16 @@ }, { "name": "monolog/monolog", - "version": "2.6.0", + "version": "2.7.0", "source": { "type": "git", "url": "https://github.com/Seldaek/monolog.git", - "reference": "247918972acd74356b0a91dfaa5adcaec069b6c0" + "reference": "5579edf28aee1190a798bfa5be8bc16c563bd524" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Seldaek/monolog/zipball/247918972acd74356b0a91dfaa5adcaec069b6c0", - "reference": "247918972acd74356b0a91dfaa5adcaec069b6c0", + "url": "https://api.github.com/repos/Seldaek/monolog/zipball/5579edf28aee1190a798bfa5be8bc16c563bd524", + "reference": "5579edf28aee1190a798bfa5be8bc16c563bd524", "shasum": "" }, "require": { @@ -3107,7 +3107,7 @@ ], "support": { "issues": "https://github.com/Seldaek/monolog/issues", - "source": "https://github.com/Seldaek/monolog/tree/2.6.0" + "source": "https://github.com/Seldaek/monolog/tree/2.7.0" }, "funding": [ { @@ -3119,7 +3119,7 @@ "type": "tidelift" } ], - "time": "2022-05-10T09:36:00+00:00" + "time": "2022-06-09T08:59:12+00:00" }, { "name": "nikic/fast-route", @@ -3173,16 +3173,16 @@ }, { "name": "paragonie/constant_time_encoding", - "version": "v2.5.0", + "version": "v2.6.0", "source": { "type": "git", "url": "https://github.com/paragonie/constant_time_encoding.git", - "reference": "9229e15f2e6ba772f0c55dd6986c563b937170a8" + "reference": "3f3bf06406244a94aeffd5818ba05b41a1754ae5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/paragonie/constant_time_encoding/zipball/9229e15f2e6ba772f0c55dd6986c563b937170a8", - "reference": "9229e15f2e6ba772f0c55dd6986c563b937170a8", + "url": "https://api.github.com/repos/paragonie/constant_time_encoding/zipball/3f3bf06406244a94aeffd5818ba05b41a1754ae5", + "reference": "3f3bf06406244a94aeffd5818ba05b41a1754ae5", "shasum": "" }, "require": { @@ -3236,7 +3236,7 @@ "issues": "https://github.com/paragonie/constant_time_encoding/issues", "source": "https://github.com/paragonie/constant_time_encoding" }, - "time": "2022-01-17T05:32:27+00:00" + "time": "2022-06-10T07:38:28+00:00" }, { "name": "paragonie/random_compat", @@ -4018,12 +4018,12 @@ "source": { "type": "git", "url": "https://github.com/Roave/SecurityAdvisories.git", - "reference": "e44f8ca7996a2573a10b7f1f8baff9c9caf7db09" + "reference": "bf362097fbfe4580b99b696dd8208b24ffd112b2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Roave/SecurityAdvisories/zipball/e44f8ca7996a2573a10b7f1f8baff9c9caf7db09", - "reference": "e44f8ca7996a2573a10b7f1f8baff9c9caf7db09", + "url": "https://api.github.com/repos/Roave/SecurityAdvisories/zipball/bf362097fbfe4580b99b696dd8208b24ffd112b2", + "reference": "bf362097fbfe4580b99b696dd8208b24ffd112b2", "shasum": "" }, "conflict": { @@ -4099,7 +4099,7 @@ "doctrine/mongodb-odm": ">=1,<1.0.2", "doctrine/mongodb-odm-bundle": ">=2,<3.0.1", "doctrine/orm": ">=2,<2.4.8|>=2.5,<2.5.1|>=2.8.3,<2.8.4", - "dolibarr/dolibarr": "<16|>= 3.3.beta1, < 13.0.2", + "dolibarr/dolibarr": "= 12.0.5|<16|>= 3.3.beta1, < 13.0.2", "dompdf/dompdf": "<1.2.1", "drupal/core": ">=7,<7.88|>=8,<9.2.13|>=9.3,<9.3.6", "drupal/drupal": ">=7,<7.80|>=8,<8.9.16|>=9,<9.1.12|>=9.2,<9.2.4", @@ -4128,7 +4128,7 @@ "ezsystems/repository-forms": ">=2.3,<2.3.2.1", "ezyang/htmlpurifier": "<4.1.1", "facade/ignition": "<1.16.15|>=2,<2.4.2|>=2.5,<2.5.2", - "facturascripts/facturascripts": "<2022.8", + "facturascripts/facturascripts": "<=2022.8", "feehi/cms": "<=2.1.1", "feehi/feehicms": "<=0.1.3", "fenom/fenom": "<=2.12.1", @@ -4142,7 +4142,7 @@ "fooman/tcpdf": "<6.2.22", "forkcms/forkcms": "<5.11.1", "fossar/tcpdf-parser": "<6.2.22", - "francoisjacquet/rosariosis": "<8.1.1", + "francoisjacquet/rosariosis": "<9", "friendsofsymfony/oauth2-php": "<1.3", "friendsofsymfony/rest-bundle": ">=1.2,<1.2.2", "friendsofsymfony/user-bundle": ">=1.2,<1.3.5", @@ -4162,7 +4162,7 @@ "gree/jose": "<=2.2", "gregwar/rst": "<1.0.3", "grumpydictator/firefly-iii": "<5.6.5", - "guzzlehttp/guzzle": "<6.5.6|>=7,<7.4.3", + "guzzlehttp/guzzle": "<6.5.7|>=7,<7.4.4", "guzzlehttp/psr7": "<1.8.4|>=2,<2.1.1", "helloxz/imgurl": "= 2.31|<=2.31", "hillelcoren/invoice-ninja": "<5.3.35", @@ -4200,7 +4200,7 @@ "laminas/laminas-http": "<2.14.2", "laravel/fortify": "<1.11.1", "laravel/framework": "<6.20.42|>=7,<7.30.6|>=8,<8.75", - "laravel/laravel": "<=5.8.38", + "laravel/laravel": "<=9.1.8", "laravel/socialite": ">=1,<1.0.99|>=2,<2.0.10", "latte/latte": "<2.10.8", "lavalite/cms": "<=5.8", @@ -4242,6 +4242,7 @@ "nette/application": ">=2,<2.0.19|>=2.1,<2.1.13|>=2.2,<2.2.10|>=2.3,<2.3.14|>=2.4,<2.4.16|>=3,<3.0.6", "nette/nette": ">=2,<2.0.19|>=2.1,<2.1.13", "nilsteampassnet/teampass": "<=2.1.27.36", + "noumo/easyii": "<=0.9", "nukeviet/nukeviet": "<4.3.4", "nystudio107/craft-seomatic": "<3.4.12", "nzo/url-encryptor-bundle": ">=4,<4.3.2|>=5,<5.0.1", @@ -4284,7 +4285,7 @@ "pimcore/data-hub": "<1.2.4", "pimcore/pimcore": "<10.4", "pocketmine/bedrock-protocol": "<8.0.2", - "pocketmine/pocketmine-mp": "<4.2.10", + "pocketmine/pocketmine-mp": ">= 4.0.0-BETA5, < 4.4.2|<4.2.10", "pressbooks/pressbooks": "<5.18", "prestashop/autoupgrade": ">=4,<4.10.1", "prestashop/contactform": ">1.0.1,<4.3", @@ -4329,6 +4330,7 @@ "silverstripe/graphql": "<3.5.2|>=4-alpha.1,<4-alpha.2|= 4.0.0-alpha1", "silverstripe/registry": ">=2.1,<2.1.2|>=2.2,<2.2.1", "silverstripe/restfulserver": ">=1,<1.0.9|>=2,<2.0.4", + "silverstripe/silverstripe-omnipay": "<2.5.2|>=3,<3.0.2|>=3.1,<3.1.4|>=3.2,<3.2.1", "silverstripe/subsites": ">=2,<2.1.1", "silverstripe/taxonomy": ">=1.3,<1.3.1|>=2,<2.0.1", "silverstripe/userforms": "<3", @@ -4506,7 +4508,7 @@ "type": "tidelift" } ], - "time": "2022-06-03T23:04:18+00:00" + "time": "2022-06-10T00:15:15+00:00" } ], "aliases": [], diff --git a/src/MadelineProtoExtensions/ApiExtensions.php b/src/MadelineProtoExtensions/ApiExtensions.php index 28825b3..3c406cb 100644 --- a/src/MadelineProtoExtensions/ApiExtensions.php +++ b/src/MadelineProtoExtensions/ApiExtensions.php @@ -10,7 +10,7 @@ use Amp\Http\Server\Response; use Amp\Promise; use danog\MadelineProto; -use danog\MadelineProto\TL\Conversion\BotAPI; +use danog\MadelineProto\StrTools; use TelegramApiServer\EventObservers\EventHandler; use TelegramApiServer\Exceptions\MediaTooBig; use TelegramApiServer\Exceptions\NoMediaException; @@ -18,7 +18,6 @@ class ApiExtensions { - use BotAPI; private MadelineProto\Api $madelineProto; private Request $request; @@ -136,7 +135,7 @@ public function formatMessage(?string $message = null, array $entities = []): ?s foreach ($entities as $key => &$entity) { if (isset($html[$entity['_']])) { - $text = static::mbSubstr($message, $entity['offset'], $entity['length']); + $text = StrTools::mbSubstr($message, $entity['offset'], $entity['length']); $template = $html[$entity['_']]; if (in_array($entity['_'], ['messageEntityTextUrl', 'messageEntityMention', 'messageEntityUrl'])) { @@ -153,11 +152,11 @@ public function formatMessage(?string $message = null, array $entities = []): ?s continue; } if ($nextEntity['offset'] < ($entity['offset'] + $entity['length'])) { - $nextEntity['offset'] += static::mbStrlen( + $nextEntity['offset'] += StrTools::mbStrlen( preg_replace('~(\>).*<\/.*$~', '$1', $textFormated) ); } else { - $nextEntity['offset'] += static::mbStrlen($textFormated) - static::mbStrlen($text); + $nextEntity['offset'] += StrTools::mbStrlen($textFormated) - StrTools::mbStrlen($text); } } unset($nextEntity); @@ -170,8 +169,8 @@ public function formatMessage(?string $message = null, array $entities = []): ?s private static function substringReplace(string $original, string $replacement, int $position, int $length): string { - $startString = static::mbSubstr($original, 0, $position); - $endString = static::mbSubstr($original, $position + $length, static::mbStrlen($original)); + $startString = StrTools::mbSubstr($original, 0, $position); + $endString = StrTools::mbSubstr($original, $position + $length, StrTools::mbStrlen($original)); return $startString . $replacement . $endString; } From b9216265e7e07678a99f2ba349f95384a3600ca8 Mon Sep 17 00:00:00 2001 From: Alexander Pankratov Date: Mon, 18 Jul 2022 10:46:26 +0300 Subject: [PATCH 021/270] Update madelineProto --- composer.lock | 117 ++++++++++++++++++++++++++++---------------------- 1 file changed, 65 insertions(+), 52 deletions(-) diff --git a/composer.lock b/composer.lock index ea847de..3eb3612 100644 --- a/composer.lock +++ b/composer.lock @@ -1294,16 +1294,16 @@ }, { "name": "amphp/process", - "version": "v1.1.3", + "version": "v1.1.4", "source": { "type": "git", "url": "https://github.com/amphp/process.git", - "reference": "f09e3ed3b0a953ccbfff1140f12be4a884f0aa83" + "reference": "76e9495fd6818b43a20167cb11d8a67f7744ee0f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/amphp/process/zipball/f09e3ed3b0a953ccbfff1140f12be4a884f0aa83", - "reference": "f09e3ed3b0a953ccbfff1140f12be4a884f0aa83", + "url": "https://api.github.com/repos/amphp/process/zipball/76e9495fd6818b43a20167cb11d8a67f7744ee0f", + "reference": "76e9495fd6818b43a20167cb11d8a67f7744ee0f", "shasum": "" }, "require": { @@ -1347,7 +1347,7 @@ "homepage": "https://github.com/amphp/process", "support": { "issues": "https://github.com/amphp/process/issues", - "source": "https://github.com/amphp/process/tree/v1.1.3" + "source": "https://github.com/amphp/process/tree/v1.1.4" }, "funding": [ { @@ -1355,7 +1355,7 @@ "type": "github" } ], - "time": "2021-12-17T19:09:33+00:00" + "time": "2022-07-06T23:50:12+00:00" }, { "name": "amphp/redis", @@ -2353,12 +2353,12 @@ "source": { "type": "git", "url": "https://github.com/danog/MadelineProto.git", - "reference": "931cb7f23199719ca80e9611f5f7a2cc438592e1" + "reference": "3c979f74604c55446267f526d4457467d0665559" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/danog/MadelineProto/zipball/931cb7f23199719ca80e9611f5f7a2cc438592e1", - "reference": "931cb7f23199719ca80e9611f5f7a2cc438592e1", + "url": "https://api.github.com/repos/danog/MadelineProto/zipball/3c979f74604c55446267f526d4457467d0665559", + "reference": "3c979f74604c55446267f526d4457467d0665559", "shasum": "" }, "require": { @@ -2393,10 +2393,10 @@ "php-64bit": ">=8.0", "phpseclib/phpseclib": "^3", "psr/http-factory": "^1.0", - "psr/log": "^1", + "psr/log": "^1|^2|^3", "symfony/polyfill-mbstring": "*", "symfony/polyfill-php80": "^1.18", - "webmozart/assert": "^1.10" + "webmozart/assert": "^1.11" }, "conflict": { "ext-pthreads": "*", @@ -2471,7 +2471,7 @@ "type": "github" } ], - "time": "2022-06-07T16:40:19+00:00" + "time": "2022-07-16T16:10:58+00:00" }, { "name": "danog/magicalserializer", @@ -2781,16 +2781,16 @@ }, { "name": "league/uri", - "version": "6.6.0", + "version": "6.7.1", "source": { "type": "git", "url": "https://github.com/thephpleague/uri.git", - "reference": "4147f19b9de3b5af6a258f35d7a0efbbf9963298" + "reference": "2d7c87a0860f3126a39f44a8a9bf2fed402dcfea" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thephpleague/uri/zipball/4147f19b9de3b5af6a258f35d7a0efbbf9963298", - "reference": "4147f19b9de3b5af6a258f35d7a0efbbf9963298", + "url": "https://api.github.com/repos/thephpleague/uri/zipball/2d7c87a0860f3126a39f44a8a9bf2fed402dcfea", + "reference": "2d7c87a0860f3126a39f44a8a9bf2fed402dcfea", "shasum": "" }, "require": { @@ -2804,6 +2804,7 @@ }, "require-dev": { "friendsofphp/php-cs-fixer": "^v3.3.2", + "nyholm/psr7": "^1.5", "php-http/psr7-integration-tests": "^1.1", "phpstan/phpstan": "^1.2.0", "phpstan/phpstan-deprecation-rules": "^1.0", @@ -2867,7 +2868,7 @@ "docs": "https://uri.thephpleague.com", "forum": "https://thephpleague.slack.com", "issues": "https://github.com/thephpleague/uri/issues", - "source": "https://github.com/thephpleague/uri/tree/6.6.0" + "source": "https://github.com/thephpleague/uri/tree/6.7.1" }, "funding": [ { @@ -2875,7 +2876,7 @@ "type": "github" } ], - "time": "2022-05-28T05:44:35+00:00" + "time": "2022-06-29T09:48:18+00:00" }, { "name": "league/uri-interfaces", @@ -3173,16 +3174,16 @@ }, { "name": "paragonie/constant_time_encoding", - "version": "v2.6.0", + "version": "v2.6.3", "source": { "type": "git", "url": "https://github.com/paragonie/constant_time_encoding.git", - "reference": "3f3bf06406244a94aeffd5818ba05b41a1754ae5" + "reference": "58c3f47f650c94ec05a151692652a868995d2938" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/paragonie/constant_time_encoding/zipball/3f3bf06406244a94aeffd5818ba05b41a1754ae5", - "reference": "3f3bf06406244a94aeffd5818ba05b41a1754ae5", + "url": "https://api.github.com/repos/paragonie/constant_time_encoding/zipball/58c3f47f650c94ec05a151692652a868995d2938", + "reference": "58c3f47f650c94ec05a151692652a868995d2938", "shasum": "" }, "require": { @@ -3236,7 +3237,7 @@ "issues": "https://github.com/paragonie/constant_time_encoding/issues", "source": "https://github.com/paragonie/constant_time_encoding" }, - "time": "2022-06-10T07:38:28+00:00" + "time": "2022-06-14T06:56:20+00:00" }, { "name": "paragonie/random_compat", @@ -3578,30 +3579,30 @@ }, { "name": "psr/log", - "version": "1.1.4", + "version": "3.0.0", "source": { "type": "git", "url": "https://github.com/php-fig/log.git", - "reference": "d49695b909c3b7628b6289db5479a1c204601f11" + "reference": "fe5ea303b0887d5caefd3d431c3e61ad47037001" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/log/zipball/d49695b909c3b7628b6289db5479a1c204601f11", - "reference": "d49695b909c3b7628b6289db5479a1c204601f11", + "url": "https://api.github.com/repos/php-fig/log/zipball/fe5ea303b0887d5caefd3d431c3e61ad47037001", + "reference": "fe5ea303b0887d5caefd3d431c3e61ad47037001", "shasum": "" }, "require": { - "php": ">=5.3.0" + "php": ">=8.0.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.1.x-dev" + "dev-master": "3.x-dev" } }, "autoload": { "psr-4": { - "Psr\\Log\\": "Psr/Log/" + "Psr\\Log\\": "src" } }, "notification-url": "https://packagist.org/downloads/", @@ -3622,9 +3623,9 @@ "psr-3" ], "support": { - "source": "https://github.com/php-fig/log/tree/1.1.4" + "source": "https://github.com/php-fig/log/tree/3.0.0" }, - "time": "2021-05-03T11:20:27+00:00" + "time": "2021-07-14T16:46:02+00:00" }, { "name": "symfony/polyfill-ctype", @@ -4018,12 +4019,12 @@ "source": { "type": "git", "url": "https://github.com/Roave/SecurityAdvisories.git", - "reference": "bf362097fbfe4580b99b696dd8208b24ffd112b2" + "reference": "0144c1225b5e4da02cf2c27a0e2cb2705168c47c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Roave/SecurityAdvisories/zipball/bf362097fbfe4580b99b696dd8208b24ffd112b2", - "reference": "bf362097fbfe4580b99b696dd8208b24ffd112b2", + "url": "https://api.github.com/repos/Roave/SecurityAdvisories/zipball/0144c1225b5e4da02cf2c27a0e2cb2705168c47c", + "reference": "0144c1225b5e4da02cf2c27a0e2cb2705168c47c", "shasum": "" }, "conflict": { @@ -4057,6 +4058,8 @@ "bottelet/flarepoint": "<2.2.1", "brightlocal/phpwhois": "<=4.2.5", "brotkrueml/codehighlight": "<2.7", + "brotkrueml/schema": "<1.13.1|>=2,<2.5.1", + "brotkrueml/typo3-matomo-integration": "<1.3.2", "buddypress/buddypress": "<7.2.1", "bugsnag/bugsnag-laravel": ">=2,<2.0.2", "bytefury/crater": "<6.0.2", @@ -4074,7 +4077,7 @@ "codiad/codiad": "<=2.8.4", "composer/composer": "<1.10.26|>=2-alpha.1,<2.2.12|>=2.3,<2.3.5", "concrete5/concrete5": "<9", - "concrete5/core": "<8.5.7", + "concrete5/core": "<8.5.8|>=9,<9.1", "contao-components/mediaelement": ">=2.14.2,<2.21.1", "contao/contao": ">=4,<4.4.56|>=4.5,<4.9.18|>=4.10,<4.11.7|>=4.13,<4.13.3", "contao/core": ">=2,<3.5.39", @@ -4083,7 +4086,7 @@ "contao/managed-edition": "<=1.5", "craftcms/cms": "<3.7.36", "croogo/croogo": "<3.0.7", - "cuyz/valinor": ">=0.5,<0.7", + "cuyz/valinor": "<0.12", "czproject/git-php": "<4.0.3", "darylldoyle/safe-svg": "<1.9.10", "datadog/dd-trace": ">=0.30,<0.30.2", @@ -4099,13 +4102,14 @@ "doctrine/mongodb-odm": ">=1,<1.0.2", "doctrine/mongodb-odm-bundle": ">=2,<3.0.1", "doctrine/orm": ">=2,<2.4.8|>=2.5,<2.5.1|>=2.8.3,<2.8.4", - "dolibarr/dolibarr": "= 12.0.5|<16|>= 3.3.beta1, < 13.0.2", - "dompdf/dompdf": "<1.2.1", + "dolibarr/dolibarr": "<16|= 12.0.5|>= 3.3.beta1, < 13.0.2", + "dompdf/dompdf": "<2", "drupal/core": ">=7,<7.88|>=8,<9.2.13|>=9.3,<9.3.6", "drupal/drupal": ">=7,<7.80|>=8,<8.9.16|>=9,<9.1.12|>=9.2,<9.2.4", "dweeves/magmi": "<=0.7.24", "ecodev/newsletter": "<=4", "ectouch/ectouch": "<=2.7.2", + "elefant/cms": "<1.3.13", "elgg/elgg": "<3.3.24|>=4,<4.0.5", "endroid/qr-code-bundle": "<3.4.2", "enshrined/svg-sanitize": "<0.15", @@ -4142,7 +4146,7 @@ "fooman/tcpdf": "<6.2.22", "forkcms/forkcms": "<5.11.1", "fossar/tcpdf-parser": "<6.2.22", - "francoisjacquet/rosariosis": "<9", + "francoisjacquet/rosariosis": "<9.1", "friendsofsymfony/oauth2-php": "<1.3", "friendsofsymfony/rest-bundle": ">=1.2,<1.2.2", "friendsofsymfony/user-bundle": ">=1.2,<1.3.5", @@ -4152,7 +4156,7 @@ "fuel/core": "<1.8.1", "gaoming13/wechat-php-sdk": "<=1.10.2", "genix/cms": "<=1.1.11", - "getgrav/grav": "<1.7.33", + "getgrav/grav": "<1.7.34", "getkirby/cms": "<3.5.8", "getkirby/panel": "<2.5.14", "gilacms/gila": "<=1.11.4", @@ -4162,7 +4166,7 @@ "gree/jose": "<=2.2", "gregwar/rst": "<1.0.3", "grumpydictator/firefly-iii": "<5.6.5", - "guzzlehttp/guzzle": "<6.5.7|>=7,<7.4.4", + "guzzlehttp/guzzle": "<6.5.8|>=7,<7.4.5", "guzzlehttp/psr7": "<1.8.4|>=2,<2.1.1", "helloxz/imgurl": "= 2.31|<=2.31", "hillelcoren/invoice-ninja": "<5.3.35", @@ -4172,6 +4176,7 @@ "ibexa/core": ">=4,<4.0.7|>=4.1,<4.1.4", "ibexa/post-install": "<=1.0.4", "icecoder/icecoder": "<=8.1", + "idno/known": "<=1.3.1", "illuminate/auth": ">=4,<4.0.99|>=4.1,<=4.1.31|>=4.2,<=4.2.22|>=5,<=5.0.35|>=5.1,<=5.1.46|>=5.2,<=5.2.45|>=5.3,<=5.3.31|>=5.4,<=5.4.36|>=5.5,<5.5.10", "illuminate/cookie": ">=4,<=4.0.11|>=4.1,<=4.1.99999|>=4.2,<=4.2.99999|>=5,<=5.0.99999|>=5.1,<=5.1.99999|>=5.2,<=5.2.99999|>=5.3,<=5.3.99999|>=5.4,<=5.4.99999|>=5.5,<=5.5.49|>=5.6,<=5.6.99999|>=5.7,<=5.7.99999|>=5.8,<=5.8.99999|>=6,<6.18.31|>=7,<7.22.4", "illuminate/database": "<6.20.26|>=7,<7.30.5|>=8,<8.40", @@ -4179,6 +4184,7 @@ "illuminate/view": "<6.20.42|>=7,<7.30.6|>=8,<8.75", "impresscms/impresscms": "<=1.4.3", "in2code/femanager": "<5.5.1|>=6,<6.3.1", + "in2code/lux": "<17.6.1|>=18,<24.0.2", "intelliants/subrion": "<=4.2.1", "ivankristianto/phpwhois": "<=4.3", "jackalope/jackalope-doctrine-dbal": "<1.7.4", @@ -4194,6 +4200,7 @@ "kevinpapst/kimai2": "<1.16.7", "kitodo/presentation": "<3.1.2", "klaviyo/magento2-extension": ">=1,<3", + "krayin/laravel-crm": "<1.2.2", "kreait/firebase-php": ">=3.2,<3.8.1", "la-haute-societe/tcpdf": "<6.2.22", "laminas/laminas-form": "<2.17.1|>=3,<3.0.2|>=3.1,<3.1.1", @@ -4243,14 +4250,14 @@ "nette/nette": ">=2,<2.0.19|>=2.1,<2.1.13", "nilsteampassnet/teampass": "<=2.1.27.36", "noumo/easyii": "<=0.9", - "nukeviet/nukeviet": "<4.3.4", + "nukeviet/nukeviet": "<4.5.2", "nystudio107/craft-seomatic": "<3.4.12", "nzo/url-encryptor-bundle": ">=4,<4.3.2|>=5,<5.0.1", "october/backend": "<1.1.2", "october/cms": "= 1.1.1|= 1.0.471|= 1.0.469|>=1.0.319,<1.0.469", "october/october": ">=1.0.319,<1.0.466|>=2.1,<2.1.12", "october/rain": "<1.0.472|>=1.1,<1.1.2", - "october/system": "<1.0.475|>=1.1,<1.1.11|>=2,<2.1.27", + "october/system": "<1.0.476|>=1.1,<1.1.12|>=2,<2.2.15", "onelogin/php-saml": "<2.10.4", "oneup/uploader-bundle": "<1.9.3|>=2,<2.1.5", "open-web-analytics/open-web-analytics": "<1.7.4", @@ -4258,8 +4265,10 @@ "openid/php-openid": "<2.3", "openmage/magento-lts": "<19.4.15|>=20,<20.0.13", "orchid/platform": ">=9,<9.4.4", + "oro/commerce": ">=5,<5.0.4", "oro/crm": ">=1.7,<1.7.4|>=3.1,<4.1.17|>=4.2,<4.2.7", "oro/platform": ">=1.7,<1.7.4|>=3.1,<3.1.29|>=4.1,<4.1.17|>=4.2,<4.2.8", + "packbackbooks/lti-1-3-php-library": "<5", "padraic/humbug_get_contents": "<1.1.2", "pagarme/pagarme-php": ">=0,<3", "pagekit/pagekit": "<=1.0.18", @@ -4283,11 +4292,12 @@ "phpwhois/phpwhois": "<=4.2.5", "phpxmlrpc/extras": "<0.6.1", "pimcore/data-hub": "<1.2.4", - "pimcore/pimcore": "<10.4", + "pimcore/pimcore": "<10.4.4", "pocketmine/bedrock-protocol": "<8.0.2", "pocketmine/pocketmine-mp": ">= 4.0.0-BETA5, < 4.4.2|<4.2.10", "pressbooks/pressbooks": "<5.18", "prestashop/autoupgrade": ">=4,<4.10.1", + "prestashop/blockwishlist": ">=2,<2.1.1", "prestashop/contactform": ">1.0.1,<4.3", "prestashop/gamification": "<2.3.2", "prestashop/prestashop": ">=1.7,<=1.7.8.2", @@ -4317,17 +4327,18 @@ "shopware/core": "<=6.4.9", "shopware/platform": "<=6.4.9", "shopware/production": "<=6.3.5.2", - "shopware/shopware": "<5.7.9", + "shopware/shopware": "<5.7.12", "shopware/storefront": "<=6.4.8.1", "shopxo/shopxo": "<2.2.6", "showdoc/showdoc": "<2.10.4", "silverstripe/admin": ">=1,<1.8.1", - "silverstripe/assets": ">=1,<1.4.7|>=1.5,<1.5.2", + "silverstripe/assets": ">=1,<1.10.1", "silverstripe/cms": "<4.3.6|>=4.4,<4.4.4", "silverstripe/comments": ">=1.3,<1.9.99|>=2,<2.9.99|>=3,<3.1.1", "silverstripe/forum": "<=0.6.1|>=0.7,<=0.7.3", - "silverstripe/framework": "<4.10.1", + "silverstripe/framework": "<4.10.9", "silverstripe/graphql": "<3.5.2|>=4-alpha.1,<4-alpha.2|= 4.0.0-alpha1", + "silverstripe/hybridsessions": ">=1,<2.4.1|>=2.5,<2.5.1", "silverstripe/registry": ">=2.1,<2.1.2|>=2.2,<2.2.1", "silverstripe/restfulserver": ">=1,<1.0.9|>=2,<2.0.4", "silverstripe/silverstripe-omnipay": "<2.5.2|>=3,<3.0.2|>=3.1,<3.1.4|>=3.2,<3.2.1", @@ -4400,17 +4411,18 @@ "thelia/backoffice-default-template": ">=2.1,<2.1.2", "thelia/thelia": ">=2.1-beta.1,<2.1.3", "theonedemon/phpwhois": "<=4.2.5", + "thinkcmf/thinkcmf": "<=5.1.7", "tinymce/tinymce": "<5.10", "titon/framework": ">=0,<9.9.99", - "topthink/framework": "<6.0.12", + "topthink/framework": "<=6.0.12", "topthink/think": "<=6.0.9", "topthink/thinkphp": "<=3.2.3", "tribalsystems/zenario": "<9.2.55826", "truckersmp/phpwhois": "<=4.3.1", "twig/twig": "<1.38|>=2,<2.14.11|>=3,<3.3.8", - "typo3/cms": ">=6.2,<6.2.30|>=7,<7.6.32|>=8,<8.7.38|>=9,<9.5.29|>=10,<10.4.19|>=11,<11.5", + "typo3/cms": ">=6.2,<6.2.30|>=7,<7.6.32|>=8,<8.7.38|>=9,<9.5.29|>=10,<10.4.29|>=11,<11.5.11", "typo3/cms-backend": ">=7,<=7.6.50|>=8,<=8.7.39|>=9,<=9.5.24|>=10,<=10.4.13|>=11,<=11.1", - "typo3/cms-core": ">=6.2,<=6.2.56|>=7,<=7.6.52|>=8,<=8.7.41|>=9,<9.5.29|>=10,<10.4.19|>=11,<11.5", + "typo3/cms-core": ">=6.2,<=6.2.56|>=7,<7.6.57|>=8,<8.7.47|>=9,<9.5.35|>=10,<10.4.29|>=11,<11.5.11", "typo3/cms-form": ">=8,<=8.7.39|>=9,<=9.5.24|>=10,<=10.4.13|>=11,<=11.1", "typo3/flow": ">=1,<1.0.4|>=1.1,<1.1.1|>=2,<2.0.1|>=2.3,<2.3.16|>=3,<3.0.12|>=3.1,<3.1.10|>=3.2,<3.2.13|>=3.3,<3.3.13|>=4,<4.0.6", "typo3/neos": ">=1.1,<1.1.3|>=1.2,<1.2.13|>=2,<2.0.4|>=2.3,<2.3.99|>=3,<3.0.20|>=3.1,<3.1.18|>=3.2,<3.2.14|>=3.3,<3.3.23|>=4,<4.0.17|>=4.1,<4.1.16|>=4.2,<4.2.12|>=4.3,<4.3.3", @@ -4430,6 +4442,7 @@ "webcoast/deferred-image-processing": "<1.0.2", "wikimedia/parsoid": "<0.12.2", "willdurand/js-translation-bundle": "<2.1.1", + "wintercms/winter": "<1.0.475|>=1.1,<1.1.9", "wp-cli/wp-cli": "<2.5", "wp-graphql/wp-graphql": "<0.3.5", "wpanel/wpanel4-cms": "<=4.3.1", @@ -4508,7 +4521,7 @@ "type": "tidelift" } ], - "time": "2022-06-10T00:15:15+00:00" + "time": "2022-07-15T22:04:13+00:00" } ], "aliases": [], From 432e533f882287b4373044e26dda2cc9284ed90b Mon Sep 17 00:00:00 2001 From: Alexander Pankratov Date: Fri, 22 Jul 2022 01:12:52 +0300 Subject: [PATCH 022/270] Update madelineProto --- composer.json | 2 +- composer.lock | 29 ++++++++++++++--------------- 2 files changed, 15 insertions(+), 16 deletions(-) diff --git a/composer.json b/composer.json index 148be50..2c1b49b 100644 --- a/composer.json +++ b/composer.json @@ -28,7 +28,7 @@ "amphp/websocket-client": "^1", "amphp/http-client": "^4", "vlucas/phpdotenv": "^4", - "danog/madelineproto": "dev-stable", + "danog/madelineproto": "^7.0", "amphp/http-server-form-parser": "^1.1" }, "require-dev": { diff --git a/composer.lock b/composer.lock index 3eb3612..21306da 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "a0e9091df5fdf3da55db5aaa29b01fb5", + "content-hash": "7ed8680412f85dd1a2d30068dee6a747", "packages": [ { "name": "amphp/amp", @@ -2349,16 +2349,16 @@ }, { "name": "danog/madelineproto", - "version": "dev-stable", + "version": "7.0.101.9999", "source": { "type": "git", "url": "https://github.com/danog/MadelineProto.git", - "reference": "3c979f74604c55446267f526d4457467d0665559" + "reference": "01a652b3ac71ab99ca178b1417aa774e3c76a8e3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/danog/MadelineProto/zipball/3c979f74604c55446267f526d4457467d0665559", - "reference": "3c979f74604c55446267f526d4457467d0665559", + "url": "https://api.github.com/repos/danog/MadelineProto/zipball/01a652b3ac71ab99ca178b1417aa774e3c76a8e3", + "reference": "01a652b3ac71ab99ca178b1417aa774e3c76a8e3", "shasum": "" }, "require": { @@ -2403,7 +2403,7 @@ "krakjoe/pthreads-polyfill": "*" }, "require-dev": { - "bamarni/composer-bin-plugin": "^1.4", + "bamarni/composer-bin-plugin": "1.5.0", "danog/phpdoc": "^0.1.7", "ext-ctype": "*", "phabel/phabel": "^1", @@ -2419,7 +2419,6 @@ "ext-pdo": "Install pdo extension to support database used as cache", "ext-primemodule": "Install the primemodule and FFI extensions to speed up MadelineProto (https://prime.madelineproto.xyz)" }, - "default-branch": true, "type": "project", "extra": { "phabel": { @@ -2463,7 +2462,7 @@ ], "support": { "issues": "https://github.com/danog/MadelineProto/issues", - "source": "https://github.com/danog/MadelineProto/tree/stable" + "source": "https://github.com/danog/MadelineProto/tree/7.0.101.9999" }, "funding": [ { @@ -2471,7 +2470,7 @@ "type": "github" } ], - "time": "2022-07-16T16:10:58+00:00" + "time": "2022-07-18T12:41:49+00:00" }, { "name": "danog/magicalserializer", @@ -4019,12 +4018,12 @@ "source": { "type": "git", "url": "https://github.com/Roave/SecurityAdvisories.git", - "reference": "0144c1225b5e4da02cf2c27a0e2cb2705168c47c" + "reference": "cac27edea0578f194ba24dd8e0c4ee85ec622078" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Roave/SecurityAdvisories/zipball/0144c1225b5e4da02cf2c27a0e2cb2705168c47c", - "reference": "0144c1225b5e4da02cf2c27a0e2cb2705168c47c", + "url": "https://api.github.com/repos/Roave/SecurityAdvisories/zipball/cac27edea0578f194ba24dd8e0c4ee85ec622078", + "reference": "cac27edea0578f194ba24dd8e0c4ee85ec622078", "shasum": "" }, "conflict": { @@ -4352,7 +4351,7 @@ "simplito/elliptic-php": "<1.0.6", "slim/slim": "<2.6", "smarty/smarty": "<3.1.45|>=4,<4.1.1", - "snipe/snipe-it": "<5.4.4|>= 6.0.0-RC-1, <= 6.0.0-RC-5", + "snipe/snipe-it": "<=6.0.2|>= 6.0.0-RC-1, <= 6.0.0-RC-5", "socalnick/scn-social-auth": "<1.15.2", "socialiteproviders/steam": "<1.1", "spipu/html2pdf": "<5.2.4", @@ -4443,6 +4442,7 @@ "wikimedia/parsoid": "<0.12.2", "willdurand/js-translation-bundle": "<2.1.1", "wintercms/winter": "<1.0.475|>=1.1,<1.1.9", + "woocommerce/woocommerce": "<6.6", "wp-cli/wp-cli": "<2.5", "wp-graphql/wp-graphql": "<0.3.5", "wpanel/wpanel4-cms": "<=4.3.1", @@ -4521,13 +4521,12 @@ "type": "tidelift" } ], - "time": "2022-07-15T22:04:13+00:00" + "time": "2022-07-21T22:04:13+00:00" } ], "aliases": [], "minimum-stability": "dev", "stability-flags": { - "danog/madelineproto": 20, "roave/security-advisories": 20 }, "prefer-stable": true, From ab5654c2102ac8e8a403728a58b5c25d6953c599 Mon Sep 17 00:00:00 2001 From: Alexander Pankratov Date: Sun, 7 Aug 2022 23:21:28 +0300 Subject: [PATCH 023/270] Update madelineProto --- composer.lock | 82 +++++++++++++++++++++++++++------------------------ 1 file changed, 44 insertions(+), 38 deletions(-) diff --git a/composer.lock b/composer.lock index 21306da..0085fd0 100644 --- a/composer.lock +++ b/composer.lock @@ -2349,16 +2349,16 @@ }, { "name": "danog/madelineproto", - "version": "7.0.101.9999", + "version": "7.0.114.9999", "source": { "type": "git", "url": "https://github.com/danog/MadelineProto.git", - "reference": "01a652b3ac71ab99ca178b1417aa774e3c76a8e3" + "reference": "0fe97e7d286ffd3f0f631d375ae815d9c6e875df" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/danog/MadelineProto/zipball/01a652b3ac71ab99ca178b1417aa774e3c76a8e3", - "reference": "01a652b3ac71ab99ca178b1417aa774e3c76a8e3", + "url": "https://api.github.com/repos/danog/MadelineProto/zipball/0fe97e7d286ffd3f0f631d375ae815d9c6e875df", + "reference": "0fe97e7d286ffd3f0f631d375ae815d9c6e875df", "shasum": "" }, "require": { @@ -2462,7 +2462,7 @@ ], "support": { "issues": "https://github.com/danog/MadelineProto/issues", - "source": "https://github.com/danog/MadelineProto/tree/7.0.101.9999" + "source": "https://github.com/danog/MadelineProto/tree/7.0.114.9999" }, "funding": [ { @@ -2470,7 +2470,7 @@ "type": "github" } ], - "time": "2022-07-18T12:41:49+00:00" + "time": "2022-07-29T10:29:43+00:00" }, { "name": "danog/magicalserializer", @@ -2570,16 +2570,16 @@ }, { "name": "danog/tg-file-decoder", - "version": "0.1.9", + "version": "0.1.11", "source": { "type": "git", "url": "https://github.com/danog/tg-file-decoder.git", - "reference": "6ff8389fc7365fee8db51d5142ca7261c43b99c2" + "reference": "d7472df075c74844a083125a35f8d9e1066bcc8e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/danog/tg-file-decoder/zipball/6ff8389fc7365fee8db51d5142ca7261c43b99c2", - "reference": "6ff8389fc7365fee8db51d5142ca7261c43b99c2", + "url": "https://api.github.com/repos/danog/tg-file-decoder/zipball/d7472df075c74844a083125a35f8d9e1066bcc8e", + "reference": "d7472df075c74844a083125a35f8d9e1066bcc8e", "shasum": "" }, "require": { @@ -2621,7 +2621,7 @@ ], "support": { "issues": "https://github.com/danog/tg-file-decoder/issues", - "source": "https://github.com/danog/tg-file-decoder/tree/0.1.9" + "source": "https://github.com/danog/tg-file-decoder/tree/0.1.11" }, "funding": [ { @@ -2629,7 +2629,7 @@ "type": "github" } ], - "time": "2022-02-09T13:10:06+00:00" + "time": "2022-07-26T18:02:44+00:00" }, { "name": "daverandom/libdns", @@ -3019,16 +3019,16 @@ }, { "name": "monolog/monolog", - "version": "2.7.0", + "version": "2.8.0", "source": { "type": "git", "url": "https://github.com/Seldaek/monolog.git", - "reference": "5579edf28aee1190a798bfa5be8bc16c563bd524" + "reference": "720488632c590286b88b80e62aa3d3d551ad4a50" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Seldaek/monolog/zipball/5579edf28aee1190a798bfa5be8bc16c563bd524", - "reference": "5579edf28aee1190a798bfa5be8bc16c563bd524", + "url": "https://api.github.com/repos/Seldaek/monolog/zipball/720488632c590286b88b80e62aa3d3d551ad4a50", + "reference": "720488632c590286b88b80e62aa3d3d551ad4a50", "shasum": "" }, "require": { @@ -3048,11 +3048,10 @@ "guzzlehttp/psr7": "^2.2", "mongodb/mongodb": "^1.8", "php-amqplib/php-amqplib": "~2.4 || ^3", - "php-console/php-console": "^3.1.3", "phpspec/prophecy": "^1.15", "phpstan/phpstan": "^0.12.91", "phpunit/phpunit": "^8.5.14", - "predis/predis": "^1.1", + "predis/predis": "^1.1 || ^2.0", "rollbar/rollbar": "^1.3 || ^2 || ^3", "ruflin/elastica": "^7", "swiftmailer/swiftmailer": "^5.3|^6.0", @@ -3072,7 +3071,6 @@ "graylog2/gelf-php": "Allow sending log messages to a GrayLog2 server", "mongodb/mongodb": "Allow sending log messages to a MongoDB server (via library)", "php-amqplib/php-amqplib": "Allow sending log messages to an AMQP server using php-amqplib", - "php-console/php-console": "Allow sending log messages to Google Chrome", "rollbar/rollbar": "Allow sending log messages to Rollbar", "ruflin/elastica": "Allow sending log messages to an Elastic Search server" }, @@ -3107,7 +3105,7 @@ ], "support": { "issues": "https://github.com/Seldaek/monolog/issues", - "source": "https://github.com/Seldaek/monolog/tree/2.7.0" + "source": "https://github.com/Seldaek/monolog/tree/2.8.0" }, "funding": [ { @@ -3119,7 +3117,7 @@ "type": "tidelift" } ], - "time": "2022-06-09T08:59:12+00:00" + "time": "2022-07-24T11:55:47+00:00" }, { "name": "nikic/fast-route", @@ -3290,29 +3288,33 @@ }, { "name": "phpoption/phpoption", - "version": "1.8.1", + "version": "1.9.0", "source": { "type": "git", "url": "https://github.com/schmittjoh/php-option.git", - "reference": "eab7a0df01fe2344d172bff4cd6dbd3f8b84ad15" + "reference": "dc5ff11e274a90cc1c743f66c9ad700ce50db9ab" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/schmittjoh/php-option/zipball/eab7a0df01fe2344d172bff4cd6dbd3f8b84ad15", - "reference": "eab7a0df01fe2344d172bff4cd6dbd3f8b84ad15", + "url": "https://api.github.com/repos/schmittjoh/php-option/zipball/dc5ff11e274a90cc1c743f66c9ad700ce50db9ab", + "reference": "dc5ff11e274a90cc1c743f66c9ad700ce50db9ab", "shasum": "" }, "require": { - "php": "^7.0 || ^8.0" + "php": "^7.2.5 || ^8.0" }, "require-dev": { - "bamarni/composer-bin-plugin": "^1.4.1", - "phpunit/phpunit": "^6.5.14 || ^7.5.20 || ^8.5.19 || ^9.5.8" + "bamarni/composer-bin-plugin": "^1.8", + "phpunit/phpunit": "^8.5.28 || ^9.5.21" }, "type": "library", "extra": { + "bamarni-bin": { + "bin-links": true, + "forward-command": true + }, "branch-alias": { - "dev-master": "1.8-dev" + "dev-master": "1.9-dev" } }, "autoload": { @@ -3345,7 +3347,7 @@ ], "support": { "issues": "https://github.com/schmittjoh/php-option/issues", - "source": "https://github.com/schmittjoh/php-option/tree/1.8.1" + "source": "https://github.com/schmittjoh/php-option/tree/1.9.0" }, "funding": [ { @@ -3357,7 +3359,7 @@ "type": "tidelift" } ], - "time": "2021-12-04T23:24:31+00:00" + "time": "2022-07-30T15:51:26+00:00" }, { "name": "phpseclib/phpseclib", @@ -4018,12 +4020,12 @@ "source": { "type": "git", "url": "https://github.com/Roave/SecurityAdvisories.git", - "reference": "cac27edea0578f194ba24dd8e0c4ee85ec622078" + "reference": "8b99cfd0a6224d0fc7b223603210d48e36a79966" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Roave/SecurityAdvisories/zipball/cac27edea0578f194ba24dd8e0c4ee85ec622078", - "reference": "cac27edea0578f194ba24dd8e0c4ee85ec622078", + "url": "https://api.github.com/repos/Roave/SecurityAdvisories/zipball/8b99cfd0a6224d0fc7b223603210d48e36a79966", + "reference": "8b99cfd0a6224d0fc7b223603210d48e36a79966", "shasum": "" }, "conflict": { @@ -4103,7 +4105,7 @@ "doctrine/orm": ">=2,<2.4.8|>=2.5,<2.5.1|>=2.8.3,<2.8.4", "dolibarr/dolibarr": "<16|= 12.0.5|>= 3.3.beta1, < 13.0.2", "dompdf/dompdf": "<2", - "drupal/core": ">=7,<7.88|>=8,<9.2.13|>=9.3,<9.3.6", + "drupal/core": ">=7,<7.91|>=8,<9.3.19|>=9.4,<9.4.3", "drupal/drupal": ">=7,<7.80|>=8,<8.9.16|>=9,<9.1.12|>=9.2,<9.2.4", "dweeves/magmi": "<=0.7.24", "ecodev/newsletter": "<=4", @@ -4141,6 +4143,7 @@ "flarum/sticky": ">=0.1-beta.14,<=0.1-beta.15", "flarum/tags": "<=0.1-beta.13", "fluidtypo3/vhs": "<5.1.1", + "fof/byobu": ">=0.3-beta.2,<1.1.7", "fof/upload": "<1.2.3", "fooman/tcpdf": "<6.2.22", "forkcms/forkcms": "<5.11.1", @@ -4185,6 +4188,7 @@ "in2code/femanager": "<5.5.1|>=6,<6.3.1", "in2code/lux": "<17.6.1|>=18,<24.0.2", "intelliants/subrion": "<=4.2.1", + "islandora/islandora": ">=2,<2.4.1", "ivankristianto/phpwhois": "<=4.3", "jackalope/jackalope-doctrine-dbal": "<1.7.4", "james-heinrich/getid3": "<1.9.21", @@ -4202,6 +4206,7 @@ "krayin/laravel-crm": "<1.2.2", "kreait/firebase-php": ">=3.2,<3.8.1", "la-haute-societe/tcpdf": "<6.2.22", + "laminas/laminas-diactoros": "<2.11.1", "laminas/laminas-form": "<2.17.1|>=3,<3.0.2|>=3.1,<3.1.1", "laminas/laminas-http": "<2.14.2", "laravel/fortify": "<1.11.1", @@ -4229,6 +4234,7 @@ "matyhtf/framework": "<3.0.6", "mautic/core": "<4.3|= 2.13.1", "mediawiki/core": ">=1.27,<1.27.6|>=1.29,<1.29.3|>=1.30,<1.30.2|>=1.31,<1.31.9|>=1.32,<1.32.6|>=1.32.99,<1.33.3|>=1.33.99,<1.34.3|>=1.34.99,<1.35", + "mezzio/mezzio-swoole": "<3.7|>=4,<4.3", "microweber/microweber": "<1.3", "miniorange/miniorange-saml": "<1.4.3", "mittwald/typo3_forum": "<1.2.1", @@ -4299,7 +4305,7 @@ "prestashop/blockwishlist": ">=2,<2.1.1", "prestashop/contactform": ">1.0.1,<4.3", "prestashop/gamification": "<2.3.2", - "prestashop/prestashop": ">=1.7,<=1.7.8.2", + "prestashop/prestashop": ">=1.6.0.10,<1.7.8.7", "prestashop/productcomments": ">=4,<4.2.1", "prestashop/ps_emailsubscription": "<2.6.1", "prestashop/ps_facetedsearch": "<3.4.1", @@ -4326,7 +4332,7 @@ "shopware/core": "<=6.4.9", "shopware/platform": "<=6.4.9", "shopware/production": "<=6.3.5.2", - "shopware/shopware": "<5.7.12", + "shopware/shopware": "<=5.7.13", "shopware/storefront": "<=6.4.8.1", "shopxo/shopxo": "<2.2.6", "showdoc/showdoc": "<2.10.4", @@ -4521,7 +4527,7 @@ "type": "tidelift" } ], - "time": "2022-07-21T22:04:13+00:00" + "time": "2022-08-06T06:06:57+00:00" } ], "aliases": [], From 4511cd8e63ce5c65bcbc49f706c371812165d48b Mon Sep 17 00:00:00 2001 From: Alexander Pankratov Date: Sun, 7 Aug 2022 23:56:52 +0300 Subject: [PATCH 024/270] Update mariadb --- docker-compose.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docker-compose.yml b/docker-compose.yml index dd13fcd..fe6ea2a 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -22,7 +22,7 @@ services: max-size: "1024k" max-file: "2" mysql: - image: mariadb:10.7 + image: mariadb:10.8 container_name: telegram-api-server-mysql restart: unless-stopped ports: @@ -31,6 +31,7 @@ services: - ./.mysql:/var/lib/mysql environment: MYSQL_ALLOW_EMPTY_PASSWORD: 'yes' + MARIADB_AUTO_UPGRADE: "1" command: ["mysqld", "--innodb-buffer-pool-size=16M"] networks: default: From c6d2bedbb270a9855a582a66f2f63f43c34c5cfa Mon Sep 17 00:00:00 2001 From: Alexander Pankratov Date: Wed, 24 Aug 2022 07:48:16 +0300 Subject: [PATCH 025/270] Close sleeping connections to DB --- composer.lock | 39 ++++++++++++++++++++------------------- docker-compose.yml | 2 +- 2 files changed, 21 insertions(+), 20 deletions(-) diff --git a/composer.lock b/composer.lock index 0085fd0..d9efc37 100644 --- a/composer.lock +++ b/composer.lock @@ -720,16 +720,16 @@ }, { "name": "amphp/http-server", - "version": "v2.1.5", + "version": "v2.1.7", "source": { "type": "git", "url": "https://github.com/amphp/http-server.git", - "reference": "70456948a96778abd6462e96bb07759ab958d6c5" + "reference": "850f1b22ad0f3459c6ef6e89e897c8abf2b18b4c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/amphp/http-server/zipball/70456948a96778abd6462e96bb07759ab958d6c5", - "reference": "70456948a96778abd6462e96bb07759ab958d6c5", + "url": "https://api.github.com/repos/amphp/http-server/zipball/850f1b22ad0f3459c6ef6e89e897c8abf2b18b4c", + "reference": "850f1b22ad0f3459c6ef6e89e897c8abf2b18b4c", "shasum": "" }, "require": { @@ -806,7 +806,7 @@ ], "support": { "issues": "https://github.com/amphp/http-server/issues", - "source": "https://github.com/amphp/http-server/tree/v2.1.5" + "source": "https://github.com/amphp/http-server/tree/v2.1.7" }, "funding": [ { @@ -814,7 +814,7 @@ "type": "github" } ], - "time": "2021-12-14T23:24:42+00:00" + "time": "2022-08-16T13:29:25+00:00" }, { "name": "amphp/http-server-form-parser", @@ -2349,16 +2349,16 @@ }, { "name": "danog/madelineproto", - "version": "7.0.114.9999", + "version": "7.0.121.9999", "source": { "type": "git", "url": "https://github.com/danog/MadelineProto.git", - "reference": "0fe97e7d286ffd3f0f631d375ae815d9c6e875df" + "reference": "75e5e5cf610d462ad894c7db88833816e5499778" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/danog/MadelineProto/zipball/0fe97e7d286ffd3f0f631d375ae815d9c6e875df", - "reference": "0fe97e7d286ffd3f0f631d375ae815d9c6e875df", + "url": "https://api.github.com/repos/danog/MadelineProto/zipball/75e5e5cf610d462ad894c7db88833816e5499778", + "reference": "75e5e5cf610d462ad894c7db88833816e5499778", "shasum": "" }, "require": { @@ -2462,7 +2462,7 @@ ], "support": { "issues": "https://github.com/danog/MadelineProto/issues", - "source": "https://github.com/danog/MadelineProto/tree/7.0.114.9999" + "source": "https://github.com/danog/MadelineProto/tree/7.0.121.9999" }, "funding": [ { @@ -2470,7 +2470,7 @@ "type": "github" } ], - "time": "2022-07-29T10:29:43+00:00" + "time": "2022-08-15T15:43:32+00:00" }, { "name": "danog/magicalserializer", @@ -4020,18 +4020,19 @@ "source": { "type": "git", "url": "https://github.com/Roave/SecurityAdvisories.git", - "reference": "8b99cfd0a6224d0fc7b223603210d48e36a79966" + "reference": "bd4a45f60f097f0c44f77c6d72caa24ebc9b9f66" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Roave/SecurityAdvisories/zipball/8b99cfd0a6224d0fc7b223603210d48e36a79966", - "reference": "8b99cfd0a6224d0fc7b223603210d48e36a79966", + "url": "https://api.github.com/repos/Roave/SecurityAdvisories/zipball/bd4a45f60f097f0c44f77c6d72caa24ebc9b9f66", + "reference": "bd4a45f60f097f0c44f77c6d72caa24ebc9b9f66", "shasum": "" }, "conflict": { "3f/pygmentize": "<1.2", "admidio/admidio": "<4.1.9", "adodb/adodb-php": "<=5.20.20|>=5.21,<=5.21.3", + "aheinze/cockpit": "<=2.2.1", "akaunting/akaunting": "<2.1.13", "alextselegidis/easyappointments": "<=1.4.3", "alterphp/easyadmin-extension-bundle": ">=1.2,<1.2.11|>=1.3,<1.3.1", @@ -4075,6 +4076,7 @@ "codeception/codeception": "<3.1.3|>=4,<4.1.22", "codeigniter/framework": "<=3.0.6", "codeigniter4/framework": "<4.1.9", + "codeigniter4/shield": "= 1.0.0-beta", "codiad/codiad": "<=2.8.4", "composer/composer": "<1.10.26|>=2-alpha.1,<2.2.12|>=2.3,<2.3.5", "concrete5/concrete5": "<9", @@ -4211,7 +4213,6 @@ "laminas/laminas-http": "<2.14.2", "laravel/fortify": "<1.11.1", "laravel/framework": "<6.20.42|>=7,<7.30.6|>=8,<8.75", - "laravel/laravel": "<=9.1.8", "laravel/socialite": ">=1,<1.0.99|>=2,<2.0.10", "latte/latte": "<2.10.8", "lavalite/cms": "<=5.8", @@ -4235,7 +4236,7 @@ "mautic/core": "<4.3|= 2.13.1", "mediawiki/core": ">=1.27,<1.27.6|>=1.29,<1.29.3|>=1.30,<1.30.2|>=1.31,<1.31.9|>=1.32,<1.32.6|>=1.32.99,<1.33.3|>=1.33.99,<1.34.3|>=1.34.99,<1.35", "mezzio/mezzio-swoole": "<3.7|>=4,<4.3", - "microweber/microweber": "<1.3", + "microweber/microweber": "<1.3.1", "miniorange/miniorange-saml": "<1.4.3", "mittwald/typo3_forum": "<1.2.1", "modx/revolution": "<= 2.8.3-pl|<2.8", @@ -4299,7 +4300,7 @@ "pimcore/data-hub": "<1.2.4", "pimcore/pimcore": "<10.4.4", "pocketmine/bedrock-protocol": "<8.0.2", - "pocketmine/pocketmine-mp": ">= 4.0.0-BETA5, < 4.4.2|<4.2.10", + "pocketmine/pocketmine-mp": "<4.7.2|>= 4.0.0-BETA5, < 4.4.2", "pressbooks/pressbooks": "<5.18", "prestashop/autoupgrade": ">=4,<4.10.1", "prestashop/blockwishlist": ">=2,<2.1.1", @@ -4527,7 +4528,7 @@ "type": "tidelift" } ], - "time": "2022-08-06T06:06:57+00:00" + "time": "2022-08-22T17:06:07+00:00" } ], "aliases": [], diff --git a/docker-compose.yml b/docker-compose.yml index fe6ea2a..b98de80 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -32,7 +32,7 @@ services: environment: MYSQL_ALLOW_EMPTY_PASSWORD: 'yes' MARIADB_AUTO_UPGRADE: "1" - command: ["mysqld", "--innodb-buffer-pool-size=16M"] + command: ["mysqld", "--innodb-buffer-pool-size=16M", "--wait_timeout=65"] networks: default: name: telegram-api-server \ No newline at end of file From c292edc1be10fb0a5c28a2c20418c1034f3a7926 Mon Sep 17 00:00:00 2001 From: Alexander Pankratov Date: Wed, 24 Aug 2022 21:29:45 +0300 Subject: [PATCH 026/270] Try shutdown normally in healthcheck --- src/Server/HealthCheck.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/Server/HealthCheck.php b/src/Server/HealthCheck.php index 6dadec5..df5def5 100644 --- a/src/Server/HealthCheck.php +++ b/src/Server/HealthCheck.php @@ -59,7 +59,11 @@ public static function start(int $parentPid): void Logger::getInstance()->critical('Health check failed'); if (self::isProcessAlive($parentPid)) { Logger::getInstance()->critical('Killing parent process'); - exec("kill -9 $parentPid"); + + exec("kill SIGINT $parentPid"); + if (self::isProcessAlive($parentPid)) { + exec("kill SIGKILL $parentPid"); + } } } From e6e2a1a2a02908a57ff10fc0864a8431ccd054d7 Mon Sep 17 00:00:00 2001 From: Alexander Pankratov Date: Wed, 24 Aug 2022 21:32:19 +0300 Subject: [PATCH 027/270] Fix readme --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index c623407..d6eff7f 100644 --- a/README.md +++ b/README.md @@ -126,7 +126,7 @@ Fast, simple, async php telegram api server: * Docker: `docker-compose up -d` Docker will monitor and restart containers. * Manual: - 1. Use [http://supervisord.org](supervisor) to monitor and restart swoole/amphp servers. + 1. Use [supervisor](http://supervisord.org) to monitor and restart swoole/amphp servers. 1. `apt-get install supervisor` 1. Put config file in `/etc/supervisor/conf.d/telegram_api_server.conf`. Example: ``` @@ -289,7 +289,7 @@ Full list of system methods available in [SystemApiExtensions class](https://git If there is no authorization in session, or session file is blank, authorization required: User: -* `http://127.0.0.1:9503/api/users/xtrime/phoneLogin?phone=+7123...` +* `http://127.0.0.1:9503/api/users/xtrime/phoneLogin?phone=%2B7123...`, %2B - is urlencoded "+" sign * `http://127.0.0.1:9503/api/users/xtrime/completePhoneLogin?code=123456` * (optional) `http://127.0.0.1:9503/api/users/xtrime/complete2falogin?password=123456` * (optional) `http://127.0.0.1:9503/api/users/xtrime/completeSignup?firstName=MyExampleName` From 7a15addd4e24e917006fee21a1d57121dc37dfec Mon Sep 17 00:00:00 2001 From: Alexander Pankratov Date: Wed, 24 Aug 2022 22:26:57 +0300 Subject: [PATCH 028/270] Try shutdown normally in healthcheck --- src/Server/HealthCheck.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Server/HealthCheck.php b/src/Server/HealthCheck.php index df5def5..b88f87e 100644 --- a/src/Server/HealthCheck.php +++ b/src/Server/HealthCheck.php @@ -60,9 +60,9 @@ public static function start(int $parentPid): void if (self::isProcessAlive($parentPid)) { Logger::getInstance()->critical('Killing parent process'); - exec("kill SIGINT $parentPid"); + exec("kill -2 $parentPid"); if (self::isProcessAlive($parentPid)) { - exec("kill SIGKILL $parentPid"); + exec("kill -9 $parentPid"); } } } From 624cb27cd5f7152d0c0414d2773a7beda0081c7b Mon Sep 17 00:00:00 2001 From: Alexander Pankratov Date: Wed, 24 Aug 2022 23:04:10 +0300 Subject: [PATCH 029/270] Temporary branch with fixes --- composer.json | 2 +- composer.lock | 15 ++++++++------- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/composer.json b/composer.json index 2c1b49b..79dcd5a 100644 --- a/composer.json +++ b/composer.json @@ -28,7 +28,7 @@ "amphp/websocket-client": "^1", "amphp/http-client": "^4", "vlucas/phpdotenv": "^4", - "danog/madelineproto": "^7.0", + "danog/madelineproto": "dev-compress_db", "amphp/http-server-form-parser": "^1.1" }, "require-dev": { diff --git a/composer.lock b/composer.lock index d9efc37..d4d4cd2 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "7ed8680412f85dd1a2d30068dee6a747", + "content-hash": "8dcff4517f5c5e1f48acf76f51ed0079", "packages": [ { "name": "amphp/amp", @@ -2349,16 +2349,16 @@ }, { "name": "danog/madelineproto", - "version": "7.0.121.9999", + "version": "dev-compress_db", "source": { "type": "git", "url": "https://github.com/danog/MadelineProto.git", - "reference": "75e5e5cf610d462ad894c7db88833816e5499778" + "reference": "89b08f3092c1d7af56fd0ded323eb1107b9c228b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/danog/MadelineProto/zipball/75e5e5cf610d462ad894c7db88833816e5499778", - "reference": "75e5e5cf610d462ad894c7db88833816e5499778", + "url": "https://api.github.com/repos/danog/MadelineProto/zipball/89b08f3092c1d7af56fd0ded323eb1107b9c228b", + "reference": "89b08f3092c1d7af56fd0ded323eb1107b9c228b", "shasum": "" }, "require": { @@ -2462,7 +2462,7 @@ ], "support": { "issues": "https://github.com/danog/MadelineProto/issues", - "source": "https://github.com/danog/MadelineProto/tree/7.0.121.9999" + "source": "https://github.com/danog/MadelineProto/tree/compress_db" }, "funding": [ { @@ -2470,7 +2470,7 @@ "type": "github" } ], - "time": "2022-08-15T15:43:32+00:00" + "time": "2022-08-24T20:32:06+00:00" }, { "name": "danog/magicalserializer", @@ -4534,6 +4534,7 @@ "aliases": [], "minimum-stability": "dev", "stability-flags": { + "danog/madelineproto": 20, "roave/security-advisories": 20 }, "prefer-stable": true, From 28195c7e3374e76d1a81fcb16f48326ee21a44d8 Mon Sep 17 00:00:00 2001 From: Alexander Pankratov Date: Tue, 11 Oct 2022 15:51:38 +0200 Subject: [PATCH 030/270] Update madelineProto --- composer.json | 2 +- composer.lock | 145 +++++++++++++++++++++++++++----------------------- 2 files changed, 78 insertions(+), 69 deletions(-) diff --git a/composer.json b/composer.json index 79dcd5a..0446652 100644 --- a/composer.json +++ b/composer.json @@ -28,7 +28,7 @@ "amphp/websocket-client": "^1", "amphp/http-client": "^4", "vlucas/phpdotenv": "^4", - "danog/madelineproto": "dev-compress_db", + "danog/madelineproto": "^7.0.132", "amphp/http-server-form-parser": "^1.1" }, "require-dev": { diff --git a/composer.lock b/composer.lock index d4d4cd2..e142329 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "8dcff4517f5c5e1f48acf76f51ed0079", + "content-hash": "97a81012b9987780b17449d8ac5f6112", "packages": [ { "name": "amphp/amp", @@ -326,16 +326,16 @@ }, { "name": "amphp/file", - "version": "v2.0.3", + "version": "v2.0.4", "source": { "type": "git", "url": "https://github.com/amphp/file.git", - "reference": "013f592f3ece1440bcf8ce8a223147f8487d69d2" + "reference": "be639a9b1f579d3fe847ca0dcc17c7a7f5168910" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/amphp/file/zipball/013f592f3ece1440bcf8ce8a223147f8487d69d2", - "reference": "013f592f3ece1440bcf8ce8a223147f8487d69d2", + "url": "https://api.github.com/repos/amphp/file/zipball/be639a9b1f579d3fe847ca0dcc17c7a7f5168910", + "reference": "be639a9b1f579d3fe847ca0dcc17c7a7f5168910", "shasum": "" }, "require": { @@ -399,7 +399,7 @@ ], "support": { "issues": "https://github.com/amphp/file/issues", - "source": "https://github.com/amphp/file/tree/v2.0.3" + "source": "https://github.com/amphp/file/tree/v2.0.4" }, "funding": [ { @@ -407,7 +407,7 @@ "type": "github" } ], - "time": "2022-02-08T17:57:37+00:00" + "time": "2022-09-08T17:22:23+00:00" }, { "name": "amphp/hpack", @@ -2349,16 +2349,16 @@ }, { "name": "danog/madelineproto", - "version": "dev-compress_db", + "version": "7.0.132", "source": { "type": "git", "url": "https://github.com/danog/MadelineProto.git", - "reference": "89b08f3092c1d7af56fd0ded323eb1107b9c228b" + "reference": "eb48fe6da562b03f22e5277e82ecb0971321c821" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/danog/MadelineProto/zipball/89b08f3092c1d7af56fd0ded323eb1107b9c228b", - "reference": "89b08f3092c1d7af56fd0ded323eb1107b9c228b", + "url": "https://api.github.com/repos/danog/MadelineProto/zipball/eb48fe6da562b03f22e5277e82ecb0971321c821", + "reference": "eb48fe6da562b03f22e5277e82ecb0971321c821", "shasum": "" }, "require": { @@ -2462,7 +2462,7 @@ ], "support": { "issues": "https://github.com/danog/MadelineProto/issues", - "source": "https://github.com/danog/MadelineProto/tree/compress_db" + "source": "https://github.com/danog/MadelineProto/tree/7.0.132" }, "funding": [ { @@ -2470,7 +2470,7 @@ "type": "github" } ], - "time": "2022-08-24T20:32:06+00:00" + "time": "2022-10-08T16:44:22+00:00" }, { "name": "danog/magicalserializer", @@ -2633,16 +2633,16 @@ }, { "name": "daverandom/libdns", - "version": "v2.0.2", + "version": "v2.0.3", "source": { "type": "git", "url": "https://github.com/DaveRandom/LibDNS.git", - "reference": "e8b6d6593d18ac3a6a14666d8a68a4703b2e05f9" + "reference": "42c2d700d1178c9f9e78664793463f7f1aea248c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/DaveRandom/LibDNS/zipball/e8b6d6593d18ac3a6a14666d8a68a4703b2e05f9", - "reference": "e8b6d6593d18ac3a6a14666d8a68a4703b2e05f9", + "url": "https://api.github.com/repos/DaveRandom/LibDNS/zipball/42c2d700d1178c9f9e78664793463f7f1aea248c", + "reference": "42c2d700d1178c9f9e78664793463f7f1aea248c", "shasum": "" }, "require": { @@ -2671,9 +2671,9 @@ ], "support": { "issues": "https://github.com/DaveRandom/LibDNS/issues", - "source": "https://github.com/DaveRandom/LibDNS/tree/v2.0.2" + "source": "https://github.com/DaveRandom/LibDNS/tree/v2.0.3" }, - "time": "2019-12-03T09:12:46+00:00" + "time": "2022-09-20T18:15:38+00:00" }, { "name": "erusev/parsedown", @@ -2780,37 +2780,38 @@ }, { "name": "league/uri", - "version": "6.7.1", + "version": "6.8.0", "source": { "type": "git", "url": "https://github.com/thephpleague/uri.git", - "reference": "2d7c87a0860f3126a39f44a8a9bf2fed402dcfea" + "reference": "a700b4656e4c54371b799ac61e300ab25a2d1d39" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thephpleague/uri/zipball/2d7c87a0860f3126a39f44a8a9bf2fed402dcfea", - "reference": "2d7c87a0860f3126a39f44a8a9bf2fed402dcfea", + "url": "https://api.github.com/repos/thephpleague/uri/zipball/a700b4656e4c54371b799ac61e300ab25a2d1d39", + "reference": "a700b4656e4c54371b799ac61e300ab25a2d1d39", "shasum": "" }, "require": { "ext-json": "*", "league/uri-interfaces": "^2.3", - "php": "^7.4 || ^8.0", - "psr/http-message": "^1.0" + "php": "^8.1", + "psr/http-message": "^1.0.1" }, "conflict": { "league/uri-schemes": "^1.0" }, "require-dev": { - "friendsofphp/php-cs-fixer": "^v3.3.2", - "nyholm/psr7": "^1.5", - "php-http/psr7-integration-tests": "^1.1", - "phpstan/phpstan": "^1.2.0", + "friendsofphp/php-cs-fixer": "^v3.9.5", + "nyholm/psr7": "^1.5.1", + "php-http/psr7-integration-tests": "^1.1.1", + "phpbench/phpbench": "^1.2.6", + "phpstan/phpstan": "^1.8.5", "phpstan/phpstan-deprecation-rules": "^1.0", - "phpstan/phpstan-phpunit": "^1.0.0", - "phpstan/phpstan-strict-rules": "^1.1.0", - "phpunit/phpunit": "^9.5.10", - "psr/http-factory": "^1.0" + "phpstan/phpstan-phpunit": "^1.1.1", + "phpstan/phpstan-strict-rules": "^1.4.3", + "phpunit/phpunit": "^9.5.24", + "psr/http-factory": "^1.0.1" }, "suggest": { "ext-fileinfo": "Needed to create Data URI from a filepath", @@ -2867,7 +2868,7 @@ "docs": "https://uri.thephpleague.com", "forum": "https://thephpleague.slack.com", "issues": "https://github.com/thephpleague/uri/issues", - "source": "https://github.com/thephpleague/uri/tree/6.7.1" + "source": "https://github.com/thephpleague/uri/tree/6.8.0" }, "funding": [ { @@ -2875,7 +2876,7 @@ "type": "github" } ], - "time": "2022-06-29T09:48:18+00:00" + "time": "2022-09-13T19:58:47+00:00" }, { "name": "league/uri-interfaces", @@ -3363,16 +3364,16 @@ }, { "name": "phpseclib/phpseclib", - "version": "3.0.14", + "version": "3.0.16", "source": { "type": "git", "url": "https://github.com/phpseclib/phpseclib.git", - "reference": "2f0b7af658cbea265cbb4a791d6c29a6613f98ef" + "reference": "7181378909ed8890be4db53d289faac5b77f8b05" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpseclib/phpseclib/zipball/2f0b7af658cbea265cbb4a791d6c29a6613f98ef", - "reference": "2f0b7af658cbea265cbb4a791d6c29a6613f98ef", + "url": "https://api.github.com/repos/phpseclib/phpseclib/zipball/7181378909ed8890be4db53d289faac5b77f8b05", + "reference": "7181378909ed8890be4db53d289faac5b77f8b05", "shasum": "" }, "require": { @@ -3384,6 +3385,7 @@ "phpunit/phpunit": "*" }, "suggest": { + "ext-dom": "Install the DOM extension to load XML formatted public keys.", "ext-gmp": "Install the GMP (GNU Multiple Precision) extension in order to speed up arbitrary precision integer arithmetic operations.", "ext-libsodium": "SSH2/SFTP can make use of some algorithms provided by the libsodium-php extension.", "ext-mcrypt": "Install the Mcrypt extension in order to speed up a few other cryptographic operations.", @@ -3452,7 +3454,7 @@ ], "support": { "issues": "https://github.com/phpseclib/phpseclib/issues", - "source": "https://github.com/phpseclib/phpseclib/tree/3.0.14" + "source": "https://github.com/phpseclib/phpseclib/tree/3.0.16" }, "funding": [ { @@ -3468,7 +3470,7 @@ "type": "tidelift" } ], - "time": "2022-04-04T05:15:45+00:00" + "time": "2022-09-05T18:03:08+00:00" }, { "name": "psr/http-factory", @@ -4020,12 +4022,12 @@ "source": { "type": "git", "url": "https://github.com/Roave/SecurityAdvisories.git", - "reference": "bd4a45f60f097f0c44f77c6d72caa24ebc9b9f66" + "reference": "b311503298c072e565411e3ef61c04519272473f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Roave/SecurityAdvisories/zipball/bd4a45f60f097f0c44f77c6d72caa24ebc9b9f66", - "reference": "bd4a45f60f097f0c44f77c6d72caa24ebc9b9f66", + "url": "https://api.github.com/repos/Roave/SecurityAdvisories/zipball/b311503298c072e565411e3ef61c04519272473f", + "reference": "b311503298c072e565411e3ef61c04519272473f", "shasum": "" }, "conflict": { @@ -4046,6 +4048,7 @@ "appwrite/server-ce": "<0.11.1|>=0.12,<0.12.2", "area17/twill": "<1.2.5|>=2,<2.5.3", "asymmetricrypt/asymmetricrypt": ">=0,<9.9.99", + "awesome-support/awesome-support": "<=6.0.7", "aws/aws-sdk-php": ">=3,<3.2.1", "bagisto/bagisto": "<0.1.5", "barrelstrength/sprout-base-email": "<1.2.7", @@ -4071,11 +4074,11 @@ "cart2quote/module-quotation": ">=4.1.6,<=4.4.5|>=5,<5.4.4", "cartalyst/sentry": "<=2.1.6", "catfan/medoo": "<1.7.5", - "centreon/centreon": "<20.10.7", + "centreon/centreon": "<21.4.16|>=21.10,<21.10.8|>=22,<22.4.1", "cesnet/simplesamlphp-module-proxystatistics": "<3.1", "codeception/codeception": "<3.1.3|>=4,<4.1.22", "codeigniter/framework": "<=3.0.6", - "codeigniter4/framework": "<4.1.9", + "codeigniter4/framework": "<4.2.7", "codeigniter4/shield": "= 1.0.0-beta", "codiad/codiad": "<=2.8.4", "composer/composer": "<1.10.26|>=2-alpha.1,<2.2.12|>=2.3,<2.3.5", @@ -4087,7 +4090,7 @@ "contao/core-bundle": "<4.9.18|>=4.10,<4.11.7|>=4.13,<4.13.3|= 4.10.0", "contao/listing-bundle": ">=4,<4.4.8", "contao/managed-edition": "<=1.5", - "craftcms/cms": "<3.7.36", + "craftcms/cms": "<3.7.55.2|>= 4.0.0-RC1, < 4.2.1", "croogo/croogo": "<3.0.7", "cuyz/valinor": "<0.12", "czproject/git-php": "<4.0.3", @@ -4106,7 +4109,7 @@ "doctrine/mongodb-odm-bundle": ">=2,<3.0.1", "doctrine/orm": ">=2,<2.4.8|>=2.5,<2.5.1|>=2.8.3,<2.8.4", "dolibarr/dolibarr": "<16|= 12.0.5|>= 3.3.beta1, < 13.0.2", - "dompdf/dompdf": "<2", + "dompdf/dompdf": "<2.0.1", "drupal/core": ">=7,<7.91|>=8,<9.3.19|>=9.4,<9.4.3", "drupal/drupal": ">=7,<7.80|>=8,<8.9.16|>=9,<9.1.12|>=9.2,<9.2.4", "dweeves/magmi": "<=0.7.24", @@ -4118,6 +4121,8 @@ "enshrined/svg-sanitize": "<0.15", "erusev/parsedown": "<1.7.2", "ether/logs": "<3.0.4", + "exceedone/exment": "<4.4.3|>=5,<5.0.3", + "exceedone/laravel-admin": "= 3.0.0|<2.2.3", "ezsystems/demobundle": ">=5.4,<5.4.6.1", "ezsystems/ez-support-tools": ">=2.2,<2.2.3", "ezsystems/ezdemo-ls-extension": ">=5.4,<5.4.2.1", @@ -4137,7 +4142,7 @@ "facade/ignition": "<1.16.15|>=2,<2.4.2|>=2.5,<2.5.2", "facturascripts/facturascripts": "<=2022.8", "feehi/cms": "<=2.1.1", - "feehi/feehicms": "<=0.1.3", + "feehi/feehicms": "<=2.0.1.1", "fenom/fenom": "<=2.12.1", "filegator/filegator": "<7.8", "firebase/php-jwt": "<2", @@ -4150,19 +4155,20 @@ "fooman/tcpdf": "<6.2.22", "forkcms/forkcms": "<5.11.1", "fossar/tcpdf-parser": "<6.2.22", - "francoisjacquet/rosariosis": "<9.1", + "francoisjacquet/rosariosis": "<10.1", "friendsofsymfony/oauth2-php": "<1.3", "friendsofsymfony/rest-bundle": ">=1.2,<1.2.2", "friendsofsymfony/user-bundle": ">=1.2,<1.3.5", "friendsoftypo3/mediace": ">=7.6.2,<7.6.5", "froala/wysiwyg-editor": "<3.2.7", - "froxlor/froxlor": "<=0.10.22", + "froxlor/froxlor": "<0.10.38", "fuel/core": "<1.8.1", "gaoming13/wechat-php-sdk": "<=1.10.2", "genix/cms": "<=1.1.11", "getgrav/grav": "<1.7.34", - "getkirby/cms": "<3.5.8", + "getkirby/cms": "<3.5.8.1|>=3.6,<3.6.6.1|>=3.7,<3.7.4", "getkirby/panel": "<2.5.14", + "getkirby/starterkit": "<=3.7.0.2", "gilacms/gila": "<=1.11.4", "globalpayments/php-sdk": "<2", "google/protobuf": "<3.15", @@ -4220,7 +4226,7 @@ "league/commonmark": "<0.18.3", "league/flysystem": "<1.1.4|>=2,<2.1.1", "lexik/jwt-authentication-bundle": "<2.10.7|>=2.11,<2.11.3", - "librenms/librenms": "<22.4", + "librenms/librenms": "<=22.8", "limesurvey/limesurvey": "<3.27.19", "livehelperchat/livehelperchat": "<=3.91", "livewire/livewire": ">2.2.4,<2.2.6", @@ -4236,7 +4242,7 @@ "mautic/core": "<4.3|= 2.13.1", "mediawiki/core": ">=1.27,<1.27.6|>=1.29,<1.29.3|>=1.30,<1.30.2|>=1.31,<1.31.9|>=1.32,<1.32.6|>=1.32.99,<1.33.3|>=1.33.99,<1.34.3|>=1.34.99,<1.35", "mezzio/mezzio-swoole": "<3.7|>=4,<4.3", - "microweber/microweber": "<1.3.1", + "microweber/microweber": "<=1.3.1", "miniorange/miniorange-saml": "<1.4.3", "mittwald/typo3_forum": "<1.2.1", "modx/revolution": "<= 2.8.3-pl|<2.8", @@ -4255,6 +4261,7 @@ "nette/application": ">=2,<2.0.19|>=2.1,<2.1.13|>=2.2,<2.2.10|>=2.3,<2.3.14|>=2.4,<2.4.16|>=3,<3.0.6", "nette/nette": ">=2,<2.0.19|>=2.1,<2.1.13", "nilsteampassnet/teampass": "<=2.1.27.36", + "notrinos/notrinos-erp": "<=0.7", "noumo/easyii": "<=0.9", "nukeviet/nukeviet": "<4.5.2", "nystudio107/craft-seomatic": "<3.4.12", @@ -4298,16 +4305,16 @@ "phpwhois/phpwhois": "<=4.2.5", "phpxmlrpc/extras": "<0.6.1", "pimcore/data-hub": "<1.2.4", - "pimcore/pimcore": "<10.4.4", + "pimcore/pimcore": "<=10.5.6", "pocketmine/bedrock-protocol": "<8.0.2", "pocketmine/pocketmine-mp": "<4.7.2|>= 4.0.0-BETA5, < 4.4.2", "pressbooks/pressbooks": "<5.18", "prestashop/autoupgrade": ">=4,<4.10.1", "prestashop/blockwishlist": ">=2,<2.1.1", - "prestashop/contactform": ">1.0.1,<4.3", + "prestashop/contactform": ">=1.0.1,<4.3", "prestashop/gamification": "<2.3.2", "prestashop/prestashop": ">=1.6.0.10,<1.7.8.7", - "prestashop/productcomments": ">=4,<4.2.1", + "prestashop/productcomments": "<5.0.2", "prestashop/ps_emailsubscription": "<2.6.1", "prestashop/ps_facetedsearch": "<3.4.1", "prestashop/ps_linklist": "<3.1", @@ -4319,6 +4326,8 @@ "pusher/pusher-php-server": "<2.2.1", "pwweb/laravel-core": "<=0.3.6-beta", "rainlab/debugbar-plugin": "<3.1", + "rankmath/seo-by-rank-math": "<=1.0.95", + "react/http": ">=0.7,<1.7", "remdex/livehelperchat": "<3.99", "rmccue/requests": ">=1.6,<1.8", "robrichards/xmlseclibs": "<3.0.4", @@ -4333,7 +4342,7 @@ "shopware/core": "<=6.4.9", "shopware/platform": "<=6.4.9", "shopware/production": "<=6.3.5.2", - "shopware/shopware": "<=5.7.13", + "shopware/shopware": "<=5.7.14", "shopware/storefront": "<=6.4.8.1", "shopxo/shopxo": "<2.2.6", "showdoc/showdoc": "<2.10.4", @@ -4357,8 +4366,8 @@ "simplesamlphp/simplesamlphp-module-infocard": "<1.0.1", "simplito/elliptic-php": "<1.0.6", "slim/slim": "<2.6", - "smarty/smarty": "<3.1.45|>=4,<4.1.1", - "snipe/snipe-it": "<=6.0.2|>= 6.0.0-RC-1, <= 6.0.0-RC-5", + "smarty/smarty": "<3.1.47|>=4,<4.2.1", + "snipe/snipe-it": "<6.0.11|>= 6.0.0-RC-1, <= 6.0.0-RC-5", "socalnick/scn-social-auth": "<1.15.2", "socialiteproviders/steam": "<1.1", "spipu/html2pdf": "<5.2.4", @@ -4420,23 +4429,24 @@ "thinkcmf/thinkcmf": "<=5.1.7", "tinymce/tinymce": "<5.10", "titon/framework": ">=0,<9.9.99", - "topthink/framework": "<=6.0.12", + "topthink/framework": "<=6.0.13", "topthink/think": "<=6.0.9", "topthink/thinkphp": "<=3.2.3", "tribalsystems/zenario": "<9.2.55826", "truckersmp/phpwhois": "<=4.3.1", - "twig/twig": "<1.38|>=2,<2.14.11|>=3,<3.3.8", - "typo3/cms": ">=6.2,<6.2.30|>=7,<7.6.32|>=8,<8.7.38|>=9,<9.5.29|>=10,<10.4.29|>=11,<11.5.11", + "twig/twig": "<1.44.7|>=2,<2.15.3|>=3,<3.4.3", + "typo3/cms": ">=6.2,<6.2.30|>=7,<7.6.32|>=8,<8.7.38|>=9,<9.5.29|>=10,<10.4.32|>=11,<11.5.16", "typo3/cms-backend": ">=7,<=7.6.50|>=8,<=8.7.39|>=9,<=9.5.24|>=10,<=10.4.13|>=11,<=11.1", - "typo3/cms-core": ">=6.2,<=6.2.56|>=7,<7.6.57|>=8,<8.7.47|>=9,<9.5.35|>=10,<10.4.29|>=11,<11.5.11", + "typo3/cms-core": ">=6.2,<=6.2.56|>=7,<7.6.58|>=8,<8.7.48|>=9,<9.5.37|>=10,<10.4.32|>=11,<11.5.16", "typo3/cms-form": ">=8,<=8.7.39|>=9,<=9.5.24|>=10,<=10.4.13|>=11,<=11.1", "typo3/flow": ">=1,<1.0.4|>=1.1,<1.1.1|>=2,<2.0.1|>=2.3,<2.3.16|>=3,<3.0.12|>=3.1,<3.1.10|>=3.2,<3.2.13|>=3.3,<3.3.13|>=4,<4.0.6", + "typo3/html-sanitizer": ">=1,<1.0.7|>=2,<2.0.16", "typo3/neos": ">=1.1,<1.1.3|>=1.2,<1.2.13|>=2,<2.0.4|>=2.3,<2.3.99|>=3,<3.0.20|>=3.1,<3.1.18|>=3.2,<3.2.14|>=3.3,<3.3.23|>=4,<4.0.17|>=4.1,<4.1.16|>=4.2,<4.2.12|>=4.3,<4.3.3", "typo3/phar-stream-wrapper": ">=1,<2.1.1|>=3,<3.1.1", "typo3/swiftmailer": ">=4.1,<4.1.99|>=5.4,<5.4.5", "typo3fluid/fluid": ">=2,<2.0.8|>=2.1,<2.1.7|>=2.2,<2.2.4|>=2.3,<2.3.7|>=2.4,<2.4.4|>=2.5,<2.5.11|>=2.6,<2.6.10", "ua-parser/uap-php": "<3.8", - "unisharp/laravel-filemanager": "<=2.3", + "unisharp/laravel-filemanager": "<=2.5.1", "userfrosting/userfrosting": ">=0.3.1,<4.6.3", "usmanhalalit/pixie": "<1.0.3|>=2,<2.0.2", "vanilla/safecurl": "<0.9.2", @@ -4455,7 +4465,7 @@ "wpanel/wpanel4-cms": "<=4.3.1", "wwbn/avideo": "<=11.6", "yeswiki/yeswiki": "<4.1", - "yetiforce/yetiforce-crm": "<6.4", + "yetiforce/yetiforce-crm": "<=6.4", "yidashi/yii2cmf": "<=2", "yii2mod/yii2-cms": "<1.9.2", "yiisoft/yii": ">=1.1.14,<1.1.15", @@ -4528,13 +4538,12 @@ "type": "tidelift" } ], - "time": "2022-08-22T17:06:07+00:00" + "time": "2022-10-06T20:04:40+00:00" } ], "aliases": [], "minimum-stability": "dev", "stability-flags": { - "danog/madelineproto": 20, "roave/security-advisories": 20 }, "prefer-stable": true, From e44223124b7f35a1a7649bef77be0a3491fe32f3 Mon Sep 17 00:00:00 2001 From: Alexander Pankratov Date: Tue, 25 Oct 2022 20:16:41 +0200 Subject: [PATCH 031/270] Update madelineProto --- composer.lock | 79 ++++++++++++++++++++++++++++----------------------- 1 file changed, 44 insertions(+), 35 deletions(-) diff --git a/composer.lock b/composer.lock index e142329..e78748a 100644 --- a/composer.lock +++ b/composer.lock @@ -484,16 +484,16 @@ }, { "name": "amphp/http", - "version": "v1.6.3", + "version": "v1.7.0", "source": { "type": "git", "url": "https://github.com/amphp/http.git", - "reference": "e2b75561011a9596e4574cc867e07a706d56394b" + "reference": "b65454643a7e92c6f1f75e00acac0a0a676ec8be" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/amphp/http/zipball/e2b75561011a9596e4574cc867e07a706d56394b", - "reference": "e2b75561011a9596e4574cc867e07a706d56394b", + "url": "https://api.github.com/repos/amphp/http/zipball/b65454643a7e92c6f1f75e00acac0a0a676ec8be", + "reference": "b65454643a7e92c6f1f75e00acac0a0a676ec8be", "shasum": "" }, "require": { @@ -501,8 +501,8 @@ "php": ">=7.1" }, "require-dev": { - "amphp/php-cs-fixer-config": "dev-master", - "phpunit/phpunit": "^7 || ^6.5" + "amphp/php-cs-fixer-config": "^2-dev", + "phpunit/phpunit": "^9 || ^8 || ^7" }, "type": "library", "extra": { @@ -531,7 +531,7 @@ "description": "Basic HTTP primitives which can be shared by servers and clients.", "support": { "issues": "https://github.com/amphp/http/issues", - "source": "https://github.com/amphp/http/tree/v1.6.3" + "source": "https://github.com/amphp/http/tree/v1.7.0" }, "funding": [ { @@ -539,7 +539,7 @@ "type": "github" } ], - "time": "2020-11-28T17:04:34+00:00" + "time": "2022-10-16T20:32:41+00:00" }, { "name": "amphp/http-client", @@ -2349,16 +2349,16 @@ }, { "name": "danog/madelineproto", - "version": "7.0.132", + "version": "7.0.138.9999", "source": { "type": "git", "url": "https://github.com/danog/MadelineProto.git", - "reference": "eb48fe6da562b03f22e5277e82ecb0971321c821" + "reference": "9be9f8d638597ef6da330398ae00168080cfec59" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/danog/MadelineProto/zipball/eb48fe6da562b03f22e5277e82ecb0971321c821", - "reference": "eb48fe6da562b03f22e5277e82ecb0971321c821", + "url": "https://api.github.com/repos/danog/MadelineProto/zipball/9be9f8d638597ef6da330398ae00168080cfec59", + "reference": "9be9f8d638597ef6da330398ae00168080cfec59", "shasum": "" }, "require": { @@ -2462,7 +2462,7 @@ ], "support": { "issues": "https://github.com/danog/MadelineProto/issues", - "source": "https://github.com/danog/MadelineProto/tree/7.0.132" + "source": "https://github.com/danog/MadelineProto/tree/7.0.138.9999" }, "funding": [ { @@ -2470,7 +2470,7 @@ "type": "github" } ], - "time": "2022-10-08T16:44:22+00:00" + "time": "2022-10-21T10:03:01+00:00" }, { "name": "danog/magicalserializer", @@ -3364,16 +3364,16 @@ }, { "name": "phpseclib/phpseclib", - "version": "3.0.16", + "version": "3.0.17", "source": { "type": "git", "url": "https://github.com/phpseclib/phpseclib.git", - "reference": "7181378909ed8890be4db53d289faac5b77f8b05" + "reference": "dbc2307d5c69aeb22db136c52e91130d7f2ca761" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpseclib/phpseclib/zipball/7181378909ed8890be4db53d289faac5b77f8b05", - "reference": "7181378909ed8890be4db53d289faac5b77f8b05", + "url": "https://api.github.com/repos/phpseclib/phpseclib/zipball/dbc2307d5c69aeb22db136c52e91130d7f2ca761", + "reference": "dbc2307d5c69aeb22db136c52e91130d7f2ca761", "shasum": "" }, "require": { @@ -3454,7 +3454,7 @@ ], "support": { "issues": "https://github.com/phpseclib/phpseclib/issues", - "source": "https://github.com/phpseclib/phpseclib/tree/3.0.16" + "source": "https://github.com/phpseclib/phpseclib/tree/3.0.17" }, "funding": [ { @@ -3470,7 +3470,7 @@ "type": "tidelift" } ], - "time": "2022-09-05T18:03:08+00:00" + "time": "2022-10-24T10:51:50+00:00" }, { "name": "psr/http-factory", @@ -3880,16 +3880,16 @@ }, { "name": "vlucas/phpdotenv", - "version": "v4.2.2", + "version": "v4.3.0", "source": { "type": "git", "url": "https://github.com/vlucas/phpdotenv.git", - "reference": "77e974614d2ead521f18069dccc571696f52b8dc" + "reference": "67a491df68208bef8c37092db11fa3885008efcf" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/vlucas/phpdotenv/zipball/77e974614d2ead521f18069dccc571696f52b8dc", - "reference": "77e974614d2ead521f18069dccc571696f52b8dc", + "url": "https://api.github.com/repos/vlucas/phpdotenv/zipball/67a491df68208bef8c37092db11fa3885008efcf", + "reference": "67a491df68208bef8c37092db11fa3885008efcf", "shasum": "" }, "require": { @@ -3901,7 +3901,7 @@ "bamarni/composer-bin-plugin": "^1.4.1", "ext-filter": "*", "ext-pcre": "*", - "phpunit/phpunit": "^4.8.36 || ^5.7.27 || ^6.5.14 || ^7.5.20 || ^8.5.21" + "phpunit/phpunit": "^4.8.36 || ^5.7.27 || ^6.5.14 || ^7.5.20 || ^8.5.30" }, "suggest": { "ext-filter": "Required to use the boolean validator.", @@ -3909,8 +3909,12 @@ }, "type": "library", "extra": { + "bamarni-bin": { + "bin-links": true, + "forward-command": true + }, "branch-alias": { - "dev-master": "4.2-dev" + "dev-master": "4.3-dev" } }, "autoload": { @@ -3942,7 +3946,7 @@ ], "support": { "issues": "https://github.com/vlucas/phpdotenv/issues", - "source": "https://github.com/vlucas/phpdotenv/tree/v4.2.2" + "source": "https://github.com/vlucas/phpdotenv/tree/v4.3.0" }, "funding": [ { @@ -3954,7 +3958,7 @@ "type": "tidelift" } ], - "time": "2021-12-12T23:07:53+00:00" + "time": "2022-10-16T00:51:09+00:00" }, { "name": "webmozart/assert", @@ -4022,12 +4026,12 @@ "source": { "type": "git", "url": "https://github.com/Roave/SecurityAdvisories.git", - "reference": "b311503298c072e565411e3ef61c04519272473f" + "reference": "599b9d6746e56b67b187afed175dd02fb1a288fa" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Roave/SecurityAdvisories/zipball/b311503298c072e565411e3ef61c04519272473f", - "reference": "b311503298c072e565411e3ef61c04519272473f", + "url": "https://api.github.com/repos/Roave/SecurityAdvisories/zipball/599b9d6746e56b67b187afed175dd02fb1a288fa", + "reference": "599b9d6746e56b67b187afed175dd02fb1a288fa", "shasum": "" }, "conflict": { @@ -4166,7 +4170,7 @@ "gaoming13/wechat-php-sdk": "<=1.10.2", "genix/cms": "<=1.1.11", "getgrav/grav": "<1.7.34", - "getkirby/cms": "<3.5.8.1|>=3.6,<3.6.6.1|>=3.7,<3.7.4", + "getkirby/cms": "= 3.8.0|<3.5.8.2|>=3.6,<3.6.6.2|>=3.7,<3.7.5.1", "getkirby/panel": "<2.5.14", "getkirby/starterkit": "<=3.7.0.2", "gilacms/gila": "<=1.11.4", @@ -4241,6 +4245,9 @@ "matyhtf/framework": "<3.0.6", "mautic/core": "<4.3|= 2.13.1", "mediawiki/core": ">=1.27,<1.27.6|>=1.29,<1.29.3|>=1.30,<1.30.2|>=1.31,<1.31.9|>=1.32,<1.32.6|>=1.32.99,<1.33.3|>=1.33.99,<1.34.3|>=1.34.99,<1.35", + "melisplatform/melis-asset-manager": "<5.0.1", + "melisplatform/melis-cms": "<5.0.1", + "melisplatform/melis-front": "<5.0.1", "mezzio/mezzio-swoole": "<3.7|>=4,<4.3", "microweber/microweber": "<=1.3.1", "miniorange/miniorange-saml": "<1.4.3", @@ -4270,7 +4277,7 @@ "october/cms": "= 1.1.1|= 1.0.471|= 1.0.469|>=1.0.319,<1.0.469", "october/october": ">=1.0.319,<1.0.466|>=2.1,<2.1.12", "october/rain": "<1.0.472|>=1.1,<1.1.2", - "october/system": "<1.0.476|>=1.1,<1.1.12|>=2,<2.2.15", + "october/system": "<1.0.476|>=1.1,<1.1.12|>=2,<2.2.34|>=3,<3.0.66", "onelogin/php-saml": "<2.10.4", "oneup/uploader-bundle": "<1.9.3|>=2,<2.1.5", "open-web-analytics/open-web-analytics": "<1.7.4", @@ -4278,7 +4285,7 @@ "openid/php-openid": "<2.3", "openmage/magento-lts": "<19.4.15|>=20,<20.0.13", "orchid/platform": ">=9,<9.4.4", - "oro/commerce": ">=5,<5.0.4", + "oro/commerce": ">=4.1,<5.0.6", "oro/crm": ">=1.7,<1.7.4|>=3.1,<4.1.17|>=4.2,<4.2.7", "oro/platform": ">=1.7,<1.7.4|>=3.1,<3.1.29|>=4.1,<4.1.17|>=4.2,<4.2.8", "packbackbooks/lti-1-3-php-library": "<5", @@ -4297,6 +4304,7 @@ "phpmailer/phpmailer": "<6.5", "phpmussel/phpmussel": ">=1,<1.6", "phpmyadmin/phpmyadmin": "<5.1.3", + "phpmyfaq/phpmyfaq": "<=3.1.7", "phpoffice/phpexcel": "<1.8", "phpoffice/phpspreadsheet": "<1.16", "phpseclib/phpseclib": "<2.0.31|>=3,<3.0.7", @@ -4427,6 +4435,7 @@ "thelia/thelia": ">=2.1-beta.1,<2.1.3", "theonedemon/phpwhois": "<=4.2.5", "thinkcmf/thinkcmf": "<=5.1.7", + "thorsten/phpmyfaq": "<=3.1.7", "tinymce/tinymce": "<5.10", "titon/framework": ">=0,<9.9.99", "topthink/framework": "<=6.0.13", @@ -4538,7 +4547,7 @@ "type": "tidelift" } ], - "time": "2022-10-06T20:04:40+00:00" + "time": "2022-10-24T19:11:20+00:00" } ], "aliases": [], From a89f9824305ea0eb99c0a2ad41d4930525ca8046 Mon Sep 17 00:00:00 2001 From: Alexander Pankratov Date: Tue, 8 Nov 2022 11:37:25 +0100 Subject: [PATCH 032/270] Update madelineProto --- composer.lock | 42 +++++++++++++++++++++++------------------- 1 file changed, 23 insertions(+), 19 deletions(-) diff --git a/composer.lock b/composer.lock index e78748a..4916b3f 100644 --- a/composer.lock +++ b/composer.lock @@ -2349,16 +2349,16 @@ }, { "name": "danog/madelineproto", - "version": "7.0.138.9999", + "version": "7.0.141", "source": { "type": "git", "url": "https://github.com/danog/MadelineProto.git", - "reference": "9be9f8d638597ef6da330398ae00168080cfec59" + "reference": "67a78c9d32ed68e5735ff7cb6c74a6a980a1fb0e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/danog/MadelineProto/zipball/9be9f8d638597ef6da330398ae00168080cfec59", - "reference": "9be9f8d638597ef6da330398ae00168080cfec59", + "url": "https://api.github.com/repos/danog/MadelineProto/zipball/67a78c9d32ed68e5735ff7cb6c74a6a980a1fb0e", + "reference": "67a78c9d32ed68e5735ff7cb6c74a6a980a1fb0e", "shasum": "" }, "require": { @@ -2390,7 +2390,7 @@ "ext-xml": "*", "ext-zlib": "*", "league/uri": "^6", - "php-64bit": ">=8.0", + "php-64bit": ">=8.1", "phpseclib/phpseclib": "^3", "psr/http-factory": "^1.0", "psr/log": "^1|^2|^3", @@ -2406,7 +2406,6 @@ "bamarni/composer-bin-plugin": "1.5.0", "danog/phpdoc": "^0.1.7", "ext-ctype": "*", - "phabel/phabel": "^1", "phpdocumentor/reflection-docblock": "^5.2", "phpunit/phpunit": "^9", "roave/security-advisories": "dev-latest", @@ -2462,7 +2461,7 @@ ], "support": { "issues": "https://github.com/danog/MadelineProto/issues", - "source": "https://github.com/danog/MadelineProto/tree/7.0.138.9999" + "source": "https://github.com/danog/MadelineProto/tree/7.0.141" }, "funding": [ { @@ -2470,7 +2469,7 @@ "type": "github" } ], - "time": "2022-10-21T10:03:01+00:00" + "time": "2022-11-07T14:54:43+00:00" }, { "name": "danog/magicalserializer", @@ -4026,12 +4025,12 @@ "source": { "type": "git", "url": "https://github.com/Roave/SecurityAdvisories.git", - "reference": "599b9d6746e56b67b187afed175dd02fb1a288fa" + "reference": "964c5d9ca40d0ec72db203b3dd6382a30abef616" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Roave/SecurityAdvisories/zipball/599b9d6746e56b67b187afed175dd02fb1a288fa", - "reference": "599b9d6746e56b67b187afed175dd02fb1a288fa", + "url": "https://api.github.com/repos/Roave/SecurityAdvisories/zipball/964c5d9ca40d0ec72db203b3dd6382a30abef616", + "reference": "964c5d9ca40d0ec72db203b3dd6382a30abef616", "shasum": "" }, "conflict": { @@ -4048,12 +4047,14 @@ "amphp/http-client": ">=4,<4.4", "anchorcms/anchor-cms": "<=0.12.7", "andreapollastri/cipi": "<=3.1.15", + "apereo/phpcas": "<1.6", "api-platform/core": ">=2.2,<2.2.10|>=2.3,<2.3.6", "appwrite/server-ce": "<0.11.1|>=0.12,<0.12.2", "area17/twill": "<1.2.5|>=2,<2.5.3", "asymmetricrypt/asymmetricrypt": ">=0,<9.9.99", "awesome-support/awesome-support": "<=6.0.7", "aws/aws-sdk-php": ">=3,<3.2.1", + "badaso/core": "<2.6.1", "bagisto/bagisto": "<0.1.5", "barrelstrength/sprout-base-email": "<1.2.7", "barrelstrength/sprout-forms": "<3.9", @@ -4078,7 +4079,7 @@ "cart2quote/module-quotation": ">=4.1.6,<=4.4.5|>=5,<5.4.4", "cartalyst/sentry": "<=2.1.6", "catfan/medoo": "<1.7.5", - "centreon/centreon": "<21.4.16|>=21.10,<21.10.8|>=22,<22.4.1", + "centreon/centreon": "<22.10-beta.1", "cesnet/simplesamlphp-module-proxystatistics": "<3.1", "codeception/codeception": "<3.1.3|>=4,<4.1.22", "codeigniter/framework": "<=3.0.6", @@ -4165,7 +4166,7 @@ "friendsofsymfony/user-bundle": ">=1.2,<1.3.5", "friendsoftypo3/mediace": ">=7.6.2,<7.6.5", "froala/wysiwyg-editor": "<3.2.7", - "froxlor/froxlor": "<0.10.38", + "froxlor/froxlor": "<0.10.39", "fuel/core": "<1.8.1", "gaoming13/wechat-php-sdk": "<=1.10.2", "genix/cms": "<=1.1.11", @@ -4197,7 +4198,7 @@ "illuminate/encryption": ">=4,<=4.0.11|>=4.1,<=4.1.31|>=4.2,<=4.2.22|>=5,<=5.0.35|>=5.1,<=5.1.46|>=5.2,<=5.2.45|>=5.3,<=5.3.31|>=5.4,<=5.4.36|>=5.5,<5.5.40|>=5.6,<5.6.15", "illuminate/view": "<6.20.42|>=7,<7.30.6|>=8,<8.75", "impresscms/impresscms": "<=1.4.3", - "in2code/femanager": "<5.5.1|>=6,<6.3.1", + "in2code/femanager": "<5.5.2|>=6,<6.3.3|>=7,<7.0.1", "in2code/lux": "<17.6.1|>=18,<24.0.2", "intelliants/subrion": "<=4.2.1", "islandora/islandora": ">=2,<2.4.1", @@ -4209,6 +4210,7 @@ "joomla/filter": "<1.4.4|>=2,<2.0.1", "joomla/input": ">=2,<2.0.2", "joomla/session": "<1.3.1", + "joyqi/hyper-down": "<=2.4.27", "jsdecena/laracom": "<2.0.9", "jsmitty12/phpwhois": "<5.1", "kazist/phpwhois": "<=4.2.6", @@ -4281,7 +4283,7 @@ "onelogin/php-saml": "<2.10.4", "oneup/uploader-bundle": "<1.9.3|>=2,<2.1.5", "open-web-analytics/open-web-analytics": "<1.7.4", - "opencart/opencart": "<=3.0.3.2", + "opencart/opencart": "<=3.0.3.7", "openid/php-openid": "<2.3", "openmage/magento-lts": "<19.4.15|>=20,<20.0.13", "orchid/platform": ">=9,<9.4.4", @@ -4313,7 +4315,7 @@ "phpwhois/phpwhois": "<=4.2.5", "phpxmlrpc/extras": "<0.6.1", "pimcore/data-hub": "<1.2.4", - "pimcore/pimcore": "<=10.5.6", + "pimcore/pimcore": "<10.5.9", "pocketmine/bedrock-protocol": "<8.0.2", "pocketmine/pocketmine-mp": "<4.7.2|>= 4.0.0-BETA5, < 4.4.2", "pressbooks/pressbooks": "<5.18", @@ -4327,6 +4329,7 @@ "prestashop/ps_facetedsearch": "<3.4.1", "prestashop/ps_linklist": "<3.1", "privatebin/privatebin": "<1.4", + "processwire/processwire": "<=3.0.200", "propel/propel": ">=2-alpha.1,<=2-alpha.7", "propel/propel1": ">=1,<=1.7.1", "pterodactyl/panel": "<1.7", @@ -4435,9 +4438,10 @@ "thelia/thelia": ">=2.1-beta.1,<2.1.3", "theonedemon/phpwhois": "<=4.2.5", "thinkcmf/thinkcmf": "<=5.1.7", - "thorsten/phpmyfaq": "<=3.1.7", + "thorsten/phpmyfaq": "<3.1.8", "tinymce/tinymce": "<5.10", "titon/framework": ">=0,<9.9.99", + "tobiasbg/tablepress": "<= 2.0-RC1", "topthink/framework": "<=6.0.13", "topthink/think": "<=6.0.9", "topthink/thinkphp": "<=3.2.3", @@ -4467,7 +4471,7 @@ "webcoast/deferred-image-processing": "<1.0.2", "wikimedia/parsoid": "<0.12.2", "willdurand/js-translation-bundle": "<2.1.1", - "wintercms/winter": "<1.0.475|>=1.1,<1.1.9", + "wintercms/winter": "<1.0.475|>=1.1,<1.1.10|>=1.2,<1.2.1", "woocommerce/woocommerce": "<6.6", "wp-cli/wp-cli": "<2.5", "wp-graphql/wp-graphql": "<0.3.5", @@ -4547,7 +4551,7 @@ "type": "tidelift" } ], - "time": "2022-10-24T19:11:20+00:00" + "time": "2022-11-04T21:04:09+00:00" } ], "aliases": [], From 06b2bb8487ad66bf245dbef2312602c592a26eb2 Mon Sep 17 00:00:00 2001 From: Alexander Pankratov Date: Tue, 6 Dec 2022 20:09:02 +0100 Subject: [PATCH 033/270] Update madelineProto --- composer.lock | 135 +++++++++++++++++++++++++++----------------------- 1 file changed, 72 insertions(+), 63 deletions(-) diff --git a/composer.lock b/composer.lock index 4916b3f..15aa521 100644 --- a/composer.lock +++ b/composer.lock @@ -2349,16 +2349,16 @@ }, { "name": "danog/madelineproto", - "version": "7.0.141", + "version": "7.0.144", "source": { "type": "git", "url": "https://github.com/danog/MadelineProto.git", - "reference": "67a78c9d32ed68e5735ff7cb6c74a6a980a1fb0e" + "reference": "37fdcd57a3e8676f58e327f28acb39b4a127229b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/danog/MadelineProto/zipball/67a78c9d32ed68e5735ff7cb6c74a6a980a1fb0e", - "reference": "67a78c9d32ed68e5735ff7cb6c74a6a980a1fb0e", + "url": "https://api.github.com/repos/danog/MadelineProto/zipball/37fdcd57a3e8676f58e327f28acb39b4a127229b", + "reference": "37fdcd57a3e8676f58e327f28acb39b4a127229b", "shasum": "" }, "require": { @@ -2461,7 +2461,7 @@ ], "support": { "issues": "https://github.com/danog/MadelineProto/issues", - "source": "https://github.com/danog/MadelineProto/tree/7.0.141" + "source": "https://github.com/danog/MadelineProto/tree/7.0.144" }, "funding": [ { @@ -2469,7 +2469,7 @@ "type": "github" } ], - "time": "2022-11-07T14:54:43+00:00" + "time": "2022-12-06T13:26:25+00:00" }, { "name": "danog/magicalserializer", @@ -2518,16 +2518,16 @@ }, { "name": "danog/primemodule", - "version": "1.0.10.9999", + "version": "1.0.11.9999", "source": { "type": "git", "url": "https://github.com/danog/PrimeModule.git", - "reference": "dadd3fa2693425f2b7feee5bb717d79b1af42b80" + "reference": "2328b1ec43b4a2a318602f4b16d6bf628ca96d04" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/danog/PrimeModule/zipball/dadd3fa2693425f2b7feee5bb717d79b1af42b80", - "reference": "dadd3fa2693425f2b7feee5bb717d79b1af42b80", + "url": "https://api.github.com/repos/danog/PrimeModule/zipball/2328b1ec43b4a2a318602f4b16d6bf628ca96d04", + "reference": "2328b1ec43b4a2a318602f4b16d6bf628ca96d04", "shasum": "" }, "require": { @@ -2563,30 +2563,30 @@ "description": "Prime module capable of doing prime factorization of huge numbers very quickly.\"", "support": { "issues": "https://github.com/danog/PrimeModule/issues", - "source": "https://github.com/danog/PrimeModule/tree/1.0.10.9999" + "source": "https://github.com/danog/PrimeModule/tree/1.0.11.9999" }, - "time": "2022-05-22T12:28:02+00:00" + "time": "2022-12-03T20:53:15+00:00" }, { "name": "danog/tg-file-decoder", - "version": "0.1.11", + "version": "0.1.12", "source": { "type": "git", "url": "https://github.com/danog/tg-file-decoder.git", - "reference": "d7472df075c74844a083125a35f8d9e1066bcc8e" + "reference": "fd9827e7af8f3b47dc6db4b1c12bfeb6654dde4f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/danog/tg-file-decoder/zipball/d7472df075c74844a083125a35f8d9e1066bcc8e", - "reference": "d7472df075c74844a083125a35f8d9e1066bcc8e", + "url": "https://api.github.com/repos/danog/tg-file-decoder/zipball/fd9827e7af8f3b47dc6db4b1c12bfeb6654dde4f", + "reference": "fd9827e7af8f3b47dc6db4b1c12bfeb6654dde4f", "shasum": "" }, "require": { - "php": ">=7.0" + "php": ">=8.1" }, "require-dev": { "amphp/php-cs-fixer-config": "dev-master", - "phpunit/phpunit": "^8|^6" + "phpunit/phpunit": "^9" }, "type": "project", "autoload": { @@ -2620,7 +2620,7 @@ ], "support": { "issues": "https://github.com/danog/tg-file-decoder/issues", - "source": "https://github.com/danog/tg-file-decoder/tree/0.1.11" + "source": "https://github.com/danog/tg-file-decoder/tree/0.1.12" }, "funding": [ { @@ -2628,7 +2628,7 @@ "type": "github" } ], - "time": "2022-07-26T18:02:44+00:00" + "time": "2022-11-16T16:22:45+00:00" }, { "name": "daverandom/libdns", @@ -3631,16 +3631,16 @@ }, { "name": "symfony/polyfill-ctype", - "version": "v1.26.0", + "version": "v1.27.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-ctype.git", - "reference": "6fd1b9a79f6e3cf65f9e679b23af304cd9e010d4" + "reference": "5bbc823adecdae860bb64756d639ecfec17b050a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/6fd1b9a79f6e3cf65f9e679b23af304cd9e010d4", - "reference": "6fd1b9a79f6e3cf65f9e679b23af304cd9e010d4", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/5bbc823adecdae860bb64756d639ecfec17b050a", + "reference": "5bbc823adecdae860bb64756d639ecfec17b050a", "shasum": "" }, "require": { @@ -3655,7 +3655,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.26-dev" + "dev-main": "1.27-dev" }, "thanks": { "name": "symfony/polyfill", @@ -3693,7 +3693,7 @@ "portable" ], "support": { - "source": "https://github.com/symfony/polyfill-ctype/tree/v1.26.0" + "source": "https://github.com/symfony/polyfill-ctype/tree/v1.27.0" }, "funding": [ { @@ -3709,20 +3709,20 @@ "type": "tidelift" } ], - "time": "2022-05-24T11:49:31+00:00" + "time": "2022-11-03T14:55:06+00:00" }, { "name": "symfony/polyfill-mbstring", - "version": "v1.26.0", + "version": "v1.27.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e" + "reference": "8ad114f6b39e2c98a8b0e3bd907732c207c2b534" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e", - "reference": "9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/8ad114f6b39e2c98a8b0e3bd907732c207c2b534", + "reference": "8ad114f6b39e2c98a8b0e3bd907732c207c2b534", "shasum": "" }, "require": { @@ -3737,7 +3737,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.26-dev" + "dev-main": "1.27-dev" }, "thanks": { "name": "symfony/polyfill", @@ -3776,7 +3776,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.26.0" + "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.27.0" }, "funding": [ { @@ -3792,20 +3792,20 @@ "type": "tidelift" } ], - "time": "2022-05-24T11:49:31+00:00" + "time": "2022-11-03T14:55:06+00:00" }, { "name": "symfony/polyfill-php80", - "version": "v1.26.0", + "version": "v1.27.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php80.git", - "reference": "cfa0ae98841b9e461207c13ab093d76b0fa7bace" + "reference": "7a6ff3f1959bb01aefccb463a0f2cd3d3d2fd936" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/cfa0ae98841b9e461207c13ab093d76b0fa7bace", - "reference": "cfa0ae98841b9e461207c13ab093d76b0fa7bace", + "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/7a6ff3f1959bb01aefccb463a0f2cd3d3d2fd936", + "reference": "7a6ff3f1959bb01aefccb463a0f2cd3d3d2fd936", "shasum": "" }, "require": { @@ -3814,7 +3814,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.26-dev" + "dev-main": "1.27-dev" }, "thanks": { "name": "symfony/polyfill", @@ -3859,7 +3859,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php80/tree/v1.26.0" + "source": "https://github.com/symfony/polyfill-php80/tree/v1.27.0" }, "funding": [ { @@ -3875,7 +3875,7 @@ "type": "tidelift" } ], - "time": "2022-05-10T07:21:04+00:00" + "time": "2022-11-03T14:55:06+00:00" }, { "name": "vlucas/phpdotenv", @@ -4025,12 +4025,12 @@ "source": { "type": "git", "url": "https://github.com/Roave/SecurityAdvisories.git", - "reference": "964c5d9ca40d0ec72db203b3dd6382a30abef616" + "reference": "5ff66815edb2a9cb060eed77daa81f20ae6ce5b4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Roave/SecurityAdvisories/zipball/964c5d9ca40d0ec72db203b3dd6382a30abef616", - "reference": "964c5d9ca40d0ec72db203b3dd6382a30abef616", + "url": "https://api.github.com/repos/Roave/SecurityAdvisories/zipball/5ff66815edb2a9cb060eed77daa81f20ae6ce5b4", + "reference": "5ff66815edb2a9cb060eed77daa81f20ae6ce5b4", "shasum": "" }, "conflict": { @@ -4054,12 +4054,13 @@ "asymmetricrypt/asymmetricrypt": ">=0,<9.9.99", "awesome-support/awesome-support": "<=6.0.7", "aws/aws-sdk-php": ">=3,<3.2.1", - "badaso/core": "<2.6.1", + "backdrop/backdrop": "<=1.23", + "badaso/core": "<2.7", "bagisto/bagisto": "<0.1.5", "barrelstrength/sprout-base-email": "<1.2.7", "barrelstrength/sprout-forms": "<3.9", "barryvdh/laravel-translation-manager": "<0.6.2", - "baserproject/basercms": "<4.5.4", + "baserproject/basercms": "<=4.7.1", "billz/raspap-webgui": "<=2.6.6", "bk2k/bootstrap-package": ">=7.1,<7.1.2|>=8,<8.0.8|>=9,<9.0.4|>=9.1,<9.1.3|>=10,<10.0.10|>=11,<11.0.3", "bmarshall511/wordpress_zero_spam": "<5.2.13", @@ -4087,7 +4088,7 @@ "codeigniter4/shield": "= 1.0.0-beta", "codiad/codiad": "<=2.8.4", "composer/composer": "<1.10.26|>=2-alpha.1,<2.2.12|>=2.3,<2.3.5", - "concrete5/concrete5": "<9", + "concrete5/concrete5": "<=9.1.3|>= 9.0.0RC1, < 9.1.3", "concrete5/core": "<8.5.8|>=9,<9.1", "contao-components/mediaelement": ">=2.14.2,<2.21.1", "contao/contao": ">=4,<4.4.56|>=4.5,<4.9.18|>=4.10,<4.11.7|>=4.13,<4.13.3", @@ -4113,7 +4114,7 @@ "doctrine/mongodb-odm": ">=1,<1.0.2", "doctrine/mongodb-odm-bundle": ">=2,<3.0.1", "doctrine/orm": ">=2,<2.4.8|>=2.5,<2.5.1|>=2.8.3,<2.8.4", - "dolibarr/dolibarr": "<16|= 12.0.5|>= 3.3.beta1, < 13.0.2", + "dolibarr/dolibarr": "<16|>=16.0.1,<16.0.3|= 12.0.5|>= 3.3.beta1, < 13.0.2", "dompdf/dompdf": "<2.0.1", "drupal/core": ">=7,<7.91|>=8,<9.3.19|>=9.4,<9.4.3", "drupal/drupal": ">=7,<7.80|>=8,<8.9.16|>=9,<9.1.12|>=9.2,<9.2.4", @@ -4133,16 +4134,17 @@ "ezsystems/ezdemo-ls-extension": ">=5.4,<5.4.2.1", "ezsystems/ezfind-ls": ">=5.3,<5.3.6.1|>=5.4,<5.4.11.1|>=2017.12,<2017.12.0.1", "ezsystems/ezplatform": "<=1.13.6|>=2,<=2.5.24", - "ezsystems/ezplatform-admin-ui": ">=1.3,<1.3.5|>=1.4,<1.4.6|>=1.5,<1.5.27", + "ezsystems/ezplatform-admin-ui": ">=1.3,<1.3.5|>=1.4,<1.4.6|>=1.5,<1.5.29|>=2.3,<2.3.26", "ezsystems/ezplatform-admin-ui-assets": ">=4,<4.2.1|>=5,<5.0.1|>=5.1,<5.1.1", - "ezsystems/ezplatform-kernel": "<=1.2.5|>=1.3,<1.3.19", + "ezsystems/ezplatform-graphql": ">=1-rc.1,<1.0.13|>=2-beta.1,<2.3.12", + "ezsystems/ezplatform-kernel": "<=1.2.5|>=1.3,<1.3.26", "ezsystems/ezplatform-rest": ">=1.2,<=1.2.2|>=1.3,<1.3.8", "ezsystems/ezplatform-richtext": ">=2.3,<=2.3.7", "ezsystems/ezplatform-user": ">=1,<1.0.1", - "ezsystems/ezpublish-kernel": "<=6.13.8.1|>=7,<7.5.29", + "ezsystems/ezpublish-kernel": "<=6.13.8.1|>=7,<7.5.30", "ezsystems/ezpublish-legacy": "<=2017.12.7.3|>=2018.6,<=2019.3.5.1", "ezsystems/platform-ui-assets-bundle": ">=4.2,<4.2.3", - "ezsystems/repository-forms": ">=2.3,<2.3.2.1", + "ezsystems/repository-forms": ">=2.3,<2.3.2.1|>=2.5,<2.5.15", "ezyang/htmlpurifier": "<4.1.1", "facade/ignition": "<1.16.15|>=2,<2.4.2|>=2.5,<2.5.2", "facturascripts/facturascripts": "<=2022.8", @@ -4151,7 +4153,7 @@ "fenom/fenom": "<=2.12.1", "filegator/filegator": "<7.8", "firebase/php-jwt": "<2", - "flarum/core": ">=1,<=1.0.1", + "flarum/core": ">=1,<=1.0.1|>=1.5,<1.6.2", "flarum/sticky": ">=0.1-beta.14,<=0.1-beta.15", "flarum/tags": "<=0.1-beta.13", "fluidtypo3/vhs": "<5.1.1", @@ -4188,7 +4190,9 @@ "hjue/justwriting": "<=1", "hov/jobfair": "<1.0.13|>=2,<2.0.2", "hyn/multi-tenant": ">=5.6,<5.7.2", - "ibexa/core": ">=4,<4.0.7|>=4.1,<4.1.4", + "ibexa/admin-ui": ">=4.2,<4.2.3", + "ibexa/core": ">=4,<4.0.7|>=4.1,<4.1.4|>=4.2,<4.2.3", + "ibexa/graphql": ">=2.5,<2.5.31|>=3.3,<3.3.28|>=4.2,<4.2.3", "ibexa/post-install": "<=1.0.4", "icecoder/icecoder": "<=8.1", "idno/known": "<=1.3.1", @@ -4205,6 +4209,7 @@ "ivankristianto/phpwhois": "<=4.3", "jackalope/jackalope-doctrine-dbal": "<1.7.4", "james-heinrich/getid3": "<1.9.21", + "jasig/phpcas": "<1.3.3", "joomla/archive": "<1.1.12|>=2,<2.0.1", "joomla/filesystem": "<1.6.2|>=2,<2.0.1", "joomla/filter": "<1.4.4|>=2,<2.0.1", @@ -4232,7 +4237,7 @@ "league/commonmark": "<0.18.3", "league/flysystem": "<1.1.4|>=2,<2.1.1", "lexik/jwt-authentication-bundle": "<2.10.7|>=2.11,<2.11.3", - "librenms/librenms": "<=22.8", + "librenms/librenms": "<22.10", "limesurvey/limesurvey": "<3.27.19", "livehelperchat/livehelperchat": "<=3.91", "livewire/livewire": ">2.2.4,<2.2.6", @@ -4257,7 +4262,7 @@ "modx/revolution": "<= 2.8.3-pl|<2.8", "mojo42/jirafeau": "<4.4", "monolog/monolog": ">=1.8,<1.12", - "moodle/moodle": "<4.0.1", + "moodle/moodle": "<4.0.5", "mustache/mustache": ">=2,<2.14.1", "namshi/jose": "<2.2", "neoan3-apps/template": "<1.1.1", @@ -4314,6 +4319,7 @@ "phpunit/phpunit": ">=4.8.19,<4.8.28|>=5,<5.6.3", "phpwhois/phpwhois": "<=4.2.5", "phpxmlrpc/extras": "<0.6.1", + "phpxmlrpc/phpxmlrpc": "<4.9", "pimcore/data-hub": "<1.2.4", "pimcore/pimcore": "<10.5.9", "pocketmine/bedrock-protocol": "<8.0.2", @@ -4336,6 +4342,7 @@ "ptrofimov/beanstalk_console": "<1.7.14", "pusher/pusher-php-server": "<2.2.1", "pwweb/laravel-core": "<=0.3.6-beta", + "pyrocms/pyrocms": "<=3.9.1", "rainlab/debugbar-plugin": "<3.1", "rankmath/seo-by-rank-math": "<=1.0.95", "react/http": ">=0.7,<1.7", @@ -4357,12 +4364,12 @@ "shopware/storefront": "<=6.4.8.1", "shopxo/shopxo": "<2.2.6", "showdoc/showdoc": "<2.10.4", - "silverstripe/admin": ">=1,<1.8.1", - "silverstripe/assets": ">=1,<1.10.1", - "silverstripe/cms": "<4.3.6|>=4.4,<4.4.4", + "silverstripe/admin": ">=1,<1.11.3", + "silverstripe/assets": ">=1,<1.11.1", + "silverstripe/cms": "<4.11.3", "silverstripe/comments": ">=1.3,<1.9.99|>=2,<2.9.99|>=3,<3.1.1", "silverstripe/forum": "<=0.6.1|>=0.7,<=0.7.3", - "silverstripe/framework": "<4.10.9", + "silverstripe/framework": "<4.11.14", "silverstripe/graphql": "<3.5.2|>=4-alpha.1,<4-alpha.2|= 4.0.0-alpha1", "silverstripe/hybridsessions": ">=1,<2.4.1|>=2.5,<2.5.1", "silverstripe/registry": ">=2.1,<2.1.2|>=2.2,<2.2.1", @@ -4371,6 +4378,7 @@ "silverstripe/subsites": ">=2,<2.1.1", "silverstripe/taxonomy": ">=1.3,<1.3.1|>=2,<2.0.1", "silverstripe/userforms": "<3", + "silverstripe/versioned-admin": ">=1,<1.11.1", "simple-updates/phpwhois": "<=1", "simplesamlphp/saml2": "<1.10.6|>=2,<2.3.8|>=3,<3.1.4", "simplesamlphp/simplesamlphp": "<1.18.6", @@ -4381,6 +4389,7 @@ "snipe/snipe-it": "<6.0.11|>= 6.0.0-RC-1, <= 6.0.0-RC-5", "socalnick/scn-social-auth": "<1.15.2", "socialiteproviders/steam": "<1.1", + "spatie/browsershot": "<3.57.4", "spipu/html2pdf": "<5.2.4", "spoonity/tcpdf": "<6.2.22", "squizlabs/php_codesniffer": ">=1,<2.8.1|>=3,<3.0.1", @@ -4445,7 +4454,7 @@ "topthink/framework": "<=6.0.13", "topthink/think": "<=6.0.9", "topthink/thinkphp": "<=3.2.3", - "tribalsystems/zenario": "<9.2.55826", + "tribalsystems/zenario": "<=9.3.57595", "truckersmp/phpwhois": "<=4.3.1", "twig/twig": "<1.44.7|>=2,<2.15.3|>=3,<3.4.3", "typo3/cms": ">=6.2,<6.2.30|>=7,<7.6.32|>=8,<8.7.38|>=9,<9.5.29|>=10,<10.4.32|>=11,<11.5.16", @@ -4481,7 +4490,7 @@ "yetiforce/yetiforce-crm": "<=6.4", "yidashi/yii2cmf": "<=2", "yii2mod/yii2-cms": "<1.9.2", - "yiisoft/yii": ">=1.1.14,<1.1.15", + "yiisoft/yii": "<1.1.27", "yiisoft/yii2": "<2.0.38", "yiisoft/yii2-bootstrap": "<2.0.4", "yiisoft/yii2-dev": "<2.0.43", @@ -4551,7 +4560,7 @@ "type": "tidelift" } ], - "time": "2022-11-04T21:04:09+00:00" + "time": "2022-12-06T16:04:33+00:00" } ], "aliases": [], From 874ef47ea6a008d6f69d3441e9d4145f38fc548e Mon Sep 17 00:00:00 2001 From: Alexander Pankratov Date: Sat, 7 Jan 2023 22:59:06 +0100 Subject: [PATCH 034/270] Update madelineProto --- composer.lock | 171 +++++++++++++++++++++++++++----------------------- 1 file changed, 94 insertions(+), 77 deletions(-) diff --git a/composer.lock b/composer.lock index 15aa521..8bd22e7 100644 --- a/composer.lock +++ b/composer.lock @@ -1029,16 +1029,16 @@ }, { "name": "amphp/mysql", - "version": "v2.1.2", + "version": "v2.1.3", "source": { "type": "git", "url": "https://github.com/amphp/mysql.git", - "reference": "d0b9a618b45ad3a10452a3860056db76a6930a75" + "reference": "dac7e7149da22ef4473c026efae5d307d8fd41b7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/amphp/mysql/zipball/d0b9a618b45ad3a10452a3860056db76a6930a75", - "reference": "d0b9a618b45ad3a10452a3860056db76a6930a75", + "url": "https://api.github.com/repos/amphp/mysql/zipball/dac7e7149da22ef4473c026efae5d307d8fd41b7", + "reference": "dac7e7149da22ef4473c026efae5d307d8fd41b7", "shasum": "" }, "require": { @@ -1083,7 +1083,7 @@ "description": "Asynchronous MySQL client for PHP based on Amp.", "support": { "issues": "https://github.com/amphp/mysql/issues", - "source": "https://github.com/amphp/mysql/tree/v2.1.2" + "source": "https://github.com/amphp/mysql/tree/v2.1.3" }, "funding": [ { @@ -1091,20 +1091,20 @@ "type": "github" } ], - "time": "2021-12-01T17:38:48+00:00" + "time": "2022-09-25T20:44:16+00:00" }, { "name": "amphp/parallel", - "version": "v1.4.1", + "version": "v1.4.2", "source": { "type": "git", "url": "https://github.com/amphp/parallel.git", - "reference": "fbc128383c1ffb3823866f71b88d8c4722a25ce9" + "reference": "75853e1623efa5aa5e65e986ec9a97db573a5267" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/amphp/parallel/zipball/fbc128383c1ffb3823866f71b88d8c4722a25ce9", - "reference": "fbc128383c1ffb3823866f71b88d8c4722a25ce9", + "url": "https://api.github.com/repos/amphp/parallel/zipball/75853e1623efa5aa5e65e986ec9a97db573a5267", + "reference": "75853e1623efa5aa5e65e986ec9a97db573a5267", "shasum": "" }, "require": { @@ -1157,7 +1157,7 @@ ], "support": { "issues": "https://github.com/amphp/parallel/issues", - "source": "https://github.com/amphp/parallel/tree/v1.4.1" + "source": "https://github.com/amphp/parallel/tree/v1.4.2" }, "funding": [ { @@ -1165,33 +1165,34 @@ "type": "github" } ], - "time": "2021-10-25T19:16:02+00:00" + "time": "2022-12-30T00:21:42+00:00" }, { "name": "amphp/parser", - "version": "v1.0.0", + "version": "v1.1.0", "source": { "type": "git", "url": "https://github.com/amphp/parser.git", - "reference": "f83e68f03d5b8e8e0365b8792985a7f341c57ae1" + "reference": "ff1de4144726c5dad5fab97f66692ebe8de3e151" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/amphp/parser/zipball/f83e68f03d5b8e8e0365b8792985a7f341c57ae1", - "reference": "f83e68f03d5b8e8e0365b8792985a7f341c57ae1", + "url": "https://api.github.com/repos/amphp/parser/zipball/ff1de4144726c5dad5fab97f66692ebe8de3e151", + "reference": "ff1de4144726c5dad5fab97f66692ebe8de3e151", "shasum": "" }, "require": { - "php": ">=7" + "php": ">=7.4" }, "require-dev": { - "friendsofphp/php-cs-fixer": "^2.3", - "phpunit/phpunit": "^6" + "amphp/php-cs-fixer-config": "^2", + "phpunit/phpunit": "^9", + "psalm/phar": "^5.4" }, "type": "library", "autoload": { "psr-4": { - "Amp\\Parser\\": "lib" + "Amp\\Parser\\": "src" } }, "notification-url": "https://packagist.org/downloads/", @@ -1199,13 +1200,13 @@ "MIT" ], "authors": [ - { - "name": "Niklas Keller", - "email": "me@kelunik.com" - }, { "name": "Aaron Piotrowski", "email": "aaron@trowski.com" + }, + { + "name": "Niklas Keller", + "email": "me@kelunik.com" } ], "description": "A generator parser to make streaming parsers simple.", @@ -1218,22 +1219,28 @@ ], "support": { "issues": "https://github.com/amphp/parser/issues", - "source": "https://github.com/amphp/parser/tree/is-valid" + "source": "https://github.com/amphp/parser/tree/v1.1.0" }, - "time": "2017-06-06T05:29:10+00:00" + "funding": [ + { + "url": "https://github.com/amphp", + "type": "github" + } + ], + "time": "2022-12-30T18:08:47+00:00" }, { "name": "amphp/postgres", - "version": "v1.4.3", + "version": "v1.4.5", "source": { "type": "git", "url": "https://github.com/amphp/postgres.git", - "reference": "f52cc35ef02ee4ad709083e0432c2288d4df7de0" + "reference": "8e45076ac65870d58e2fe206ca23f3546b60bf03" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/amphp/postgres/zipball/f52cc35ef02ee4ad709083e0432c2288d4df7de0", - "reference": "f52cc35ef02ee4ad709083e0432c2288d4df7de0", + "url": "https://api.github.com/repos/amphp/postgres/zipball/8e45076ac65870d58e2fe206ca23f3546b60bf03", + "reference": "8e45076ac65870d58e2fe206ca23f3546b60bf03", "shasum": "" }, "require": { @@ -1282,7 +1289,7 @@ ], "support": { "issues": "https://github.com/amphp/postgres/issues", - "source": "https://github.com/amphp/postgres/tree/v1.4.3" + "source": "https://github.com/amphp/postgres/tree/v1.4.5" }, "funding": [ { @@ -1290,7 +1297,7 @@ "type": "github" } ], - "time": "2021-12-04T16:46:00+00:00" + "time": "2023-01-06T04:36:07+00:00" }, { "name": "amphp/process", @@ -1569,26 +1576,25 @@ }, { "name": "amphp/sql", - "version": "v1.0.1", + "version": "v1.0.2", "source": { "type": "git", "url": "https://github.com/amphp/sql.git", - "reference": "0445ac35623a18105efeac93364288434430a4d8" + "reference": "5a1dcfd9a3c3518826c616b4d0b0fa0363f087fa" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/amphp/sql/zipball/0445ac35623a18105efeac93364288434430a4d8", - "reference": "0445ac35623a18105efeac93364288434430a4d8", + "url": "https://api.github.com/repos/amphp/sql/zipball/5a1dcfd9a3c3518826c616b4d0b0fa0363f087fa", + "reference": "5a1dcfd9a3c3518826c616b4d0b0fa0363f087fa", "shasum": "" }, "require": { "amphp/amp": "^2", - "php": ">=7" + "php": ">=7.1" }, "require-dev": { "amphp/php-cs-fixer-config": "dev-master", - "amphp/phpunit-util": "^1", - "phpunit/phpunit": "^6" + "phpunit/phpunit": "^8" }, "type": "library", "autoload": { @@ -1611,22 +1617,28 @@ ], "support": { "issues": "https://github.com/amphp/sql/issues", - "source": "https://github.com/amphp/sql/tree/v1.0.1" + "source": "https://github.com/amphp/sql/tree/v1.0.2" }, - "time": "2019-09-26T16:23:02+00:00" + "funding": [ + { + "url": "https://github.com/amphp", + "type": "github" + } + ], + "time": "2022-12-18T22:54:18+00:00" }, { "name": "amphp/sql-common", - "version": "v1.1.3", + "version": "v1.1.4", "source": { "type": "git", "url": "https://github.com/amphp/sql-common.git", - "reference": "cab5f252916a7bf5c9dffa01736dfd9115e7f652" + "reference": "6ed5b96d26528bd56213ebb867a2992e7a0b8278" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/amphp/sql-common/zipball/cab5f252916a7bf5c9dffa01736dfd9115e7f652", - "reference": "cab5f252916a7bf5c9dffa01736dfd9115e7f652", + "url": "https://api.github.com/repos/amphp/sql-common/zipball/6ed5b96d26528bd56213ebb867a2992e7a0b8278", + "reference": "6ed5b96d26528bd56213ebb867a2992e7a0b8278", "shasum": "" }, "require": { @@ -1660,7 +1672,7 @@ ], "support": { "issues": "https://github.com/amphp/sql-common/issues", - "source": "https://github.com/amphp/sql-common/tree/v1.1.3" + "source": "https://github.com/amphp/sql-common/tree/v1.1.4" }, "funding": [ { @@ -1668,7 +1680,7 @@ "type": "github" } ], - "time": "2020-11-15T02:33:47+00:00" + "time": "2023-01-06T04:22:36+00:00" }, { "name": "amphp/sync", @@ -2349,16 +2361,16 @@ }, { "name": "danog/madelineproto", - "version": "7.0.144", + "version": "7.0.148", "source": { "type": "git", "url": "https://github.com/danog/MadelineProto.git", - "reference": "37fdcd57a3e8676f58e327f28acb39b4a127229b" + "reference": "2b618e0557f937060a5931088fcde3bee24dfde7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/danog/MadelineProto/zipball/37fdcd57a3e8676f58e327f28acb39b4a127229b", - "reference": "37fdcd57a3e8676f58e327f28acb39b4a127229b", + "url": "https://api.github.com/repos/danog/MadelineProto/zipball/2b618e0557f937060a5931088fcde3bee24dfde7", + "reference": "2b618e0557f937060a5931088fcde3bee24dfde7", "shasum": "" }, "require": { @@ -2461,7 +2473,7 @@ ], "support": { "issues": "https://github.com/danog/MadelineProto/issues", - "source": "https://github.com/danog/MadelineProto/tree/7.0.144" + "source": "https://github.com/danog/MadelineProto/tree/7.0.148" }, "funding": [ { @@ -2469,7 +2481,7 @@ "type": "github" } ], - "time": "2022-12-06T13:26:25+00:00" + "time": "2023-01-06T11:07:19+00:00" }, { "name": "danog/magicalserializer", @@ -3015,6 +3027,7 @@ "issues": "https://github.com/thephpleague/uri-parser/issues", "source": "https://github.com/thephpleague/uri-parser/tree/master" }, + "abandoned": true, "time": "2018-11-22T07:55:51+00:00" }, { @@ -3363,16 +3376,16 @@ }, { "name": "phpseclib/phpseclib", - "version": "3.0.17", + "version": "3.0.18", "source": { "type": "git", "url": "https://github.com/phpseclib/phpseclib.git", - "reference": "dbc2307d5c69aeb22db136c52e91130d7f2ca761" + "reference": "f28693d38ba21bb0d9f0c411ee5dae2b178201da" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpseclib/phpseclib/zipball/dbc2307d5c69aeb22db136c52e91130d7f2ca761", - "reference": "dbc2307d5c69aeb22db136c52e91130d7f2ca761", + "url": "https://api.github.com/repos/phpseclib/phpseclib/zipball/f28693d38ba21bb0d9f0c411ee5dae2b178201da", + "reference": "f28693d38ba21bb0d9f0c411ee5dae2b178201da", "shasum": "" }, "require": { @@ -3453,7 +3466,7 @@ ], "support": { "issues": "https://github.com/phpseclib/phpseclib/issues", - "source": "https://github.com/phpseclib/phpseclib/tree/3.0.17" + "source": "https://github.com/phpseclib/phpseclib/tree/3.0.18" }, "funding": [ { @@ -3469,7 +3482,7 @@ "type": "tidelift" } ], - "time": "2022-10-24T10:51:50+00:00" + "time": "2022-12-17T18:26:50+00:00" }, { "name": "psr/http-factory", @@ -4025,12 +4038,12 @@ "source": { "type": "git", "url": "https://github.com/Roave/SecurityAdvisories.git", - "reference": "5ff66815edb2a9cb060eed77daa81f20ae6ce5b4" + "reference": "ef9dca6c49faa06e7203bbed30411e26e474a8fb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Roave/SecurityAdvisories/zipball/5ff66815edb2a9cb060eed77daa81f20ae6ce5b4", - "reference": "5ff66815edb2a9cb060eed77daa81f20ae6ce5b4", + "url": "https://api.github.com/repos/Roave/SecurityAdvisories/zipball/ef9dca6c49faa06e7203bbed30411e26e474a8fb", + "reference": "ef9dca6c49faa06e7203bbed30411e26e474a8fb", "shasum": "" }, "conflict": { @@ -4039,6 +4052,7 @@ "adodb/adodb-php": "<=5.20.20|>=5.21,<=5.21.3", "aheinze/cockpit": "<=2.2.1", "akaunting/akaunting": "<2.1.13", + "akeneo/pim-community-dev": "<5.0.119|>=6,<6.0.53", "alextselegidis/easyappointments": "<=1.4.3", "alterphp/easyadmin-extension-bundle": ">=1.2,<1.2.11|>=1.3,<1.3.1", "amazing/media2click": ">=1,<1.3.3", @@ -4060,7 +4074,7 @@ "barrelstrength/sprout-base-email": "<1.2.7", "barrelstrength/sprout-forms": "<3.9", "barryvdh/laravel-translation-manager": "<0.6.2", - "baserproject/basercms": "<=4.7.1", + "baserproject/basercms": "<4.7.2", "billz/raspap-webgui": "<=2.6.6", "bk2k/bootstrap-package": ">=7.1,<7.1.2|>=8,<8.0.8|>=9,<9.0.4|>=9.1,<9.1.3|>=10,<10.0.10|>=11,<11.0.3", "bmarshall511/wordpress_zero_spam": "<5.2.13", @@ -4084,7 +4098,7 @@ "cesnet/simplesamlphp-module-proxystatistics": "<3.1", "codeception/codeception": "<3.1.3|>=4,<4.1.22", "codeigniter/framework": "<=3.0.6", - "codeigniter4/framework": "<4.2.7", + "codeigniter4/framework": "<4.2.11", "codeigniter4/shield": "= 1.0.0-beta", "codiad/codiad": "<=2.8.4", "composer/composer": "<1.10.26|>=2-alpha.1,<2.2.12|>=2.3,<2.3.5", @@ -4149,7 +4163,7 @@ "facade/ignition": "<1.16.15|>=2,<2.4.2|>=2.5,<2.5.2", "facturascripts/facturascripts": "<=2022.8", "feehi/cms": "<=2.1.1", - "feehi/feehicms": "<=2.0.1.1", + "feehi/feehicms": "<=2.1.1", "fenom/fenom": "<=2.12.1", "filegator/filegator": "<7.8", "firebase/php-jwt": "<2", @@ -4168,7 +4182,7 @@ "friendsofsymfony/user-bundle": ">=1.2,<1.3.5", "friendsoftypo3/mediace": ">=7.6.2,<7.6.5", "froala/wysiwyg-editor": "<3.2.7", - "froxlor/froxlor": "<0.10.39", + "froxlor/froxlor": "<0.10.39|>=2-beta.0,<2-beta.1", "fuel/core": "<1.8.1", "gaoming13/wechat-php-sdk": "<=1.10.2", "genix/cms": "<=1.1.11", @@ -4256,6 +4270,7 @@ "melisplatform/melis-cms": "<5.0.1", "melisplatform/melis-front": "<5.0.1", "mezzio/mezzio-swoole": "<3.7|>=4,<4.3", + "mgallegos/laravel-jqgrid": "<=1.3", "microweber/microweber": "<=1.3.1", "miniorange/miniorange-saml": "<1.4.3", "mittwald/typo3_forum": "<1.2.1", @@ -4329,7 +4344,7 @@ "prestashop/blockwishlist": ">=2,<2.1.1", "prestashop/contactform": ">=1.0.1,<4.3", "prestashop/gamification": "<2.3.2", - "prestashop/prestashop": ">=1.6.0.10,<1.7.8.7", + "prestashop/prestashop": "<1.7.8.8", "prestashop/productcomments": "<5.0.2", "prestashop/ps_emailsubscription": "<2.6.1", "prestashop/ps_facetedsearch": "<3.4.1", @@ -4349,6 +4364,7 @@ "remdex/livehelperchat": "<3.99", "rmccue/requests": ">=1.6,<1.8", "robrichards/xmlseclibs": "<3.0.4", + "roots/soil": "<4.1", "rudloff/alltube": "<3.0.3", "s-cart/core": "<6.9", "s-cart/s-cart": "<6.9", @@ -4375,7 +4391,7 @@ "silverstripe/registry": ">=2.1,<2.1.2|>=2.2,<2.2.1", "silverstripe/restfulserver": ">=1,<1.0.9|>=2,<2.0.4", "silverstripe/silverstripe-omnipay": "<2.5.2|>=3,<3.0.2|>=3.1,<3.1.4|>=3.2,<3.2.1", - "silverstripe/subsites": ">=2,<2.1.1", + "silverstripe/subsites": ">=2,<2.6.1", "silverstripe/taxonomy": ">=1.3,<1.3.1|>=2,<2.0.1", "silverstripe/userforms": "<3", "silverstripe/versioned-admin": ">=1,<1.11.1", @@ -4386,7 +4402,7 @@ "simplito/elliptic-php": "<1.0.6", "slim/slim": "<2.6", "smarty/smarty": "<3.1.47|>=4,<4.2.1", - "snipe/snipe-it": "<6.0.11|>= 6.0.0-RC-1, <= 6.0.0-RC-5", + "snipe/snipe-it": "<=6.0.14|>= 6.0.0-RC-1, <= 6.0.0-RC-5", "socalnick/scn-social-auth": "<1.15.2", "socialiteproviders/steam": "<1.1", "spatie/browsershot": "<3.57.4", @@ -4447,22 +4463,22 @@ "thelia/thelia": ">=2.1-beta.1,<2.1.3", "theonedemon/phpwhois": "<=4.2.5", "thinkcmf/thinkcmf": "<=5.1.7", - "thorsten/phpmyfaq": "<3.1.8", - "tinymce/tinymce": "<5.10", + "thorsten/phpmyfaq": "<3.1.9", + "tinymce/tinymce": "<5.10.7|>=6,<6.3.1", "titon/framework": ">=0,<9.9.99", "tobiasbg/tablepress": "<= 2.0-RC1", - "topthink/framework": "<=6.0.13", + "topthink/framework": "<6.0.14", "topthink/think": "<=6.0.9", "topthink/thinkphp": "<=3.2.3", "tribalsystems/zenario": "<=9.3.57595", "truckersmp/phpwhois": "<=4.3.1", "twig/twig": "<1.44.7|>=2,<2.15.3|>=3,<3.4.3", - "typo3/cms": ">=6.2,<6.2.30|>=7,<7.6.32|>=8,<8.7.38|>=9,<9.5.29|>=10,<10.4.32|>=11,<11.5.16", + "typo3/cms": "<2.0.5|>=3,<3.0.3|>=6.2,<6.2.30|>=7,<7.6.32|>=8,<8.7.38|>=9,<9.5.29|>=10,<10.4.33|>=11,<11.5.20|>=12,<12.1.1", "typo3/cms-backend": ">=7,<=7.6.50|>=8,<=8.7.39|>=9,<=9.5.24|>=10,<=10.4.13|>=11,<=11.1", - "typo3/cms-core": ">=6.2,<=6.2.56|>=7,<7.6.58|>=8,<8.7.48|>=9,<9.5.37|>=10,<10.4.32|>=11,<11.5.16", + "typo3/cms-core": "<8.7.49|>=9,<9.5.38|>=10,<10.4.33|>=11,<11.5.20|>=12,<12.1.1", "typo3/cms-form": ">=8,<=8.7.39|>=9,<=9.5.24|>=10,<=10.4.13|>=11,<=11.1", "typo3/flow": ">=1,<1.0.4|>=1.1,<1.1.1|>=2,<2.0.1|>=2.3,<2.3.16|>=3,<3.0.12|>=3.1,<3.1.10|>=3.2,<3.2.13|>=3.3,<3.3.13|>=4,<4.0.6", - "typo3/html-sanitizer": ">=1,<1.0.7|>=2,<2.0.16", + "typo3/html-sanitizer": ">=1,<1.5|>=2,<2.1.1", "typo3/neos": ">=1.1,<1.1.3|>=1.2,<1.2.13|>=2,<2.0.4|>=2.3,<2.3.99|>=3,<3.0.20|>=3.1,<3.1.18|>=3.2,<3.2.14|>=3.3,<3.3.23|>=4,<4.0.17|>=4.1,<4.1.16|>=4.2,<4.2.12|>=4.3,<4.3.3", "typo3/phar-stream-wrapper": ">=1,<2.1.1|>=3,<3.1.1", "typo3/swiftmailer": ">=4.1,<4.1.99|>=5.4,<5.4.5", @@ -4495,9 +4511,10 @@ "yiisoft/yii2-bootstrap": "<2.0.4", "yiisoft/yii2-dev": "<2.0.43", "yiisoft/yii2-elasticsearch": "<2.0.5", - "yiisoft/yii2-gii": "<2.0.4", + "yiisoft/yii2-gii": "<=2.2.4", "yiisoft/yii2-jui": "<2.0.4", "yiisoft/yii2-redis": "<2.0.8", + "yikesinc/yikes-inc-easy-mailchimp-extender": "<6.8.6", "yoast-seo-for-typo3/yoast_seo": "<7.2.3", "yourls/yourls": "<=1.8.2", "zendesk/zendesk_api_client_php": "<2.2.11", @@ -4560,7 +4577,7 @@ "type": "tidelift" } ], - "time": "2022-12-06T16:04:33+00:00" + "time": "2023-01-04T14:04:25+00:00" } ], "aliases": [], From 2b4c40735b4a7b91c92ac42d4c4626b575e82c9d Mon Sep 17 00:00:00 2001 From: Alexander Pankratov Date: Sat, 7 Jan 2023 23:32:33 +0100 Subject: [PATCH 035/270] Fix getSponsoredMessages on premium accounts --- composer.json | 2 +- composer.lock | 15 ++++++++------- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/composer.json b/composer.json index 0446652..3cd1f4e 100644 --- a/composer.json +++ b/composer.json @@ -28,7 +28,7 @@ "amphp/websocket-client": "^1", "amphp/http-client": "^4", "vlucas/phpdotenv": "^4", - "danog/madelineproto": "^7.0.132", + "danog/madelineproto": "v7.x-dev", "amphp/http-server-form-parser": "^1.1" }, "require-dev": { diff --git a/composer.lock b/composer.lock index 8bd22e7..4ab5a9d 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "97a81012b9987780b17449d8ac5f6112", + "content-hash": "56af6c9503d3503b4c5a1793f3dbd603", "packages": [ { "name": "amphp/amp", @@ -2361,16 +2361,16 @@ }, { "name": "danog/madelineproto", - "version": "7.0.148", + "version": "v7.x-dev", "source": { "type": "git", "url": "https://github.com/danog/MadelineProto.git", - "reference": "2b618e0557f937060a5931088fcde3bee24dfde7" + "reference": "43c68b3a46106fc2e10cf8f8ac373b3169cc317f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/danog/MadelineProto/zipball/2b618e0557f937060a5931088fcde3bee24dfde7", - "reference": "2b618e0557f937060a5931088fcde3bee24dfde7", + "url": "https://api.github.com/repos/danog/MadelineProto/zipball/43c68b3a46106fc2e10cf8f8ac373b3169cc317f", + "reference": "43c68b3a46106fc2e10cf8f8ac373b3169cc317f", "shasum": "" }, "require": { @@ -2473,7 +2473,7 @@ ], "support": { "issues": "https://github.com/danog/MadelineProto/issues", - "source": "https://github.com/danog/MadelineProto/tree/7.0.148" + "source": "https://github.com/danog/MadelineProto/tree/v7" }, "funding": [ { @@ -2481,7 +2481,7 @@ "type": "github" } ], - "time": "2023-01-06T11:07:19+00:00" + "time": "2023-01-07T22:27:29+00:00" }, { "name": "danog/magicalserializer", @@ -4583,6 +4583,7 @@ "aliases": [], "minimum-stability": "dev", "stability-flags": { + "danog/madelineproto": 20, "roave/security-advisories": 20 }, "prefer-stable": true, From 89ddab7c7467a4e79a22fcd577cd133d63d70b19 Mon Sep 17 00:00:00 2001 From: Alexander Pankratov Date: Mon, 9 Jan 2023 11:44:27 +0100 Subject: [PATCH 036/270] Fix FLOOD_WAIT, downgrade madeline --- composer.json | 2 +- composer.lock | 15 +++++++-------- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/composer.json b/composer.json index 3cd1f4e..6c909fc 100644 --- a/composer.json +++ b/composer.json @@ -28,7 +28,7 @@ "amphp/websocket-client": "^1", "amphp/http-client": "^4", "vlucas/phpdotenv": "^4", - "danog/madelineproto": "v7.x-dev", + "danog/madelineproto": "v7.0.144", "amphp/http-server-form-parser": "^1.1" }, "require-dev": { diff --git a/composer.lock b/composer.lock index 4ab5a9d..ad52ceb 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "56af6c9503d3503b4c5a1793f3dbd603", + "content-hash": "81f9b37675211006c766f881872d7d36", "packages": [ { "name": "amphp/amp", @@ -2361,16 +2361,16 @@ }, { "name": "danog/madelineproto", - "version": "v7.x-dev", + "version": "7.0.144", "source": { "type": "git", "url": "https://github.com/danog/MadelineProto.git", - "reference": "43c68b3a46106fc2e10cf8f8ac373b3169cc317f" + "reference": "37fdcd57a3e8676f58e327f28acb39b4a127229b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/danog/MadelineProto/zipball/43c68b3a46106fc2e10cf8f8ac373b3169cc317f", - "reference": "43c68b3a46106fc2e10cf8f8ac373b3169cc317f", + "url": "https://api.github.com/repos/danog/MadelineProto/zipball/37fdcd57a3e8676f58e327f28acb39b4a127229b", + "reference": "37fdcd57a3e8676f58e327f28acb39b4a127229b", "shasum": "" }, "require": { @@ -2473,7 +2473,7 @@ ], "support": { "issues": "https://github.com/danog/MadelineProto/issues", - "source": "https://github.com/danog/MadelineProto/tree/v7" + "source": "https://github.com/danog/MadelineProto/tree/7.0.144" }, "funding": [ { @@ -2481,7 +2481,7 @@ "type": "github" } ], - "time": "2023-01-07T22:27:29+00:00" + "time": "2022-12-06T13:26:25+00:00" }, { "name": "danog/magicalserializer", @@ -4583,7 +4583,6 @@ "aliases": [], "minimum-stability": "dev", "stability-flags": { - "danog/madelineproto": 20, "roave/security-advisories": 20 }, "prefer-stable": true, From 8ab237303309bc8518a8e2828d080705412b38a7 Mon Sep 17 00:00:00 2001 From: Alexander Pankratov Date: Sun, 15 Jan 2023 18:47:38 +0100 Subject: [PATCH 037/270] Feat: upgrade php version --- Dockerfile | 2 +- composer.json | 4 ++-- composer.lock | 49 +++++++++++++++++++++++++++++++++---------------- 3 files changed, 36 insertions(+), 19 deletions(-) diff --git a/Dockerfile b/Dockerfile index 45b44d1..5f4274e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM php:8.1-cli +FROM php:8.2-cli ADD https://github.com/ufoscout/docker-compose-wait/releases/download/2.9.0/wait /usr/local/bin/docker-compose-wait ADD docker/php/conf.d/. "$PHP_INI_DIR/conf.d/" diff --git a/composer.json b/composer.json index 6c909fc..0482b08 100644 --- a/composer.json +++ b/composer.json @@ -18,7 +18,7 @@ "madelineproto" ], "require": { - "php": "~8.0|~8.1", + "php": "^8.0", "ext-json": "*", "ext-mbstring": "*", "ext-pcntl": "*", @@ -28,7 +28,7 @@ "amphp/websocket-client": "^1", "amphp/http-client": "^4", "vlucas/phpdotenv": "^4", - "danog/madelineproto": "v7.0.144", + "danog/madelineproto": "^v7.0.144", "amphp/http-server-form-parser": "^1.1" }, "require-dev": { diff --git a/composer.lock b/composer.lock index ad52ceb..1a00cb0 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "81f9b37675211006c766f881872d7d36", + "content-hash": "3edc2579e89f2cba99486aa129b90ec4", "packages": [ { "name": "amphp/amp", @@ -2361,16 +2361,16 @@ }, { "name": "danog/madelineproto", - "version": "7.0.144", + "version": "7.0.151", "source": { "type": "git", "url": "https://github.com/danog/MadelineProto.git", - "reference": "37fdcd57a3e8676f58e327f28acb39b4a127229b" + "reference": "7b2032ca19c054745b6f74c73fd7758f343c5ba8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/danog/MadelineProto/zipball/37fdcd57a3e8676f58e327f28acb39b4a127229b", - "reference": "37fdcd57a3e8676f58e327f28acb39b4a127229b", + "url": "https://api.github.com/repos/danog/MadelineProto/zipball/7b2032ca19c054745b6f74c73fd7758f343c5ba8", + "reference": "7b2032ca19c054745b6f74c73fd7758f343c5ba8", "shasum": "" }, "require": { @@ -2473,7 +2473,7 @@ ], "support": { "issues": "https://github.com/danog/MadelineProto/issues", - "source": "https://github.com/danog/MadelineProto/tree/7.0.144" + "source": "https://github.com/danog/MadelineProto/tree/7.0.151" }, "funding": [ { @@ -2481,7 +2481,7 @@ "type": "github" } ], - "time": "2022-12-06T13:26:25+00:00" + "time": "2023-01-12T15:28:42+00:00" }, { "name": "danog/magicalserializer", @@ -4038,12 +4038,12 @@ "source": { "type": "git", "url": "https://github.com/Roave/SecurityAdvisories.git", - "reference": "ef9dca6c49faa06e7203bbed30411e26e474a8fb" + "reference": "d69f15ccfded11d661206313e0a984ddac14c42c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Roave/SecurityAdvisories/zipball/ef9dca6c49faa06e7203bbed30411e26e474a8fb", - "reference": "ef9dca6c49faa06e7203bbed30411e26e474a8fb", + "url": "https://api.github.com/repos/Roave/SecurityAdvisories/zipball/d69f15ccfded11d661206313e0a984ddac14c42c", + "reference": "d69f15ccfded11d661206313e0a984ddac14c42c", "shasum": "" }, "conflict": { @@ -4064,6 +4064,7 @@ "apereo/phpcas": "<1.6", "api-platform/core": ">=2.2,<2.2.10|>=2.3,<2.3.6", "appwrite/server-ce": "<0.11.1|>=0.12,<0.12.2", + "arc/web": "<3", "area17/twill": "<1.2.5|>=2,<2.5.3", "asymmetricrypt/asymmetricrypt": ">=0,<9.9.99", "awesome-support/awesome-support": "<=6.0.7", @@ -4074,6 +4075,7 @@ "barrelstrength/sprout-base-email": "<1.2.7", "barrelstrength/sprout-forms": "<3.9", "barryvdh/laravel-translation-manager": "<0.6.2", + "barzahlen/barzahlen-php": "<2.0.1", "baserproject/basercms": "<4.7.2", "billz/raspap-webgui": "<=2.6.6", "bk2k/bootstrap-package": ">=7.1,<7.1.2|>=8,<8.0.8|>=9,<9.0.4|>=9.1,<9.1.3|>=10,<10.0.10|>=11,<11.0.3", @@ -4089,7 +4091,7 @@ "bugsnag/bugsnag-laravel": ">=2,<2.0.2", "bytefury/crater": "<6.0.2", "cachethq/cachet": "<2.5.1", - "cakephp/cakephp": "<3.10.3|>=4,<4.0.6", + "cakephp/cakephp": "<3.10.3|>=4,<4.0.10|>=4.1,<4.1.4", "cardgate/magento2": "<2.0.33", "cart2quote/module-quotation": ">=4.1.6,<=4.4.5|>=5,<5.4.4", "cartalyst/sentry": "<=2.1.6", @@ -4117,6 +4119,7 @@ "darylldoyle/safe-svg": "<1.9.10", "datadog/dd-trace": ">=0.30,<0.30.2", "david-garcia/phpwhois": "<=4.3.1", + "dbrisinajumi/d2files": "<1", "derhansen/sf_event_mgt": "<4.3.1|>=5,<5.1.1", "directmailteam/direct-mail": "<5.2.4", "doctrine/annotations": ">=1,<1.2.7", @@ -4167,7 +4170,8 @@ "fenom/fenom": "<=2.12.1", "filegator/filegator": "<7.8", "firebase/php-jwt": "<2", - "flarum/core": ">=1,<=1.0.1|>=1.5,<1.6.2", + "flarum/core": "<1.6.3", + "flarum/mentions": "<1.6.3", "flarum/sticky": ">=0.1-beta.14,<=0.1-beta.15", "flarum/tags": "<=0.1-beta.13", "fluidtypo3/vhs": "<5.1.1", @@ -4199,8 +4203,10 @@ "grumpydictator/firefly-iii": "<5.6.5", "guzzlehttp/guzzle": "<6.5.8|>=7,<7.4.5", "guzzlehttp/psr7": "<1.8.4|>=2,<2.1.1", + "harvesthq/chosen": "<1.8.7", "helloxz/imgurl": "= 2.31|<=2.31", "hillelcoren/invoice-ninja": "<5.3.35", + "himiklab/yii2-jqgrid-widget": "<1.0.8", "hjue/justwriting": "<=1", "hov/jobfair": "<1.0.13|>=2,<2.0.2", "hyn/multi-tenant": ">=5.6,<5.7.2", @@ -4218,6 +4224,7 @@ "impresscms/impresscms": "<=1.4.3", "in2code/femanager": "<5.5.2|>=6,<6.3.3|>=7,<7.0.1", "in2code/lux": "<17.6.1|>=18,<24.0.2", + "innologi/typo3-appointments": "<2.0.6", "intelliants/subrion": "<=4.2.1", "islandora/islandora": ">=2,<2.4.1", "ivankristianto/phpwhois": "<=4.3", @@ -4233,6 +4240,7 @@ "jsdecena/laracom": "<2.0.9", "jsmitty12/phpwhois": "<5.1", "kazist/phpwhois": "<=4.2.6", + "kelvinmo/simplexrd": "<3.1.1", "kevinpapst/kimai2": "<1.16.7", "kitodo/presentation": "<3.1.2", "klaviyo/magento2-extension": ">=1,<3", @@ -4322,6 +4330,7 @@ "pegasus/google-for-jobs": "<1.5.1|>=2,<2.1.1", "personnummer/personnummer": "<3.0.2", "phanan/koel": "<5.1.4", + "php-mod/curl": "<2.3.2", "phpfastcache/phpfastcache": "<6.1.5|>=7,<7.1.2|>=8,<8.0.7", "phpmailer/phpmailer": "<6.5", "phpmussel/phpmussel": ">=1,<1.6", @@ -4334,11 +4343,11 @@ "phpunit/phpunit": ">=4.8.19,<4.8.28|>=5,<5.6.3", "phpwhois/phpwhois": "<=4.2.5", "phpxmlrpc/extras": "<0.6.1", - "phpxmlrpc/phpxmlrpc": "<4.9", + "phpxmlrpc/phpxmlrpc": "<4.9.2", "pimcore/data-hub": "<1.2.4", "pimcore/pimcore": "<10.5.9", "pocketmine/bedrock-protocol": "<8.0.2", - "pocketmine/pocketmine-mp": "<4.7.2|>= 4.0.0-BETA5, < 4.4.2", + "pocketmine/pocketmine-mp": "<4.12.5|>= 4.0.0-BETA5, < 4.4.2", "pressbooks/pressbooks": "<5.18", "prestashop/autoupgrade": ">=4,<4.10.1", "prestashop/blockwishlist": ">=2,<2.1.1", @@ -4399,6 +4408,7 @@ "simplesamlphp/saml2": "<1.10.6|>=2,<2.3.8|>=3,<3.1.4", "simplesamlphp/simplesamlphp": "<1.18.6", "simplesamlphp/simplesamlphp-module-infocard": "<1.0.1", + "simplesamlphp/simplesamlphp-module-openid": "<1", "simplito/elliptic-php": "<1.0.6", "slim/slim": "<2.6", "smarty/smarty": "<3.1.47|>=4,<4.2.1", @@ -4414,7 +4424,9 @@ "stormpath/sdk": ">=0,<9.9.99", "studio-42/elfinder": "<2.1.59", "subrion/cms": "<=4.2.1", + "sukohi/surpass": "<1", "sulu/sulu": "= 2.4.0-RC1|<1.6.44|>=2,<2.2.18|>=2.3,<2.3.8", + "sumocoders/framework-user-bundle": "<1.4", "swiftmailer/swiftmailer": ">=4,<5.4.5", "sylius/admin-bundle": ">=1,<1.0.17|>=1.1,<1.1.9|>=1.2,<1.2.2", "sylius/grid": ">=1,<1.1.19|>=1.2,<1.2.18|>=1.3,<1.3.13|>=1.4,<1.4.5|>=1.5,<1.5.1", @@ -4424,6 +4436,7 @@ "sylius/sylius": "<1.9.10|>=1.10,<1.10.11|>=1.11,<1.11.2", "symbiote/silverstripe-multivaluefield": ">=3,<3.0.99", "symbiote/silverstripe-queuedjobs": ">=3,<3.0.2|>=3.1,<3.1.4|>=4,<4.0.7|>=4.1,<4.1.2|>=4.2,<4.2.4|>=4.3,<4.3.3|>=4.4,<4.4.3|>=4.5,<4.5.1|>=4.6,<4.6.4", + "symbiote/silverstripe-seed": "<6.0.3", "symbiote/silverstripe-versionedfiles": "<=2.0.3", "symfont/process": ">=0,<4", "symfony/cache": ">=3.1,<3.4.35|>=4,<4.2.12|>=4.3,<4.3.8", @@ -4472,6 +4485,7 @@ "topthink/thinkphp": "<=3.2.3", "tribalsystems/zenario": "<=9.3.57595", "truckersmp/phpwhois": "<=4.3.1", + "ttskch/pagination-service-provider": "<1", "twig/twig": "<1.44.7|>=2,<2.15.3|>=3,<3.4.3", "typo3/cms": "<2.0.5|>=3,<3.0.3|>=6.2,<6.2.30|>=7,<7.6.32|>=8,<8.7.38|>=9,<9.5.29|>=10,<10.4.33|>=11,<11.5.20|>=12,<12.1.1", "typo3/cms-backend": ">=7,<=7.6.50|>=8,<=8.7.39|>=9,<=9.5.24|>=10,<=10.4.13|>=11,<=11.1", @@ -4489,11 +4503,13 @@ "usmanhalalit/pixie": "<1.0.3|>=2,<2.0.2", "vanilla/safecurl": "<0.9.2", "verot/class.upload.php": "<=1.0.3|>=2,<=2.0.4", + "vova07/yii2-fileapi-widget": "<0.1.9", "vrana/adminer": "<4.8.1", "wallabag/tcpdf": "<6.2.22", "wanglelecc/laracms": "<=1.0.3", "web-auth/webauthn-framework": ">=3.3,<3.3.4", "webcoast/deferred-image-processing": "<1.0.2", + "webpa/webpa": "<3.1.2", "wikimedia/parsoid": "<0.12.2", "willdurand/js-translation-bundle": "<2.1.1", "wintercms/winter": "<1.0.475|>=1.1,<1.1.10|>=1.2,<1.2.1", @@ -4502,6 +4518,7 @@ "wp-graphql/wp-graphql": "<0.3.5", "wpanel/wpanel4-cms": "<=4.3.1", "wwbn/avideo": "<=11.6", + "xataface/xataface": "<3", "yeswiki/yeswiki": "<4.1", "yetiforce/yetiforce-crm": "<=6.4", "yidashi/yii2cmf": "<=2", @@ -4577,7 +4594,7 @@ "type": "tidelift" } ], - "time": "2023-01-04T14:04:25+00:00" + "time": "2023-01-14T06:04:34+00:00" } ], "aliases": [], @@ -4588,7 +4605,7 @@ "prefer-stable": true, "prefer-lowest": false, "platform": { - "php": "~8.0|~8.1", + "php": "^8.0", "ext-json": "*", "ext-mbstring": "*", "ext-pcntl": "*" From 87eb160c6fcac577e223091b7da38aee9fbfcdda Mon Sep 17 00:00:00 2001 From: Alexander Pankratov Date: Mon, 16 Jan 2023 11:12:20 +0100 Subject: [PATCH 038/270] Fix FLOOD_WAIT, downgrade madeline again. --- composer.json | 2 +- composer.lock | 14 +++++++------- docker-compose.yml | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/composer.json b/composer.json index 0482b08..93ad862 100644 --- a/composer.json +++ b/composer.json @@ -28,7 +28,7 @@ "amphp/websocket-client": "^1", "amphp/http-client": "^4", "vlucas/phpdotenv": "^4", - "danog/madelineproto": "^v7.0.144", + "danog/madelineproto": "v7.0.144", "amphp/http-server-form-parser": "^1.1" }, "require-dev": { diff --git a/composer.lock b/composer.lock index 1a00cb0..4b9f5b1 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "3edc2579e89f2cba99486aa129b90ec4", + "content-hash": "28c4174c4d89b7adff73721c4a3409f6", "packages": [ { "name": "amphp/amp", @@ -2361,16 +2361,16 @@ }, { "name": "danog/madelineproto", - "version": "7.0.151", + "version": "7.0.144", "source": { "type": "git", "url": "https://github.com/danog/MadelineProto.git", - "reference": "7b2032ca19c054745b6f74c73fd7758f343c5ba8" + "reference": "37fdcd57a3e8676f58e327f28acb39b4a127229b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/danog/MadelineProto/zipball/7b2032ca19c054745b6f74c73fd7758f343c5ba8", - "reference": "7b2032ca19c054745b6f74c73fd7758f343c5ba8", + "url": "https://api.github.com/repos/danog/MadelineProto/zipball/37fdcd57a3e8676f58e327f28acb39b4a127229b", + "reference": "37fdcd57a3e8676f58e327f28acb39b4a127229b", "shasum": "" }, "require": { @@ -2473,7 +2473,7 @@ ], "support": { "issues": "https://github.com/danog/MadelineProto/issues", - "source": "https://github.com/danog/MadelineProto/tree/7.0.151" + "source": "https://github.com/danog/MadelineProto/tree/7.0.144" }, "funding": [ { @@ -2481,7 +2481,7 @@ "type": "github" } ], - "time": "2023-01-12T15:28:42+00:00" + "time": "2022-12-06T13:26:25+00:00" }, { "name": "danog/magicalserializer", diff --git a/docker-compose.yml b/docker-compose.yml index b98de80..7de4d5a 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -32,7 +32,7 @@ services: environment: MYSQL_ALLOW_EMPTY_PASSWORD: 'yes' MARIADB_AUTO_UPGRADE: "1" - command: ["mysqld", "--innodb-buffer-pool-size=16M", "--wait_timeout=65"] + command: ["mysqld", "--innodb-buffer-pool-size=32M", "--wait_timeout=65"] networks: default: name: telegram-api-server \ No newline at end of file From 986aebafe777fef5c129bccb01d161ab0884973c Mon Sep 17 00:00:00 2001 From: Alexander Pankratov Date: Mon, 16 Jan 2023 11:55:53 +0100 Subject: [PATCH 039/270] Feat: upgrade docker entrypoint logic --- Dockerfile | 2 +- README.md | 16 +++++++++------- bin/docker-exec.sh | 3 --- bin/docker-logs.sh | 3 --- docker-compose.yml | 2 ++ entrypoint.sh | 4 ++++ 6 files changed, 16 insertions(+), 14 deletions(-) delete mode 100755 bin/docker-exec.sh delete mode 100755 bin/docker-logs.sh create mode 100755 entrypoint.sh diff --git a/Dockerfile b/Dockerfile index 5f4274e..7144b06 100644 --- a/Dockerfile +++ b/Dockerfile @@ -28,4 +28,4 @@ RUN apt-get update && apt-get upgrade -y \ EXPOSE 9503 -ENTRYPOINT docker-compose-wait && nice -n 20 php server.php -e=.env.docker --docker -s=* \ No newline at end of file +ENTRYPOINT ["./entrypoint.sh"] \ No newline at end of file diff --git a/README.md b/README.md index d6eff7f..d905c8c 100644 --- a/README.md +++ b/README.md @@ -30,7 +30,7 @@ Fast, simple, async php telegram api server: ### Manual: 1. Requirements: * ssh / cli - * php 7.4 or php 8 + * php 8.1+ * composer * git * Mysql/MariaDB (optional) @@ -50,9 +50,7 @@ Fast, simple, async php telegram api server: 1. Fill app_id and app_hash in `.env.docker` or `.env`. 1. Start TelegramApiServer in cli: * docker: - 1. Start: `docker-compose up` - 1. Start new shell and connect to docker container: `bash bin/docker-exec.sh` - 1. Start another instance with different port inside new shell: `php server.php -p=9500 -s=session --docker -e=.env.docker` + 1. Start container interactively: `docker-compose run --rm telegram-api-server` * manual: 1. `php server.php --session=session` 1. Authorize your session: @@ -92,7 +90,7 @@ Fast, simple, async php telegram api server: 1. Access Telegram API with simple GET/POST requests. Regular and application/json POST supported. - Its recommended to use http_build_query, when using GET requests. + It's recommended to use http_build_query, when using GET requests. **Rules:** * All methods from MadelineProto supported: [Methods List](https://docs.madelineproto.xyz/API_docs/methods/) @@ -229,6 +227,9 @@ curl --location --request POST '127.0.0.1:9503/api/downloadToResponse' \ Also see: https://docs.madelineproto.xyz/docs/FILES.html#downloading-files ### Multiple sessions support +**WARNING: running multiple sessions in one instance is unstable.** +Crash/error in one session will crash all of them. +Correct way: override docker-compose.yml and add containers with different ports and session names for each session. When running multiple sessions, need to define which session to use for request. Each session stored in `sessions/{$session}.madeline`. Nested folders supported. @@ -273,7 +274,7 @@ Each session stored in `sessions/{$session}.madeline`. Nested folders supported. These settings will be saved into json file and will apply after the restart. ### Session management - + **Examples:** * Session list: `http://127.0.0.1:9503/system/getSessionList` * Adding session: `http://127.0.0.1:9503/system/addSession?session=users/xtrime` @@ -285,7 +286,8 @@ Each session stored in `sessions/{$session}.madeline`. Nested folders supported. Full list of system methods available in [SystemApiExtensions class](https://github.com/xtrime-ru/TelegramApiServer/blob/master/src/MadelineProtoExtensions/SystemApiExtensions.php) -### Authorizing session remotely +### Authorizing session remotely +WARNING: it is recomended to use interactive mode to authorize sessions! If there is no authorization in session, or session file is blank, authorization required: User: diff --git a/bin/docker-exec.sh b/bin/docker-exec.sh deleted file mode 100755 index 94360ff..0000000 --- a/bin/docker-exec.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/usr/bin/env bash - -docker exec -it telegram-api-server /bin/bash \ No newline at end of file diff --git a/bin/docker-logs.sh b/bin/docker-logs.sh deleted file mode 100755 index af897f8..0000000 --- a/bin/docker-logs.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/usr/bin/env bash - -docker logs telegram-api-server --follow \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml index 7de4d5a..4deb0aa 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -21,6 +21,8 @@ services: options: max-size: "1024k" max-file: "2" + command: + - "-s=session" mysql: image: mariadb:10.8 container_name: telegram-api-server-mysql diff --git a/entrypoint.sh b/entrypoint.sh new file mode 100755 index 0000000..60fc295 --- /dev/null +++ b/entrypoint.sh @@ -0,0 +1,4 @@ +#!/usr/bin/env bash + +docker-compose-wait \ +&& nice -n 20 php server.php -e=.env.docker --docker "$@" \ No newline at end of file From 0dd8ff5b626a3f6083f7417ba0162dbe1bf04bdc Mon Sep 17 00:00:00 2001 From: Alexander Pankratov Date: Tue, 17 Jan 2023 12:39:06 +0100 Subject: [PATCH 040/270] Fix: clean start --- config.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/config.php b/config.php index 235c7af..aa4ade3 100644 --- a/config.php +++ b/config.php @@ -77,4 +77,8 @@ $settings['telegram']['connection_settings']['all']['proxy_extra'] = []; } +if (empty($settings['telegram']['app_info']['api_id'])) { + unset($settings['telegram']['app_info']); +} + return $settings; \ No newline at end of file From 35a4566189e30f2bbd20d6b1fd175c448e0cdc5d Mon Sep 17 00:00:00 2001 From: Alexander Pankratov Date: Tue, 17 Jan 2023 14:00:55 +0100 Subject: [PATCH 041/270] Fix: update readme --- README.md | 2 +- config.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index d905c8c..83584c3 100644 --- a/README.md +++ b/README.md @@ -44,9 +44,9 @@ Fast, simple, async php telegram api server: 1. `php server.php` ## First start -1. Ctrl + C to stop TelegramApiServer if running. 1. Get app_id and app_hash at [my.telegram.org](https://my.telegram.org/). Only one app_id needed for any amount of users and bots. +1. Create .env file: `cp .env.docker.exaple .env.docker` or `cp .env.exaple .env` 1. Fill app_id and app_hash in `.env.docker` or `.env`. 1. Start TelegramApiServer in cli: * docker: diff --git a/config.php b/config.php index aa4ade3..a71875f 100644 --- a/config.php +++ b/config.php @@ -78,7 +78,7 @@ } if (empty($settings['telegram']['app_info']['api_id'])) { - unset($settings['telegram']['app_info']); + throw new InvalidArgumentException('Need to fill TELEGRAM_API_ID in .env.docker or .env'); } return $settings; \ No newline at end of file From dd2e664bad263ec9f6342c1744643456cf48dc36 Mon Sep 17 00:00:00 2001 From: Andrey Surzhikov Date: Wed, 1 Feb 2023 22:41:19 +0200 Subject: [PATCH 042/270] Update README.md - Add how to start multiple sessions via docker compose interactive mode - Fix missed letters --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 83584c3..1ffe143 100644 --- a/README.md +++ b/README.md @@ -46,11 +46,12 @@ Fast, simple, async php telegram api server: ## First start 1. Get app_id and app_hash at [my.telegram.org](https://my.telegram.org/). Only one app_id needed for any amount of users and bots. -1. Create .env file: `cp .env.docker.exaple .env.docker` or `cp .env.exaple .env` +1. Create .env file: `cp .env.docker.example .env.docker` or `cp .env.example .env` 1. Fill app_id and app_hash in `.env.docker` or `.env`. 1. Start TelegramApiServer in cli: * docker: 1. Start container interactively: `docker-compose run --rm telegram-api-server` + 2. If you need to start multiple sessions, do it one-by-one, like this: `docker-compose run --rm telegram-api-server --session=user1` * manual: 1. `php server.php --session=session` 1. Authorize your session: From e22091baa01da0364d2f6e83a769e76457e47a5d Mon Sep 17 00:00:00 2001 From: Alexander Pankratov <34161928+xtrime-ru@users.noreply.github.com> Date: Wed, 1 Feb 2023 22:28:29 +0100 Subject: [PATCH 043/270] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 1ffe143..d10b8cf 100644 --- a/README.md +++ b/README.md @@ -51,7 +51,7 @@ Fast, simple, async php telegram api server: 1. Start TelegramApiServer in cli: * docker: 1. Start container interactively: `docker-compose run --rm telegram-api-server` - 2. If you need to start multiple sessions, do it one-by-one, like this: `docker-compose run --rm telegram-api-server --session=user1` + 2. If you need to start multiple sessions, create docker-compose.override.yml. Add additional containers there. Use unique ports and session names in command. * manual: 1. `php server.php --session=session` 1. Authorize your session: From 3fb7cdbdf46c80071012f42007edbd0247c5bfff Mon Sep 17 00:00:00 2001 From: Alexander Pankratov Date: Sun, 19 Feb 2023 22:49:09 +0100 Subject: [PATCH 044/270] Fix: ip whitelist in multiple docker containers --- src/Server/Authorization.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Server/Authorization.php b/src/Server/Authorization.php index 5e23da0..14f519e 100644 --- a/src/Server/Authorization.php +++ b/src/Server/Authorization.php @@ -39,7 +39,7 @@ private function isIpAllowed(string $host): bool { global $options; if ($options['docker']) { - $isSameNetwork = abs(ip2long($host) - $this->selfIp) < 10; + $isSameNetwork = abs(ip2long($host) - $this->selfIp) < 256; if ($isSameNetwork) { return true; } From b3e0e5e365011e5e9a3da7e25d005f8d31230da4 Mon Sep 17 00:00:00 2001 From: Alexander Pankratov Date: Wed, 1 Mar 2023 12:02:26 +0100 Subject: [PATCH 045/270] Fix: race condition while upgrading env --- composer.lock | 214 +++++++++++++++++++--------------- docker-compose.yml | 6 +- src/Migrations/EnvUpgrade.php | 7 +- 3 files changed, 131 insertions(+), 96 deletions(-) diff --git a/composer.lock b/composer.lock index 4b9f5b1..ed99b43 100644 --- a/composer.lock +++ b/composer.lock @@ -484,16 +484,16 @@ }, { "name": "amphp/http", - "version": "v1.7.0", + "version": "v1.7.1", "source": { "type": "git", "url": "https://github.com/amphp/http.git", - "reference": "b65454643a7e92c6f1f75e00acac0a0a676ec8be" + "reference": "0d729b09fbace00dd1fd35ae8d4d45eb25f39d96" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/amphp/http/zipball/b65454643a7e92c6f1f75e00acac0a0a676ec8be", - "reference": "b65454643a7e92c6f1f75e00acac0a0a676ec8be", + "url": "https://api.github.com/repos/amphp/http/zipball/0d729b09fbace00dd1fd35ae8d4d45eb25f39d96", + "reference": "0d729b09fbace00dd1fd35ae8d4d45eb25f39d96", "shasum": "" }, "require": { @@ -531,7 +531,7 @@ "description": "Basic HTTP primitives which can be shared by servers and clients.", "support": { "issues": "https://github.com/amphp/http/issues", - "source": "https://github.com/amphp/http/tree/v1.7.0" + "source": "https://github.com/amphp/http/tree/v1.7.1" }, "funding": [ { @@ -539,7 +539,7 @@ "type": "github" } ], - "time": "2022-10-16T20:32:41+00:00" + "time": "2023-02-08T00:29:51+00:00" }, { "name": "amphp/http-client", @@ -720,16 +720,16 @@ }, { "name": "amphp/http-server", - "version": "v2.1.7", + "version": "v2.1.8", "source": { "type": "git", "url": "https://github.com/amphp/http-server.git", - "reference": "850f1b22ad0f3459c6ef6e89e897c8abf2b18b4c" + "reference": "49a7ff6d89ebe84ba0c64604613f898a697bb353" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/amphp/http-server/zipball/850f1b22ad0f3459c6ef6e89e897c8abf2b18b4c", - "reference": "850f1b22ad0f3459c6ef6e89e897c8abf2b18b4c", + "url": "https://api.github.com/repos/amphp/http-server/zipball/49a7ff6d89ebe84ba0c64604613f898a697bb353", + "reference": "49a7ff6d89ebe84ba0c64604613f898a697bb353", "shasum": "" }, "require": { @@ -806,7 +806,7 @@ ], "support": { "issues": "https://github.com/amphp/http-server/issues", - "source": "https://github.com/amphp/http-server/tree/v2.1.7" + "source": "https://github.com/amphp/http-server/tree/v2.1.8" }, "funding": [ { @@ -814,7 +814,7 @@ "type": "github" } ], - "time": "2022-08-16T13:29:25+00:00" + "time": "2023-02-01T01:09:54+00:00" }, { "name": "amphp/http-server-form-parser", @@ -964,23 +964,24 @@ }, { "name": "amphp/log", - "version": "v1.1.0", + "version": "v1.2.0", "source": { "type": "git", "url": "https://github.com/amphp/log.git", - "reference": "25dcd3b58622bd22ffa7129288edb85e0c17081a" + "reference": "c067b03281f5e018ca4bd05f5d161208685cbc03" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/amphp/log/zipball/25dcd3b58622bd22ffa7129288edb85e0c17081a", - "reference": "25dcd3b58622bd22ffa7129288edb85e0c17081a", + "url": "https://api.github.com/repos/amphp/log/zipball/c067b03281f5e018ca4bd05f5d161208685cbc03", + "reference": "c067b03281f5e018ca4bd05f5d161208685cbc03", "shasum": "" }, "require": { "amphp/amp": "^2", "amphp/byte-stream": "^1.3", - "monolog/monolog": "^2 || ^1.23", - "php": ">=7.1" + "monolog/monolog": "^3|^2|^1.23", + "php": ">=7.2", + "psr/log": "^3|^2|^1" }, "require-dev": { "amphp/php-cs-fixer-config": "dev-master", @@ -1023,9 +1024,15 @@ ], "support": { "issues": "https://github.com/amphp/log/issues", - "source": "https://github.com/amphp/log/tree/master" + "source": "https://github.com/amphp/log/tree/v1.2.0" }, - "time": "2019-09-04T15:31:40+00:00" + "funding": [ + { + "url": "https://github.com/amphp", + "type": "github" + } + ], + "time": "2023-02-03T01:46:14+00:00" }, { "name": "amphp/mysql", @@ -1366,16 +1373,16 @@ }, { "name": "amphp/redis", - "version": "v1.0.7", + "version": "v1.1.0", "source": { "type": "git", "url": "https://github.com/amphp/redis.git", - "reference": "90aa4f50d7889a880d15e6e4a504b398e16faa82" + "reference": "07eb1248874926b4e03ae2fe3be81f42e992ede9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/amphp/redis/zipball/90aa4f50d7889a880d15e6e4a504b398e16faa82", - "reference": "90aa4f50d7889a880d15e6e4a504b398e16faa82", + "url": "https://api.github.com/repos/amphp/redis/zipball/07eb1248874926b4e03ae2fe3be81f42e992ede9", + "reference": "07eb1248874926b4e03ae2fe3be81f42e992ede9", "shasum": "" }, "require": { @@ -1421,7 +1428,7 @@ ], "support": { "issues": "https://github.com/amphp/redis/issues", - "source": "https://github.com/amphp/redis/tree/v1.0.7" + "source": "https://github.com/amphp/redis/tree/v1.1.0" }, "funding": [ { @@ -1429,7 +1436,7 @@ "type": "github" } ], - "time": "2022-01-11T16:03:42+00:00" + "time": "2023-02-18T19:03:10+00:00" }, { "name": "amphp/serialization", @@ -2738,30 +2745,35 @@ }, { "name": "kelunik/certificate", - "version": "v1.1.2", + "version": "v1.1.3", "source": { "type": "git", "url": "https://github.com/kelunik/certificate.git", - "reference": "56542e62d51533d04d0a9713261fea546bff80f6" + "reference": "7e00d498c264d5eb4f78c69f41c8bd6719c0199e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/kelunik/certificate/zipball/56542e62d51533d04d0a9713261fea546bff80f6", - "reference": "56542e62d51533d04d0a9713261fea546bff80f6", + "url": "https://api.github.com/repos/kelunik/certificate/zipball/7e00d498c264d5eb4f78c69f41c8bd6719c0199e", + "reference": "7e00d498c264d5eb4f78c69f41c8bd6719c0199e", "shasum": "" }, "require": { "ext-openssl": "*", - "php": ">=5.4" + "php": ">=7.0" }, "require-dev": { - "fabpot/php-cs-fixer": "^1.9", - "phpunit/phpunit": "^4.8" + "amphp/php-cs-fixer-config": "^2", + "phpunit/phpunit": "^6 | 7 | ^8 | ^9" }, "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.x-dev" + } + }, "autoload": { "psr-4": { - "Kelunik\\Certificate\\": "lib" + "Kelunik\\Certificate\\": "src" } }, "notification-url": "https://packagist.org/downloads/", @@ -2785,9 +2797,9 @@ ], "support": { "issues": "https://github.com/kelunik/certificate/issues", - "source": "https://github.com/kelunik/certificate/tree/v1.1.2" + "source": "https://github.com/kelunik/certificate/tree/v1.1.3" }, - "time": "2019-05-29T19:02:31+00:00" + "time": "2023-02-03T21:26:53+00:00" }, { "name": "league/uri", @@ -3032,42 +3044,41 @@ }, { "name": "monolog/monolog", - "version": "2.8.0", + "version": "3.3.1", "source": { "type": "git", "url": "https://github.com/Seldaek/monolog.git", - "reference": "720488632c590286b88b80e62aa3d3d551ad4a50" + "reference": "9b5daeaffce5b926cac47923798bba91059e60e2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Seldaek/monolog/zipball/720488632c590286b88b80e62aa3d3d551ad4a50", - "reference": "720488632c590286b88b80e62aa3d3d551ad4a50", + "url": "https://api.github.com/repos/Seldaek/monolog/zipball/9b5daeaffce5b926cac47923798bba91059e60e2", + "reference": "9b5daeaffce5b926cac47923798bba91059e60e2", "shasum": "" }, "require": { - "php": ">=7.2", - "psr/log": "^1.0.1 || ^2.0 || ^3.0" + "php": ">=8.1", + "psr/log": "^2.0 || ^3.0" }, "provide": { - "psr/log-implementation": "1.0.0 || 2.0.0 || 3.0.0" + "psr/log-implementation": "3.0.0" }, "require-dev": { - "aws/aws-sdk-php": "^2.4.9 || ^3.0", + "aws/aws-sdk-php": "^3.0", "doctrine/couchdb": "~1.0@dev", "elasticsearch/elasticsearch": "^7 || ^8", "ext-json": "*", - "graylog2/gelf-php": "^1.4.2", - "guzzlehttp/guzzle": "^7.4", + "graylog2/gelf-php": "^1.4.2 || ^2@dev", + "guzzlehttp/guzzle": "^7.4.5", "guzzlehttp/psr7": "^2.2", "mongodb/mongodb": "^1.8", "php-amqplib/php-amqplib": "~2.4 || ^3", - "phpspec/prophecy": "^1.15", - "phpstan/phpstan": "^0.12.91", - "phpunit/phpunit": "^8.5.14", - "predis/predis": "^1.1 || ^2.0", - "rollbar/rollbar": "^1.3 || ^2 || ^3", + "phpstan/phpstan": "^1.9", + "phpstan/phpstan-deprecation-rules": "^1.0", + "phpstan/phpstan-strict-rules": "^1.4", + "phpunit/phpunit": "^9.5.26", + "predis/predis": "^1.1 || ^2", "ruflin/elastica": "^7", - "swiftmailer/swiftmailer": "^5.3|^6.0", "symfony/mailer": "^5.4 || ^6", "symfony/mime": "^5.4 || ^6" }, @@ -3090,7 +3101,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "2.x-dev" + "dev-main": "3.x-dev" } }, "autoload": { @@ -3118,7 +3129,7 @@ ], "support": { "issues": "https://github.com/Seldaek/monolog/issues", - "source": "https://github.com/Seldaek/monolog/tree/2.8.0" + "source": "https://github.com/Seldaek/monolog/tree/3.3.1" }, "funding": [ { @@ -3130,7 +3141,7 @@ "type": "tidelift" } ], - "time": "2022-07-24T11:55:47+00:00" + "time": "2023-02-06T13:46:10+00:00" }, { "name": "nikic/fast-route", @@ -3301,24 +3312,24 @@ }, { "name": "phpoption/phpoption", - "version": "1.9.0", + "version": "1.9.1", "source": { "type": "git", "url": "https://github.com/schmittjoh/php-option.git", - "reference": "dc5ff11e274a90cc1c743f66c9ad700ce50db9ab" + "reference": "dd3a383e599f49777d8b628dadbb90cae435b87e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/schmittjoh/php-option/zipball/dc5ff11e274a90cc1c743f66c9ad700ce50db9ab", - "reference": "dc5ff11e274a90cc1c743f66c9ad700ce50db9ab", + "url": "https://api.github.com/repos/schmittjoh/php-option/zipball/dd3a383e599f49777d8b628dadbb90cae435b87e", + "reference": "dd3a383e599f49777d8b628dadbb90cae435b87e", "shasum": "" }, "require": { "php": "^7.2.5 || ^8.0" }, "require-dev": { - "bamarni/composer-bin-plugin": "^1.8", - "phpunit/phpunit": "^8.5.28 || ^9.5.21" + "bamarni/composer-bin-plugin": "^1.8.2", + "phpunit/phpunit": "^8.5.32 || ^9.6.3 || ^10.0.12" }, "type": "library", "extra": { @@ -3360,7 +3371,7 @@ ], "support": { "issues": "https://github.com/schmittjoh/php-option/issues", - "source": "https://github.com/schmittjoh/php-option/tree/1.9.0" + "source": "https://github.com/schmittjoh/php-option/tree/1.9.1" }, "funding": [ { @@ -3372,7 +3383,7 @@ "type": "tidelift" } ], - "time": "2022-07-30T15:51:26+00:00" + "time": "2023-02-25T19:38:58+00:00" }, { "name": "phpseclib/phpseclib", @@ -4038,12 +4049,12 @@ "source": { "type": "git", "url": "https://github.com/Roave/SecurityAdvisories.git", - "reference": "d69f15ccfded11d661206313e0a984ddac14c42c" + "reference": "6ab259b93537fda94e80a3e7c545957ce0848052" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Roave/SecurityAdvisories/zipball/d69f15ccfded11d661206313e0a984ddac14c42c", - "reference": "d69f15ccfded11d661206313e0a984ddac14c42c", + "url": "https://api.github.com/repos/Roave/SecurityAdvisories/zipball/6ab259b93537fda94e80a3e7c545957ce0848052", + "reference": "6ab259b93537fda94e80a3e7c545957ce0848052", "shasum": "" }, "conflict": { @@ -4062,11 +4073,12 @@ "anchorcms/anchor-cms": "<=0.12.7", "andreapollastri/cipi": "<=3.1.15", "apereo/phpcas": "<1.6", - "api-platform/core": ">=2.2,<2.2.10|>=2.3,<2.3.6", + "api-platform/core": ">=2.2,<2.2.10|>=2.3,<2.3.6|>=2.6,<2.7.10|>=3,<3.0.12|>=3.1,<3.1.3", "appwrite/server-ce": "<0.11.1|>=0.12,<0.12.2", "arc/web": "<3", "area17/twill": "<1.2.5|>=2,<2.5.3", "asymmetricrypt/asymmetricrypt": ">=0,<9.9.99", + "automad/automad": "<1.8", "awesome-support/awesome-support": "<=6.0.7", "aws/aws-sdk-php": ">=3,<3.2.1", "backdrop/backdrop": "<=1.23", @@ -4077,6 +4089,7 @@ "barryvdh/laravel-translation-manager": "<0.6.2", "barzahlen/barzahlen-php": "<2.0.1", "baserproject/basercms": "<4.7.2", + "bassjobsen/bootstrap-3-typeahead": ">4.0.2", "billz/raspap-webgui": "<=2.6.6", "bk2k/bootstrap-package": ">=7.1,<7.1.2|>=8,<8.0.8|>=9,<9.0.4|>=9.1,<9.1.3|>=10,<10.0.10|>=11,<11.0.3", "bmarshall511/wordpress_zero_spam": "<5.2.13", @@ -4091,13 +4104,15 @@ "bugsnag/bugsnag-laravel": ">=2,<2.0.2", "bytefury/crater": "<6.0.2", "cachethq/cachet": "<2.5.1", - "cakephp/cakephp": "<3.10.3|>=4,<4.0.10|>=4.1,<4.1.4", + "cakephp/cakephp": "<3.10.3|>=4,<4.0.10|>=4.2,<4.2.12|>=4.3,<4.3.11|>=4.4,<4.4.10|= 1.3.7|>=4.1,<4.1.4", + "cakephp/database": ">=4.2,<4.2.12|>=4.3,<4.3.11|>=4.4,<4.4.10", "cardgate/magento2": "<2.0.33", "cart2quote/module-quotation": ">=4.1.6,<=4.4.5|>=5,<5.4.4", "cartalyst/sentry": "<=2.1.6", "catfan/medoo": "<1.7.5", "centreon/centreon": "<22.10-beta.1", "cesnet/simplesamlphp-module-proxystatistics": "<3.1", + "cockpit-hq/cockpit": "<2.3.9", "codeception/codeception": "<3.1.3|>=4,<4.1.22", "codeigniter/framework": "<=3.0.6", "codeigniter4/framework": "<4.2.11", @@ -4120,6 +4135,7 @@ "datadog/dd-trace": ">=0.30,<0.30.2", "david-garcia/phpwhois": "<=4.3.1", "dbrisinajumi/d2files": "<1", + "derhansen/fe_change_pwd": "<2.0.5|>=3,<3.0.3", "derhansen/sf_event_mgt": "<4.3.1|>=5,<5.1.1", "directmailteam/direct-mail": "<5.2.4", "doctrine/annotations": ">=1,<1.2.7", @@ -4132,7 +4148,7 @@ "doctrine/mongodb-odm-bundle": ">=2,<3.0.1", "doctrine/orm": ">=2,<2.4.8|>=2.5,<2.5.1|>=2.8.3,<2.8.4", "dolibarr/dolibarr": "<16|>=16.0.1,<16.0.3|= 12.0.5|>= 3.3.beta1, < 13.0.2", - "dompdf/dompdf": "<2.0.1", + "dompdf/dompdf": "<2.0.2|= 2.0.2", "drupal/core": ">=7,<7.91|>=8,<9.3.19|>=9.4,<9.4.3", "drupal/drupal": ">=7,<7.80|>=8,<8.9.16|>=9,<9.1.12|>=9.2,<9.2.4", "dweeves/magmi": "<=0.7.24", @@ -4169,7 +4185,9 @@ "feehi/feehicms": "<=2.1.1", "fenom/fenom": "<=2.12.1", "filegator/filegator": "<7.8", - "firebase/php-jwt": "<2", + "firebase/php-jwt": "<6", + "fixpunkt/fp-masterquiz": "<2.2.1|>=3,<3.5.2", + "fixpunkt/fp-newsletter": "<1.1.1|>=2,<2.1.2|>=2.2,<3.2.6", "flarum/core": "<1.6.3", "flarum/mentions": "<1.6.3", "flarum/sticky": ">=0.1-beta.14,<=0.1-beta.15", @@ -4180,13 +4198,13 @@ "fooman/tcpdf": "<6.2.22", "forkcms/forkcms": "<5.11.1", "fossar/tcpdf-parser": "<6.2.22", - "francoisjacquet/rosariosis": "<10.1", + "francoisjacquet/rosariosis": "<10.8.2", "friendsofsymfony/oauth2-php": "<1.3", "friendsofsymfony/rest-bundle": ">=1.2,<1.2.2", "friendsofsymfony/user-bundle": ">=1.2,<1.3.5", "friendsoftypo3/mediace": ">=7.6.2,<7.6.5", "froala/wysiwyg-editor": "<3.2.7", - "froxlor/froxlor": "<0.10.39|>=2-beta.0,<2-beta.1", + "froxlor/froxlor": "<2.0.11", "fuel/core": "<1.8.1", "gaoming13/wechat-php-sdk": "<=1.10.2", "genix/cms": "<=1.1.11", @@ -4200,7 +4218,7 @@ "gos/web-socket-bundle": "<1.10.4|>=2,<2.6.1|>=3,<3.3", "gree/jose": "<=2.2", "gregwar/rst": "<1.0.3", - "grumpydictator/firefly-iii": "<5.6.5", + "grumpydictator/firefly-iii": "<5.8", "guzzlehttp/guzzle": "<6.5.8|>=7,<7.4.5", "guzzlehttp/psr7": "<1.8.4|>=2,<2.1.1", "harvesthq/chosen": "<1.8.7", @@ -4222,7 +4240,7 @@ "illuminate/encryption": ">=4,<=4.0.11|>=4.1,<=4.1.31|>=4.2,<=4.2.22|>=5,<=5.0.35|>=5.1,<=5.1.46|>=5.2,<=5.2.45|>=5.3,<=5.3.31|>=5.4,<=5.4.36|>=5.5,<5.5.40|>=5.6,<5.6.15", "illuminate/view": "<6.20.42|>=7,<7.30.6|>=8,<8.75", "impresscms/impresscms": "<=1.4.3", - "in2code/femanager": "<5.5.2|>=6,<6.3.3|>=7,<7.0.1", + "in2code/femanager": "<5.5.3|>=6,<6.3.4|>=7,<7.1", "in2code/lux": "<17.6.1|>=18,<24.0.2", "innologi/typo3-appointments": "<2.0.6", "intelliants/subrion": "<=4.2.1", @@ -4242,6 +4260,7 @@ "kazist/phpwhois": "<=4.2.6", "kelvinmo/simplexrd": "<3.1.1", "kevinpapst/kimai2": "<1.16.7", + "kimai/kimai": "<1.1", "kitodo/presentation": "<3.1.2", "klaviyo/magento2-extension": ">=1,<3", "krayin/laravel-crm": "<1.2.2", @@ -4260,6 +4279,7 @@ "league/flysystem": "<1.1.4|>=2,<2.1.1", "lexik/jwt-authentication-bundle": "<2.10.7|>=2.11,<2.11.3", "librenms/librenms": "<22.10", + "liftkit/database": "<2.13.2", "limesurvey/limesurvey": "<3.27.19", "livehelperchat/livehelperchat": "<=3.91", "livewire/livewire": ">2.2.4,<2.2.6", @@ -4270,18 +4290,22 @@ "magento/magento1ce": "<1.9.4.3", "magento/magento1ee": ">=1,<1.14.4.3", "magento/product-community-edition": ">=2,<2.2.10|>=2.3,<2.3.2-p.2", + "maikuolan/phpmussel": ">=1,<1.6", + "mantisbt/mantisbt": "<=2.25.5", "marcwillmann/turn": "<0.3.3", "matyhtf/framework": "<3.0.6", "mautic/core": "<4.3|= 2.13.1", "mediawiki/core": ">=1.27,<1.27.6|>=1.29,<1.29.3|>=1.30,<1.30.2|>=1.31,<1.31.9|>=1.32,<1.32.6|>=1.32.99,<1.33.3|>=1.33.99,<1.34.3|>=1.34.99,<1.35", + "mediawiki/matomo": "<2.4.3", "melisplatform/melis-asset-manager": "<5.0.1", "melisplatform/melis-cms": "<5.0.1", "melisplatform/melis-front": "<5.0.1", "mezzio/mezzio-swoole": "<3.7|>=4,<4.3", "mgallegos/laravel-jqgrid": "<=1.3", - "microweber/microweber": "<=1.3.1", + "microweber/microweber": "<=1.3.2", "miniorange/miniorange-saml": "<1.4.3", "mittwald/typo3_forum": "<1.2.1", + "mobiledetect/mobiledetectlib": "<2.8.32", "modx/revolution": "<= 2.8.3-pl|<2.8", "mojo42/jirafeau": "<4.4", "monolog/monolog": ">=1.8,<1.12", @@ -4297,7 +4321,7 @@ "netgen/tagsbundle": ">=3.4,<3.4.11|>=4,<4.0.15", "nette/application": ">=2,<2.0.19|>=2.1,<2.1.13|>=2.2,<2.2.10|>=2.3,<2.3.14|>=2.4,<2.4.16|>=3,<3.0.6", "nette/nette": ">=2,<2.0.19|>=2.1,<2.1.13", - "nilsteampassnet/teampass": "<=2.1.27.36", + "nilsteampassnet/teampass": "<3.0.0.23", "notrinos/notrinos-erp": "<=0.7", "noumo/easyii": "<=0.9", "nukeviet/nukeviet": "<4.5.2", @@ -4313,7 +4337,7 @@ "open-web-analytics/open-web-analytics": "<1.7.4", "opencart/opencart": "<=3.0.3.7", "openid/php-openid": "<2.3", - "openmage/magento-lts": "<19.4.15|>=20,<20.0.13", + "openmage/magento-lts": "<19.4.22|>=20,<20.0.19", "orchid/platform": ">=9,<9.4.4", "oro/commerce": ">=4.1,<5.0.6", "oro/crm": ">=1.7,<1.7.4|>=3.1,<4.1.17|>=4.2,<4.2.7", @@ -4334,7 +4358,7 @@ "phpfastcache/phpfastcache": "<6.1.5|>=7,<7.1.2|>=8,<8.0.7", "phpmailer/phpmailer": "<6.5", "phpmussel/phpmussel": ">=1,<1.6", - "phpmyadmin/phpmyadmin": "<5.1.3", + "phpmyadmin/phpmyadmin": "<5.2.1", "phpmyfaq/phpmyfaq": "<=3.1.7", "phpoffice/phpexcel": "<1.8", "phpoffice/phpspreadsheet": "<1.16", @@ -4345,7 +4369,8 @@ "phpxmlrpc/extras": "<0.6.1", "phpxmlrpc/phpxmlrpc": "<4.9.2", "pimcore/data-hub": "<1.2.4", - "pimcore/pimcore": "<10.5.9", + "pimcore/pimcore": "<=10.5.17", + "pixelfed/pixelfed": "<=0.11.4", "pocketmine/bedrock-protocol": "<8.0.2", "pocketmine/pocketmine-mp": "<4.12.5|>= 4.0.0-BETA5, < 4.4.2", "pressbooks/pressbooks": "<5.18", @@ -4382,8 +4407,8 @@ "scheb/two-factor-bundle": ">=0,<3.26|>=4,<4.11", "sensiolabs/connect": "<4.2.3", "serluck/phpwhois": "<=4.2.6", - "shopware/core": "<=6.4.9", - "shopware/platform": "<=6.4.9", + "shopware/core": "<=6.4.18", + "shopware/platform": "<=6.4.18", "shopware/production": "<=6.3.5.2", "shopware/shopware": "<=5.7.14", "shopware/storefront": "<=6.4.8.1", @@ -4409,6 +4434,7 @@ "simplesamlphp/simplesamlphp": "<1.18.6", "simplesamlphp/simplesamlphp-module-infocard": "<1.0.1", "simplesamlphp/simplesamlphp-module-openid": "<1", + "simplesamlphp/simplesamlphp-module-openidprovider": "<0.9", "simplito/elliptic-php": "<1.0.6", "slim/slim": "<2.6", "smarty/smarty": "<3.1.47|>=4,<4.2.1", @@ -4427,6 +4453,7 @@ "sukohi/surpass": "<1", "sulu/sulu": "= 2.4.0-RC1|<1.6.44|>=2,<2.2.18|>=2.3,<2.3.8", "sumocoders/framework-user-bundle": "<1.4", + "swag/paypal": "<5.4.4", "swiftmailer/swiftmailer": ">=4,<5.4.5", "sylius/admin-bundle": ">=1,<1.0.17|>=1.1,<1.1.9|>=1.2,<1.2.2", "sylius/grid": ">=1,<1.1.19|>=1.2,<1.2.18|>=1.3,<1.3.13|>=1.4,<1.4.5|>=1.5,<1.5.1", @@ -4438,14 +4465,14 @@ "symbiote/silverstripe-queuedjobs": ">=3,<3.0.2|>=3.1,<3.1.4|>=4,<4.0.7|>=4.1,<4.1.2|>=4.2,<4.2.4|>=4.3,<4.3.3|>=4.4,<4.4.3|>=4.5,<4.5.1|>=4.6,<4.6.4", "symbiote/silverstripe-seed": "<6.0.3", "symbiote/silverstripe-versionedfiles": "<=2.0.3", - "symfont/process": ">=0,<4", + "symfont/process": ">=0", "symfony/cache": ">=3.1,<3.4.35|>=4,<4.2.12|>=4.3,<4.3.8", "symfony/dependency-injection": ">=2,<2.0.17|>=2.7,<2.7.51|>=2.8,<2.8.50|>=3,<3.4.26|>=4,<4.1.12|>=4.2,<4.2.7", "symfony/error-handler": ">=4.4,<4.4.4|>=5,<5.0.4", "symfony/form": ">=2.3,<2.3.35|>=2.4,<2.6.12|>=2.7,<2.7.50|>=2.8,<2.8.49|>=3,<3.4.20|>=4,<4.0.15|>=4.1,<4.1.9|>=4.2,<4.2.1", "symfony/framework-bundle": ">=2,<2.3.18|>=2.4,<2.4.8|>=2.5,<2.5.2|>=2.7,<2.7.51|>=2.8,<2.8.50|>=3,<3.4.26|>=4,<4.1.12|>=4.2,<4.2.7|>=5.3.14,<=5.3.14|>=5.4.3,<=5.4.3|>=6.0.3,<=6.0.3|= 6.0.3|= 5.4.3|= 5.3.14", "symfony/http-foundation": ">=2,<2.8.52|>=3,<3.4.35|>=4,<4.2.12|>=4.3,<4.3.8|>=4.4,<4.4.7|>=5,<5.0.7", - "symfony/http-kernel": ">=2,<2.8.52|>=3,<3.4.35|>=4,<4.2.12|>=4.3,<4.4.13|>=5,<5.1.5|>=5.2,<5.3.12", + "symfony/http-kernel": ">=2,<4.4.50|>=5,<5.4.20|>=6,<6.0.20|>=6.1,<6.1.12|>=6.2,<6.2.6", "symfony/intl": ">=2.7,<2.7.38|>=2.8,<2.8.31|>=3,<3.2.14|>=3.3,<3.3.13", "symfony/maker-bundle": ">=1.27,<1.29.2|>=1.30,<1.31.1", "symfony/mime": ">=4.3,<4.3.8", @@ -4455,13 +4482,13 @@ "symfony/proxy-manager-bridge": ">=2.7,<2.7.51|>=2.8,<2.8.50|>=3,<3.4.26|>=4,<4.1.12|>=4.2,<4.2.7", "symfony/routing": ">=2,<2.0.19", "symfony/security": ">=2,<2.7.51|>=2.8,<3.4.49|>=4,<4.4.24|>=5,<5.2.8", - "symfony/security-bundle": ">=2,<2.7.48|>=2.8,<2.8.41|>=3,<3.3.17|>=3.4,<3.4.11|>=4,<4.0.11|>=5.3,<5.3.12", + "symfony/security-bundle": ">=2,<4.4.50|>=5,<5.4.20|>=6,<6.0.20|>=6.1,<6.1.12|>=6.2,<6.2.6", "symfony/security-core": ">=2.4,<2.6.13|>=2.7,<2.7.9|>=2.7.30,<2.7.32|>=2.8,<3.4.49|>=4,<4.4.24|>=5,<5.2.9", "symfony/security-csrf": ">=2.4,<2.7.48|>=2.8,<2.8.41|>=3,<3.3.17|>=3.4,<3.4.11|>=4,<4.0.11", "symfony/security-guard": ">=2.8,<3.4.48|>=4,<4.4.23|>=5,<5.2.8", "symfony/security-http": ">=2.3,<2.3.41|>=2.4,<2.7.51|>=2.8,<2.8.50|>=3,<3.4.26|>=4,<4.2.12|>=4.3,<4.3.8|>=4.4,<4.4.7|>=5,<5.0.7|>=5.1,<5.2.8|>=5.3,<5.3.2", "symfony/serializer": ">=2,<2.0.11|>=4.1,<4.4.35|>=5,<5.3.12", - "symfony/symfony": ">=2,<3.4.49|>=4,<4.4.35|>=5,<5.3.12|>=5.3.14,<=5.3.14|>=5.4.3,<=5.4.3|>=6.0.3,<=6.0.3", + "symfony/symfony": ">=2,<4.4.50|>=5,<5.4.20|>=6,<6.0.20|>=6.1,<6.1.12|>=6.2,<6.2.6", "symfony/translation": ">=2,<2.0.17", "symfony/validator": ">=2,<2.0.24|>=2.1,<2.1.12|>=2.2,<2.2.5|>=2.3,<2.3.3", "symfony/var-exporter": ">=4.2,<4.2.12|>=4.3,<4.3.8", @@ -4476,20 +4503,21 @@ "thelia/thelia": ">=2.1-beta.1,<2.1.3", "theonedemon/phpwhois": "<=4.2.5", "thinkcmf/thinkcmf": "<=5.1.7", - "thorsten/phpmyfaq": "<3.1.9", + "thorsten/phpmyfaq": "<3.1.11", "tinymce/tinymce": "<5.10.7|>=6,<6.3.1", + "tinymighty/wiki-seo": "<1.2.2", "titon/framework": ">=0,<9.9.99", "tobiasbg/tablepress": "<= 2.0-RC1", "topthink/framework": "<6.0.14", - "topthink/think": "<=6.0.9", + "topthink/think": "<=6.1.1", "topthink/thinkphp": "<=3.2.3", "tribalsystems/zenario": "<=9.3.57595", "truckersmp/phpwhois": "<=4.3.1", "ttskch/pagination-service-provider": "<1", "twig/twig": "<1.44.7|>=2,<2.15.3|>=3,<3.4.3", - "typo3/cms": "<2.0.5|>=3,<3.0.3|>=6.2,<6.2.30|>=7,<7.6.32|>=8,<8.7.38|>=9,<9.5.29|>=10,<10.4.33|>=11,<11.5.20|>=12,<12.1.1", + "typo3/cms": "<2.0.5|>=3,<3.0.3|>=6.2,<6.2.30|>=7,<7.6.32|>=8,<8.7.38|>=9,<9.5.29|>=10,<10.4.35|>=11,<11.5.23|>=12,<12.2", "typo3/cms-backend": ">=7,<=7.6.50|>=8,<=8.7.39|>=9,<=9.5.24|>=10,<=10.4.13|>=11,<=11.1", - "typo3/cms-core": "<8.7.49|>=9,<9.5.38|>=10,<10.4.33|>=11,<11.5.20|>=12,<12.1.1", + "typo3/cms-core": "<8.7.51|>=9,<9.5.40|>=10,<10.4.36|>=11,<11.5.23|>=12,<12.2", "typo3/cms-form": ">=8,<=8.7.39|>=9,<=9.5.24|>=10,<=10.4.13|>=11,<=11.1", "typo3/flow": ">=1,<1.0.4|>=1.1,<1.1.1|>=2,<2.0.1|>=2.3,<2.3.16|>=3,<3.0.12|>=3.1,<3.1.10|>=3.2,<3.2.13|>=3.3,<3.3.13|>=4,<4.0.6", "typo3/html-sanitizer": ">=1,<1.5|>=2,<2.1.1", @@ -4506,8 +4534,10 @@ "vova07/yii2-fileapi-widget": "<0.1.9", "vrana/adminer": "<4.8.1", "wallabag/tcpdf": "<6.2.22", + "wallabag/wallabag": "<2.5.4", "wanglelecc/laracms": "<=1.0.3", "web-auth/webauthn-framework": ">=3.3,<3.3.4", + "webbuilders-group/silverstripe-kapost-bridge": "<0.4", "webcoast/deferred-image-processing": "<1.0.2", "webpa/webpa": "<3.1.2", "wikimedia/parsoid": "<0.12.2", @@ -4517,8 +4547,10 @@ "wp-cli/wp-cli": "<2.5", "wp-graphql/wp-graphql": "<0.3.5", "wpanel/wpanel4-cms": "<=4.3.1", - "wwbn/avideo": "<=11.6", + "wpcloud/wp-stateless": "<3.2", + "wwbn/avideo": "<12.4", "xataface/xataface": "<3", + "xpressengine/xpressengine": "<3.0.15", "yeswiki/yeswiki": "<4.1", "yetiforce/yetiforce-crm": "<=6.4", "yidashi/yii2cmf": "<=2", @@ -4594,7 +4626,7 @@ "type": "tidelift" } ], - "time": "2023-01-14T06:04:34+00:00" + "time": "2023-03-01T00:18:15+00:00" } ], "aliases": [], diff --git a/docker-compose.yml b/docker-compose.yml index 4deb0aa..53eacbd 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -32,9 +32,9 @@ services: volumes: - ./.mysql:/var/lib/mysql environment: - MYSQL_ALLOW_EMPTY_PASSWORD: 'yes' - MARIADB_AUTO_UPGRADE: "1" - command: ["mysqld", "--innodb-buffer-pool-size=32M", "--wait_timeout=65"] + MARIADB_ALLOW_EMPTY_PASSWORD: yes + MARIADB_AUTO_UPGRADE: yes + command: ["mysqld", "--innodb-buffer-pool-size=32M", "--wait_timeout=65", "--skip-grant-tables"] networks: default: name: telegram-api-server \ No newline at end of file diff --git a/src/Migrations/EnvUpgrade.php b/src/Migrations/EnvUpgrade.php index e4c6e76..e2d9878 100644 --- a/src/Migrations/EnvUpgrade.php +++ b/src/Migrations/EnvUpgrade.php @@ -6,9 +6,12 @@ class EnvUpgrade { public static function mysqlToDbPrefix() { foreach (glob(ROOT_DIR . '/.env*') as $envFile) { + $text = file_get_contents($envFile); - $text = preg_replace('/^MYSQL_/m', 'DB_', $text); - file_put_contents($envFile, $text); + if (str_contains($text, 'MYSQL_')) { + $text = preg_replace('/^MYSQL_/m', 'DB_', $text); + file_put_contents($envFile, $text); + } } } From 6965cbce3e4e9c0a0d32cb1a0c0cd3950ae361fd Mon Sep 17 00:00:00 2001 From: Alexander Pankratov Date: Fri, 3 Mar 2023 01:18:43 +0100 Subject: [PATCH 046/270] Fix: mysql config --- docker-compose.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker-compose.yml b/docker-compose.yml index 53eacbd..8701c46 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -32,7 +32,7 @@ services: volumes: - ./.mysql:/var/lib/mysql environment: - MARIADB_ALLOW_EMPTY_PASSWORD: yes + MARIADB_ALLOW_EMPTY_ROOT_PASSWORD: yes MARIADB_AUTO_UPGRADE: yes command: ["mysqld", "--innodb-buffer-pool-size=32M", "--wait_timeout=65", "--skip-grant-tables"] networks: From 2d09c548e655f218bdf4ad6eec9fe63ec1cbe8fc Mon Sep 17 00:00:00 2001 From: Alexander Pankratov Date: Mon, 20 Mar 2023 13:58:32 +0100 Subject: [PATCH 047/270] Fix: another mysql fix --- composer.lock | 56 ++++++++++++++++++++++++++-------------------- docker-compose.yml | 4 ++-- 2 files changed, 34 insertions(+), 26 deletions(-) diff --git a/composer.lock b/composer.lock index ed99b43..2cba1cb 100644 --- a/composer.lock +++ b/composer.lock @@ -3387,16 +3387,16 @@ }, { "name": "phpseclib/phpseclib", - "version": "3.0.18", + "version": "3.0.19", "source": { "type": "git", "url": "https://github.com/phpseclib/phpseclib.git", - "reference": "f28693d38ba21bb0d9f0c411ee5dae2b178201da" + "reference": "cc181005cf548bfd8a4896383bb825d859259f95" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpseclib/phpseclib/zipball/f28693d38ba21bb0d9f0c411ee5dae2b178201da", - "reference": "f28693d38ba21bb0d9f0c411ee5dae2b178201da", + "url": "https://api.github.com/repos/phpseclib/phpseclib/zipball/cc181005cf548bfd8a4896383bb825d859259f95", + "reference": "cc181005cf548bfd8a4896383bb825d859259f95", "shasum": "" }, "require": { @@ -3477,7 +3477,7 @@ ], "support": { "issues": "https://github.com/phpseclib/phpseclib/issues", - "source": "https://github.com/phpseclib/phpseclib/tree/3.0.18" + "source": "https://github.com/phpseclib/phpseclib/tree/3.0.19" }, "funding": [ { @@ -3493,7 +3493,7 @@ "type": "tidelift" } ], - "time": "2022-12-17T18:26:50+00:00" + "time": "2023-03-05T17:13:09+00:00" }, { "name": "psr/http-factory", @@ -4049,12 +4049,12 @@ "source": { "type": "git", "url": "https://github.com/Roave/SecurityAdvisories.git", - "reference": "6ab259b93537fda94e80a3e7c545957ce0848052" + "reference": "ad434708152844968e15adf8eb3f4a2d7066242e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Roave/SecurityAdvisories/zipball/6ab259b93537fda94e80a3e7c545957ce0848052", - "reference": "6ab259b93537fda94e80a3e7c545957ce0848052", + "url": "https://api.github.com/repos/Roave/SecurityAdvisories/zipball/ad434708152844968e15adf8eb3f4a2d7066242e", + "reference": "ad434708152844968e15adf8eb3f4a2d7066242e", "shasum": "" }, "conflict": { @@ -4064,7 +4064,7 @@ "aheinze/cockpit": "<=2.2.1", "akaunting/akaunting": "<2.1.13", "akeneo/pim-community-dev": "<5.0.119|>=6,<6.0.53", - "alextselegidis/easyappointments": "<=1.4.3", + "alextselegidis/easyappointments": "<1.5", "alterphp/easyadmin-extension-bundle": ">=1.2,<1.2.11|>=1.3,<1.3.1", "amazing/media2click": ">=1,<1.3.3", "amphp/artax": "<1.0.6|>=2,<2.0.6", @@ -4112,11 +4112,11 @@ "catfan/medoo": "<1.7.5", "centreon/centreon": "<22.10-beta.1", "cesnet/simplesamlphp-module-proxystatistics": "<3.1", - "cockpit-hq/cockpit": "<2.3.9", + "cockpit-hq/cockpit": "<2.4.1", "codeception/codeception": "<3.1.3|>=4,<4.1.22", "codeigniter/framework": "<=3.0.6", "codeigniter4/framework": "<4.2.11", - "codeigniter4/shield": "= 1.0.0-beta", + "codeigniter4/shield": "<1-beta.4|= 1.0.0-beta", "codiad/codiad": "<=2.8.4", "composer/composer": "<1.10.26|>=2-alpha.1,<2.2.12|>=2.3,<2.3.5", "concrete5/concrete5": "<=9.1.3|>= 9.0.0RC1, < 9.1.3", @@ -4127,7 +4127,7 @@ "contao/core-bundle": "<4.9.18|>=4.10,<4.11.7|>=4.13,<4.13.3|= 4.10.0", "contao/listing-bundle": ">=4,<4.4.8", "contao/managed-edition": "<=1.5", - "craftcms/cms": "<3.7.55.2|>= 4.0.0-RC1, < 4.2.1", + "craftcms/cms": "<3.7.64|>= 4.0.0-RC1, < 4.3.7|>= 4.0.0-RC1, < 4.2.1", "croogo/croogo": "<3.0.7", "cuyz/valinor": "<0.12", "czproject/git-php": "<4.0.3", @@ -4156,6 +4156,7 @@ "ectouch/ectouch": "<=2.7.2", "elefant/cms": "<1.3.13", "elgg/elgg": "<3.3.24|>=4,<4.0.5", + "encore/laravel-admin": "<=1.8.19", "endroid/qr-code-bundle": "<3.4.2", "enshrined/svg-sanitize": "<0.15", "erusev/parsedown": "<1.7.2", @@ -4170,11 +4171,11 @@ "ezsystems/ezplatform-admin-ui": ">=1.3,<1.3.5|>=1.4,<1.4.6|>=1.5,<1.5.29|>=2.3,<2.3.26", "ezsystems/ezplatform-admin-ui-assets": ">=4,<4.2.1|>=5,<5.0.1|>=5.1,<5.1.1", "ezsystems/ezplatform-graphql": ">=1-rc.1,<1.0.13|>=2-beta.1,<2.3.12", - "ezsystems/ezplatform-kernel": "<=1.2.5|>=1.3,<1.3.26", + "ezsystems/ezplatform-kernel": "<1.2.5.1|>=1.3,<1.3.26", "ezsystems/ezplatform-rest": ">=1.2,<=1.2.2|>=1.3,<1.3.8", "ezsystems/ezplatform-richtext": ">=2.3,<=2.3.7", "ezsystems/ezplatform-user": ">=1,<1.0.1", - "ezsystems/ezpublish-kernel": "<=6.13.8.1|>=7,<7.5.30", + "ezsystems/ezpublish-kernel": "<6.13.8.2|>=7,<7.5.30", "ezsystems/ezpublish-legacy": "<=2017.12.7.3|>=2018.6,<=2019.3.5.1", "ezsystems/platform-ui-assets-bundle": ">=4.2,<4.2.3", "ezsystems/repository-forms": ">=2.3,<2.3.2.1|>=2.5,<2.5.15", @@ -4188,7 +4189,7 @@ "firebase/php-jwt": "<6", "fixpunkt/fp-masterquiz": "<2.2.1|>=3,<3.5.2", "fixpunkt/fp-newsletter": "<1.1.1|>=2,<2.1.2|>=2.2,<3.2.6", - "flarum/core": "<1.6.3", + "flarum/core": "<1.7", "flarum/mentions": "<1.6.3", "flarum/sticky": ">=0.1-beta.14,<=0.1-beta.15", "flarum/tags": "<=0.1-beta.13", @@ -4199,13 +4200,15 @@ "forkcms/forkcms": "<5.11.1", "fossar/tcpdf-parser": "<6.2.22", "francoisjacquet/rosariosis": "<10.8.2", + "frappant/frp-form-answers": "<3.1.2|>=4,<4.0.2", "friendsofsymfony/oauth2-php": "<1.3", "friendsofsymfony/rest-bundle": ">=1.2,<1.2.2", "friendsofsymfony/user-bundle": ">=1.2,<1.3.5", "friendsoftypo3/mediace": ">=7.6.2,<7.6.5", "froala/wysiwyg-editor": "<3.2.7", - "froxlor/froxlor": "<2.0.11", + "froxlor/froxlor": "<2.0.13", "fuel/core": "<1.8.1", + "funadmin/funadmin": "<=3.2", "gaoming13/wechat-php-sdk": "<=1.10.2", "genix/cms": "<=1.1.11", "getgrav/grav": "<1.7.34", @@ -4216,7 +4219,7 @@ "globalpayments/php-sdk": "<2", "google/protobuf": "<3.15", "gos/web-socket-bundle": "<1.10.4|>=2,<2.6.1|>=3,<3.3", - "gree/jose": "<=2.2", + "gree/jose": "<2.2.1", "gregwar/rst": "<1.0.3", "grumpydictator/firefly-iii": "<5.8", "guzzlehttp/guzzle": "<6.5.8|>=7,<7.4.5", @@ -4263,6 +4266,7 @@ "kimai/kimai": "<1.1", "kitodo/presentation": "<3.1.2", "klaviyo/magento2-extension": ">=1,<3", + "knplabs/knp-snappy": "<=1.4.1", "krayin/laravel-crm": "<1.2.2", "kreait/firebase-php": ">=3.2,<3.8.1", "la-haute-societe/tcpdf": "<6.2.22", @@ -4309,7 +4313,7 @@ "modx/revolution": "<= 2.8.3-pl|<2.8", "mojo42/jirafeau": "<4.4", "monolog/monolog": ">=1.8,<1.12", - "moodle/moodle": "<4.0.5", + "moodle/moodle": "<4.0.6|= 3.11|>=4.1-beta,<4.1.1", "mustache/mustache": ">=2,<2.14.1", "namshi/jose": "<2.2", "neoan3-apps/template": "<1.1.1", @@ -4362,14 +4366,14 @@ "phpmyfaq/phpmyfaq": "<=3.1.7", "phpoffice/phpexcel": "<1.8", "phpoffice/phpspreadsheet": "<1.16", - "phpseclib/phpseclib": "<2.0.31|>=3,<3.0.7", + "phpseclib/phpseclib": "<2.0.31|>=3,<3.0.19", "phpservermon/phpservermon": "<=3.5.2", "phpunit/phpunit": ">=4.8.19,<4.8.28|>=5,<5.6.3", "phpwhois/phpwhois": "<=4.2.5", "phpxmlrpc/extras": "<0.6.1", "phpxmlrpc/phpxmlrpc": "<4.9.2", "pimcore/data-hub": "<1.2.4", - "pimcore/pimcore": "<=10.5.17", + "pimcore/pimcore": "<11", "pixelfed/pixelfed": "<=0.11.4", "pocketmine/bedrock-protocol": "<8.0.2", "pocketmine/pocketmine-mp": "<4.12.5|>= 4.0.0-BETA5, < 4.4.2", @@ -4378,7 +4382,7 @@ "prestashop/blockwishlist": ">=2,<2.1.1", "prestashop/contactform": ">=1.0.1,<4.3", "prestashop/gamification": "<2.3.2", - "prestashop/prestashop": "<1.7.8.8", + "prestashop/prestashop": "<8.0.1", "prestashop/productcomments": "<5.0.2", "prestashop/ps_emailsubscription": "<2.6.1", "prestashop/ps_facetedsearch": "<3.4.1", @@ -4420,7 +4424,7 @@ "silverstripe/comments": ">=1.3,<1.9.99|>=2,<2.9.99|>=3,<3.1.1", "silverstripe/forum": "<=0.6.1|>=0.7,<=0.7.3", "silverstripe/framework": "<4.11.14", - "silverstripe/graphql": "<3.5.2|>=4-alpha.1,<4-alpha.2|= 4.0.0-alpha1", + "silverstripe/graphql": "<3.5.2|>=4-alpha.1,<4-alpha.2|>=4.1.1,<4.1.2|>=4.2.2,<4.2.3|= 4.0.0-alpha1", "silverstripe/hybridsessions": ">=1,<2.4.1|>=2.5,<2.5.1", "silverstripe/registry": ">=2.1,<2.1.2|>=2.2,<2.2.1", "silverstripe/restfulserver": ">=1,<1.0.9|>=2,<2.0.4", @@ -4529,6 +4533,7 @@ "unisharp/laravel-filemanager": "<=2.5.1", "userfrosting/userfrosting": ">=0.3.1,<4.6.3", "usmanhalalit/pixie": "<1.0.3|>=2,<2.0.2", + "uvdesk/community-skeleton": "<1.1", "vanilla/safecurl": "<0.9.2", "verot/class.upload.php": "<=1.0.3|>=2,<=2.0.4", "vova07/yii2-fileapi-widget": "<0.1.9", @@ -4612,6 +4617,9 @@ } ], "description": "Prevents installation of composer packages with known security vulnerabilities: no API, simply require it", + "keywords": [ + "dev" + ], "support": { "issues": "https://github.com/Roave/SecurityAdvisories/issues", "source": "https://github.com/Roave/SecurityAdvisories/tree/latest" @@ -4626,7 +4634,7 @@ "type": "tidelift" } ], - "time": "2023-03-01T00:18:15+00:00" + "time": "2023-03-17T19:03:58+00:00" } ], "aliases": [], diff --git a/docker-compose.yml b/docker-compose.yml index 8701c46..62de11b 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -32,8 +32,8 @@ services: volumes: - ./.mysql:/var/lib/mysql environment: - MARIADB_ALLOW_EMPTY_ROOT_PASSWORD: yes - MARIADB_AUTO_UPGRADE: yes + MARIADB_ALLOW_EMPTY_ROOT_PASSWORD: 'yes' + MARIADB_AUTO_UPGRADE: 'yes' command: ["mysqld", "--innodb-buffer-pool-size=32M", "--wait_timeout=65", "--skip-grant-tables"] networks: default: From 4f46902b32e50ce40877c794e1963de283df01a9 Mon Sep 17 00:00:00 2001 From: Alexander Pankratov Date: Mon, 30 Jan 2023 02:12:37 +0100 Subject: [PATCH 048/270] Feat: support new madeline v8 and amp v3 --- Dockerfile | 19 +- Dockerfile-dev | 12 + README.md | 14 +- composer.json | 19 +- composer.lock | 2132 +++++++---------- docker-compose.dev.yml | 11 + docker-compose.yml | 6 +- docker/php/conf.d/xdebug.ini | 5 + examples/websocket-events.php | 33 +- server.php | 2 +- src/Client.php | 104 +- src/Controllers/AbstractApiController.php | 49 +- src/Controllers/ApiController.php | 2 - src/Controllers/EventsController.php | 65 +- src/Controllers/LogController.php | 41 +- src/Controllers/SystemController.php | 3 +- src/EventObservers/EventHandler.php | 3 +- src/EventObservers/EventObserver.php | 53 +- src/EventObservers/LogObserver.php | 2 +- src/Files.php | 4 +- src/Logger.php | 6 +- src/MadelineProtoExtensions/ApiExtensions.php | 450 ++-- .../SystemApiExtensions.php | 85 +- src/Migrations/StartUpFixes.php | 6 + src/Server/Authorization.php | 25 +- src/Server/HealthCheck.php | 52 +- src/Server/Router.php | 10 +- src/Server/Server.php | 65 +- 28 files changed, 1391 insertions(+), 1887 deletions(-) create mode 100644 Dockerfile-dev create mode 100644 docker-compose.dev.yml create mode 100644 docker/php/conf.d/xdebug.ini diff --git a/Dockerfile b/Dockerfile index 7144b06..57bc67a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,17 +1,14 @@ FROM php:8.2-cli -ADD https://github.com/ufoscout/docker-compose-wait/releases/download/2.9.0/wait /usr/local/bin/docker-compose-wait -ADD docker/php/conf.d/. "$PHP_INI_DIR/conf.d/" - -RUN apt-get update && apt-get upgrade -y \ - && apt-get install apt-utils procps -y \ +RUN apt-get update && apt-get upgrade -y +RUN true \ # Install main extension - && apt-get install git zip vim libzip-dev libgmp-dev libevent-dev libssl-dev libnghttp2-dev libffi-dev -y \ + && apt-get install procps git zip vim libzip-dev libgmp-dev libevent-dev libssl-dev libnghttp2-dev libffi-dev -y \ && docker-php-ext-install -j$(nproc) sockets zip gmp pcntl bcmath ffi mysqli pdo pdo_mysql \ # Install additional extension && mkdir -p /usr/src/php/ext/ && cd /usr/src/php/ext/ \ - && pecl bundle ev \ - && docker-php-ext-install -j$(nproc) ev \ + && pecl bundle ev && pecl bundle eio-3.0.0RC4 \ + && docker-php-ext-install -j$(nproc) ev eio \ # Install PrimeModule for AuthKey generation speedup && git clone https://github.com/danog/PrimeModule-ext \ && cd PrimeModule-ext && make -j$(nproc) \ @@ -19,13 +16,17 @@ RUN apt-get update && apt-get upgrade -y \ && cd ../ \ && rm -rf PrimeModule-ext/ \ # Install composer - && chmod +x /usr/local/bin/docker-compose-wait \ && curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer \ # Cleanup && docker-php-source delete \ && apt-get autoremove --purge -y && apt-get autoclean -y && apt-get clean -y \ && rm -rf /usr/src +ADD https://github.com/ufoscout/docker-compose-wait/releases/download/2.9.0/wait /usr/local/bin/docker-compose-wait +RUN chmod +x /usr/local/bin/docker-compose-wait + +ADD docker/php/conf.d/. "$PHP_INI_DIR/conf.d/" + EXPOSE 9503 ENTRYPOINT ["./entrypoint.sh"] \ No newline at end of file diff --git a/Dockerfile-dev b/Dockerfile-dev new file mode 100644 index 0000000..edad447 --- /dev/null +++ b/Dockerfile-dev @@ -0,0 +1,12 @@ +FROM xtrime/telegram-api-server:latest + +ADD docker/php/conf.d/. "$PHP_INI_DIR/conf.d/" + +RUN pecl install xdebug \ + && echo "" >> "$PHP_INI_DIR/conf.d/xdebug.ini" \ + && echo "zend_extension=xdebug.so" >> "$PHP_INI_DIR/conf.d/xdebug.ini" + +EXPOSE 9503 +EXPOSE 9003 + +ENTRYPOINT ["./entrypoint.sh"] \ No newline at end of file diff --git a/README.md b/README.md index d10b8cf..9a518bc 100644 --- a/README.md +++ b/README.md @@ -24,7 +24,7 @@ Fast, simple, async php telegram api server: ### Docker: 1. `git clone https://github.com/xtrime-ru/TelegramApiServer.git TelegramApiServer` 1. `cd TelegramApiServer` -1. Start container: `docker-compose up` +1. Start container: `docker compose up` Folder will be linked inside container to store all necessary data: sessions, env, db. ### Manual: @@ -50,7 +50,7 @@ Fast, simple, async php telegram api server: 1. Fill app_id and app_hash in `.env.docker` or `.env`. 1. Start TelegramApiServer in cli: * docker: - 1. Start container interactively: `docker-compose run --rm telegram-api-server` + 1. Start container interactively: `docker compose run --rm api` 2. If you need to start multiple sessions, create docker-compose.override.yml. Add additional containers there. Use unique ports and session names in command. * manual: 1. `php server.php --session=session` @@ -101,7 +101,7 @@ Fast, simple, async php telegram api server: You can add a client IP in .env file to `IP_WHITELIST` (separate with a comma) In docker version by default api available only from localhost (127.0.0.1). - To allow connections from the internet, need to change ports in docker-compose.yml to `9503:9503` and recreate the container: `docker-compose up -d`. + To allow connections from the internet, need to change ports in docker-compose.yml to `9503:9503` and recreate the container: `docker compose up -d`. This is very insecure, because this will open TAS port to anyone from the internet. Only protection is the `IP_WHITELIST`, and there are no warranties that it will secure your accounts. * If method is inside class (messages, contacts and etc.) use '.' to separate class from method: @@ -122,7 +122,7 @@ Fast, simple, async php telegram api server: * copy message from one channel to another (not repost): `http://127.0.0.1:9503/api/copyMessages/?data[from_peer]=@xtrime&data[to_peer]=@xtrime&data[id][0]=1` ## Run in background -* Docker: `docker-compose up -d` +* Docker: `docker compose up -d` Docker will monitor and restart containers. * Manual: 1. Use [supervisor](http://supervisord.org) to monitor and restart swoole/amphp servers. @@ -147,9 +147,9 @@ Fast, simple, async php telegram api server: * `composer install -o --no-dev` * Compare `.env.docker` or `.env` with corresponding `.env.example`. Update if needed. * Docker: - * `docker-compose pull` - * `docker-compose down` - * `docker-compose up` + * `docker compose pull` + * `docker compose down` + * `docker compose up` * Manual: `supervisorctl restart telegram_api_server` ## Advanced features diff --git a/composer.json b/composer.json index 93ad862..99e91b3 100644 --- a/composer.json +++ b/composer.json @@ -18,21 +18,18 @@ "madelineproto" ], "require": { - "php": "^8.0", + "php": "^8.1", "ext-json": "*", "ext-mbstring": "*", "ext-pcntl": "*", - "amphp/http-server": "^2", - "amphp/http-server-router": "^1", - "amphp/websocket-server": "^2", - "amphp/websocket-client": "^1", - "amphp/http-client": "^4", + "amphp/http-server": "^v3.x-dev", + "amphp/http": "^v2", + "amphp/http-server-router": "^2", + "amphp/http-server-form-parser": "^v2", + "amphp/websocket-server": "^v3", + "amphp/websocket-client": "^v2", "vlucas/phpdotenv": "^4", - "danog/madelineproto": "v7.0.144", - "amphp/http-server-form-parser": "^1.1" - }, - "require-dev": { - "roave/security-advisories": "dev-master" + "danog/madelineproto": "v8.x-dev" }, "minimum-stability": "dev", "prefer-stable": true, diff --git a/composer.lock b/composer.lock index 2cba1cb..d1c27af 100644 --- a/composer.lock +++ b/composer.lock @@ -4,47 +4,40 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "28c4174c4d89b7adff73721c4a3409f6", + "content-hash": "ad486b083ffb76c3b96979c0bf925f5f", "packages": [ { "name": "amphp/amp", - "version": "v2.6.2", + "version": "v3.0.0", "source": { "type": "git", "url": "https://github.com/amphp/amp.git", - "reference": "9d5100cebffa729aaffecd3ad25dc5aeea4f13bb" + "reference": "aaf0ec1d5a2c20b523258995a10e80c1fb765871" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/amphp/amp/zipball/9d5100cebffa729aaffecd3ad25dc5aeea4f13bb", - "reference": "9d5100cebffa729aaffecd3ad25dc5aeea4f13bb", + "url": "https://api.github.com/repos/amphp/amp/zipball/aaf0ec1d5a2c20b523258995a10e80c1fb765871", + "reference": "aaf0ec1d5a2c20b523258995a10e80c1fb765871", "shasum": "" }, "require": { - "php": ">=7.1" + "php": ">=8.1", + "revolt/event-loop": "^1 || ^0.2" }, "require-dev": { - "amphp/php-cs-fixer-config": "dev-master", - "amphp/phpunit-util": "^1", - "ext-json": "*", - "jetbrains/phpstorm-stubs": "^2019.3", - "phpunit/phpunit": "^7 | ^8 | ^9", - "psalm/phar": "^3.11@dev", - "react/promise": "^2" + "amphp/php-cs-fixer-config": "^2", + "phpunit/phpunit": "^9", + "psalm/phar": "^4.13" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.x-dev" - } - }, "autoload": { "files": [ - "lib/functions.php", - "lib/Internal/functions.php" + "src/functions.php", + "src/Future/functions.php", + "src/Internal/functions.php" ], "psr-4": { - "Amp\\": "lib" + "Amp\\": "src" } }, "notification-url": "https://packagist.org/downloads/", @@ -52,10 +45,6 @@ "MIT" ], "authors": [ - { - "name": "Daniel Lowrey", - "email": "rdlowrey@php.net" - }, { "name": "Aaron Piotrowski", "email": "aaron@trowski.com" @@ -67,6 +56,10 @@ { "name": "Niklas Keller", "email": "me@kelunik.com" + }, + { + "name": "Daniel Lowrey", + "email": "rdlowrey@php.net" } ], "description": "A non-blocking concurrency framework for PHP applications.", @@ -83,9 +76,8 @@ "promise" ], "support": { - "irc": "irc://irc.freenode.org/amphp", "issues": "https://github.com/amphp/amp/issues", - "source": "https://github.com/amphp/amp/tree/v2.6.2" + "source": "https://github.com/amphp/amp/tree/v3.0.0" }, "funding": [ { @@ -93,46 +85,44 @@ "type": "github" } ], - "time": "2022-02-20T17:52:18+00:00" + "time": "2022-12-18T16:52:44+00:00" }, { "name": "amphp/byte-stream", - "version": "v1.8.1", + "version": "v2.0.1", "source": { "type": "git", "url": "https://github.com/amphp/byte-stream.git", - "reference": "acbd8002b3536485c997c4e019206b3f10ca15bd" + "reference": "7e7a77579f3e90c6fbd56e49628e6ace02d8f88a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/amphp/byte-stream/zipball/acbd8002b3536485c997c4e019206b3f10ca15bd", - "reference": "acbd8002b3536485c997c4e019206b3f10ca15bd", + "url": "https://api.github.com/repos/amphp/byte-stream/zipball/7e7a77579f3e90c6fbd56e49628e6ace02d8f88a", + "reference": "7e7a77579f3e90c6fbd56e49628e6ace02d8f88a", "shasum": "" }, "require": { - "amphp/amp": "^2", - "php": ">=7.1" + "amphp/amp": "^3", + "amphp/parser": "^1.1", + "amphp/pipeline": "^1", + "amphp/serialization": "^1", + "amphp/sync": "^2", + "php": ">=8.1", + "revolt/event-loop": "^1 || ^0.2.3" }, "require-dev": { - "amphp/php-cs-fixer-config": "dev-master", - "amphp/phpunit-util": "^1.4", - "friendsofphp/php-cs-fixer": "^2.3", - "jetbrains/phpstorm-stubs": "^2019.3", - "phpunit/phpunit": "^6 || ^7 || ^8", - "psalm/phar": "^3.11.4" + "amphp/php-cs-fixer-config": "^2", + "amphp/phpunit-util": "^3", + "phpunit/phpunit": "^9", + "psalm/phar": "^5.4" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.x-dev" - } - }, "autoload": { "files": [ - "lib/functions.php" + "src/functions.php" ], "psr-4": { - "Amp\\ByteStream\\": "lib" + "Amp\\ByteStream\\": "src" } }, "notification-url": "https://packagist.org/downloads/", @@ -150,7 +140,7 @@ } ], "description": "A stream abstraction to make working with non-blocking I/O simple.", - "homepage": "http://amphp.org/byte-stream", + "homepage": "https://amphp.org/byte-stream", "keywords": [ "amp", "amphp", @@ -160,9 +150,8 @@ "stream" ], "support": { - "irc": "irc://irc.freenode.org/amphp", "issues": "https://github.com/amphp/byte-stream/issues", - "source": "https://github.com/amphp/byte-stream/tree/v1.8.1" + "source": "https://github.com/amphp/byte-stream/tree/v2.0.1" }, "funding": [ { @@ -170,42 +159,39 @@ "type": "github" } ], - "time": "2021-03-30T17:13:30+00:00" + "time": "2023-02-03T04:06:20+00:00" }, { "name": "amphp/cache", - "version": "v1.5.0", + "version": "v2.0.0", "source": { "type": "git", "url": "https://github.com/amphp/cache.git", - "reference": "2b6b5dbb70e54cc914df9952ba7c012bc4cbcd28" + "reference": "218bb3888d380eb9dd926cd06f803573c84391d3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/amphp/cache/zipball/2b6b5dbb70e54cc914df9952ba7c012bc4cbcd28", - "reference": "2b6b5dbb70e54cc914df9952ba7c012bc4cbcd28", + "url": "https://api.github.com/repos/amphp/cache/zipball/218bb3888d380eb9dd926cd06f803573c84391d3", + "reference": "218bb3888d380eb9dd926cd06f803573c84391d3", "shasum": "" }, "require": { - "amphp/amp": "^2", + "amphp/amp": "^3", "amphp/serialization": "^1", - "amphp/sync": "^1.2", - "php": ">=7.1" - }, - "conflict": { - "amphp/file": "<0.2 || >=3" + "amphp/sync": "^2", + "php": ">=8.1", + "revolt/event-loop": "^1 || ^0.2" }, "require-dev": { - "amphp/file": "^1 || ^2", - "amphp/php-cs-fixer-config": "dev-master", - "amphp/phpunit-util": "^1.1", - "phpunit/phpunit": "^6 | ^7 | ^8 | ^9", - "vimeo/psalm": "^4" + "amphp/php-cs-fixer-config": "^2", + "amphp/phpunit-util": "^3", + "phpunit/phpunit": "^9", + "psalm/phar": "^5.4" }, "type": "library", "autoload": { "psr-4": { - "Amp\\Cache\\": "lib" + "Amp\\Cache\\": "src" } }, "notification-url": "https://packagist.org/downloads/", @@ -217,17 +203,20 @@ "name": "Niklas Keller", "email": "me@kelunik.com" }, + { + "name": "Aaron Piotrowski", + "email": "aaron@trowski.com" + }, { "name": "Daniel Lowrey", "email": "rdlowrey@php.net" } ], - "description": "A promise-aware caching API for Amp.", - "homepage": "https://github.com/amphp/cache", + "description": "A fiber-aware cache API based on Amp and Revolt.", + "homepage": "https://amphp.org/cache", "support": { - "irc": "irc://irc.freenode.org/amphp", "issues": "https://github.com/amphp/cache/issues", - "source": "https://github.com/amphp/cache/tree/v1.5.0" + "source": "https://github.com/amphp/cache/tree/v2.0.0" }, "funding": [ { @@ -235,45 +224,46 @@ "type": "github" } ], - "time": "2021-06-29T17:12:43+00:00" + "time": "2023-01-09T21:04:12+00:00" }, { "name": "amphp/dns", - "version": "v1.2.3", + "version": "v2.0.1", "source": { "type": "git", "url": "https://github.com/amphp/dns.git", - "reference": "852292532294d7972c729a96b49756d781f7c59d" + "reference": "e42876aa8306c754abd1b3e71a44e13066909fd1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/amphp/dns/zipball/852292532294d7972c729a96b49756d781f7c59d", - "reference": "852292532294d7972c729a96b49756d781f7c59d", + "url": "https://api.github.com/repos/amphp/dns/zipball/e42876aa8306c754abd1b3e71a44e13066909fd1", + "reference": "e42876aa8306c754abd1b3e71a44e13066909fd1", "shasum": "" }, "require": { - "amphp/amp": "^2", - "amphp/byte-stream": "^1.1", - "amphp/cache": "^1.2", + "amphp/amp": "^3", + "amphp/byte-stream": "^2", + "amphp/cache": "^2", "amphp/parser": "^1", - "amphp/windows-registry": "^0.3", - "daverandom/libdns": "^2.0.1", + "amphp/windows-registry": "^1", + "daverandom/libdns": "^2.0.2", "ext-filter": "*", - "ext-json": "*", - "php": ">=7.0" + "php": ">=8.1", + "revolt/event-loop": "^1 || ^0.2" }, "require-dev": { - "amphp/php-cs-fixer-config": "dev-master", - "amphp/phpunit-util": "^1", - "phpunit/phpunit": "^6 || ^7 || ^8 || ^9" + "amphp/php-cs-fixer-config": "^2", + "amphp/phpunit-util": "^3", + "phpunit/phpunit": "^9", + "psalm/phar": "^5.4" }, "type": "library", "autoload": { "files": [ - "lib/functions.php" + "src/functions.php" ], "psr-4": { - "Amp\\Dns\\": "lib" + "Amp\\Dns\\": "src" } }, "notification-url": "https://packagist.org/downloads/", @@ -314,7 +304,7 @@ ], "support": { "issues": "https://github.com/amphp/dns/issues", - "source": "https://github.com/amphp/dns/tree/v1.2.3" + "source": "https://github.com/amphp/dns/tree/v2.0.1" }, "funding": [ { @@ -322,42 +312,42 @@ "type": "github" } ], - "time": "2020-07-21T19:04:57+00:00" + "time": "2023-01-21T16:00:09+00:00" }, { "name": "amphp/file", - "version": "v2.0.4", + "version": "v3.0.0", "source": { "type": "git", "url": "https://github.com/amphp/file.git", - "reference": "be639a9b1f579d3fe847ca0dcc17c7a7f5168910" + "reference": "1c9f0ebdb20ae05f1540fca3e7a517f7f166652b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/amphp/file/zipball/be639a9b1f579d3fe847ca0dcc17c7a7f5168910", - "reference": "be639a9b1f579d3fe847ca0dcc17c7a7f5168910", + "url": "https://api.github.com/repos/amphp/file/zipball/1c9f0ebdb20ae05f1540fca3e7a517f7f166652b", + "reference": "1c9f0ebdb20ae05f1540fca3e7a517f7f166652b", "shasum": "" }, "require": { - "amphp/amp": "^2.5.2", - "amphp/byte-stream": "^1.8.1", - "amphp/parallel": "^1.4", - "amphp/sync": "^1.4", - "php": ">=7.1" + "amphp/amp": "^3", + "amphp/byte-stream": "^2", + "amphp/cache": "^2", + "amphp/parallel": "^2.1", + "amphp/sync": "^2", + "php": ">=8.1", + "revolt/event-loop": "^1" }, "require-dev": { - "amphp/php-cs-fixer-config": "dev-master", - "amphp/phpunit-util": "^1.1", + "amphp/php-cs-fixer-config": "^2", + "amphp/phpunit-util": "^3", + "phpunit/phpunit": "^9", + "psalm/phar": "^5.4" + }, + "suggest": { "ext-eio": "^2 || ^3", - "ext-uv": "^0.3 || ^0.2", - "phpunit/phpunit": "^9 || ^8 || ^7" + "ext-uv": "^0.3 || ^0.2" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.x-dev" - } - }, "autoload": { "files": [ "src/functions.php" @@ -384,7 +374,7 @@ "email": "me@kelunik.com" } ], - "description": "Allows non-blocking access to the filesystem for Amp.", + "description": "Non-blocking access to the filesystem based on Amp and Revolt.", "homepage": "https://github.com/amphp/file", "keywords": [ "amp", @@ -399,7 +389,7 @@ ], "support": { "issues": "https://github.com/amphp/file/issues", - "source": "https://github.com/amphp/file/tree/v2.0.4" + "source": "https://github.com/amphp/file/tree/v3.0.0" }, "funding": [ { @@ -407,7 +397,7 @@ "type": "github" } ], - "time": "2022-09-08T17:22:23+00:00" + "time": "2023-03-02T22:29:08+00:00" }, { "name": "amphp/hpack", @@ -484,35 +474,36 @@ }, { "name": "amphp/http", - "version": "v1.7.1", + "version": "v2.0.0-beta.3", "source": { "type": "git", "url": "https://github.com/amphp/http.git", - "reference": "0d729b09fbace00dd1fd35ae8d4d45eb25f39d96" + "reference": "90b524d58461c0a47e18d15a9cdce3ebb2f94166" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/amphp/http/zipball/0d729b09fbace00dd1fd35ae8d4d45eb25f39d96", - "reference": "0d729b09fbace00dd1fd35ae8d4d45eb25f39d96", + "url": "https://api.github.com/repos/amphp/http/zipball/90b524d58461c0a47e18d15a9cdce3ebb2f94166", + "reference": "90b524d58461c0a47e18d15a9cdce3ebb2f94166", "shasum": "" }, "require": { "amphp/hpack": "^3", - "php": ">=7.1" + "amphp/parser": "^1.1", + "league/uri-components": "^2.4", + "php": ">=8.1", + "psr/http-message": "^1" }, "require-dev": { - "amphp/php-cs-fixer-config": "^2-dev", - "phpunit/phpunit": "^9 || ^8 || ^7" + "amphp/php-cs-fixer-config": "^2", + "league/uri": "^6.8", + "phpunit/phpunit": "^9", + "psalm/phar": "^5.4" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.x-dev" - } - }, "autoload": { "files": [ - "src/functions.php" + "src/functions.php", + "src/Internal/constants.php" ], "psr-4": { "Amp\\Http\\": "src" @@ -526,12 +517,16 @@ { "name": "Niklas Keller", "email": "me@kelunik.com" + }, + { + "name": "Aaron Piotrowski", + "email": "aaron@trowski.com" } ], "description": "Basic HTTP primitives which can be shared by servers and clients.", "support": { "issues": "https://github.com/amphp/http/issues", - "source": "https://github.com/amphp/http/tree/v1.7.1" + "source": "https://github.com/amphp/http/tree/v2.0.0-beta.3" }, "funding": [ { @@ -539,48 +534,45 @@ "type": "github" } ], - "time": "2023-02-08T00:29:51+00:00" + "time": "2023-04-08T14:32:00+00:00" }, { "name": "amphp/http-client", - "version": "v4.6.2", + "version": "v5.0.0-beta.10", "source": { "type": "git", "url": "https://github.com/amphp/http-client.git", - "reference": "453f84f623e409889168351e60246f5feddc1b3c" + "reference": "1e1fc7d70023f62aa35f85531ef00cf3aaa0b222" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/amphp/http-client/zipball/453f84f623e409889168351e60246f5feddc1b3c", - "reference": "453f84f623e409889168351e60246f5feddc1b3c", + "url": "https://api.github.com/repos/amphp/http-client/zipball/1e1fc7d70023f62aa35f85531ef00cf3aaa0b222", + "reference": "1e1fc7d70023f62aa35f85531ef00cf3aaa0b222", "shasum": "" }, "require": { - "amphp/amp": "^2.4", - "amphp/byte-stream": "^1.6", + "amphp/amp": "^3", + "amphp/byte-stream": "^2", "amphp/hpack": "^3", - "amphp/http": "^1.6", - "amphp/socket": "^1", - "amphp/sync": "^1.3", + "amphp/http": "^2", + "amphp/pipeline": "^1", + "amphp/socket": "^2", + "amphp/sync": "^2", "league/uri": "^6", - "php": ">=7.2", - "psr/http-message": "^1" - }, - "conflict": { - "amphp/file": "<0.2 || >=3" + "php": ">=8.1", + "psr/http-message": "^1", + "revolt/event-loop": "^1" }, "require-dev": { - "amphp/file": "^0.2 || ^0.3 || ^1 || ^2", - "amphp/http-server": "^2", - "amphp/php-cs-fixer-config": "dev-master", - "amphp/phpunit-util": "^1.1", - "amphp/react-adapter": "^2.1", - "clue/socks-react": "^1.0", + "amphp/file": "^3", + "amphp/http-server": "^3", + "amphp/php-cs-fixer-config": "^2", + "amphp/phpunit-util": "^3", "ext-json": "*", - "kelunik/link-header-rfc5988": "^1.0", + "kelunik/link-header-rfc5988": "^1", "laminas/laminas-diactoros": "^2.3", - "phpunit/phpunit": "^7 || ^8 || ^9", - "vimeo/psalm": "^4" + "phpunit/phpunit": "^9", + "psalm/phar": "^5.4" }, "suggest": { "amphp/file": "Required for file request bodies and HTTP archive logging", @@ -619,7 +611,7 @@ "email": "aaron@trowski.com" } ], - "description": "Asynchronous concurrent HTTP/2 and HTTP/1.1 client built on the Amp concurrency framework", + "description": "Non-blocking concurrent HTTP/2 and HTTP/1.1 client based on Amp and Revolt.", "homepage": "https://github.com/amphp/http-client", "keywords": [ "async", @@ -631,7 +623,7 @@ ], "support": { "issues": "https://github.com/amphp/http-client/issues", - "source": "https://github.com/amphp/http-client/tree/v4.6.2" + "source": "https://github.com/amphp/http-client/tree/v5.0.0-beta.10" }, "funding": [ { @@ -639,43 +631,43 @@ "type": "github" } ], - "time": "2021-10-09T14:11:46+00:00" + "time": "2023-04-09T15:03:50+00:00" }, { "name": "amphp/http-client-cookies", - "version": "v1.2.0", + "version": "v2.0.0-beta.2", "source": { "type": "git", "url": "https://github.com/amphp/http-client-cookies.git", - "reference": "ab7e498bb6c4e389e2b9880727d6470997189d87" + "reference": "ee07882d39818aef0556da13eeb050178f91d3a3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/amphp/http-client-cookies/zipball/ab7e498bb6c4e389e2b9880727d6470997189d87", - "reference": "ab7e498bb6c4e389e2b9880727d6470997189d87", + "url": "https://api.github.com/repos/amphp/http-client-cookies/zipball/ee07882d39818aef0556da13eeb050178f91d3a3", + "reference": "ee07882d39818aef0556da13eeb050178f91d3a3", "shasum": "" }, "require": { - "amphp/amp": "^2.3", - "amphp/dns": "^1.2", - "amphp/http": "^1.5", - "amphp/http-client": "^4", - "amphp/sync": "^1.3", + "amphp/amp": "^3", + "amphp/dns": "^2", + "amphp/http": "^2-dev", + "amphp/http-client": "^5", + "amphp/sync": "^2", "ext-filter": "*", - "php": ">=7.2", - "psr/http-message": "^1.0" + "php": ">=8.1", + "psr/http-message": "^1" }, "conflict": { - "amphp/file": "<1 || >=3" + "amphp/file": "<3 || >=4" }, "require-dev": { - "amphp/file": "^2", - "amphp/http-server": "dev-master", - "amphp/php-cs-fixer-config": "dev-master", - "amphp/phpunit-util": "^1.1", - "amphp/socket": "^1", - "friendsofphp/php-cs-fixer": "^2.3", - "phpunit/phpunit": "^7 || ^8" + "amphp/file": "^3", + "amphp/http-server": "^3", + "amphp/php-cs-fixer-config": "^2", + "amphp/phpunit-util": "^3", + "amphp/socket": "^2", + "phpunit/phpunit": "^9", + "psalm/phar": "^5.6" }, "type": "library", "autoload": { @@ -708,7 +700,7 @@ ], "support": { "issues": "https://github.com/amphp/http-client-cookies/issues", - "source": "https://github.com/amphp/http-client-cookies/tree/v1.2.0" + "source": "https://github.com/amphp/http-client-cookies/tree/v2.0.0-beta.2" }, "funding": [ { @@ -716,58 +708,58 @@ "type": "github" } ], - "time": "2021-10-21T20:53:46+00:00" + "time": "2023-02-03T00:13:11+00:00" }, { "name": "amphp/http-server", - "version": "v2.1.8", + "version": "3.x-dev", "source": { "type": "git", "url": "https://github.com/amphp/http-server.git", - "reference": "49a7ff6d89ebe84ba0c64604613f898a697bb353" + "reference": "76c48d8e5295f2cf20b41fc3dfccc7cb6ae9bb4d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/amphp/http-server/zipball/49a7ff6d89ebe84ba0c64604613f898a697bb353", - "reference": "49a7ff6d89ebe84ba0c64604613f898a697bb353", + "url": "https://api.github.com/repos/amphp/http-server/zipball/76c48d8e5295f2cf20b41fc3dfccc7cb6ae9bb4d", + "reference": "76c48d8e5295f2cf20b41fc3dfccc7cb6ae9bb4d", "shasum": "" }, "require": { - "amphp/amp": "^2", - "amphp/byte-stream": "^1.3", + "amphp/amp": "^3", + "amphp/byte-stream": "^2", + "amphp/cache": "^2", "amphp/hpack": "^3", - "amphp/http": "^1.6", - "amphp/socket": "^1", - "cash/lrucache": "^1", + "amphp/http": "^2", + "amphp/pipeline": "^1", + "amphp/socket": "^2", + "amphp/sync": "^2", "league/uri": "^6", - "php": ">=7.2", + "league/uri-interfaces": "^2.3", + "php": ">=8.1", "psr/http-message": "^1", - "psr/log": "^1|^2|^3" + "psr/log": "^1|^2|^3", + "revolt/event-loop": "^1" }, "require-dev": { - "amphp/http-client": "^4", - "amphp/log": "^1", - "amphp/php-cs-fixer-config": "dev-master", - "amphp/phpunit-util": "^1.1", - "infection/infection": "^0.9.2", + "amphp/http-client": "^5", + "amphp/log": "^2", + "amphp/php-cs-fixer-config": "^2", + "amphp/phpunit-util": "^3", "league/uri-components": "^2", - "monolog/monolog": "^2 || ^1.23", - "phpunit/phpunit": "^8 || ^7" + "monolog/monolog": "^3", + "phpunit/phpunit": "^9", + "psalm/phar": "^5.4" }, "suggest": { "ext-zlib": "Allows GZip compression of response bodies" }, + "default-branch": true, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.x-dev" - } - }, "autoload": { "files": [ + "src/Driver/functions.php", "src/Middleware/functions.php", - "src/functions.php", - "src/Server.php" + "src/functions.php" ], "psr-4": { "Amp\\Http\\Server\\": "src" @@ -806,7 +798,7 @@ ], "support": { "issues": "https://github.com/amphp/http-server/issues", - "source": "https://github.com/amphp/http-server/tree/v2.1.8" + "source": "https://github.com/amphp/http-server/tree/3.x" }, "funding": [ { @@ -814,34 +806,37 @@ "type": "github" } ], - "time": "2023-02-01T01:09:54+00:00" + "time": "2023-04-09T16:12:16+00:00" }, { "name": "amphp/http-server-form-parser", - "version": "v1.1.5", + "version": "v2.x-dev", "source": { "type": "git", "url": "https://github.com/amphp/http-server-form-parser.git", - "reference": "b20cedbdcf87c19816e7f8cb4f992655599dad41" + "reference": "43ef1a70a69465b4a5dadfcda78c54125f721fd5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/amphp/http-server-form-parser/zipball/b20cedbdcf87c19816e7f8cb4f992655599dad41", - "reference": "b20cedbdcf87c19816e7f8cb4f992655599dad41", + "url": "https://api.github.com/repos/amphp/http-server-form-parser/zipball/43ef1a70a69465b4a5dadfcda78c54125f721fd5", + "reference": "43ef1a70a69465b4a5dadfcda78c54125f721fd5", "shasum": "" }, "require": { - "amphp/amp": "^2", - "amphp/byte-stream": "^1.3", - "amphp/http": "^1", - "amphp/http-server": "^2 || ^1 || ^0.8", - "php": ">=7.1" + "amphp/amp": "^3", + "amphp/byte-stream": "^2", + "amphp/http": "^2-dev", + "amphp/http-server": "^3", + "amphp/pipeline": "^1", + "php": ">=8.1", + "revolt/event-loop": "^1 || ^0.2.4" }, "require-dev": { - "amphp/log": "^1.0", - "amphp/php-cs-fixer-config": "dev-master", - "amphp/phpunit-util": "^1.1.2", - "phpunit/phpunit": "^9 || ^8 || ^7 || ^6" + "amphp/log": "^2", + "amphp/php-cs-fixer-config": "^2", + "amphp/phpunit-util": "^3", + "phpunit/phpunit": "^9", + "psalm/phar": "^5.6" }, "type": "library", "autoload": { @@ -885,7 +880,7 @@ ], "support": { "issues": "https://github.com/amphp/http-server-form-parser/issues", - "source": "https://github.com/amphp/http-server-form-parser/tree/v1.1.5" + "source": "https://github.com/amphp/http-server-form-parser/tree/v2" }, "funding": [ { @@ -893,34 +888,37 @@ "type": "github" } ], - "time": "2022-04-11T13:31:54+00:00" + "time": "2023-02-02T05:07:33+00:00" }, { "name": "amphp/http-server-router", - "version": "v1.0.2", + "version": "v2.0.0-beta.2", "source": { "type": "git", "url": "https://github.com/amphp/http-server-router.git", - "reference": "c6a1731f3833f3a4b4e4cd633889eb14b5ef635b" + "reference": "01ba5e8c92a1d8290fc7cc8a0c1685da501c67df" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/amphp/http-server-router/zipball/c6a1731f3833f3a4b4e4cd633889eb14b5ef635b", - "reference": "c6a1731f3833f3a4b4e4cd633889eb14b5ef635b", + "url": "https://api.github.com/repos/amphp/http-server-router/zipball/01ba5e8c92a1d8290fc7cc8a0c1685da501c67df", + "reference": "01ba5e8c92a1d8290fc7cc8a0c1685da501c67df", "shasum": "" }, "require": { - "amphp/http": "^1", - "amphp/http-server": "^2 || ^1 || ^0.8", - "cash/lrucache": "^1", - "nikic/fast-route": "^1" + "amphp/cache": "^2", + "amphp/http": "^2-dev", + "amphp/http-server": "^3", + "amphp/socket": "^2", + "nikic/fast-route": "^1", + "php": ">=8.1" }, "require-dev": { - "amphp/log": "^1", - "amphp/phpunit-util": "^1", - "friendsofphp/php-cs-fixer": "^2.3", - "league/uri-schemes": "^1.1", - "phpunit/phpunit": "^6" + "amphp/log": "^2", + "amphp/php-cs-fixer-config": "^2", + "amphp/phpunit-util": "^3", + "league/uri": "^6", + "phpunit/phpunit": "^9", + "psalm/phar": "^5.6" }, "type": "library", "autoload": { @@ -958,35 +956,43 @@ ], "support": { "issues": "https://github.com/amphp/http-server-router/issues", - "source": "https://github.com/amphp/http-server-router/tree/v1.0.2" + "source": "https://github.com/amphp/http-server-router/tree/v2.0.0-beta.2" }, - "time": "2019-08-21T15:51:20+00:00" + "funding": [ + { + "url": "https://github.com/amphp", + "type": "github" + } + ], + "time": "2023-02-02T01:05:48+00:00" }, { "name": "amphp/log", - "version": "v1.2.0", + "version": "v2.0.0-beta.2", "source": { "type": "git", "url": "https://github.com/amphp/log.git", - "reference": "c067b03281f5e018ca4bd05f5d161208685cbc03" + "reference": "f65226ffa4dfe0dd63805f2af31aced9ed27efb6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/amphp/log/zipball/c067b03281f5e018ca4bd05f5d161208685cbc03", - "reference": "c067b03281f5e018ca4bd05f5d161208685cbc03", + "url": "https://api.github.com/repos/amphp/log/zipball/f65226ffa4dfe0dd63805f2af31aced9ed27efb6", + "reference": "f65226ffa4dfe0dd63805f2af31aced9ed27efb6", "shasum": "" }, "require": { - "amphp/amp": "^2", - "amphp/byte-stream": "^1.3", + "amphp/amp": "^3", + "amphp/byte-stream": "^2", "monolog/monolog": "^3|^2|^1.23", - "php": ">=7.2", + "php": ">=8.1", "psr/log": "^3|^2|^1" }, "require-dev": { - "amphp/php-cs-fixer-config": "dev-master", - "amphp/phpunit-util": "^1.1", - "phpunit/phpunit": "^8 || ^7" + "amphp/file": "^3", + "amphp/php-cs-fixer-config": "^2", + "amphp/phpunit-util": "^3", + "phpunit/phpunit": "^9", + "psalm/phar": "^5.6" }, "type": "library", "autoload": { @@ -1011,7 +1017,7 @@ "email": "me@kelunik.com" } ], - "description": "Non-blocking logging for PHP based on Amp and Monolog.", + "description": "Non-blocking logging for PHP based on Amp, Revolt, and Monolog.", "homepage": "https://github.com/amphp/log", "keywords": [ "amp", @@ -1024,7 +1030,7 @@ ], "support": { "issues": "https://github.com/amphp/log/issues", - "source": "https://github.com/amphp/log/tree/v1.2.0" + "source": "https://github.com/amphp/log/tree/v2.0.0-beta.2" }, "funding": [ { @@ -1032,37 +1038,41 @@ "type": "github" } ], - "time": "2023-02-03T01:46:14+00:00" + "time": "2023-02-03T03:34:16+00:00" }, { "name": "amphp/mysql", - "version": "v2.1.3", + "version": "v3.0.0-beta.5", "source": { "type": "git", "url": "https://github.com/amphp/mysql.git", - "reference": "dac7e7149da22ef4473c026efae5d307d8fd41b7" + "reference": "857b0adfff0c84d22a81e9a6226efc67f820a7f6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/amphp/mysql/zipball/dac7e7149da22ef4473c026efae5d307d8fd41b7", - "reference": "dac7e7149da22ef4473c026efae5d307d8fd41b7", + "url": "https://api.github.com/repos/amphp/mysql/zipball/857b0adfff0c84d22a81e9a6226efc67f820a7f6", + "reference": "857b0adfff0c84d22a81e9a6226efc67f820a7f6", "shasum": "" }, "require": { - "amphp/amp": "^2", - "amphp/socket": "^1", - "amphp/sql": "^1", - "amphp/sql-common": "^1", - "php": ">=7.1" + "amphp/amp": "^3", + "amphp/parser": "^1.1", + "amphp/pipeline": "^1", + "amphp/socket": "^2", + "amphp/sql": "^2", + "amphp/sql-common": "^2", + "php": ">=8.1" }, "require-dev": { - "amphp/file": "^2 || ^1 || ^0.3.5", - "amphp/php-cs-fixer-config": "dev-master", - "amphp/phpunit-util": "^1.1.2", - "amphp/process": "^1", + "amphp/file": "^3", + "amphp/php-cs-fixer-config": "^2", + "amphp/phpunit-util": "^3", + "amphp/process": "^2", + "ext-mysqli": "*", "ext-openssl": "*", - "phpbench/phpbench": "^0.13.0", - "phpunit/phpunit": "^9 || ^8 || ^7" + "phpbench/phpbench": "^1.2.6", + "phpunit/phpunit": "^9", + "psalm/phar": "^5.4" }, "type": "library", "autoload": { @@ -1090,7 +1100,7 @@ "description": "Asynchronous MySQL client for PHP based on Amp.", "support": { "issues": "https://github.com/amphp/mysql/issues", - "source": "https://github.com/amphp/mysql/tree/v2.1.3" + "source": "https://github.com/amphp/mysql/tree/v3.0.0-beta.5" }, "funding": [ { @@ -1098,45 +1108,50 @@ "type": "github" } ], - "time": "2022-09-25T20:44:16+00:00" + "time": "2023-02-12T15:40:51+00:00" }, { "name": "amphp/parallel", - "version": "v1.4.2", + "version": "v2.1.0", "source": { "type": "git", "url": "https://github.com/amphp/parallel.git", - "reference": "75853e1623efa5aa5e65e986ec9a97db573a5267" + "reference": "409a8f2a091a1eacf239695cb7f37bda4f635e83" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/amphp/parallel/zipball/75853e1623efa5aa5e65e986ec9a97db573a5267", - "reference": "75853e1623efa5aa5e65e986ec9a97db573a5267", + "url": "https://api.github.com/repos/amphp/parallel/zipball/409a8f2a091a1eacf239695cb7f37bda4f635e83", + "reference": "409a8f2a091a1eacf239695cb7f37bda4f635e83", "shasum": "" }, "require": { - "amphp/amp": "^2", - "amphp/byte-stream": "^1.6.1", + "amphp/amp": "^3", + "amphp/byte-stream": "^2", "amphp/parser": "^1", - "amphp/process": "^1", + "amphp/pipeline": "^1", + "amphp/process": "^2", "amphp/serialization": "^1", - "amphp/sync": "^1.0.1", - "php": ">=7.1" + "amphp/socket": "^2", + "amphp/sync": "^2", + "php": ">=8.1", + "revolt/event-loop": "^1 || ^0.2.1" }, "require-dev": { - "amphp/php-cs-fixer-config": "dev-master", - "amphp/phpunit-util": "^1.1", - "phpunit/phpunit": "^8 || ^7" + "amphp/php-cs-fixer-config": "^2", + "amphp/phpunit-util": "^3", + "phpunit/phpunit": "^9", + "psalm/phar": "^5.4" }, "type": "library", "autoload": { "files": [ - "lib/Context/functions.php", - "lib/Sync/functions.php", - "lib/Worker/functions.php" + "src/Context/functions.php", + "src/Context/Internal/functions.php", + "src/Ipc/functions.php", + "src/Worker/functions.php" ], "psr-4": { - "Amp\\Parallel\\": "lib" + "Amp\\Parallel\\": "src" } }, "notification-url": "https://packagist.org/downloads/", @@ -1148,6 +1163,10 @@ "name": "Aaron Piotrowski", "email": "aaron@trowski.com" }, + { + "name": "Niklas Keller", + "email": "me@kelunik.com" + }, { "name": "Stephen Coakley", "email": "me@stephencoakley.com" @@ -1164,7 +1183,7 @@ ], "support": { "issues": "https://github.com/amphp/parallel/issues", - "source": "https://github.com/amphp/parallel/tree/v1.4.2" + "source": "https://github.com/amphp/parallel/tree/v2.1.0" }, "funding": [ { @@ -1172,7 +1191,7 @@ "type": "github" } ], - "time": "2022-12-30T00:21:42+00:00" + "time": "2023-03-02T22:01:04+00:00" }, { "name": "amphp/parser", @@ -1236,32 +1255,101 @@ ], "time": "2022-12-30T18:08:47+00:00" }, + { + "name": "amphp/pipeline", + "version": "v1.0.0", + "source": { + "type": "git", + "url": "https://github.com/amphp/pipeline.git", + "reference": "810dee498d2fd7d2c9247b32d95f38c92c13169e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/amphp/pipeline/zipball/810dee498d2fd7d2c9247b32d95f38c92c13169e", + "reference": "810dee498d2fd7d2c9247b32d95f38c92c13169e", + "shasum": "" + }, + "require": { + "amphp/amp": "^3", + "php": ">=8.1", + "revolt/event-loop": "^1 || ^0.2" + }, + "require-dev": { + "amphp/php-cs-fixer-config": "^2", + "amphp/phpunit-util": "^3", + "phpunit/phpunit": "^9", + "psalm/phar": "^4.12" + }, + "type": "library", + "autoload": { + "psr-4": { + "Amp\\Pipeline\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Aaron Piotrowski", + "email": "aaron@trowski.com" + }, + { + "name": "Niklas Keller", + "email": "me@kelunik.com" + } + ], + "description": "Asynchronous iterators and operators.", + "homepage": "https://amphp.org/pipeline", + "keywords": [ + "amp", + "amphp", + "async", + "io", + "iterator", + "non-blocking" + ], + "support": { + "issues": "https://github.com/amphp/pipeline/issues", + "source": "https://github.com/amphp/pipeline/tree/v1.0.0" + }, + "funding": [ + { + "url": "https://github.com/amphp", + "type": "github" + } + ], + "time": "2022-12-22T02:13:01+00:00" + }, { "name": "amphp/postgres", - "version": "v1.4.5", + "version": "v2.0.0-beta.2", "source": { "type": "git", "url": "https://github.com/amphp/postgres.git", - "reference": "8e45076ac65870d58e2fe206ca23f3546b60bf03" + "reference": "70599b5a1851efad8b4ab6617db35dcbbd41f589" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/amphp/postgres/zipball/8e45076ac65870d58e2fe206ca23f3546b60bf03", - "reference": "8e45076ac65870d58e2fe206ca23f3546b60bf03", + "url": "https://api.github.com/repos/amphp/postgres/zipball/70599b5a1851efad8b4ab6617db35dcbbd41f589", + "reference": "70599b5a1851efad8b4ab6617db35dcbbd41f589", "shasum": "" }, "require": { - "amphp/amp": "^2", - "amphp/sql": "^1", - "amphp/sql-common": "^1", - "php": ">=7.1" + "amphp/amp": "^3", + "amphp/pipeline": "^1", + "amphp/sql": "^2", + "amphp/sql-common": "^2", + "php": ">=8.1" }, "require-dev": { - "amphp/php-cs-fixer-config": "dev-master", - "amphp/phpunit-util": "^1.1.2", + "amphp/php-cs-fixer-config": "^2-dev", + "amphp/phpunit-util": "^3", "ext-pgsql": "*", "ext-pq": "*", - "phpunit/phpunit": "^8 | ^7" + "phpunit/phpunit": "^9", + "psalm/phar": "^4.10" }, "type": "library", "autoload": { @@ -1284,7 +1372,7 @@ } ], "description": "Asynchronous PostgreSQL client for Amp.", - "homepage": "http://amphp.org", + "homepage": "https://amphp.org", "keywords": [ "async", "asynchronous", @@ -1296,7 +1384,7 @@ ], "support": { "issues": "https://github.com/amphp/postgres/issues", - "source": "https://github.com/amphp/postgres/tree/v1.4.5" + "source": "https://github.com/amphp/postgres/tree/v2.0.0-beta.2" }, "funding": [ { @@ -1304,39 +1392,42 @@ "type": "github" } ], - "time": "2023-01-06T04:36:07+00:00" + "time": "2022-12-18T22:45:21+00:00" }, { "name": "amphp/process", - "version": "v1.1.4", + "version": "v2.0.0", "source": { "type": "git", "url": "https://github.com/amphp/process.git", - "reference": "76e9495fd6818b43a20167cb11d8a67f7744ee0f" + "reference": "9c9247fe8283b22e00a254746bf822da4b0b5ea4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/amphp/process/zipball/76e9495fd6818b43a20167cb11d8a67f7744ee0f", - "reference": "76e9495fd6818b43a20167cb11d8a67f7744ee0f", + "url": "https://api.github.com/repos/amphp/process/zipball/9c9247fe8283b22e00a254746bf822da4b0b5ea4", + "reference": "9c9247fe8283b22e00a254746bf822da4b0b5ea4", "shasum": "" }, "require": { - "amphp/amp": "^2", - "amphp/byte-stream": "^1.4", - "php": ">=7" + "amphp/amp": "^3", + "amphp/byte-stream": "^2", + "amphp/sync": "^2", + "php": ">=8.1", + "revolt/event-loop": "^1 || ^0.2" }, "require-dev": { - "amphp/php-cs-fixer-config": "dev-master", - "amphp/phpunit-util": "^1", - "phpunit/phpunit": "^6" + "amphp/php-cs-fixer-config": "^2", + "amphp/phpunit-util": "^3", + "phpunit/phpunit": "^9", + "psalm/phar": "^5.4" }, "type": "library", "autoload": { "files": [ - "lib/functions.php" + "src/functions.php" ], "psr-4": { - "Amp\\Process\\": "lib" + "Amp\\Process\\": "src" } }, "notification-url": "https://packagist.org/downloads/", @@ -1357,11 +1448,11 @@ "email": "me@kelunik.com" } ], - "description": "Asynchronous process manager.", - "homepage": "https://github.com/amphp/process", + "description": "A fiber-aware process manager based on Amp and Revolt.", + "homepage": "https://amphp.org/process", "support": { "issues": "https://github.com/amphp/process/issues", - "source": "https://github.com/amphp/process/tree/v1.1.4" + "source": "https://github.com/amphp/process/tree/v2.0.0" }, "funding": [ { @@ -1369,38 +1460,47 @@ "type": "github" } ], - "time": "2022-07-06T23:50:12+00:00" + "time": "2023-01-09T21:32:38+00:00" }, { "name": "amphp/redis", - "version": "v1.1.0", + "version": "v2.0.0-beta.3", "source": { "type": "git", "url": "https://github.com/amphp/redis.git", - "reference": "07eb1248874926b4e03ae2fe3be81f42e992ede9" + "reference": "6a19255ae5b1393b4347e613b2aa4f323e916e8e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/amphp/redis/zipball/07eb1248874926b4e03ae2fe3be81f42e992ede9", - "reference": "07eb1248874926b4e03ae2fe3be81f42e992ede9", + "url": "https://api.github.com/repos/amphp/redis/zipball/6a19255ae5b1393b4347e613b2aa4f323e916e8e", + "reference": "6a19255ae5b1393b4347e613b2aa4f323e916e8e", "shasum": "" }, "require": { - "amphp/amp": "^2.2.1", - "amphp/cache": "^1.2.1", - "amphp/socket": "^1", - "amphp/sync": "^1.1", + "amphp/amp": "^3", + "amphp/byte-stream": "^2", + "amphp/cache": "^2", + "amphp/pipeline": "^1", + "amphp/serialization": "^1", + "amphp/socket": "^2", + "amphp/sync": "^2", + "league/uri": "^6.5", "league/uri-parser": "^1.4", - "php": ">=7.1" + "php": ">=8.1", + "psr/log": "^1|^2|^3", + "revolt/event-loop": "^1 || ^0.2.4" }, "require-dev": { - "amphp/php-cs-fixer-config": "dev-master", - "amphp/phpunit-util": "^1.1.2", - "phpunit/phpunit": "^7 | ^8" + "amphp/php-cs-fixer-config": "^2-dev", + "amphp/phpunit-util": "^3", + "amphp/process": "^2", + "phpunit/phpunit": "^9", + "psalm/phar": "^4.22" }, "type": "library", "autoload": { "files": [ + "src/Connection/functions.php", "src/functions.php" ], "psr-4": { @@ -1428,7 +1528,7 @@ ], "support": { "issues": "https://github.com/amphp/redis/issues", - "source": "https://github.com/amphp/redis/tree/v1.1.0" + "source": "https://github.com/amphp/redis/tree/v2.0.0-beta.3" }, "funding": [ { @@ -1436,7 +1536,7 @@ "type": "github" } ], - "time": "2023-02-18T19:03:10+00:00" + "time": "2022-11-07T22:43:56+00:00" }, { "name": "amphp/serialization", @@ -1498,43 +1598,41 @@ }, { "name": "amphp/socket", - "version": "v1.2.0", + "version": "v2.1.0", "source": { "type": "git", "url": "https://github.com/amphp/socket.git", - "reference": "a8af9f5d0a66c5fe9567da45a51509e592788fe6" + "reference": "70a72fb8b4fbc0117b65c6fb927651ecb8a4b325" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/amphp/socket/zipball/a8af9f5d0a66c5fe9567da45a51509e592788fe6", - "reference": "a8af9f5d0a66c5fe9567da45a51509e592788fe6", + "url": "https://api.github.com/repos/amphp/socket/zipball/70a72fb8b4fbc0117b65c6fb927651ecb8a4b325", + "reference": "70a72fb8b4fbc0117b65c6fb927651ecb8a4b325", "shasum": "" }, "require": { - "amphp/amp": "^2", - "amphp/byte-stream": "^1.6", - "amphp/dns": "^1 || ^0.9", + "amphp/amp": "^3", + "amphp/byte-stream": "^2", + "amphp/dns": "^2", "ext-openssl": "*", "kelunik/certificate": "^1.1", - "league/uri-parser": "^1.4", - "php": ">=7.1" + "league/uri": "^6.5", + "php": ">=8.1", + "revolt/event-loop": "^1 || ^0.2" }, "require-dev": { - "amphp/php-cs-fixer-config": "dev-master", - "amphp/phpunit-util": "^1", - "phpunit/phpunit": "^6 || ^7 || ^8", - "vimeo/psalm": "^3.9@dev" + "amphp/php-cs-fixer-config": "^2", + "amphp/phpunit-util": "^3", + "amphp/process": "^2", + "phpunit/phpunit": "^9", + "psalm/phar": "^5.4" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.x-dev" - } - }, "autoload": { "files": [ "src/functions.php", - "src/Internal/functions.php" + "src/Internal/functions.php", + "src/SocketAddress/functions.php" ], "psr-4": { "Amp\\Socket\\": "src" @@ -1558,7 +1656,7 @@ "email": "me@kelunik.com" } ], - "description": "Async socket connection / server tools for Amp.", + "description": "Non-blocking socket connection / server implementations based on Amp and Revolt.", "homepage": "https://github.com/amphp/socket", "keywords": [ "amp", @@ -1571,7 +1669,7 @@ ], "support": { "issues": "https://github.com/amphp/socket/issues", - "source": "https://github.com/amphp/socket/tree/v1.2.0" + "source": "https://github.com/amphp/socket/tree/v2.1.0" }, "funding": [ { @@ -1579,29 +1677,31 @@ "type": "github" } ], - "time": "2021-07-09T18:18:48+00:00" + "time": "2023-04-06T16:56:35+00:00" }, { "name": "amphp/sql", - "version": "v1.0.2", + "version": "v2.0.0-beta.3", "source": { "type": "git", "url": "https://github.com/amphp/sql.git", - "reference": "5a1dcfd9a3c3518826c616b4d0b0fa0363f087fa" + "reference": "1f93ed0e0d3d7e61c3a6fc1dace3dbe5aeb6e675" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/amphp/sql/zipball/5a1dcfd9a3c3518826c616b4d0b0fa0363f087fa", - "reference": "5a1dcfd9a3c3518826c616b4d0b0fa0363f087fa", + "url": "https://api.github.com/repos/amphp/sql/zipball/1f93ed0e0d3d7e61c3a6fc1dace3dbe5aeb6e675", + "reference": "1f93ed0e0d3d7e61c3a6fc1dace3dbe5aeb6e675", "shasum": "" }, "require": { - "amphp/amp": "^2", - "php": ">=7.1" + "amphp/amp": "^3", + "php": ">=8.1" }, "require-dev": { - "amphp/php-cs-fixer-config": "dev-master", - "phpunit/phpunit": "^8" + "amphp/php-cs-fixer-config": "^2-dev", + "amphp/phpunit-util": "^3", + "phpunit/phpunit": "^9", + "psalm/phar": "^4.10" }, "type": "library", "autoload": { @@ -1614,7 +1714,7 @@ "MIT" ], "description": "Asynchronous SQL client for Amp.", - "homepage": "http://amphp.org", + "homepage": "https://amphp.org", "keywords": [ "async", "asynchronous", @@ -1624,7 +1724,7 @@ ], "support": { "issues": "https://github.com/amphp/sql/issues", - "source": "https://github.com/amphp/sql/tree/v1.0.2" + "source": "https://github.com/amphp/sql/tree/v2.0.0-beta.3" }, "funding": [ { @@ -1632,31 +1732,32 @@ "type": "github" } ], - "time": "2022-12-18T22:54:18+00:00" + "time": "2022-12-18T03:44:57+00:00" }, { "name": "amphp/sql-common", - "version": "v1.1.4", + "version": "v2.0.0-beta.3", "source": { "type": "git", "url": "https://github.com/amphp/sql-common.git", - "reference": "6ed5b96d26528bd56213ebb867a2992e7a0b8278" + "reference": "9fef16bed8b437b2fc43a52ee98679b89ebd32ef" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/amphp/sql-common/zipball/6ed5b96d26528bd56213ebb867a2992e7a0b8278", - "reference": "6ed5b96d26528bd56213ebb867a2992e7a0b8278", + "url": "https://api.github.com/repos/amphp/sql-common/zipball/9fef16bed8b437b2fc43a52ee98679b89ebd32ef", + "reference": "9fef16bed8b437b2fc43a52ee98679b89ebd32ef", "shasum": "" }, "require": { - "amphp/amp": "^2", - "amphp/sql": "^1", - "php": ">=7" + "amphp/amp": "^3", + "amphp/sql": "^2", + "php": ">=8.1" }, "require-dev": { - "amphp/php-cs-fixer-config": "dev-master", - "amphp/phpunit-util": "^1.3", - "phpunit/phpunit": "^6 || ^7 || ^8 || ^9" + "amphp/php-cs-fixer-config": "^2-dev", + "amphp/phpunit-util": "^3", + "phpunit/phpunit": "^9", + "psalm/phar": "^4.10" }, "type": "library", "autoload": { @@ -1669,7 +1770,7 @@ "MIT" ], "description": "Common classes for non-blocking SQL implementations.", - "homepage": "http://amphp.org", + "homepage": "https://amphp.org", "keywords": [ "async", "asynchronous", @@ -1679,7 +1780,7 @@ ], "support": { "issues": "https://github.com/amphp/sql-common/issues", - "source": "https://github.com/amphp/sql-common/tree/v1.1.4" + "source": "https://github.com/amphp/sql-common/tree/v2.0.0-beta.3" }, "funding": [ { @@ -1687,36 +1788,39 @@ "type": "github" } ], - "time": "2023-01-06T04:22:36+00:00" + "time": "2022-12-18T05:14:36+00:00" }, { "name": "amphp/sync", - "version": "v1.4.2", + "version": "v2.0.0", "source": { "type": "git", "url": "https://github.com/amphp/sync.git", - "reference": "85ab06764f4f36d63b1356b466df6111cf4b89cf" + "reference": "ad8a0e80cc586cece4f8ce57460f8bbf442ba8fc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/amphp/sync/zipball/85ab06764f4f36d63b1356b466df6111cf4b89cf", - "reference": "85ab06764f4f36d63b1356b466df6111cf4b89cf", + "url": "https://api.github.com/repos/amphp/sync/zipball/ad8a0e80cc586cece4f8ce57460f8bbf442ba8fc", + "reference": "ad8a0e80cc586cece4f8ce57460f8bbf442ba8fc", "shasum": "" }, "require": { - "amphp/amp": "^2.2", - "php": ">=7.1" + "amphp/amp": "^3", + "amphp/pipeline": "^1", + "amphp/serialization": "^1", + "php": ">=8.1", + "revolt/event-loop": "^1 || ^0.2" }, "require-dev": { - "amphp/php-cs-fixer-config": "dev-master", - "amphp/phpunit-util": "^1.1", - "phpunit/phpunit": "^9 || ^8 || ^7" + "amphp/php-cs-fixer-config": "^2", + "amphp/phpunit-util": "^3", + "phpunit/phpunit": "^9", + "psalm/phar": "^5.4" }, "type": "library", "autoload": { "files": [ - "src/functions.php", - "src/ConcurrentIterator/functions.php" + "src/functions.php" ], "psr-4": { "Amp\\Sync\\": "src" @@ -1731,12 +1835,16 @@ "name": "Aaron Piotrowski", "email": "aaron@trowski.com" }, + { + "name": "Niklas Keller", + "email": "me@kelunik.com" + }, { "name": "Stephen Coakley", "email": "me@stephencoakley.com" } ], - "description": "Mutex, Semaphore, and other synchronization tools for Amp.", + "description": "Non-blocking synchronization primitives for PHP based on Amp and Revolt.", "homepage": "https://github.com/amphp/sync", "keywords": [ "async", @@ -1747,7 +1855,7 @@ ], "support": { "issues": "https://github.com/amphp/sync/issues", - "source": "https://github.com/amphp/sync/tree/v1.4.2" + "source": "https://github.com/amphp/sync/tree/v2.0.0" }, "funding": [ { @@ -1755,34 +1863,36 @@ "type": "github" } ], - "time": "2021-10-25T18:29:10+00:00" + "time": "2022-12-30T22:11:37+00:00" }, { "name": "amphp/websocket", - "version": "v1.0.3", + "version": "v2.0.0-beta.4", "source": { "type": "git", "url": "https://github.com/amphp/websocket.git", - "reference": "248e9dc1be0477932cd1788e5002b0aabf66f179" + "reference": "1bdf01a832ff85677e2cf200cde1096a7d66179a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/amphp/websocket/zipball/248e9dc1be0477932cd1788e5002b0aabf66f179", - "reference": "248e9dc1be0477932cd1788e5002b0aabf66f179", + "url": "https://api.github.com/repos/amphp/websocket/zipball/1bdf01a832ff85677e2cf200cde1096a7d66179a", + "reference": "1bdf01a832ff85677e2cf200cde1096a7d66179a", "shasum": "" }, "require": { - "amphp/amp": "^2.2", - "amphp/byte-stream": "^1.6.1", - "amphp/socket": "^1", - "cash/lrucache": "^1", - "php": ">=7.1" + "amphp/amp": "^3", + "amphp/byte-stream": "^2", + "amphp/parser": "^1", + "amphp/pipeline": "^1", + "amphp/socket": "^2", + "php": ">=8.1", + "revolt/event-loop": "^1 || ^0.2.4" }, "require-dev": { - "amphp/php-cs-fixer-config": "dev-master", - "amphp/phpunit-util": "^1.1.2", - "phpunit/phpunit": "^8 || ^7", - "vimeo/psalm": "^3.11@dev" + "amphp/php-cs-fixer-config": "^2", + "amphp/phpunit-util": "^3", + "phpunit/phpunit": "^9", + "psalm/phar": "^5.4" }, "suggest": { "ext-zlib": "Required for compression" @@ -1826,7 +1936,7 @@ ], "support": { "issues": "https://github.com/amphp/websocket/issues", - "source": "https://github.com/amphp/websocket/tree/v1.0.3" + "source": "https://github.com/amphp/websocket/tree/v2.0.0-beta.4" }, "funding": [ { @@ -1834,40 +1944,42 @@ "type": "github" } ], - "time": "2022-04-11T23:45:31+00:00" + "time": "2023-02-06T04:25:31+00:00" }, { "name": "amphp/websocket-client", - "version": "v1.0.1", + "version": "v2.0.0-beta.2", "source": { "type": "git", "url": "https://github.com/amphp/websocket-client.git", - "reference": "bcf5262e66abec420896a7893b7a08e9e2e655e8" + "reference": "fee0aa6ae98efb0a4eea588382f64e11aa248498" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/amphp/websocket-client/zipball/bcf5262e66abec420896a7893b7a08e9e2e655e8", - "reference": "bcf5262e66abec420896a7893b7a08e9e2e655e8", + "url": "https://api.github.com/repos/amphp/websocket-client/zipball/fee0aa6ae98efb0a4eea588382f64e11aa248498", + "reference": "fee0aa6ae98efb0a4eea588382f64e11aa248498", "shasum": "" }, "require": { - "amphp/amp": "^2.2", - "amphp/http": "^1.3", - "amphp/http-client": "^4", - "amphp/socket": "^1", - "amphp/websocket": "^1", + "amphp/amp": "^3", + "amphp/byte-stream": "^2", + "amphp/http": "^2-dev", + "amphp/http-client": "^5", + "amphp/socket": "^2", + "amphp/websocket": "^2", "league/uri": "^6", - "php": ">=7.2", - "psr/http-message": "^1" + "php": ">=8.1", + "psr/http-message": "^1", + "revolt/event-loop": "^1 || ^0.2.4" }, "require-dev": { - "amphp/http-server": "^2", - "amphp/php-cs-fixer-config": "dev-master", - "amphp/phpunit-util": "^1.1", - "amphp/websocket-server": "dev-master as 2.0-rc4", - "phpunit/phpunit": "^8 || ^7", - "psr/log": "^1", - "vimeo/psalm": "^3.11@dev" + "amphp/http-server": "^3", + "amphp/php-cs-fixer-config": "^2", + "amphp/phpunit-util": "^3", + "amphp/websocket-server": "^3", + "phpunit/phpunit": "^9", + "psalm/phar": "^5.4", + "psr/log": "^1" }, "type": "library", "autoload": { @@ -1908,7 +2020,7 @@ ], "support": { "issues": "https://github.com/amphp/websocket-client/issues", - "source": "https://github.com/amphp/websocket-client/tree/v1.0.1" + "source": "https://github.com/amphp/websocket-client/tree/v2.0.0-beta.2" }, "funding": [ { @@ -1916,41 +2028,43 @@ "type": "github" } ], - "time": "2022-03-10T09:54:59+00:00" + "time": "2023-02-06T05:26:05+00:00" }, { "name": "amphp/websocket-server", - "version": "v2.0.0", + "version": "v3.0.0-beta.2", "source": { "type": "git", "url": "https://github.com/amphp/websocket-server.git", - "reference": "5cb850e9681a9e551635b946fdb1fa2372a8abe8" + "reference": "d3a7b9623fdddb01bfa87274d037eff5654559d1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/amphp/websocket-server/zipball/5cb850e9681a9e551635b946fdb1fa2372a8abe8", - "reference": "5cb850e9681a9e551635b946fdb1fa2372a8abe8", + "url": "https://api.github.com/repos/amphp/websocket-server/zipball/d3a7b9623fdddb01bfa87274d037eff5654559d1", + "reference": "d3a7b9623fdddb01bfa87274d037eff5654559d1", "shasum": "" }, "require": { - "amphp/amp": "^2.2", - "amphp/byte-stream": "^1.6.1", - "amphp/http": "^1.3", - "amphp/http-server": "^2", - "amphp/socket": "^1", - "amphp/websocket": "^1", - "php": ">=7.2" + "amphp/amp": "^3", + "amphp/byte-stream": "^2", + "amphp/http": "^2-dev", + "amphp/http-server": "^3", + "amphp/socket": "^2", + "amphp/websocket": "^2", + "php": ">=8.1", + "psr/log": "^1|^2|^3", + "revolt/event-loop": "^1 || ^0.2.4" }, "require-dev": { - "amphp/http-client": "^4", - "amphp/http-server-router": "^1.0.2", - "amphp/http-server-static-content": "^1.0.4", - "amphp/log": "^1", - "amphp/php-cs-fixer-config": "dev-master", - "amphp/phpunit-util": "^1.3", + "amphp/http-client": "^5", + "amphp/http-server-router": "^2", + "amphp/http-server-static-content": "^2", + "amphp/log": "^2", + "amphp/php-cs-fixer-config": "^2", + "amphp/phpunit-util": "^3", "league/climate": "^3", - "phpunit/phpunit": "^9 || ^8 || ^7", - "vimeo/psalm": "^3.11@dev" + "phpunit/phpunit": "^9", + "psalm/phar": "^5.4" }, "suggest": { "ext-zlib": "Required for compression" @@ -1991,36 +2105,43 @@ ], "support": { "issues": "https://github.com/amphp/websocket-server/issues", - "source": "https://github.com/amphp/websocket-server/tree/v2.0.0" + "source": "https://github.com/amphp/websocket-server/tree/v3.0.0-beta.2" }, - "time": "2020-07-01T17:08:20+00:00" + "funding": [ + { + "url": "https://github.com/amphp", + "type": "github" + } + ], + "time": "2023-02-06T05:13:58+00:00" }, { "name": "amphp/windows-registry", - "version": "v0.3.3", + "version": "v1.0.0", "source": { "type": "git", "url": "https://github.com/amphp/windows-registry.git", - "reference": "0f56438b9197e224325e88f305346f0221df1f71" + "reference": "8248247a41af7f97b88e4716c0f8de39696ef111" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/amphp/windows-registry/zipball/0f56438b9197e224325e88f305346f0221df1f71", - "reference": "0f56438b9197e224325e88f305346f0221df1f71", + "url": "https://api.github.com/repos/amphp/windows-registry/zipball/8248247a41af7f97b88e4716c0f8de39696ef111", + "reference": "8248247a41af7f97b88e4716c0f8de39696ef111", "shasum": "" }, "require": { - "amphp/amp": "^2", - "amphp/byte-stream": "^1.4", - "amphp/process": "^1" + "amphp/byte-stream": "^2", + "amphp/process": "^2", + "php": ">=8.1" }, "require-dev": { - "amphp/php-cs-fixer-config": "dev-master" + "amphp/php-cs-fixer-config": "^2", + "psalm/phar": "^5.4" }, "type": "library", "autoload": { "psr-4": { - "Amp\\WindowsRegistry\\": "lib" + "Amp\\WindowsRegistry\\": "src" } }, "notification-url": "https://packagist.org/downloads/", @@ -2036,7 +2157,7 @@ "description": "Windows Registry Reader.", "support": { "issues": "https://github.com/amphp/windows-registry/issues", - "source": "https://github.com/amphp/windows-registry/tree/master" + "source": "https://github.com/amphp/windows-registry/tree/v1.0.0" }, "funding": [ { @@ -2044,83 +2165,40 @@ "type": "github" } ], - "time": "2020-07-10T16:13:29+00:00" - }, - { - "name": "cash/lrucache", - "version": "1.0.0", - "source": { - "type": "git", - "url": "https://github.com/cash/LRUCache.git", - "reference": "4fa4c6834cec59690b43526c4da41d6153026289" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/cash/LRUCache/zipball/4fa4c6834cec59690b43526c4da41d6153026289", - "reference": "4fa4c6834cec59690b43526c4da41d6153026289", - "shasum": "" - }, - "require": { - "php": ">=5.3.0" - }, - "type": "library", - "autoload": { - "psr-0": { - "cash": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Cash Costello", - "email": "cash.costello@gmail.com" - } - ], - "description": "An efficient memory-based Least Recently Used (LRU) cache", - "homepage": "https://github.com/cash/LRUCache", - "keywords": [ - "cache", - "lru" - ], - "support": { - "issues": "https://github.com/cash/LRUCache/issues", - "source": "https://github.com/cash/LRUCache/tree/1.0.0" - }, - "time": "2013-09-20T18:59:12+00:00" + "time": "2023-01-09T22:29:20+00:00" }, { "name": "danog/dns-over-https", - "version": "0.2.6", + "version": "v1.0.0-beta4", "source": { "type": "git", "url": "https://github.com/danog/dns-over-https.git", - "reference": "a288be1f4fdd4ce9838e98bfa96407fcfdd099b3" + "reference": "5094c943caa383cd2a77920b363ca9a4c530b1ba" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/danog/dns-over-https/zipball/a288be1f4fdd4ce9838e98bfa96407fcfdd099b3", - "reference": "a288be1f4fdd4ce9838e98bfa96407fcfdd099b3", + "url": "https://api.github.com/repos/danog/dns-over-https/zipball/5094c943caa383cd2a77920b363ca9a4c530b1ba", + "reference": "5094c943caa383cd2a77920b363ca9a4c530b1ba", "shasum": "" }, "require": { - "amphp/amp": "^2", - "amphp/cache": "^1", - "amphp/dns": "^1", - "amphp/http-client": "^4", + "amphp/amp": "^3", + "amphp/cache": "^2", + "amphp/dns": "^2", + "amphp/http-client": "^5", "amphp/parser": "^1", - "danog/libdns-json": "^0.1", + "amphp/socket": "^2", + "danog/libdns-json": "^0.2", "daverandom/libdns": "^2.0.1", "ext-filter": "*", "ext-json": "*", - "php": ">=7.0" + "php": ">=8.1" }, "require-dev": { - "amphp/php-cs-fixer-config": "dev-master", - "amphp/phpunit-util": "^1", - "phpunit/phpunit": "^6" + "amphp/php-cs-fixer-config": "^2", + "amphp/phpunit-util": "^3", + "phpunit/phpunit": "^9", + "psalm/phar": "^5" }, "type": "library", "autoload": { @@ -2173,35 +2251,36 @@ ], "support": { "issues": "https://github.com/danog/dns-over-https/issues", - "source": "https://github.com/danog/dns-over-https/tree/0.2.6" + "source": "https://github.com/danog/dns-over-https/tree/v1.0.0-beta4" }, - "time": "2019-12-27T14:35:55+00:00" + "time": "2023-02-15T17:28:06+00:00" }, { "name": "danog/ipc", - "version": "0.1.15", + "version": "1.0.0", "source": { "type": "git", "url": "https://github.com/danog/ipc.git", - "reference": "6bbd35f057746dba2baad58465fca1a93302bf67" + "reference": "ab6a5af03950e61846b36e65301e2bc278581a39" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/danog/ipc/zipball/6bbd35f057746dba2baad58465fca1a93302bf67", - "reference": "6bbd35f057746dba2baad58465fca1a93302bf67", + "url": "https://api.github.com/repos/danog/ipc/zipball/ab6a5af03950e61846b36e65301e2bc278581a39", + "reference": "ab6a5af03950e61846b36e65301e2bc278581a39", "shasum": "" }, "require": { - "amphp/byte-stream": "^1", + "amphp/byte-stream": "^2", "amphp/parser": "^1", - "php": ">=7.1" + "php": ">=8.1" }, "require-dev": { - "amphp/amp": "^2.4", - "amphp/parallel": "^1.3", - "amphp/php-cs-fixer-config": "dev-master", - "amphp/phpunit-util": "^1.3", - "phpunit/phpunit": "^7 | ^8 | ^9" + "amphp/amp": "v3.x-dev", + "amphp/parallel": "v2.x-dev", + "amphp/php-cs-fixer-config": "v2.x-dev", + "amphp/phpunit-util": "v3.x-dev", + "phpunit/phpunit": "^9", + "psalm/phar": "^5" }, "type": "library", "autoload": { @@ -2241,32 +2320,33 @@ ], "support": { "issues": "https://github.com/danog/ipc/issues", - "source": "https://github.com/danog/ipc/tree/0.1.15" + "source": "https://github.com/danog/ipc/tree/1.0.0" }, - "time": "2021-09-24T16:32:52+00:00" + "time": "2023-02-14T13:19:59+00:00" }, { "name": "danog/libdns-json", - "version": "0.1.1", + "version": "0.2.0", "source": { "type": "git", "url": "https://github.com/danog/LibDNSJson.git", - "reference": "7d5e07815d57afa64ef7cdbe1a65fbead9a3e7bd" + "reference": "a49d7930943666b86eb9f33e8305376a724280b9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/danog/LibDNSJson/zipball/7d5e07815d57afa64ef7cdbe1a65fbead9a3e7bd", - "reference": "7d5e07815d57afa64ef7cdbe1a65fbead9a3e7bd", + "url": "https://api.github.com/repos/danog/LibDNSJson/zipball/a49d7930943666b86eb9f33e8305376a724280b9", + "reference": "a49d7930943666b86eb9f33e8305376a724280b9", "shasum": "" }, "require": { "daverandom/libdns": "^2.0.1", "ext-json": "*", - "php": ">=7.0" + "php": ">=8.1" }, "require-dev": { - "amphp/php-cs-fixer-config": "dev-master", - "phpunit/phpunit": "^6" + "amphp/php-cs-fixer-config": "v2.x-dev", + "phpunit/phpunit": "^9", + "psalm/phar": "^5.1" }, "type": "library", "autoload": { @@ -2279,13 +2359,13 @@ "MIT" ], "authors": [ - { - "name": "Chris Wright", - "email": "addr@daverandom.com" - }, { "name": "Daniil Gentili", "email": "daniil@daniil.it" + }, + { + "name": "Chris Wright", + "email": "addr@daverandom.com" } ], "description": "Encoder/decoder for google's JSON DNS message format based on libdns", @@ -2301,33 +2381,33 @@ ], "support": { "issues": "https://github.com/danog/LibDNSJson/issues", - "source": "https://github.com/danog/LibDNSJson/tree/master" + "source": "https://github.com/danog/LibDNSJson/tree/0.2.0" }, - "time": "2019-07-14T14:59:51+00:00" + "time": "2022-12-05T21:13:49+00:00" }, { "name": "danog/loop", - "version": "0.1.1", + "version": "1.0.3", "source": { "type": "git", "url": "https://github.com/danog/loop.git", - "reference": "b1941cc6a7b2eede57d11a6ead464ee70793bc3f" + "reference": "bf3ef5d4d26fe1b61109f19e3f84b89cb76f37fb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/danog/loop/zipball/b1941cc6a7b2eede57d11a6ead464ee70793bc3f", - "reference": "b1941cc6a7b2eede57d11a6ead464ee70793bc3f", + "url": "https://api.github.com/repos/danog/loop/zipball/bf3ef5d4d26fe1b61109f19e3f84b89cb76f37fb", + "reference": "bf3ef5d4d26fe1b61109f19e3f84b89cb76f37fb", "shasum": "" }, "require": { - "amphp/amp": "^2", - "php": ">=7.1" + "amphp/amp": "^3", + "php": ">=8.1" }, "require-dev": { - "amphp/php-cs-fixer-config": "dev-master", - "amphp/phpunit-util": "^1.3", - "phpunit/phpunit": "^7 | ^8 | ^9", - "vimeo/psalm": "dev-master" + "amphp/php-cs-fixer-config": "^2", + "amphp/phpunit-util": "^3", + "phpunit/phpunit": "^9", + "psalm/phar": "dev-master" }, "type": "library", "autoload": { @@ -2356,7 +2436,7 @@ ], "support": { "issues": "https://github.com/danog/loop/issues", - "source": "https://github.com/danog/loop/tree/0.1.1" + "source": "https://github.com/danog/loop/tree/1.0.3" }, "funding": [ { @@ -2364,39 +2444,39 @@ "type": "github" } ], - "time": "2021-04-21T13:41:15+00:00" + "time": "2023-01-24T17:58:51+00:00" }, { "name": "danog/madelineproto", - "version": "7.0.144", + "version": "v8.x-dev", "source": { "type": "git", "url": "https://github.com/danog/MadelineProto.git", - "reference": "37fdcd57a3e8676f58e327f28acb39b4a127229b" + "reference": "31eff9db1fe27b60a84d35da3844fb8ee18e43bf" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/danog/MadelineProto/zipball/37fdcd57a3e8676f58e327f28acb39b4a127229b", - "reference": "37fdcd57a3e8676f58e327f28acb39b4a127229b", + "url": "https://api.github.com/repos/danog/MadelineProto/zipball/31eff9db1fe27b60a84d35da3844fb8ee18e43bf", + "reference": "31eff9db1fe27b60a84d35da3844fb8ee18e43bf", "shasum": "" }, "require": { - "amphp/amp": "^2", - "amphp/byte-stream": "^1", - "amphp/dns": "^1", - "amphp/file": "^2", - "amphp/http-client": "^4", - "amphp/http-client-cookies": "^1", - "amphp/log": "^1.1", - "amphp/mysql": "^2", - "amphp/postgres": "^1.2", - "amphp/redis": "^1.0", - "amphp/socket": "^1", - "amphp/websocket-client": "^1.0", - "danog/dns-over-https": "^0.2", - "danog/ipc": "^0.1", - "danog/loop": "^0.1.0", - "danog/magicalserializer": "^1.0", + "amphp/amp": "^3", + "amphp/byte-stream": "^2", + "amphp/dns": "^2", + "amphp/file": "^3", + "amphp/http": "^2", + "amphp/http-client": "^5", + "amphp/http-client-cookies": "^2", + "amphp/log": "^2", + "amphp/mysql": "^3", + "amphp/postgres": "^2", + "amphp/redis": "^2", + "amphp/socket": "^2", + "amphp/websocket-client": "^2", + "danog/dns-over-https": "^1", + "danog/ipc": "^1", + "danog/loop": "^1", "danog/primemodule": "^1", "danog/tg-file-decoder": "^0.1", "erusev/parsedown": "^1.7", @@ -2412,9 +2492,8 @@ "php-64bit": ">=8.1", "phpseclib/phpseclib": "^3", "psr/http-factory": "^1.0", - "psr/log": "^1|^2|^3", + "psr/log": "^3", "symfony/polyfill-mbstring": "*", - "symfony/polyfill-php80": "^1.18", "webmozart/assert": "^1.11" }, "conflict": { @@ -2422,8 +2501,11 @@ "krakjoe/pthreads-polyfill": "*" }, "require-dev": { - "bamarni/composer-bin-plugin": "1.5.0", + "amphp/http-server": "^3", + "amphp/phpunit-util": "^3", + "bamarni/composer-bin-plugin": "1.8.2", "danog/phpdoc": "^0.1.7", + "dg/bypass-finals": "dev-master", "ext-ctype": "*", "phpdocumentor/reflection-docblock": "^5.2", "phpunit/phpunit": "^9", @@ -2434,9 +2516,10 @@ "ext-ffi": "Install the primemodule and FFI extensions to speed up MadelineProto (https://prime.madelineproto.xyz)", "ext-gmp": "Install the gmp extension for faster crypto", "ext-openssl": "Install the openssl extension for faster crypto", - "ext-pdo": "Install pdo extension to support database used as cache", + "ext-pdo": "Install the pdo extension to store session data on MySQL or PostgreSQL", "ext-primemodule": "Install the primemodule and FFI extensions to speed up MadelineProto (https://prime.madelineproto.xyz)" }, + "default-branch": true, "type": "project", "extra": { "phabel": { @@ -2445,11 +2528,11 @@ }, "autoload": { "files": [ - "src/BigIntegor.php", - "src/polyfill.php" + "src/polyfill.php", + "src/loop.php" ], "psr-4": { - "danog\\MadelineProto\\": "src/danog/MadelineProto" + "danog\\MadelineProto\\": "src" } }, "notification-url": "https://packagist.org/downloads/", @@ -2480,7 +2563,7 @@ ], "support": { "issues": "https://github.com/danog/MadelineProto/issues", - "source": "https://github.com/danog/MadelineProto/tree/7.0.144" + "source": "https://github.com/danog/MadelineProto/tree/8.0.0-beta68" }, "funding": [ { @@ -2488,52 +2571,7 @@ "type": "github" } ], - "time": "2022-12-06T13:26:25+00:00" - }, - { - "name": "danog/magicalserializer", - "version": "1.0", - "source": { - "type": "git", - "url": "https://github.com/danog/MagicalSerializer.git", - "reference": "87b6ed05a86021e9364f31133089bb83980d5e24" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/danog/MagicalSerializer/zipball/87b6ed05a86021e9364f31133089bb83980d5e24", - "reference": "87b6ed05a86021e9364f31133089bb83980d5e24", - "shasum": "" - }, - "type": "library", - "autoload": { - "psr-0": { - "danog\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "AGPL-3.0-only" - ], - "authors": [ - { - "name": "Daniil Gentili", - "email": "daniil@daniil.it" - } - ], - "description": "Serialize Volatile, Threaded or any other internal PHP class!", - "homepage": "https://daniil.it/MagicalSerializer", - "keywords": [ - "pthreads", - "serializable", - "serialize", - "threading", - "volatile" - ], - "support": { - "issues": "https://github.com/danog/MagicalSerializer/issues", - "source": "https://github.com/danog/MagicalSerializer/tree/master" - }, - "time": "2018-02-20T10:35:49+00:00" + "time": "2023-04-03T10:07:27+00:00" }, { "name": "danog/primemodule", @@ -2901,6 +2939,96 @@ ], "time": "2022-09-13T19:58:47+00:00" }, + { + "name": "league/uri-components", + "version": "2.4.1", + "source": { + "type": "git", + "url": "https://github.com/thephpleague/uri-components.git", + "reference": "06f49e726a7fd06063e80f5f8b045fb9128e6c43" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/thephpleague/uri-components/zipball/06f49e726a7fd06063e80f5f8b045fb9128e6c43", + "reference": "06f49e726a7fd06063e80f5f8b045fb9128e6c43", + "shasum": "" + }, + "require": { + "ext-json": "*", + "league/uri-interfaces": "^2.3", + "php": "^7.4 || ^8.0", + "psr/http-message": "^1.0" + }, + "require-dev": { + "friendsofphp/php-cs-fixer": "^v3.8.0", + "guzzlehttp/psr7": "^2.2", + "laminas/laminas-diactoros": "^2.11.0", + "league/uri": "^6.0", + "phpstan/phpstan": "^1.7", + "phpstan/phpstan-deprecation-rules": "^1.0", + "phpstan/phpstan-phpunit": "^1.1", + "phpstan/phpstan-strict-rules": "^1.2", + "phpunit/phpunit": "^9.5.20" + }, + "suggest": { + "ext-fileinfo": "Needed to create Data URI from a filepath", + "ext-gmp": "to improve handle IPV4 parsing", + "ext-intl": "to handle IDN host", + "jeremykendall/php-domain-parser": "Public Suffix and Top Level Domain parsing implemented in PHP", + "league/uri": "to allow manipulating URI objects", + "php-64bit": "to improve handle IPV4 parsing", + "psr/http-message-implementation": "to allow manipulating PSR-7 Uri objects" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.x-dev" + } + }, + "autoload": { + "psr-4": { + "League\\Uri\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Ignace Nyamagana Butera", + "email": "nyamsprod@gmail.com", + "homepage": "https://nyamsprod.com" + } + ], + "description": "URI components manipulation library", + "homepage": "http://uri.thephpleague.com", + "keywords": [ + "authority", + "components", + "fragment", + "host", + "path", + "port", + "query", + "rfc3986", + "scheme", + "uri", + "url", + "userinfo" + ], + "support": { + "issues": "https://github.com/thephpleague/uri-components/issues", + "source": "https://github.com/thephpleague/uri-components/tree/2.4.1" + }, + "funding": [ + { + "url": "https://github.com/nyamsprod", + "type": "github" + } + ], + "time": "2022-05-26T05:50:46+00:00" + }, { "name": "league/uri-interfaces", "version": "2.3.0", @@ -3552,25 +3680,25 @@ }, { "name": "psr/http-message", - "version": "1.0.1", + "version": "1.1", "source": { "type": "git", "url": "https://github.com/php-fig/http-message.git", - "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363" + "reference": "cb6ce4845ce34a8ad9e68117c10ee90a29919eba" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/http-message/zipball/f6561bf28d520154e4b0ec72be95418abe6d9363", - "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363", + "url": "https://api.github.com/repos/php-fig/http-message/zipball/cb6ce4845ce34a8ad9e68117c10ee90a29919eba", + "reference": "cb6ce4845ce34a8ad9e68117c10ee90a29919eba", "shasum": "" }, "require": { - "php": ">=5.3.0" + "php": "^7.2 || ^8.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0.x-dev" + "dev-master": "1.1.x-dev" } }, "autoload": { @@ -3599,9 +3727,9 @@ "response" ], "support": { - "source": "https://github.com/php-fig/http-message/tree/master" + "source": "https://github.com/php-fig/http-message/tree/1.1" }, - "time": "2016-08-06T14:39:51+00:00" + "time": "2023-04-04T09:50:52+00:00" }, { "name": "psr/log", @@ -3654,44 +3782,37 @@ "time": "2021-07-14T16:46:02+00:00" }, { - "name": "symfony/polyfill-ctype", - "version": "v1.27.0", + "name": "revolt/event-loop", + "version": "v1.0.1", "source": { "type": "git", - "url": "https://github.com/symfony/polyfill-ctype.git", - "reference": "5bbc823adecdae860bb64756d639ecfec17b050a" + "url": "https://github.com/revoltphp/event-loop.git", + "reference": "9ac31d36635c60a9b28bb2a476384c5ec55c95cc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/5bbc823adecdae860bb64756d639ecfec17b050a", - "reference": "5bbc823adecdae860bb64756d639ecfec17b050a", + "url": "https://api.github.com/repos/revoltphp/event-loop/zipball/9ac31d36635c60a9b28bb2a476384c5ec55c95cc", + "reference": "9ac31d36635c60a9b28bb2a476384c5ec55c95cc", "shasum": "" }, "require": { - "php": ">=7.1" - }, - "provide": { - "ext-ctype": "*" + "php": ">=8.1" }, - "suggest": { - "ext-ctype": "For best performance" + "require-dev": { + "ext-json": "*", + "jetbrains/phpstorm-stubs": "^2019.3", + "phpunit/phpunit": "^9", + "psalm/phar": "^4.7" }, "type": "library", "extra": { "branch-alias": { - "dev-main": "1.27-dev" - }, - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" + "dev-main": "1.x-dev" } }, "autoload": { - "files": [ - "bootstrap.php" - ], "psr-4": { - "Symfony\\Polyfill\\Ctype\\": "" + "Revolt\\": "src" } }, "notification-url": "https://packagist.org/downloads/", @@ -3700,63 +3821,60 @@ ], "authors": [ { - "name": "Gert de Pagter", - "email": "BackEndTea@gmail.com" + "name": "Aaron Piotrowski", + "email": "aaron@trowski.com" }, { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony polyfill for ctype functions", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "ctype", - "polyfill", - "portable" - ], - "support": { - "source": "https://github.com/symfony/polyfill-ctype/tree/v1.27.0" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" + "name": "Cees-Jan Kiewiet", + "email": "ceesjank@gmail.com" }, { - "url": "https://github.com/fabpot", - "type": "github" + "name": "Christian Lück", + "email": "christian@clue.engineering" }, { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" + "name": "Niklas Keller", + "email": "me@kelunik.com" } ], - "time": "2022-11-03T14:55:06+00:00" + "description": "Rock-solid event loop for concurrent PHP applications.", + "keywords": [ + "async", + "asynchronous", + "concurrency", + "event", + "event-loop", + "non-blocking", + "scheduler" + ], + "support": { + "issues": "https://github.com/revoltphp/event-loop/issues", + "source": "https://github.com/revoltphp/event-loop/tree/v1.0.1" + }, + "time": "2023-04-02T16:25:26+00:00" }, { - "name": "symfony/polyfill-mbstring", + "name": "symfony/polyfill-ctype", "version": "v1.27.0", "source": { "type": "git", - "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "8ad114f6b39e2c98a8b0e3bd907732c207c2b534" + "url": "https://github.com/symfony/polyfill-ctype.git", + "reference": "5bbc823adecdae860bb64756d639ecfec17b050a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/8ad114f6b39e2c98a8b0e3bd907732c207c2b534", - "reference": "8ad114f6b39e2c98a8b0e3bd907732c207c2b534", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/5bbc823adecdae860bb64756d639ecfec17b050a", + "reference": "5bbc823adecdae860bb64756d639ecfec17b050a", "shasum": "" }, "require": { "php": ">=7.1" }, "provide": { - "ext-mbstring": "*" + "ext-ctype": "*" }, "suggest": { - "ext-mbstring": "For best performance" + "ext-ctype": "For best performance" }, "type": "library", "extra": { @@ -3773,7 +3891,7 @@ "bootstrap.php" ], "psr-4": { - "Symfony\\Polyfill\\Mbstring\\": "" + "Symfony\\Polyfill\\Ctype\\": "" } }, "notification-url": "https://packagist.org/downloads/", @@ -3782,25 +3900,24 @@ ], "authors": [ { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" + "name": "Gert de Pagter", + "email": "BackEndTea@gmail.com" }, { "name": "Symfony Community", "homepage": "https://symfony.com/contributors" } ], - "description": "Symfony polyfill for the Mbstring extension", + "description": "Symfony polyfill for ctype functions", "homepage": "https://symfony.com", "keywords": [ "compatibility", - "mbstring", + "ctype", "polyfill", - "portable", - "shim" + "portable" ], "support": { - "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.27.0" + "source": "https://github.com/symfony/polyfill-ctype/tree/v1.27.0" }, "funding": [ { @@ -3819,22 +3936,28 @@ "time": "2022-11-03T14:55:06+00:00" }, { - "name": "symfony/polyfill-php80", + "name": "symfony/polyfill-mbstring", "version": "v1.27.0", "source": { "type": "git", - "url": "https://github.com/symfony/polyfill-php80.git", - "reference": "7a6ff3f1959bb01aefccb463a0f2cd3d3d2fd936" + "url": "https://github.com/symfony/polyfill-mbstring.git", + "reference": "8ad114f6b39e2c98a8b0e3bd907732c207c2b534" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/7a6ff3f1959bb01aefccb463a0f2cd3d3d2fd936", - "reference": "7a6ff3f1959bb01aefccb463a0f2cd3d3d2fd936", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/8ad114f6b39e2c98a8b0e3bd907732c207c2b534", + "reference": "8ad114f6b39e2c98a8b0e3bd907732c207c2b534", "shasum": "" }, "require": { "php": ">=7.1" }, + "provide": { + "ext-mbstring": "*" + }, + "suggest": { + "ext-mbstring": "For best performance" + }, "type": "library", "extra": { "branch-alias": { @@ -3850,21 +3973,14 @@ "bootstrap.php" ], "psr-4": { - "Symfony\\Polyfill\\Php80\\": "" - }, - "classmap": [ - "Resources/stubs" - ] + "Symfony\\Polyfill\\Mbstring\\": "" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], "authors": [ - { - "name": "Ion Bazan", - "email": "ion.bazan@gmail.com" - }, { "name": "Nicolas Grekas", "email": "p@tchwork.com" @@ -3874,16 +3990,17 @@ "homepage": "https://symfony.com/contributors" } ], - "description": "Symfony polyfill backporting some PHP 8.0+ features to lower PHP versions", + "description": "Symfony polyfill for the Mbstring extension", "homepage": "https://symfony.com", "keywords": [ "compatibility", + "mbstring", "polyfill", "portable", "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php80/tree/v1.27.0" + "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.27.0" }, "funding": [ { @@ -4042,610 +4159,17 @@ "time": "2022-06-03T18:03:27+00:00" } ], - "packages-dev": [ - { - "name": "roave/security-advisories", - "version": "dev-master", - "source": { - "type": "git", - "url": "https://github.com/Roave/SecurityAdvisories.git", - "reference": "ad434708152844968e15adf8eb3f4a2d7066242e" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/Roave/SecurityAdvisories/zipball/ad434708152844968e15adf8eb3f4a2d7066242e", - "reference": "ad434708152844968e15adf8eb3f4a2d7066242e", - "shasum": "" - }, - "conflict": { - "3f/pygmentize": "<1.2", - "admidio/admidio": "<4.1.9", - "adodb/adodb-php": "<=5.20.20|>=5.21,<=5.21.3", - "aheinze/cockpit": "<=2.2.1", - "akaunting/akaunting": "<2.1.13", - "akeneo/pim-community-dev": "<5.0.119|>=6,<6.0.53", - "alextselegidis/easyappointments": "<1.5", - "alterphp/easyadmin-extension-bundle": ">=1.2,<1.2.11|>=1.3,<1.3.1", - "amazing/media2click": ">=1,<1.3.3", - "amphp/artax": "<1.0.6|>=2,<2.0.6", - "amphp/http": "<1.0.1", - "amphp/http-client": ">=4,<4.4", - "anchorcms/anchor-cms": "<=0.12.7", - "andreapollastri/cipi": "<=3.1.15", - "apereo/phpcas": "<1.6", - "api-platform/core": ">=2.2,<2.2.10|>=2.3,<2.3.6|>=2.6,<2.7.10|>=3,<3.0.12|>=3.1,<3.1.3", - "appwrite/server-ce": "<0.11.1|>=0.12,<0.12.2", - "arc/web": "<3", - "area17/twill": "<1.2.5|>=2,<2.5.3", - "asymmetricrypt/asymmetricrypt": ">=0,<9.9.99", - "automad/automad": "<1.8", - "awesome-support/awesome-support": "<=6.0.7", - "aws/aws-sdk-php": ">=3,<3.2.1", - "backdrop/backdrop": "<=1.23", - "badaso/core": "<2.7", - "bagisto/bagisto": "<0.1.5", - "barrelstrength/sprout-base-email": "<1.2.7", - "barrelstrength/sprout-forms": "<3.9", - "barryvdh/laravel-translation-manager": "<0.6.2", - "barzahlen/barzahlen-php": "<2.0.1", - "baserproject/basercms": "<4.7.2", - "bassjobsen/bootstrap-3-typeahead": ">4.0.2", - "billz/raspap-webgui": "<=2.6.6", - "bk2k/bootstrap-package": ">=7.1,<7.1.2|>=8,<8.0.8|>=9,<9.0.4|>=9.1,<9.1.3|>=10,<10.0.10|>=11,<11.0.3", - "bmarshall511/wordpress_zero_spam": "<5.2.13", - "bolt/bolt": "<3.7.2", - "bolt/core": "<=4.2", - "bottelet/flarepoint": "<2.2.1", - "brightlocal/phpwhois": "<=4.2.5", - "brotkrueml/codehighlight": "<2.7", - "brotkrueml/schema": "<1.13.1|>=2,<2.5.1", - "brotkrueml/typo3-matomo-integration": "<1.3.2", - "buddypress/buddypress": "<7.2.1", - "bugsnag/bugsnag-laravel": ">=2,<2.0.2", - "bytefury/crater": "<6.0.2", - "cachethq/cachet": "<2.5.1", - "cakephp/cakephp": "<3.10.3|>=4,<4.0.10|>=4.2,<4.2.12|>=4.3,<4.3.11|>=4.4,<4.4.10|= 1.3.7|>=4.1,<4.1.4", - "cakephp/database": ">=4.2,<4.2.12|>=4.3,<4.3.11|>=4.4,<4.4.10", - "cardgate/magento2": "<2.0.33", - "cart2quote/module-quotation": ">=4.1.6,<=4.4.5|>=5,<5.4.4", - "cartalyst/sentry": "<=2.1.6", - "catfan/medoo": "<1.7.5", - "centreon/centreon": "<22.10-beta.1", - "cesnet/simplesamlphp-module-proxystatistics": "<3.1", - "cockpit-hq/cockpit": "<2.4.1", - "codeception/codeception": "<3.1.3|>=4,<4.1.22", - "codeigniter/framework": "<=3.0.6", - "codeigniter4/framework": "<4.2.11", - "codeigniter4/shield": "<1-beta.4|= 1.0.0-beta", - "codiad/codiad": "<=2.8.4", - "composer/composer": "<1.10.26|>=2-alpha.1,<2.2.12|>=2.3,<2.3.5", - "concrete5/concrete5": "<=9.1.3|>= 9.0.0RC1, < 9.1.3", - "concrete5/core": "<8.5.8|>=9,<9.1", - "contao-components/mediaelement": ">=2.14.2,<2.21.1", - "contao/contao": ">=4,<4.4.56|>=4.5,<4.9.18|>=4.10,<4.11.7|>=4.13,<4.13.3", - "contao/core": ">=2,<3.5.39", - "contao/core-bundle": "<4.9.18|>=4.10,<4.11.7|>=4.13,<4.13.3|= 4.10.0", - "contao/listing-bundle": ">=4,<4.4.8", - "contao/managed-edition": "<=1.5", - "craftcms/cms": "<3.7.64|>= 4.0.0-RC1, < 4.3.7|>= 4.0.0-RC1, < 4.2.1", - "croogo/croogo": "<3.0.7", - "cuyz/valinor": "<0.12", - "czproject/git-php": "<4.0.3", - "darylldoyle/safe-svg": "<1.9.10", - "datadog/dd-trace": ">=0.30,<0.30.2", - "david-garcia/phpwhois": "<=4.3.1", - "dbrisinajumi/d2files": "<1", - "derhansen/fe_change_pwd": "<2.0.5|>=3,<3.0.3", - "derhansen/sf_event_mgt": "<4.3.1|>=5,<5.1.1", - "directmailteam/direct-mail": "<5.2.4", - "doctrine/annotations": ">=1,<1.2.7", - "doctrine/cache": ">=1,<1.3.2|>=1.4,<1.4.2", - "doctrine/common": ">=2,<2.4.3|>=2.5,<2.5.1", - "doctrine/dbal": ">=2,<2.0.8|>=2.1,<2.1.2|>=3,<3.1.4", - "doctrine/doctrine-bundle": "<1.5.2", - "doctrine/doctrine-module": "<=0.7.1", - "doctrine/mongodb-odm": ">=1,<1.0.2", - "doctrine/mongodb-odm-bundle": ">=2,<3.0.1", - "doctrine/orm": ">=2,<2.4.8|>=2.5,<2.5.1|>=2.8.3,<2.8.4", - "dolibarr/dolibarr": "<16|>=16.0.1,<16.0.3|= 12.0.5|>= 3.3.beta1, < 13.0.2", - "dompdf/dompdf": "<2.0.2|= 2.0.2", - "drupal/core": ">=7,<7.91|>=8,<9.3.19|>=9.4,<9.4.3", - "drupal/drupal": ">=7,<7.80|>=8,<8.9.16|>=9,<9.1.12|>=9.2,<9.2.4", - "dweeves/magmi": "<=0.7.24", - "ecodev/newsletter": "<=4", - "ectouch/ectouch": "<=2.7.2", - "elefant/cms": "<1.3.13", - "elgg/elgg": "<3.3.24|>=4,<4.0.5", - "encore/laravel-admin": "<=1.8.19", - "endroid/qr-code-bundle": "<3.4.2", - "enshrined/svg-sanitize": "<0.15", - "erusev/parsedown": "<1.7.2", - "ether/logs": "<3.0.4", - "exceedone/exment": "<4.4.3|>=5,<5.0.3", - "exceedone/laravel-admin": "= 3.0.0|<2.2.3", - "ezsystems/demobundle": ">=5.4,<5.4.6.1", - "ezsystems/ez-support-tools": ">=2.2,<2.2.3", - "ezsystems/ezdemo-ls-extension": ">=5.4,<5.4.2.1", - "ezsystems/ezfind-ls": ">=5.3,<5.3.6.1|>=5.4,<5.4.11.1|>=2017.12,<2017.12.0.1", - "ezsystems/ezplatform": "<=1.13.6|>=2,<=2.5.24", - "ezsystems/ezplatform-admin-ui": ">=1.3,<1.3.5|>=1.4,<1.4.6|>=1.5,<1.5.29|>=2.3,<2.3.26", - "ezsystems/ezplatform-admin-ui-assets": ">=4,<4.2.1|>=5,<5.0.1|>=5.1,<5.1.1", - "ezsystems/ezplatform-graphql": ">=1-rc.1,<1.0.13|>=2-beta.1,<2.3.12", - "ezsystems/ezplatform-kernel": "<1.2.5.1|>=1.3,<1.3.26", - "ezsystems/ezplatform-rest": ">=1.2,<=1.2.2|>=1.3,<1.3.8", - "ezsystems/ezplatform-richtext": ">=2.3,<=2.3.7", - "ezsystems/ezplatform-user": ">=1,<1.0.1", - "ezsystems/ezpublish-kernel": "<6.13.8.2|>=7,<7.5.30", - "ezsystems/ezpublish-legacy": "<=2017.12.7.3|>=2018.6,<=2019.3.5.1", - "ezsystems/platform-ui-assets-bundle": ">=4.2,<4.2.3", - "ezsystems/repository-forms": ">=2.3,<2.3.2.1|>=2.5,<2.5.15", - "ezyang/htmlpurifier": "<4.1.1", - "facade/ignition": "<1.16.15|>=2,<2.4.2|>=2.5,<2.5.2", - "facturascripts/facturascripts": "<=2022.8", - "feehi/cms": "<=2.1.1", - "feehi/feehicms": "<=2.1.1", - "fenom/fenom": "<=2.12.1", - "filegator/filegator": "<7.8", - "firebase/php-jwt": "<6", - "fixpunkt/fp-masterquiz": "<2.2.1|>=3,<3.5.2", - "fixpunkt/fp-newsletter": "<1.1.1|>=2,<2.1.2|>=2.2,<3.2.6", - "flarum/core": "<1.7", - "flarum/mentions": "<1.6.3", - "flarum/sticky": ">=0.1-beta.14,<=0.1-beta.15", - "flarum/tags": "<=0.1-beta.13", - "fluidtypo3/vhs": "<5.1.1", - "fof/byobu": ">=0.3-beta.2,<1.1.7", - "fof/upload": "<1.2.3", - "fooman/tcpdf": "<6.2.22", - "forkcms/forkcms": "<5.11.1", - "fossar/tcpdf-parser": "<6.2.22", - "francoisjacquet/rosariosis": "<10.8.2", - "frappant/frp-form-answers": "<3.1.2|>=4,<4.0.2", - "friendsofsymfony/oauth2-php": "<1.3", - "friendsofsymfony/rest-bundle": ">=1.2,<1.2.2", - "friendsofsymfony/user-bundle": ">=1.2,<1.3.5", - "friendsoftypo3/mediace": ">=7.6.2,<7.6.5", - "froala/wysiwyg-editor": "<3.2.7", - "froxlor/froxlor": "<2.0.13", - "fuel/core": "<1.8.1", - "funadmin/funadmin": "<=3.2", - "gaoming13/wechat-php-sdk": "<=1.10.2", - "genix/cms": "<=1.1.11", - "getgrav/grav": "<1.7.34", - "getkirby/cms": "= 3.8.0|<3.5.8.2|>=3.6,<3.6.6.2|>=3.7,<3.7.5.1", - "getkirby/panel": "<2.5.14", - "getkirby/starterkit": "<=3.7.0.2", - "gilacms/gila": "<=1.11.4", - "globalpayments/php-sdk": "<2", - "google/protobuf": "<3.15", - "gos/web-socket-bundle": "<1.10.4|>=2,<2.6.1|>=3,<3.3", - "gree/jose": "<2.2.1", - "gregwar/rst": "<1.0.3", - "grumpydictator/firefly-iii": "<5.8", - "guzzlehttp/guzzle": "<6.5.8|>=7,<7.4.5", - "guzzlehttp/psr7": "<1.8.4|>=2,<2.1.1", - "harvesthq/chosen": "<1.8.7", - "helloxz/imgurl": "= 2.31|<=2.31", - "hillelcoren/invoice-ninja": "<5.3.35", - "himiklab/yii2-jqgrid-widget": "<1.0.8", - "hjue/justwriting": "<=1", - "hov/jobfair": "<1.0.13|>=2,<2.0.2", - "hyn/multi-tenant": ">=5.6,<5.7.2", - "ibexa/admin-ui": ">=4.2,<4.2.3", - "ibexa/core": ">=4,<4.0.7|>=4.1,<4.1.4|>=4.2,<4.2.3", - "ibexa/graphql": ">=2.5,<2.5.31|>=3.3,<3.3.28|>=4.2,<4.2.3", - "ibexa/post-install": "<=1.0.4", - "icecoder/icecoder": "<=8.1", - "idno/known": "<=1.3.1", - "illuminate/auth": ">=4,<4.0.99|>=4.1,<=4.1.31|>=4.2,<=4.2.22|>=5,<=5.0.35|>=5.1,<=5.1.46|>=5.2,<=5.2.45|>=5.3,<=5.3.31|>=5.4,<=5.4.36|>=5.5,<5.5.10", - "illuminate/cookie": ">=4,<=4.0.11|>=4.1,<=4.1.99999|>=4.2,<=4.2.99999|>=5,<=5.0.99999|>=5.1,<=5.1.99999|>=5.2,<=5.2.99999|>=5.3,<=5.3.99999|>=5.4,<=5.4.99999|>=5.5,<=5.5.49|>=5.6,<=5.6.99999|>=5.7,<=5.7.99999|>=5.8,<=5.8.99999|>=6,<6.18.31|>=7,<7.22.4", - "illuminate/database": "<6.20.26|>=7,<7.30.5|>=8,<8.40", - "illuminate/encryption": ">=4,<=4.0.11|>=4.1,<=4.1.31|>=4.2,<=4.2.22|>=5,<=5.0.35|>=5.1,<=5.1.46|>=5.2,<=5.2.45|>=5.3,<=5.3.31|>=5.4,<=5.4.36|>=5.5,<5.5.40|>=5.6,<5.6.15", - "illuminate/view": "<6.20.42|>=7,<7.30.6|>=8,<8.75", - "impresscms/impresscms": "<=1.4.3", - "in2code/femanager": "<5.5.3|>=6,<6.3.4|>=7,<7.1", - "in2code/lux": "<17.6.1|>=18,<24.0.2", - "innologi/typo3-appointments": "<2.0.6", - "intelliants/subrion": "<=4.2.1", - "islandora/islandora": ">=2,<2.4.1", - "ivankristianto/phpwhois": "<=4.3", - "jackalope/jackalope-doctrine-dbal": "<1.7.4", - "james-heinrich/getid3": "<1.9.21", - "jasig/phpcas": "<1.3.3", - "joomla/archive": "<1.1.12|>=2,<2.0.1", - "joomla/filesystem": "<1.6.2|>=2,<2.0.1", - "joomla/filter": "<1.4.4|>=2,<2.0.1", - "joomla/input": ">=2,<2.0.2", - "joomla/session": "<1.3.1", - "joyqi/hyper-down": "<=2.4.27", - "jsdecena/laracom": "<2.0.9", - "jsmitty12/phpwhois": "<5.1", - "kazist/phpwhois": "<=4.2.6", - "kelvinmo/simplexrd": "<3.1.1", - "kevinpapst/kimai2": "<1.16.7", - "kimai/kimai": "<1.1", - "kitodo/presentation": "<3.1.2", - "klaviyo/magento2-extension": ">=1,<3", - "knplabs/knp-snappy": "<=1.4.1", - "krayin/laravel-crm": "<1.2.2", - "kreait/firebase-php": ">=3.2,<3.8.1", - "la-haute-societe/tcpdf": "<6.2.22", - "laminas/laminas-diactoros": "<2.11.1", - "laminas/laminas-form": "<2.17.1|>=3,<3.0.2|>=3.1,<3.1.1", - "laminas/laminas-http": "<2.14.2", - "laravel/fortify": "<1.11.1", - "laravel/framework": "<6.20.42|>=7,<7.30.6|>=8,<8.75", - "laravel/socialite": ">=1,<1.0.99|>=2,<2.0.10", - "latte/latte": "<2.10.8", - "lavalite/cms": "<=5.8", - "lcobucci/jwt": ">=3.4,<3.4.6|>=4,<4.0.4|>=4.1,<4.1.5", - "league/commonmark": "<0.18.3", - "league/flysystem": "<1.1.4|>=2,<2.1.1", - "lexik/jwt-authentication-bundle": "<2.10.7|>=2.11,<2.11.3", - "librenms/librenms": "<22.10", - "liftkit/database": "<2.13.2", - "limesurvey/limesurvey": "<3.27.19", - "livehelperchat/livehelperchat": "<=3.91", - "livewire/livewire": ">2.2.4,<2.2.6", - "lms/routes": "<2.1.1", - "localizationteam/l10nmgr": "<7.4|>=8,<8.7|>=9,<9.2", - "luyadev/yii-helpers": "<1.2.1", - "magento/community-edition": ">=2,<2.2.10|>=2.3,<2.3.3", - "magento/magento1ce": "<1.9.4.3", - "magento/magento1ee": ">=1,<1.14.4.3", - "magento/product-community-edition": ">=2,<2.2.10|>=2.3,<2.3.2-p.2", - "maikuolan/phpmussel": ">=1,<1.6", - "mantisbt/mantisbt": "<=2.25.5", - "marcwillmann/turn": "<0.3.3", - "matyhtf/framework": "<3.0.6", - "mautic/core": "<4.3|= 2.13.1", - "mediawiki/core": ">=1.27,<1.27.6|>=1.29,<1.29.3|>=1.30,<1.30.2|>=1.31,<1.31.9|>=1.32,<1.32.6|>=1.32.99,<1.33.3|>=1.33.99,<1.34.3|>=1.34.99,<1.35", - "mediawiki/matomo": "<2.4.3", - "melisplatform/melis-asset-manager": "<5.0.1", - "melisplatform/melis-cms": "<5.0.1", - "melisplatform/melis-front": "<5.0.1", - "mezzio/mezzio-swoole": "<3.7|>=4,<4.3", - "mgallegos/laravel-jqgrid": "<=1.3", - "microweber/microweber": "<=1.3.2", - "miniorange/miniorange-saml": "<1.4.3", - "mittwald/typo3_forum": "<1.2.1", - "mobiledetect/mobiledetectlib": "<2.8.32", - "modx/revolution": "<= 2.8.3-pl|<2.8", - "mojo42/jirafeau": "<4.4", - "monolog/monolog": ">=1.8,<1.12", - "moodle/moodle": "<4.0.6|= 3.11|>=4.1-beta,<4.1.1", - "mustache/mustache": ">=2,<2.14.1", - "namshi/jose": "<2.2", - "neoan3-apps/template": "<1.1.1", - "neorazorx/facturascripts": "<2022.4", - "neos/flow": ">=1,<1.0.4|>=1.1,<1.1.1|>=2,<2.0.1|>=2.3,<2.3.16|>=3,<3.0.12|>=3.1,<3.1.10|>=3.2,<3.2.13|>=3.3,<3.3.13|>=4,<4.0.6", - "neos/form": ">=1.2,<4.3.3|>=5,<5.0.9|>=5.1,<5.1.3", - "neos/neos": ">=1.1,<1.1.3|>=1.2,<1.2.13|>=2,<2.0.4|>=2.3,<2.9.99|>=3,<3.0.20|>=3.1,<3.1.18|>=3.2,<3.2.14|>=3.3,<5.3.10|>=7,<7.0.9|>=7.1,<7.1.7|>=7.2,<7.2.6|>=7.3,<7.3.4|>=8,<8.0.2", - "neos/swiftmailer": ">=4.1,<4.1.99|>=5.4,<5.4.5", - "netgen/tagsbundle": ">=3.4,<3.4.11|>=4,<4.0.15", - "nette/application": ">=2,<2.0.19|>=2.1,<2.1.13|>=2.2,<2.2.10|>=2.3,<2.3.14|>=2.4,<2.4.16|>=3,<3.0.6", - "nette/nette": ">=2,<2.0.19|>=2.1,<2.1.13", - "nilsteampassnet/teampass": "<3.0.0.23", - "notrinos/notrinos-erp": "<=0.7", - "noumo/easyii": "<=0.9", - "nukeviet/nukeviet": "<4.5.2", - "nystudio107/craft-seomatic": "<3.4.12", - "nzo/url-encryptor-bundle": ">=4,<4.3.2|>=5,<5.0.1", - "october/backend": "<1.1.2", - "october/cms": "= 1.1.1|= 1.0.471|= 1.0.469|>=1.0.319,<1.0.469", - "october/october": ">=1.0.319,<1.0.466|>=2.1,<2.1.12", - "october/rain": "<1.0.472|>=1.1,<1.1.2", - "october/system": "<1.0.476|>=1.1,<1.1.12|>=2,<2.2.34|>=3,<3.0.66", - "onelogin/php-saml": "<2.10.4", - "oneup/uploader-bundle": "<1.9.3|>=2,<2.1.5", - "open-web-analytics/open-web-analytics": "<1.7.4", - "opencart/opencart": "<=3.0.3.7", - "openid/php-openid": "<2.3", - "openmage/magento-lts": "<19.4.22|>=20,<20.0.19", - "orchid/platform": ">=9,<9.4.4", - "oro/commerce": ">=4.1,<5.0.6", - "oro/crm": ">=1.7,<1.7.4|>=3.1,<4.1.17|>=4.2,<4.2.7", - "oro/platform": ">=1.7,<1.7.4|>=3.1,<3.1.29|>=4.1,<4.1.17|>=4.2,<4.2.8", - "packbackbooks/lti-1-3-php-library": "<5", - "padraic/humbug_get_contents": "<1.1.2", - "pagarme/pagarme-php": ">=0,<3", - "pagekit/pagekit": "<=1.0.18", - "paragonie/random_compat": "<2", - "passbolt/passbolt_api": "<2.11", - "paypal/merchant-sdk-php": "<3.12", - "pear/archive_tar": "<1.4.14", - "pear/crypt_gpg": "<1.6.7", - "pegasus/google-for-jobs": "<1.5.1|>=2,<2.1.1", - "personnummer/personnummer": "<3.0.2", - "phanan/koel": "<5.1.4", - "php-mod/curl": "<2.3.2", - "phpfastcache/phpfastcache": "<6.1.5|>=7,<7.1.2|>=8,<8.0.7", - "phpmailer/phpmailer": "<6.5", - "phpmussel/phpmussel": ">=1,<1.6", - "phpmyadmin/phpmyadmin": "<5.2.1", - "phpmyfaq/phpmyfaq": "<=3.1.7", - "phpoffice/phpexcel": "<1.8", - "phpoffice/phpspreadsheet": "<1.16", - "phpseclib/phpseclib": "<2.0.31|>=3,<3.0.19", - "phpservermon/phpservermon": "<=3.5.2", - "phpunit/phpunit": ">=4.8.19,<4.8.28|>=5,<5.6.3", - "phpwhois/phpwhois": "<=4.2.5", - "phpxmlrpc/extras": "<0.6.1", - "phpxmlrpc/phpxmlrpc": "<4.9.2", - "pimcore/data-hub": "<1.2.4", - "pimcore/pimcore": "<11", - "pixelfed/pixelfed": "<=0.11.4", - "pocketmine/bedrock-protocol": "<8.0.2", - "pocketmine/pocketmine-mp": "<4.12.5|>= 4.0.0-BETA5, < 4.4.2", - "pressbooks/pressbooks": "<5.18", - "prestashop/autoupgrade": ">=4,<4.10.1", - "prestashop/blockwishlist": ">=2,<2.1.1", - "prestashop/contactform": ">=1.0.1,<4.3", - "prestashop/gamification": "<2.3.2", - "prestashop/prestashop": "<8.0.1", - "prestashop/productcomments": "<5.0.2", - "prestashop/ps_emailsubscription": "<2.6.1", - "prestashop/ps_facetedsearch": "<3.4.1", - "prestashop/ps_linklist": "<3.1", - "privatebin/privatebin": "<1.4", - "processwire/processwire": "<=3.0.200", - "propel/propel": ">=2-alpha.1,<=2-alpha.7", - "propel/propel1": ">=1,<=1.7.1", - "pterodactyl/panel": "<1.7", - "ptrofimov/beanstalk_console": "<1.7.14", - "pusher/pusher-php-server": "<2.2.1", - "pwweb/laravel-core": "<=0.3.6-beta", - "pyrocms/pyrocms": "<=3.9.1", - "rainlab/debugbar-plugin": "<3.1", - "rankmath/seo-by-rank-math": "<=1.0.95", - "react/http": ">=0.7,<1.7", - "remdex/livehelperchat": "<3.99", - "rmccue/requests": ">=1.6,<1.8", - "robrichards/xmlseclibs": "<3.0.4", - "roots/soil": "<4.1", - "rudloff/alltube": "<3.0.3", - "s-cart/core": "<6.9", - "s-cart/s-cart": "<6.9", - "sabberworm/php-css-parser": ">=1,<1.0.1|>=2,<2.0.1|>=3,<3.0.1|>=4,<4.0.1|>=5,<5.0.9|>=5.1,<5.1.3|>=5.2,<5.2.1|>=6,<6.0.2|>=7,<7.0.4|>=8,<8.0.1|>=8.1,<8.1.1|>=8.2,<8.2.1|>=8.3,<8.3.1", - "sabre/dav": ">=1.6,<1.6.99|>=1.7,<1.7.11|>=1.8,<1.8.9", - "scheb/two-factor-bundle": ">=0,<3.26|>=4,<4.11", - "sensiolabs/connect": "<4.2.3", - "serluck/phpwhois": "<=4.2.6", - "shopware/core": "<=6.4.18", - "shopware/platform": "<=6.4.18", - "shopware/production": "<=6.3.5.2", - "shopware/shopware": "<=5.7.14", - "shopware/storefront": "<=6.4.8.1", - "shopxo/shopxo": "<2.2.6", - "showdoc/showdoc": "<2.10.4", - "silverstripe/admin": ">=1,<1.11.3", - "silverstripe/assets": ">=1,<1.11.1", - "silverstripe/cms": "<4.11.3", - "silverstripe/comments": ">=1.3,<1.9.99|>=2,<2.9.99|>=3,<3.1.1", - "silverstripe/forum": "<=0.6.1|>=0.7,<=0.7.3", - "silverstripe/framework": "<4.11.14", - "silverstripe/graphql": "<3.5.2|>=4-alpha.1,<4-alpha.2|>=4.1.1,<4.1.2|>=4.2.2,<4.2.3|= 4.0.0-alpha1", - "silverstripe/hybridsessions": ">=1,<2.4.1|>=2.5,<2.5.1", - "silverstripe/registry": ">=2.1,<2.1.2|>=2.2,<2.2.1", - "silverstripe/restfulserver": ">=1,<1.0.9|>=2,<2.0.4", - "silverstripe/silverstripe-omnipay": "<2.5.2|>=3,<3.0.2|>=3.1,<3.1.4|>=3.2,<3.2.1", - "silverstripe/subsites": ">=2,<2.6.1", - "silverstripe/taxonomy": ">=1.3,<1.3.1|>=2,<2.0.1", - "silverstripe/userforms": "<3", - "silverstripe/versioned-admin": ">=1,<1.11.1", - "simple-updates/phpwhois": "<=1", - "simplesamlphp/saml2": "<1.10.6|>=2,<2.3.8|>=3,<3.1.4", - "simplesamlphp/simplesamlphp": "<1.18.6", - "simplesamlphp/simplesamlphp-module-infocard": "<1.0.1", - "simplesamlphp/simplesamlphp-module-openid": "<1", - "simplesamlphp/simplesamlphp-module-openidprovider": "<0.9", - "simplito/elliptic-php": "<1.0.6", - "slim/slim": "<2.6", - "smarty/smarty": "<3.1.47|>=4,<4.2.1", - "snipe/snipe-it": "<=6.0.14|>= 6.0.0-RC-1, <= 6.0.0-RC-5", - "socalnick/scn-social-auth": "<1.15.2", - "socialiteproviders/steam": "<1.1", - "spatie/browsershot": "<3.57.4", - "spipu/html2pdf": "<5.2.4", - "spoonity/tcpdf": "<6.2.22", - "squizlabs/php_codesniffer": ">=1,<2.8.1|>=3,<3.0.1", - "ssddanbrown/bookstack": "<22.2.3", - "statamic/cms": "<3.2.39|>=3.3,<3.3.2", - "stormpath/sdk": ">=0,<9.9.99", - "studio-42/elfinder": "<2.1.59", - "subrion/cms": "<=4.2.1", - "sukohi/surpass": "<1", - "sulu/sulu": "= 2.4.0-RC1|<1.6.44|>=2,<2.2.18|>=2.3,<2.3.8", - "sumocoders/framework-user-bundle": "<1.4", - "swag/paypal": "<5.4.4", - "swiftmailer/swiftmailer": ">=4,<5.4.5", - "sylius/admin-bundle": ">=1,<1.0.17|>=1.1,<1.1.9|>=1.2,<1.2.2", - "sylius/grid": ">=1,<1.1.19|>=1.2,<1.2.18|>=1.3,<1.3.13|>=1.4,<1.4.5|>=1.5,<1.5.1", - "sylius/grid-bundle": "<1.10.1", - "sylius/paypal-plugin": ">=1,<1.2.4|>=1.3,<1.3.1", - "sylius/resource-bundle": "<1.3.14|>=1.4,<1.4.7|>=1.5,<1.5.2|>=1.6,<1.6.4", - "sylius/sylius": "<1.9.10|>=1.10,<1.10.11|>=1.11,<1.11.2", - "symbiote/silverstripe-multivaluefield": ">=3,<3.0.99", - "symbiote/silverstripe-queuedjobs": ">=3,<3.0.2|>=3.1,<3.1.4|>=4,<4.0.7|>=4.1,<4.1.2|>=4.2,<4.2.4|>=4.3,<4.3.3|>=4.4,<4.4.3|>=4.5,<4.5.1|>=4.6,<4.6.4", - "symbiote/silverstripe-seed": "<6.0.3", - "symbiote/silverstripe-versionedfiles": "<=2.0.3", - "symfont/process": ">=0", - "symfony/cache": ">=3.1,<3.4.35|>=4,<4.2.12|>=4.3,<4.3.8", - "symfony/dependency-injection": ">=2,<2.0.17|>=2.7,<2.7.51|>=2.8,<2.8.50|>=3,<3.4.26|>=4,<4.1.12|>=4.2,<4.2.7", - "symfony/error-handler": ">=4.4,<4.4.4|>=5,<5.0.4", - "symfony/form": ">=2.3,<2.3.35|>=2.4,<2.6.12|>=2.7,<2.7.50|>=2.8,<2.8.49|>=3,<3.4.20|>=4,<4.0.15|>=4.1,<4.1.9|>=4.2,<4.2.1", - "symfony/framework-bundle": ">=2,<2.3.18|>=2.4,<2.4.8|>=2.5,<2.5.2|>=2.7,<2.7.51|>=2.8,<2.8.50|>=3,<3.4.26|>=4,<4.1.12|>=4.2,<4.2.7|>=5.3.14,<=5.3.14|>=5.4.3,<=5.4.3|>=6.0.3,<=6.0.3|= 6.0.3|= 5.4.3|= 5.3.14", - "symfony/http-foundation": ">=2,<2.8.52|>=3,<3.4.35|>=4,<4.2.12|>=4.3,<4.3.8|>=4.4,<4.4.7|>=5,<5.0.7", - "symfony/http-kernel": ">=2,<4.4.50|>=5,<5.4.20|>=6,<6.0.20|>=6.1,<6.1.12|>=6.2,<6.2.6", - "symfony/intl": ">=2.7,<2.7.38|>=2.8,<2.8.31|>=3,<3.2.14|>=3.3,<3.3.13", - "symfony/maker-bundle": ">=1.27,<1.29.2|>=1.30,<1.31.1", - "symfony/mime": ">=4.3,<4.3.8", - "symfony/phpunit-bridge": ">=2.8,<2.8.50|>=3,<3.4.26|>=4,<4.1.12|>=4.2,<4.2.7", - "symfony/polyfill": ">=1,<1.10", - "symfony/polyfill-php55": ">=1,<1.10", - "symfony/proxy-manager-bridge": ">=2.7,<2.7.51|>=2.8,<2.8.50|>=3,<3.4.26|>=4,<4.1.12|>=4.2,<4.2.7", - "symfony/routing": ">=2,<2.0.19", - "symfony/security": ">=2,<2.7.51|>=2.8,<3.4.49|>=4,<4.4.24|>=5,<5.2.8", - "symfony/security-bundle": ">=2,<4.4.50|>=5,<5.4.20|>=6,<6.0.20|>=6.1,<6.1.12|>=6.2,<6.2.6", - "symfony/security-core": ">=2.4,<2.6.13|>=2.7,<2.7.9|>=2.7.30,<2.7.32|>=2.8,<3.4.49|>=4,<4.4.24|>=5,<5.2.9", - "symfony/security-csrf": ">=2.4,<2.7.48|>=2.8,<2.8.41|>=3,<3.3.17|>=3.4,<3.4.11|>=4,<4.0.11", - "symfony/security-guard": ">=2.8,<3.4.48|>=4,<4.4.23|>=5,<5.2.8", - "symfony/security-http": ">=2.3,<2.3.41|>=2.4,<2.7.51|>=2.8,<2.8.50|>=3,<3.4.26|>=4,<4.2.12|>=4.3,<4.3.8|>=4.4,<4.4.7|>=5,<5.0.7|>=5.1,<5.2.8|>=5.3,<5.3.2", - "symfony/serializer": ">=2,<2.0.11|>=4.1,<4.4.35|>=5,<5.3.12", - "symfony/symfony": ">=2,<4.4.50|>=5,<5.4.20|>=6,<6.0.20|>=6.1,<6.1.12|>=6.2,<6.2.6", - "symfony/translation": ">=2,<2.0.17", - "symfony/validator": ">=2,<2.0.24|>=2.1,<2.1.12|>=2.2,<2.2.5|>=2.3,<2.3.3", - "symfony/var-exporter": ">=4.2,<4.2.12|>=4.3,<4.3.8", - "symfony/web-profiler-bundle": ">=2,<2.3.19|>=2.4,<2.4.9|>=2.5,<2.5.4", - "symfony/yaml": ">=2,<2.0.22|>=2.1,<2.1.7", - "t3/dce": ">=2.2,<2.6.2", - "t3g/svg-sanitizer": "<1.0.3", - "tastyigniter/tastyigniter": "<3.3", - "tecnickcom/tcpdf": "<6.2.22", - "terminal42/contao-tablelookupwizard": "<3.3.5", - "thelia/backoffice-default-template": ">=2.1,<2.1.2", - "thelia/thelia": ">=2.1-beta.1,<2.1.3", - "theonedemon/phpwhois": "<=4.2.5", - "thinkcmf/thinkcmf": "<=5.1.7", - "thorsten/phpmyfaq": "<3.1.11", - "tinymce/tinymce": "<5.10.7|>=6,<6.3.1", - "tinymighty/wiki-seo": "<1.2.2", - "titon/framework": ">=0,<9.9.99", - "tobiasbg/tablepress": "<= 2.0-RC1", - "topthink/framework": "<6.0.14", - "topthink/think": "<=6.1.1", - "topthink/thinkphp": "<=3.2.3", - "tribalsystems/zenario": "<=9.3.57595", - "truckersmp/phpwhois": "<=4.3.1", - "ttskch/pagination-service-provider": "<1", - "twig/twig": "<1.44.7|>=2,<2.15.3|>=3,<3.4.3", - "typo3/cms": "<2.0.5|>=3,<3.0.3|>=6.2,<6.2.30|>=7,<7.6.32|>=8,<8.7.38|>=9,<9.5.29|>=10,<10.4.35|>=11,<11.5.23|>=12,<12.2", - "typo3/cms-backend": ">=7,<=7.6.50|>=8,<=8.7.39|>=9,<=9.5.24|>=10,<=10.4.13|>=11,<=11.1", - "typo3/cms-core": "<8.7.51|>=9,<9.5.40|>=10,<10.4.36|>=11,<11.5.23|>=12,<12.2", - "typo3/cms-form": ">=8,<=8.7.39|>=9,<=9.5.24|>=10,<=10.4.13|>=11,<=11.1", - "typo3/flow": ">=1,<1.0.4|>=1.1,<1.1.1|>=2,<2.0.1|>=2.3,<2.3.16|>=3,<3.0.12|>=3.1,<3.1.10|>=3.2,<3.2.13|>=3.3,<3.3.13|>=4,<4.0.6", - "typo3/html-sanitizer": ">=1,<1.5|>=2,<2.1.1", - "typo3/neos": ">=1.1,<1.1.3|>=1.2,<1.2.13|>=2,<2.0.4|>=2.3,<2.3.99|>=3,<3.0.20|>=3.1,<3.1.18|>=3.2,<3.2.14|>=3.3,<3.3.23|>=4,<4.0.17|>=4.1,<4.1.16|>=4.2,<4.2.12|>=4.3,<4.3.3", - "typo3/phar-stream-wrapper": ">=1,<2.1.1|>=3,<3.1.1", - "typo3/swiftmailer": ">=4.1,<4.1.99|>=5.4,<5.4.5", - "typo3fluid/fluid": ">=2,<2.0.8|>=2.1,<2.1.7|>=2.2,<2.2.4|>=2.3,<2.3.7|>=2.4,<2.4.4|>=2.5,<2.5.11|>=2.6,<2.6.10", - "ua-parser/uap-php": "<3.8", - "unisharp/laravel-filemanager": "<=2.5.1", - "userfrosting/userfrosting": ">=0.3.1,<4.6.3", - "usmanhalalit/pixie": "<1.0.3|>=2,<2.0.2", - "uvdesk/community-skeleton": "<1.1", - "vanilla/safecurl": "<0.9.2", - "verot/class.upload.php": "<=1.0.3|>=2,<=2.0.4", - "vova07/yii2-fileapi-widget": "<0.1.9", - "vrana/adminer": "<4.8.1", - "wallabag/tcpdf": "<6.2.22", - "wallabag/wallabag": "<2.5.4", - "wanglelecc/laracms": "<=1.0.3", - "web-auth/webauthn-framework": ">=3.3,<3.3.4", - "webbuilders-group/silverstripe-kapost-bridge": "<0.4", - "webcoast/deferred-image-processing": "<1.0.2", - "webpa/webpa": "<3.1.2", - "wikimedia/parsoid": "<0.12.2", - "willdurand/js-translation-bundle": "<2.1.1", - "wintercms/winter": "<1.0.475|>=1.1,<1.1.10|>=1.2,<1.2.1", - "woocommerce/woocommerce": "<6.6", - "wp-cli/wp-cli": "<2.5", - "wp-graphql/wp-graphql": "<0.3.5", - "wpanel/wpanel4-cms": "<=4.3.1", - "wpcloud/wp-stateless": "<3.2", - "wwbn/avideo": "<12.4", - "xataface/xataface": "<3", - "xpressengine/xpressengine": "<3.0.15", - "yeswiki/yeswiki": "<4.1", - "yetiforce/yetiforce-crm": "<=6.4", - "yidashi/yii2cmf": "<=2", - "yii2mod/yii2-cms": "<1.9.2", - "yiisoft/yii": "<1.1.27", - "yiisoft/yii2": "<2.0.38", - "yiisoft/yii2-bootstrap": "<2.0.4", - "yiisoft/yii2-dev": "<2.0.43", - "yiisoft/yii2-elasticsearch": "<2.0.5", - "yiisoft/yii2-gii": "<=2.2.4", - "yiisoft/yii2-jui": "<2.0.4", - "yiisoft/yii2-redis": "<2.0.8", - "yikesinc/yikes-inc-easy-mailchimp-extender": "<6.8.6", - "yoast-seo-for-typo3/yoast_seo": "<7.2.3", - "yourls/yourls": "<=1.8.2", - "zendesk/zendesk_api_client_php": "<2.2.11", - "zendframework/zend-cache": ">=2.4,<2.4.8|>=2.5,<2.5.3", - "zendframework/zend-captcha": ">=2,<2.4.9|>=2.5,<2.5.2", - "zendframework/zend-crypt": ">=2,<2.4.9|>=2.5,<2.5.2", - "zendframework/zend-db": ">=2,<2.0.99|>=2.1,<2.1.99|>=2.2,<2.2.10|>=2.3,<2.3.5", - "zendframework/zend-developer-tools": ">=1.2.2,<1.2.3", - "zendframework/zend-diactoros": "<1.8.4", - "zendframework/zend-feed": "<2.10.3", - "zendframework/zend-form": ">=2,<2.2.7|>=2.3,<2.3.1", - "zendframework/zend-http": "<2.8.1", - "zendframework/zend-json": ">=2.1,<2.1.6|>=2.2,<2.2.6", - "zendframework/zend-ldap": ">=2,<2.0.99|>=2.1,<2.1.99|>=2.2,<2.2.8|>=2.3,<2.3.3", - "zendframework/zend-mail": ">=2,<2.4.11|>=2.5,<2.7.2", - "zendframework/zend-navigation": ">=2,<2.2.7|>=2.3,<2.3.1", - "zendframework/zend-session": ">=2,<2.0.99|>=2.1,<2.1.99|>=2.2,<2.2.9|>=2.3,<2.3.4", - "zendframework/zend-validator": ">=2.3,<2.3.6", - "zendframework/zend-view": ">=2,<2.2.7|>=2.3,<2.3.1", - "zendframework/zend-xmlrpc": ">=2.1,<2.1.6|>=2.2,<2.2.6", - "zendframework/zendframework": "<=3", - "zendframework/zendframework1": "<1.12.20", - "zendframework/zendopenid": ">=2,<2.0.2", - "zendframework/zendxml": ">=1,<1.0.1", - "zetacomponents/mail": "<1.8.2", - "zf-commons/zfc-user": "<1.2.2", - "zfcampus/zf-apigility-doctrine": ">=1,<1.0.3", - "zfr/zfr-oauth2-server-module": "<0.1.2", - "zoujingli/thinkadmin": "<6.0.22" - }, - "type": "metapackage", - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Marco Pivetta", - "email": "ocramius@gmail.com", - "role": "maintainer" - }, - { - "name": "Ilya Tribusean", - "email": "slash3b@gmail.com", - "role": "maintainer" - } - ], - "description": "Prevents installation of composer packages with known security vulnerabilities: no API, simply require it", - "keywords": [ - "dev" - ], - "support": { - "issues": "https://github.com/Roave/SecurityAdvisories/issues", - "source": "https://github.com/Roave/SecurityAdvisories/tree/latest" - }, - "funding": [ - { - "url": "https://github.com/Ocramius", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/roave/security-advisories", - "type": "tidelift" - } - ], - "time": "2023-03-17T19:03:58+00:00" - } - ], + "packages-dev": [], "aliases": [], "minimum-stability": "dev", "stability-flags": { - "roave/security-advisories": 20 + "amphp/http-server": 20, + "danog/madelineproto": 20 }, "prefer-stable": true, "prefer-lowest": false, "platform": { - "php": "^8.0", + "php": "^8.1", "ext-json": "*", "ext-mbstring": "*", "ext-pcntl": "*" diff --git a/docker-compose.dev.yml b/docker-compose.dev.yml new file mode 100644 index 0000000..886e13f --- /dev/null +++ b/docker-compose.dev.yml @@ -0,0 +1,11 @@ +services: + api: + image: xtrime/telegram-api-server:dev + build: + context: . + dockerfile: Dockerfile-dev + ports: + - "127.0.0.1:9503:9503" + - "9003" + environment: + PHP_IDE_CONFIG: "serverName=Docker" \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml index 62de11b..a82bc89 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,11 +1,10 @@ -version: '2.4' services: - telegram-api-server: + api: image: xtrime/telegram-api-server:latest build: context: . dockerfile: Dockerfile - container_name: telegram-api-server + init: true restart: unless-stopped ports: - "127.0.0.1:9503:9503" @@ -25,7 +24,6 @@ services: - "-s=session" mysql: image: mariadb:10.8 - container_name: telegram-api-server-mysql restart: unless-stopped ports: - "127.0.0.1:9507:3306" diff --git a/docker/php/conf.d/xdebug.ini b/docker/php/conf.d/xdebug.ini new file mode 100644 index 0000000..4d11575 --- /dev/null +++ b/docker/php/conf.d/xdebug.ini @@ -0,0 +1,5 @@ +xdebug.max_nesting_level=512 +xdebug.mode=debug +xdebug.start_with_request=yes +xdebug.client_host=host.docker.internal +xdebug.client_port=9003 \ No newline at end of file diff --git a/examples/websocket-events.php b/examples/websocket-events.php index a7ae7e9..bb211da 100644 --- a/examples/websocket-events.php +++ b/examples/websocket-events.php @@ -5,11 +5,14 @@ * @see \TelegramApiServer\Controllers\EventsController */ +use Amp\Future; +use Amp\Websocket\Client\WebsocketHandshake; +use function Amp\async; +use function Amp\delay; +use function Amp\Websocket\Client\connect; + require 'vendor/autoload.php'; -use Amp\Websocket\Client\Rfc6455Connection; -use Amp\Websocket\Message; -use function Amp\Websocket\Client\connect; $shortopts = 'u::'; $longopts = [ @@ -20,28 +23,32 @@ 'url' => $options['url'] ?? $options['u'] ?? 'ws://127.0.0.1:9503/events', ]; -Amp\Loop::run(static function () use ($options) { - echo "Connecting to: {$options['url']}" . PHP_EOL; +echo "Connecting to: {$options['url']}" . PHP_EOL; +async(function() use($options) { while (true) { try { - /** @var Rfc6455Connection $connection */ - $connection = yield connect($options['url']); + $handshake = (new WebsocketHandshake($options['url'])); + + $connection = connect($handshake); $connection->onClose(static function () use ($connection) { - printf("Connection closed. Reason: %s\n", $connection->getCloseReason()); + if ($connection->isClosed()) { + printf("Connection closed. Reason: %s\n", $connection->getCloseReason()); + } }); echo 'Waiting for events...' . PHP_EOL; - while ($message = yield $connection->receive()) { - /** @var Message $message */ - $payload = yield $message->buffer(); + while ($message = $connection->receive()) { + $payload = $message->buffer(); printf("[%s] Received event: %s\n", date('Y-m-d H:i:s'), $payload); } } catch (\Throwable $e) { printf("Error: %s\n", $e->getMessage()); } - yield new Amp\Delayed(500); + delay(0.1); + } +}); -}); \ No newline at end of file +$signal = Amp\trapSignal([\SIGINT, \SIGTERM]); diff --git a/server.php b/server.php index 34a64a7..de90350 100644 --- a/server.php +++ b/server.php @@ -74,7 +74,7 @@ $mainProcessPid = getmypid(); if (Config::getInstance()->get('health_check.enabled')) { - Fork::run(function() use($mainProcessPid) { + Fork::run(static function() use($mainProcessPid) { HealthCheck::start($mainProcessPid); }); } diff --git a/src/Client.php b/src/Client.php index 367a8b9..23d27bf 100644 --- a/src/Client.php +++ b/src/Client.php @@ -2,48 +2,43 @@ namespace TelegramApiServer; -use Amp\Delayed; -use Amp\Loop; -use Amp\Promise; -use danog\MadelineProto; +use danog\MadelineProto\API; +use danog\MadelineProto\APIWrapper; +use danog\MadelineProto\MTProto; use InvalidArgumentException; use Psr\Log\LogLevel; +use ReflectionProperty; +use Revolt\EventLoop; use RuntimeException; use TelegramApiServer\EventObservers\EventObserver; -use function Amp\call; +use function Amp\async; +use function Amp\Future\await; +use function Amp\Future\awaitAll; class Client { public static Client $self; - /** @var MadelineProto\API[] */ + /** @var API[] */ public array $instances = []; - public static function getInstance(): Client { + public static function getInstance(): Client { if (empty(static::$self)) { static::$self = new static(); } return static::$self; } - public static function isSessionLoggedIn(MadelineProto\API $instance) - { - return (bool) (yield $instance->getSelf()); - } - - public function connect(array $sessionFiles): \Generator + public function connect(array $sessionFiles) { warning(PHP_EOL . 'Starting MadelineProto...' . PHP_EOL); - $promises = []; foreach ($sessionFiles as $file) { $sessionName = Files::getSessionName($file); $this->addSession($sessionName); - $promises[] = $this->startLoggedInSession($sessionName); + $this->startLoggedInSession($sessionName); } - yield $promises; - - Loop::defer(fn() => yield $this->startNotLoggedInSessions()); + $this->startNotLoggedInSessions(); $sessionsCount = count($sessionFiles); warning( @@ -52,7 +47,7 @@ public function connect(array $sessionFiles): \Generator ); } - public function addSession(string $session, array $settings = []): MadelineProto\API + public function addSession(string $session, array $settings = []): API { if (isset($this->instances[$session])) { throw new InvalidArgumentException('Session already exists'); @@ -67,8 +62,7 @@ public function addSession(string $session, array $settings = []): MadelineProto (array) Config::getInstance()->get('telegram'), Files::getSessionSettings($session), ); - $instance = new MadelineProto\API($file, $settings); - $instance->async(true); + $instance = new API($file, $settings); $this->instances[$session] = $instance; return $instance; @@ -87,8 +81,6 @@ public function removeSession(string $session): void if (!empty($instance->API)) { $instance->unsetEventHandler(); - $instance->stop(); - $instance->API->unreference(); } unset($instance); gc_collect_cycles(); @@ -97,9 +89,9 @@ public function removeSession(string $session): void /** * @param string|null $session * - * @return MadelineProto\API + * @return API */ - public function getSession(?string $session = null): MadelineProto\API + public function getSession(?string $session = null): API { if (!$this->instances) { throw new RuntimeException( @@ -124,46 +116,42 @@ public function getSession(?string $session = null): MadelineProto\API return $this->instances[$session]; } - private function startNotLoggedInSessions(): Promise + private function startNotLoggedInSessions(): void { - return call( - function() { - foreach ($this->instances as $name => $instance) { - while(null === $instance->API) { - yield (new Delayed(100)); - } - if (! yield from static::isSessionLoggedIn($instance)) { - { - //Disable logging to stdout - $logLevel = Logger::getInstance()->minLevelIndex; - Logger::getInstance()->minLevelIndex = Logger::$levels[LogLevel::ERROR]; - $instance->echo("Authorizing session: {$name}\n"); - yield $instance->start(); - - //Enable logging to stdout - Logger::getInstance()->minLevelIndex = $logLevel; - } - $this->startLoggedInSession($name); - } + foreach ($this->instances as $name => $instance) { + if ($instance->getAuthorization() !== MTProto::LOGGED_IN) { + { + //Disable logging to stdout + $logLevel = Logger::getInstance()->minLevelIndex; + Logger::getInstance()->minLevelIndex = Logger::$levels[LogLevel::ERROR]; + $instance->echo("Authorizing session: {$name}\n"); + $instance->start(); + + //Enable logging to stdout + Logger::getInstance()->minLevelIndex = $logLevel; } + $this->startLoggedInSession($name); } - ); + } } - public function startLoggedInSession(string $sessionName): Promise + public function startLoggedInSession(string $sessionName): void { - return call( - function() use ($sessionName) { - if (yield from static::isSessionLoggedIn($this->instances[$sessionName])) { - if (empty(EventObserver::$sessionClients[$sessionName])) { - $this->instances[$sessionName]->unsetEventHandler(); - } - yield $this->instances[$sessionName]->start(); - $this->instances[$sessionName]->loopFork(); - $this->instances[$sessionName]->echo("Started session: {$sessionName}\n"); - } + if ($this->instances[$sessionName]->getAuthorization() === MTProto::LOGGED_IN) { + if (empty(EventObserver::$sessionClients[$sessionName])) { + $this->instances[$sessionName]->unsetEventHandler(); } - ); + $this->instances[$sessionName]->start(); + $this->instances[$sessionName]->echo("Started session: {$sessionName}\n"); + } + } + + public static function getWrapper(API $madelineProto): APIWrapper + { + $property = new ReflectionProperty($madelineProto, "wrapper"); + /** @var APIWrapper $wrapper */ + $wrapper = $property->getValue($madelineProto); + return $wrapper; } } diff --git a/src/Controllers/AbstractApiController.php b/src/Controllers/AbstractApiController.php index 3db94b5..551a096 100644 --- a/src/Controllers/AbstractApiController.php +++ b/src/Controllers/AbstractApiController.php @@ -2,14 +2,13 @@ namespace TelegramApiServer\Controllers; -use Amp\ByteStream\ResourceInputStream; +use Amp\Future; use Amp\Http\Server\FormParser\StreamedField; use Amp\Http\Server\FormParser\StreamingParser; use Amp\Http\Server\Request; -use Amp\Http\Server\RequestHandler\CallableRequestHandler; +use Amp\Http\Server\RequestHandler\ClosureRequestHandler; use Amp\Http\Server\Response; use Amp\Http\Server\Router; -use Amp\Promise; use danog\MadelineProto\API; use TelegramApiServer\Exceptions\NoticeException; use TelegramApiServer\Logger; @@ -19,7 +18,7 @@ abstract class AbstractApiController { - public const JSON_HEADER = ['Content-Type'=>'application/json;charset=utf-8']; + public const JSON_HEADER = ['Content-Type' => 'application/json;charset=utf-8']; protected Request $request; protected ?StreamedField $file = null; @@ -37,14 +36,15 @@ abstract class AbstractApiController protected array $api; abstract protected function resolvePath(array $path); + abstract protected function callApi(); - public static function getRouterCallback(string $extensionClass): CallableRequestHandler + public static function getRouterCallback(string $extensionClass): ClosureRequestHandler { - return new CallableRequestHandler( - static function (Request $request) use($extensionClass) { + return new ClosureRequestHandler( + static function (Request $request) use ($extensionClass) { $requestCallback = new static($request, $extensionClass); - $response = yield from $requestCallback->process(); + $response = $requestCallback->process(); if ($response instanceof Response) { return $response; @@ -65,15 +65,14 @@ public function __construct(Request $request, string $extensionClass) } /** - * @param Request $request - * @return \Generator|Response|string + * @return Response|string * @throws \Throwable */ public function process() { $this->resolvePath($this->request->getAttribute(Router::class)); - yield from $this->resolveRequest(); - yield from $this->generateResponse(); + $this->resolveRequest(); + $this->generateResponse(); return $this->getResponse(); } @@ -82,7 +81,7 @@ public function process() * Получаем параметры из GET и POST * */ - private function resolveRequest(): \Generator + private function resolveRequest(): void { $query = $this->request->getUri()->getQuery(); $contentType = (string)$this->request->getHeader('Content-Type'); @@ -95,29 +94,29 @@ private function resolveRequest(): \Generator $form = (new StreamingParser())->parseForm($this->request); $post = []; - while (yield $form->advance()) { + while ($form->continue()) { /** @var StreamedField $field */ - $field = $form->getCurrent(); + $field = $form->getValue(); if ($field->isFile()) { $this->file = $field; //We need to break loop without getting file //All other post field will be omitted, hope we dont need them :) break; } else { - $post[$field->getName()] = yield $field->buffer(); + $post[$field->getName()] = $field->buffer(); } } break; case $contentType === 'application/json': - $body = yield $this->request->getBody()->buffer(); + $body = $this->request->getBody()->buffer(); $post = json_decode($body, 1); break; default: - $body = yield $this->request->getBody()->buffer(); + $body = $this->request->getBody()->buffer(); parse_str($body, $post); } - $this->parameters = array_merge((array) $post, $get); + $this->parameters = array_merge((array)$post, $get); $this->parameters = array_values($this->parameters); } @@ -126,7 +125,7 @@ private function resolveRequest(): \Generator * Получает посты для формирования ответа * */ - private function generateResponse(): \Generator + private function generateResponse(): void { if ($this->page['code'] !== 200) { return; @@ -138,8 +137,8 @@ private function generateResponse(): \Generator try { $this->page['response'] = $this->callApi(); - if ($this->page['response'] instanceof Promise) { - $this->page['response'] = yield $this->page['response']; + if ($this->page['response'] instanceof Future) { + $this->page['response'] = $this->page['response']->await(); } } catch (\Throwable $e) { @@ -156,7 +155,7 @@ private function generateResponse(): \Generator protected function callApiCommon(API $madelineProto) { $pathCount = count($this->api); - if ($pathCount === 1 && method_exists($this->extensionClass,$this->api[0])) { + if ($pathCount === 1 && method_exists($this->extensionClass, $this->api[0])) { /** @var ApiExtensions|SystemApiExtensions $madelineProtoExtensions */ $madelineProtoExtensions = new $this->extensionClass($madelineProto, $this->request, $this->file); $result = $madelineProtoExtensions->{$this->api[0]}(...$this->parameters); @@ -204,9 +203,9 @@ private function setError(\Throwable $e): self * Кодирует ответ в нужный формат: json * * @return Response|string - * @throws \Throwable + * @throws \JsonException */ - private function getResponse() + private function getResponse(): string|Response { if ($this->page['response'] instanceof Response) { return $this->page['response']; diff --git a/src/Controllers/ApiController.php b/src/Controllers/ApiController.php index 1d11768..868f156 100644 --- a/src/Controllers/ApiController.php +++ b/src/Controllers/ApiController.php @@ -2,7 +2,6 @@ namespace TelegramApiServer\Controllers; -use Amp\Promise; use TelegramApiServer\Client; class ApiController extends AbstractApiController @@ -23,7 +22,6 @@ protected function resolvePath(array $path): void } /** - * @return mixed|Promise * @throws \Exception */ protected function callApi() diff --git a/src/Controllers/EventsController.php b/src/Controllers/EventsController.php index 8df55ab..6d96359 100644 --- a/src/Controllers/EventsController.php +++ b/src/Controllers/EventsController.php @@ -6,28 +6,38 @@ use Amp\Http\Server\Response; use Amp\Http\Server\Router; use Amp\Http\Status; -use Amp\Loop; -use Amp\Promise; -use Amp\Success; -use Amp\Websocket\Client as WebsocketClient; -use Amp\Websocket\Server\ClientHandler; -use Amp\Websocket\Server\Gateway; use Amp\Websocket\Server\Websocket as WebsocketServer; +use Amp\Websocket\Server\WebsocketClientGateway; +use Amp\Websocket\Server\WebsocketClientHandler; +use Amp\Websocket\Server\WebsocketHandshakeHandler; +use Amp\Websocket\WebsocketClient; +use Revolt\EventLoop; use TelegramApiServer\Client; use TelegramApiServer\EventObservers\EventObserver; -use function Amp\call; +use TelegramApiServer\Logger; -class EventsController implements ClientHandler +class EventsController implements WebsocketClientHandler, WebsocketHandshakeHandler { private const PING_INTERVAL_MS = 10_000; + private WebsocketClientGateway $gateway; + + public function __construct() + { + $this->gateway = new WebsocketClientGateway(); + } public static function getRouterCallback(): WebsocketServer { $class = new static(); - return new WebsocketServer($class); + return new WebsocketServer( + logger: Logger::getInstance(), + handshakeHandler: $class, + clientHandler: $class, + + ); } - public function handleHandshake(Gateway $gateway, Request $request, Response $response): Promise + public function handleHandshake(Request $request, Response $response): Response { try { $session = $request->getAttribute(Router::class)['session'] ?? null; @@ -37,40 +47,41 @@ public function handleHandshake(Gateway $gateway, Request $request, Response $re throw new \RuntimeException('No sessions available'); } } catch (\Throwable $e){ - return $gateway->getErrorHandler()->handleError(Status::NOT_FOUND, $e->getMessage()); + $response->setStatus(Status::NOT_FOUND); + $response->setBody($e->getMessage()); } - return new Success($response); + return $response; } - public function handleClient(Gateway $gateway, WebsocketClient $client, Request $request, Response $response): Promise + public function handleClient(WebsocketClient $client, Request $request, Response $response): void { - return call(static function() use($gateway, $client, $request) { - $requestedSession = $request->getAttribute(Router::class)['session'] ?? null; - yield from static::subscribeForUpdates($gateway, $client, $requestedSession); + $requestedSession = $request->getAttribute(Router::class)['session'] ?? null; + $this->subscribeForUpdates($client, $requestedSession); + $this->gateway->addClient($client); - while ($message = yield $client->receive()) { - // Messages received on the connection are ignored and discarded. - // Messages must be received properly to maintain connection with client (ping-pong check). - } - }); + while ($message = $client->receive()) { + notice('Recieved websocket message: ' . $message->buffer()); + // Messages received on the connection are ignored and discarded. + // Messages must be received properly to maintain connection with client (ping-pong check). + } } - private static function subscribeForUpdates(Gateway $gateway, WebsocketClient $client, ?string $requestedSession): \Generator + private function subscribeForUpdates(WebsocketClient $client, ?string $requestedSession): void { $clientId = $client->getId(); - yield EventObserver::startEventHandler($requestedSession); + EventObserver::startEventHandler($requestedSession); - $pingLoop = Loop::repeat(self::PING_INTERVAL_MS, static fn () => yield $client->ping()); + $pingLoop = EventLoop::repeat(self::PING_INTERVAL_MS, static fn () => $client->ping()); $client->onClose(static function() use($clientId, $requestedSession, $pingLoop) { - Loop::cancel($pingLoop); + EventLoop::cancel($pingLoop); EventObserver::removeSubscriber($clientId); EventObserver::stopEventHandler($requestedSession); }); - EventObserver::addSubscriber($clientId, static function($update, ?string $session) use($gateway, $clientId, $requestedSession) { + EventObserver::addSubscriber($clientId, function($update, ?string $session) use($clientId, $requestedSession) { if ($requestedSession && $session !== $requestedSession) { return; } @@ -83,7 +94,7 @@ private static function subscribeForUpdates(Gateway $gateway, WebsocketClient $c 'id' => null, ]; - $gateway->multicast( + $this->gateway->multicast( json_encode( $update, JSON_THROW_ON_ERROR | diff --git a/src/Controllers/LogController.php b/src/Controllers/LogController.php index c84ec2a..d0c6f75 100644 --- a/src/Controllers/LogController.php +++ b/src/Controllers/LogController.php @@ -5,48 +5,49 @@ use Amp\Http\Server\Request; use Amp\Http\Server\Response; use Amp\Http\Server\Router; -use Amp\Promise; -use Amp\Success; -use Amp\Websocket\Client; -use Amp\Websocket\Server\ClientHandler; -use Amp\Websocket\Server\Endpoint; use Amp\Websocket\Server\Websocket; +use Amp\Websocket\Server\WebsocketClientHandler; +use Amp\Websocket\Server\WebsocketHandshakeHandler; +use Amp\Websocket\WebsocketClient; use Psr\Log\LogLevel; use TelegramApiServer\EventObservers\LogObserver; use TelegramApiServer\Logger; -use function Amp\call; -class LogController implements ClientHandler +class LogController implements WebsocketClientHandler, WebsocketHandshakeHandler { public static function getRouterCallback(): Websocket { - return new Websocket(new static()); + $class = new static(); + return new Websocket( + logger: Logger::getInstance(), + handshakeHandler: $class, + clientHandler: $class, + ); } - public function handleHandshake(Endpoint $endpoint, Request $request, Response $response): Promise + public function handleHandshake(Request $request, Response $response): Response { $level = $request->getAttribute(Router::class)['level'] ?? LogLevel::DEBUG; if (!isset(Logger::$levels[$level])) { $response->setStatus(400); } - return new Success($response); + return $response; } - public function handleClient(Endpoint $endpoint, Client $client, Request $request, Response $response): Promise + public function handleClient(WebsocketClient $client, Request $request, Response $response): void { - return call(static function() use($endpoint, $client, $request) { - $level = $request->getAttribute(Router::class)['level'] ?? LogLevel::DEBUG; - static::subscribeForUpdates($endpoint, $client, $level); + $level = $request->getAttribute(Router::class)['level'] ?? LogLevel::DEBUG; + static::subscribeForUpdates($client, $level); - while ($message = yield $client->receive()) { - // Messages received on the connection are ignored and discarded. - // Messages must be received properly to maintain connection with client (ping-pong check). - } - }); + while ($message = $client->receive()) { + notice('Recived log websocket message: ' . $message->buffer()); + // Messages received on the connection are ignored and discarded. + // Messages must be received properly to maintain connection with client (ping-pong check). + } } - private static function subscribeForUpdates(Endpoint $endpoint, Client $client, string $requestedLevel): void + private static function subscribeForUpdates(WebsocketClient $client, string $requestedLevel): void { $clientId = $client->getId(); diff --git a/src/Controllers/SystemController.php b/src/Controllers/SystemController.php index 6245521..b55bcb9 100644 --- a/src/Controllers/SystemController.php +++ b/src/Controllers/SystemController.php @@ -2,7 +2,6 @@ namespace TelegramApiServer\Controllers; -use Amp\Promise; use TelegramApiServer\Client; class SystemController extends AbstractApiController @@ -19,7 +18,7 @@ protected function resolvePath(array $path): void } /** - * @return mixed|Promise + * @return mixed * @throws \Exception */ protected function callApi() diff --git a/src/EventObservers/EventHandler.php b/src/EventObservers/EventHandler.php index cd95193..10c2fd8 100644 --- a/src/EventObservers/EventHandler.php +++ b/src/EventObservers/EventHandler.php @@ -2,7 +2,6 @@ namespace TelegramApiServer\EventObservers; -use danog\MadelineProto\APIWrapper; use TelegramApiServer\Files; class EventHandler extends \danog\MadelineProto\EventHandler @@ -12,7 +11,7 @@ class EventHandler extends \danog\MadelineProto\EventHandler public function onStart() { - $this->sessionName = Files::getSessionName($this->API->wrapper->session); + $this->sessionName = Files::getSessionName($this->wrapper->getSession()->getSessionPath()); if (empty(static::$instances[$this->sessionName])) { static::$instances[$this->sessionName] = true; warning("Event observer CONSTRUCTED: {$this->sessionName}"); diff --git a/src/EventObservers/EventObserver.php b/src/EventObservers/EventObserver.php index c3b4110..f1922ab 100644 --- a/src/EventObservers/EventObserver.php +++ b/src/EventObservers/EventObserver.php @@ -3,12 +3,10 @@ namespace TelegramApiServer\EventObservers; -use Amp\Loop; -use Amp\Promise; -use danog\MadelineProto\API; +use danog\MadelineProto\APIWrapper; +use ReflectionProperty; use TelegramApiServer\Client; use TelegramApiServer\Logger; -use function Amp\call; class EventObserver { @@ -39,33 +37,34 @@ private static function removeSessionClient(string $session): void } } - public static function startEventHandler(?string $requestedSession = null): Promise + public static function startEventHandler(?string $requestedSession = null): void { - return call(static function() use($requestedSession) { - $sessions = []; - if ($requestedSession === null) { - $sessions = array_keys(Client::getInstance()->instances); - } else { - $sessions[] = $requestedSession; - } + $sessions = []; + if ($requestedSession === null) { + $sessions = array_keys(Client::getInstance()->instances); + } else { + $sessions[] = $requestedSession; + } - foreach ($sessions as $session) { - static::addSessionClient($session); - if (static::$sessionClients[$session] === 1) { - warning("Start EventHandler: {$session}"); - try { - $instance = Client::getInstance()->getSession($session); - yield $instance->setEventHandler(EventHandler::class); - } catch (\Throwable $e) { - static::removeSessionClient($session); - error('Cant set EventHandler', [ - 'session' => $session, - 'exception' => Logger::getExceptionAsArray($e), - ]); - } + foreach ($sessions as $session) { + static::addSessionClient($session); + if (static::$sessionClients[$session] === 1) { + warning("Start EventHandler: {$session}"); + try { + $instance = Client::getInstance()->getSession($session); + $property = new ReflectionProperty($instance, "wrapper"); + /** @var APIWrapper $wrapper */ + $wrapper = $property->getValue($instance); + $wrapper->getAPI()->setEventHandler(EventHandler::class); + } catch (\Throwable $e) { + static::removeSessionClient($session); + error('Cant set EventHandler', [ + 'session' => $session, + 'exception' => Logger::getExceptionAsArray($e), + ]); } } - }); + } } public static function stopEventHandler(?string $requestedSession = null, bool $force = false): void diff --git a/src/EventObservers/LogObserver.php b/src/EventObservers/LogObserver.php index 748c902..ce29a3d 100644 --- a/src/EventObservers/LogObserver.php +++ b/src/EventObservers/LogObserver.php @@ -25,7 +25,7 @@ public static function log($message, int $level) Logger::getInstance()->log(Logger::$madelineLevels[$level], (string) $message); } else { if ($message instanceof \Throwable) { - $message = \TelegramApiServer\Logger::getExceptionAsArray($message); + $message = Logger::getExceptionAsArray($message); } if (is_array($message)) { Logger::getInstance()->log(Logger::$madelineLevels[$level], '', $message); diff --git a/src/Files.php b/src/Files.php index f365b2b..178199e 100644 --- a/src/Files.php +++ b/src/Files.php @@ -2,6 +2,8 @@ namespace TelegramApiServer; +use RuntimeException; + class Files { @@ -27,7 +29,7 @@ public static function getSessionName(?string $sessionFile): ?string } preg_match( - '~' . static::SESSION_FOLDER . "/(?'sessionName'.*?)" . static::SESSION_EXTENSION . '$~', + '~' . static::SESSION_FOLDER . "/(?'sessionName'.*?)" . static::SESSION_EXTENSION . '~', $sessionFile, $matches ); diff --git a/src/Logger.php b/src/Logger.php index 9e27c4a..f1fa990 100644 --- a/src/Logger.php +++ b/src/Logger.php @@ -122,6 +122,9 @@ private function format(string $level, string $message, array $context): string if (false !== strpos($message, '{')) { $replacements = []; foreach ($context as $key => $val) { + if ($val instanceof \Throwable) { + $context[$key] = self::getExceptionAsArray($val); + } if (null === $val || is_scalar($val) || (is_object($val) && method_exists($val, '__toString'))) { $replacements["{{$key}}"] = $val; } else { @@ -149,7 +152,7 @@ private function format(string $level, string $message, array $context): string "\n" . json_encode( $context, - JSON_UNESCAPED_UNICODE | JSON_INVALID_UTF8_SUBSTITUTE | JSON_PRETTY_PRINT | JSON_UNESCAPED_LINE_TERMINATORS + JSON_UNESCAPED_UNICODE | JSON_INVALID_UTF8_SUBSTITUTE | JSON_PRETTY_PRINT | JSON_UNESCAPED_LINE_TERMINATORS | JSON_UNESCAPED_SLASHES ) : '' ) . PHP_EOL; @@ -163,6 +166,7 @@ public static function getExceptionAsArray(\Throwable $exception) { 'line' => $exception->getLine(), 'code' => $exception->getCode(), 'backtrace' => array_slice($exception->getTrace(), 0, 3), + 'previous exception' => $exception->getPrevious(), ]; } } \ No newline at end of file diff --git a/src/MadelineProtoExtensions/ApiExtensions.php b/src/MadelineProtoExtensions/ApiExtensions.php index 3c406cb..946deed 100644 --- a/src/MadelineProtoExtensions/ApiExtensions.php +++ b/src/MadelineProtoExtensions/ApiExtensions.php @@ -4,17 +4,16 @@ namespace TelegramApiServer\MadelineProtoExtensions; -use Amp\Delayed; use Amp\Http\Server\FormParser\StreamedField; use Amp\Http\Server\Request; use Amp\Http\Server\Response; -use Amp\Promise; use danog\MadelineProto; use danog\MadelineProto\StrTools; +use TelegramApiServer\Client; use TelegramApiServer\EventObservers\EventHandler; use TelegramApiServer\Exceptions\MediaTooBig; use TelegramApiServer\Exceptions\NoMediaException; -use function Amp\call; +use function Amp\delay; class ApiExtensions { @@ -47,9 +46,8 @@ public function __construct(MadelineProto\Api $madelineProto, Request $request, * ] * * - * @return MadelineProto\messages|Promise */ - public function getHistory(array $data): Promise + public function getHistory(array $data) { $data = array_merge( [ @@ -68,26 +66,17 @@ public function getHistory(array $data): Promise return $this->madelineProto->messages->getHistory($data); } - /** - * @param array $data - * - * @return Promise - */ - public function getHistoryHtml(array $data): Promise + public function getHistoryHtml(array $data): array { - return call( - function() use ($data) { - $response = yield $this->getHistory($data); - if (!empty($response['messages'])) { - foreach ($response['messages'] as &$message) { - $message['message'] = $this->formatMessage($message['message'] ?? null, $message['entities'] ?? []); - } - unset($message); - } - - return $response; + $response = $this->getHistory($data); + if (!empty($response['messages'])) { + foreach ($response['messages'] as &$message) { + $message['message'] = $this->formatMessage($message['message'] ?? null, $message['entities'] ?? []); } - ); + unset($message); + } + + return $response; } /** @@ -186,52 +175,47 @@ private static function substringReplace(string $original, string $replacement, * ] * * - * @return Promise */ - public function copyMessages(array $data): Promise + public function copyMessages(array $data) { - return call( - function() use ($data) { - $data = array_merge( - [ - 'from_peer' => '', - 'to_peer' => '', - 'id' => [], - ], - $data - ); - - $response = yield $this->madelineProto->channels->getMessages( - [ - 'channel' => $data['from_peer'], - 'id' => $data['id'], - ] - ); - $result = []; - if (!$response || !is_array($response) || !array_key_exists('messages', $response)) { - return $result; - } + $data = array_merge( + [ + 'from_peer' => '', + 'to_peer' => '', + 'id' => [], + ], + $data + ); - foreach ($response['messages'] as $key => $message) { - $messageData = [ - 'message' => $message['message'] ?? '', - 'peer' => $data['to_peer'], - 'entities' => $message['entities'] ?? [], - ]; - if (static::hasMedia($message, false)) { - $messageData['media'] = $message; //MadelineProto сама достанет все media из сообщения. - $result[] = yield $this->sendMedia($messageData); - } else { - $result[] = yield $this->sendMessage($messageData); - } - if ($key > 0) { - yield new Delayed(random_int(300, 2000)); - } - } + $response = $this->madelineProto->channels->getMessages( + [ + 'channel' => $data['from_peer'], + 'id' => $data['id'], + ] + ); + $result = []; + if (!$response || !is_array($response) || !array_key_exists('messages', $response)) { + return $result; + } - return $result; + foreach ($response['messages'] as $key => $message) { + $messageData = [ + 'message' => $message['message'] ?? '', + 'peer' => $data['to_peer'], + 'entities' => $message['entities'] ?? [], + ]; + if (static::hasMedia($message, false)) { + $messageData['media'] = $message; //MadelineProto сама достанет все media из сообщения. + $result[] = $this->sendMedia($messageData); + } else { + $result[] = $this->sendMessage($messageData); } - ); + if ($key > 0) { + delay(random_int(300, 2000)/1000); + } + } + + return $result; } /** @@ -246,31 +230,28 @@ function() use ($data) { * ] * * - * @return MadelineProto\updates|Promise */ - public function sendMedia(array $data): Promise + public function sendMedia(array $data): array { - return call(function() use($data) { + $data = array_merge( + [ + 'peer' => '', + 'message' => '', + 'media' => [], + 'reply_to_msg_id' => 0, + 'parse_mode' => 'HTML', + ], + $data + ); + + if (!empty($this->file)) { $data = array_merge( - [ - 'peer' => '', - 'message' => '', - 'media' => [], - 'reply_to_msg_id' => 0, - 'parse_mode' => 'HTML', - ], - $data + $data, + $this->uploadMediaForm() ); + } - if (!empty($this->file)) { - $data = array_merge( - $data, - yield $this->uploadMediaForm() - ); - } - - return yield $this->madelineProto->messages->sendMedia($data); - }); + return $this->madelineProto->messages->sendMedia(...$data); } /** @@ -284,7 +265,6 @@ public function sendMedia(array $data): Promise * ] * * - * @return Promise|MadelineProto\updates */ public function sendMessage(array $data) { @@ -314,9 +294,8 @@ public function sendMessage(array $data) * ] * * - * @return Promise */ - public function searchGlobal(array $data): Promise + public function searchGlobal(array $data): array { $data = array_merge( [ @@ -328,7 +307,7 @@ public function searchGlobal(array $data): Promise ], $data ); - return $this->madelineProto->messages->searchGlobal($data); + return $this->madelineProto->messages->searchGlobal(...$data); } /** @@ -336,167 +315,150 @@ public function searchGlobal(array $data): Promise * * @param array $data * - * @return Promise */ - public function getMedia(array $data): Promise + public function getMedia(array $data): Response { - return call( - function() use ($data) { - $data = array_merge( - [ - 'peer' => '', - 'id' => [0], - 'message' => [], - 'size_limit' => 0, - ], - $data - ); - - $message = $data['message'] ?: (yield $this->getMessages($data))['messages'][0] ?? null; - if (!$message || $message['_'] === 'messageEmpty') { - throw new NoMediaException('Empty message'); - } - - if (!static::hasMedia($message, true)) { - throw new NoMediaException('Message has no media'); - } + $data = array_merge( + [ + 'peer' => '', + 'id' => [0], + 'message' => [], + 'size_limit' => 0, + ], + $data + ); - if ($message['media']['_'] !== 'messageMediaWebPage') { - $info = yield $this->madelineProto->getDownloadInfo($message); - } else { - $webpage = $message['media']['webpage']; - if (!empty($webpage['embed_url'])) { - return new Response(302, ['Location' => $webpage['embed_url']]); - } elseif(!empty($webpage['document'])) { - $info = yield $this->madelineProto->getDownloadInfo($webpage['document']); - } elseif(!empty($webpage['photo'])) { - $info = yield $this->madelineProto->getDownloadInfo($webpage['photo']); - } else { - return yield $this->getMediaPreview($data); - } - } + $message = $data['message'] ?: ($this->getMessages($data))['messages'][0] ?? null; + if (!$message || $message['_'] === 'messageEmpty') { + throw new NoMediaException('Empty message'); + } - if ($data['size_limit'] && $info['size'] > $data['size_limit']) { - throw new MediaTooBig( - "Media exceeds size limit. Size: {$info['size']} bytes; limit: {$data['size_limit']} bytes" - ); - } + if (!static::hasMedia($message, true)) { + throw new NoMediaException('Message has no media'); + } - return yield $this->downloadToResponse($info); + if ($message['media']['_'] !== 'messageMediaWebPage') { + $info = $this->madelineProto->getDownloadInfo($message); + } else { + $webpage = $message['media']['webpage']; + if (!empty($webpage['embed_url'])) { + return new Response(302, ['Location' => $webpage['embed_url']]); + } elseif(!empty($webpage['document'])) { + $info = $this->madelineProto->getDownloadInfo($webpage['document']); + } elseif(!empty($webpage['photo'])) { + $info = $this->madelineProto->getDownloadInfo($webpage['photo']); + } else { + return $this->getMediaPreview($data); } - ); + } + + if ($data['size_limit'] && $info['size'] > $data['size_limit']) { + throw new MediaTooBig( + "Media exceeds size limit. Size: {$info['size']} bytes; limit: {$data['size_limit']} bytes" + ); + } + + return $this->downloadToResponse($info); } /** * Загружает превью медиафайла из указанного сообщения в поток * - * @param array $data - * - * @return Promise */ - public function getMediaPreview(array $data): Promise + public function getMediaPreview(array $data): Response { - return call( - function() use ($data) { - $data = array_merge( - [ - 'peer' => '', - 'id' => [0], - 'message' => [], - ], - $data - ); - - $message = $data['message'] ?: (yield $this->getMessages($data))['messages'][0] ?? null; - if (!$message || $message['_'] === 'messageEmpty') { - throw new NoMediaException('Empty message'); - } + $data = array_merge( + [ + 'peer' => '', + 'id' => [0], + 'message' => [], + ], + $data + ); - if (!static::hasMedia($message, true)) { - throw new NoMediaException('Message has no media'); - } + $message = $data['message'] ?: ($this->getMessages($data))['messages'][0] ?? null; + if (!$message || $message['_'] === 'messageEmpty') { + throw new NoMediaException('Empty message'); + } - $media = $message['media'][array_key_last($message['media'])]; - $thumb = null; - switch (true) { - case isset($media['sizes']): - foreach ($media['sizes'] as $size) { - if ($size['_'] === 'photoSize') { - $thumb = $size; - } - } - break; - case isset($media['thumb']['size']): - $thumb = $media['thumb']; - break; - case !empty($media['thumbs']): - foreach ($media['thumbs'] as $size) { - if ($size['_'] === 'photoSize') { - $thumb = $size; - } - } - break; - case isset($media['photo']['sizes']): - foreach ($media['photo']['sizes'] as $size) { - if ($size['_'] === 'photoSize') { - $thumb = $size; - } - } - break; - default: - throw new NoMediaException('Message has no preview'); + if (!static::hasMedia($message, true)) { + throw new NoMediaException('Message has no media'); + } + $media = $message['media'][array_key_last($message['media'])]; + $thumb = null; + switch (true) { + case isset($media['sizes']): + foreach ($media['sizes'] as $size) { + if ($size['_'] === 'photoSize') { + $thumb = $size; + } + } + break; + case isset($media['thumb']['size']): + $thumb = $media['thumb']; + break; + case !empty($media['thumbs']): + foreach ($media['thumbs'] as $size) { + if ($size['_'] === 'photoSize') { + $thumb = $size; + } } - if (null === $thumb) { - throw new NoMediaException('Empty preview'); + break; + case isset($media['photo']['sizes']): + foreach ($media['photo']['sizes'] as $size) { + if ($size['_'] === 'photoSize') { + $thumb = $size; + } } - $info = yield $this->madelineProto->getDownloadInfo($thumb); + break; + default: + throw new NoMediaException('Message has no preview'); - if ($media['_'] === 'webPage') { - $media = $media['photo']; - } + } + if (null === $thumb) { + throw new NoMediaException('Empty preview'); + } + $info = $this->madelineProto->getDownloadInfo($thumb); - //Фикс для LAYER 100+ - //TODO: Удалить, когда снова станет доступна загрузка photoSize - if (isset($info['thumb_size'])) { - $infoFull = yield $this->madelineProto->getDownloadInfo($media); - $infoFull['InputFileLocation']['thumb_size'] = $info['thumb_size']; - $infoFull['size'] = $info['size']; - $infoFull['mime'] = $info['mime'] ?? 'image/jpeg'; - $infoFull['name'] = 'thumb'; - $infoFull['ext'] = '.jpeg'; - $info = $infoFull; - } + if ($media['_'] === 'webPage') { + $media = $media['photo']; + } - return yield $this->downloadToResponse($info); - } - ); + //Фикс для LAYER 100+ + //TODO: Удалить, когда снова станет доступна загрузка photoSize + if (isset($info['thumb_size'])) { + $infoFull = $this->madelineProto->getDownloadInfo($media); + $infoFull['InputFileLocation']['thumb_size'] = $info['thumb_size']; + $infoFull['size'] = $info['size']; + $infoFull['mime'] = $info['mime'] ?? 'image/jpeg'; + $infoFull['name'] = 'thumb'; + $infoFull['ext'] = '.jpeg'; + $info = $infoFull; + } + + return $this->downloadToResponse($info); } /** * @param array $data * - * @return Promise */ - public function getMessages(array $data): Promise + public function getMessages(array $data): array { - return call( - function() use ($data) { - $peerInfo = yield $this->madelineProto->getInfo($data['peer']); - if (in_array($peerInfo['type'], ['channel', 'supergroup'])) { - $response = yield $this->madelineProto->channels->getMessages( - [ - 'channel' => $data['peer'], - 'id' => (array) $data['id'], - ] - ); - } else { - $response = yield $this->madelineProto->messages->getMessages(['id' => (array) $data['id']]); - } + $peerInfo = $this->madelineProto->getInfo($data['peer']); + if (in_array($peerInfo['type'], ['channel', 'supergroup'])) { + $response = $this->madelineProto->channels->getMessages( + [ + 'channel' => $data['peer'], + 'id' => (array) $data['id'], + ] + ); + } else { + $response = $this->madelineProto->messages->getMessages(['id' => (array) $data['id']]); + } - return $response; - } - ); + return $response; } /** @@ -505,9 +467,9 @@ function() use ($data) { * @param array $info * Any downloadable array: message, media etc... * - * @return Promise + * @return Response */ - public function downloadToResponse(array $info): Promise + public function downloadToResponse(array $info): Response { return $this->madelineProto->downloadToResponse($info, $this->request); } @@ -515,11 +477,8 @@ public function downloadToResponse(array $info): Promise /** * Адаптер для стандартного метода * - * @param array $info - * - * @return Promise */ - public function downloadToBrowser(array $info): Promise + public function downloadToBrowser(array $info): Response { return $this->downloadToResponse($info); } @@ -528,37 +487,34 @@ public function downloadToBrowser(array $info): Promise * Upload file from POST request. * Response can be passed to 'media' field in messages.sendMedia. * - * @return Promise * @throws NoMediaException */ - public function uploadMediaForm(): Promise + public function uploadMediaForm(): array { if (empty($this->file)) { throw new NoMediaException('File not found'); } - return call(function() { - $inputFile = yield $this->madelineProto->uploadFromStream( - $this->file, - 0, - $this->file->getMimeType(), - $this->file->getFilename() - ); - $inputFile['id'] = unpack('P', $inputFile['id'])['1']; - return [ - 'media' => [ - '_' => 'inputMediaUploadedDocument', - 'file' => $inputFile, - 'attributes' => [ - ['_' => 'documentAttributeFilename', 'file_name' => $this->file->getFilename()] - ] + $inputFile = $this->madelineProto->uploadFromStream( + $this->file, + 0, + $this->file->getMimeType(), + $this->file->getFilename() + ); + $inputFile['id'] = unpack('P', $inputFile['id'])['1']; + return [ + 'media' => [ + '_' => 'inputMediaUploadedDocument', + 'file' => $inputFile, + 'attributes' => [ + ['_' => 'documentAttributeFilename', 'file_name' => $this->file->getFilename()] ] - ]; - }); + ] + ]; } - public function setEventHandler(): Promise + public function setEventHandler(): void { - return call(fn() => yield $this->madelineProto->setEventHandler(EventHandler::class)); + Client::getWrapper($this->madelineProto)->getAPI()->setEventHandler(EventHandler::class); } } \ No newline at end of file diff --git a/src/MadelineProtoExtensions/SystemApiExtensions.php b/src/MadelineProtoExtensions/SystemApiExtensions.php index dca8189..cb76208 100644 --- a/src/MadelineProtoExtensions/SystemApiExtensions.php +++ b/src/MadelineProtoExtensions/SystemApiExtensions.php @@ -2,13 +2,14 @@ namespace TelegramApiServer\MadelineProtoExtensions; -use Amp\Loop; -use Amp\Promise; use danog\MadelineProto; use danog\MadelineProto\MTProto; +use Revolt\EventLoop; use TelegramApiServer\Client; use TelegramApiServer\Files; -use function Amp\call; +use function Amp\async; +use function Amp\File\deleteFile; +use function Amp\Future\awaitAll; class SystemApiExtensions { @@ -19,31 +20,29 @@ public function __construct(Client $client) $this->client = $client; } - public function addSession(string $session, array $settings = []): Promise + public function addSession(string $session, array $settings = []): array { if (!empty($settings['app_info']['api_id'])) { $settings['app_info']['api_id'] = (int) $settings['app_info']['api_id']; } - return call(function() use($session, $settings) { - $instance = $this->client->addSession($session, $settings); - /** @var null|MadelineProto\Settings $fullSettings */ - $fullSettings = $instance->API ? yield $instance->getSettings() : null; - try { - if ($fullSettings !== null && ! yield from Client::isSessionLoggedIn($instance)) { - $fullSettings->getAppInfo()->getApiId(); - $fullSettings->getAppInfo()->getApiHash(); - } - } catch (\Throwable $e) { - unset($fullSettings, $instance); - $this->removeSession($session); - $this->unlinkSessionFile($session); - throw $e; + $instance = $this->client->addSession($session, $settings); + /** @var null|MadelineProto\Settings $fullSettings */ + $fullSettings = $instance->getSettings(); + try { + if ($fullSettings !== null && $instance->getAuthorization() !== MTProto::LOGGED_IN) { + $fullSettings->getAppInfo()->getApiId(); + $fullSettings->getAppInfo()->getApiHash(); } + } catch (\Throwable $e) { + unset($fullSettings, $instance); + $this->removeSession($session); + $this->unlinkSessionFile($session); + throw $e; + } - yield $this->client->startLoggedInSession($session); - return $this->getSessionList(); - }); + $this->client->startLoggedInSession($session); + return $this->getSessionList(); } public function removeSession(string $session): array @@ -95,25 +94,23 @@ public function getSessionList(): array ]; } - public function unlinkSessionFile($session): Promise + public function unlinkSessionFile($session): string { - return call(function() use($session) { - $file = Files::getSessionFile($session); - - if (is_file($file)) { - $promises = []; - foreach (glob("$file*") as $file) { - $promises[] = \Amp\File\unlink($file); - } - yield from $promises; - } else { - throw new \InvalidArgumentException('Session file not found'); + $file = Files::getSessionFile($session); + + if (is_file($file)) { + $futures = []; + foreach (glob("$file*") as $file) { + $futures[] = async(fn()=>deleteFile($file)); } + awaitAll($futures); + } else { + throw new \InvalidArgumentException('Session file not found'); + } - yield $this->unlinkSessionSettings($session); + $this->unlinkSessionSettings($session); - return 'ok'; - }); + return 'ok'; } public function saveSessionSettings(string $session, array $settings = []) @@ -123,20 +120,18 @@ public function saveSessionSettings(string $session, array $settings = []) return 'ok'; } - public function unlinkSessionSettings($session): Promise + public function unlinkSessionSettings($session): string { - return call(static function() use($session) { - $settings = Files::getSessionFile($session, Files::SETTINGS_EXTENSION); - if (is_file($settings)) { - yield \Amp\File\unlink($settings); - } + $settings = Files::getSessionFile($session, Files::SETTINGS_EXTENSION); + if (is_file($settings)) { + deleteFile($settings); + } - return 'ok'; - }); + return 'ok'; } public function exit(): string { - Loop::defer(static fn() => exit()); + EventLoop::defer(static fn() => exit()); return 'ok'; } diff --git a/src/Migrations/StartUpFixes.php b/src/Migrations/StartUpFixes.php index bbd78e7..414817c 100644 --- a/src/Migrations/StartUpFixes.php +++ b/src/Migrations/StartUpFixes.php @@ -7,5 +7,11 @@ class StartUpFixes public static function fix(): void { define('MADELINE_WORKER_TYPE', 'madeline-ipc'); + + info('Removing ipc sockets from sessions to fix startup' . PHP_EOL); + foreach (glob(ROOT_DIR . '/sessions/*/*ipc') as $file) { + info("removing: $file"); + unlink($file); + } } } \ No newline at end of file diff --git a/src/Server/Authorization.php b/src/Server/Authorization.php index 14f519e..842eb20 100644 --- a/src/Server/Authorization.php +++ b/src/Server/Authorization.php @@ -5,10 +5,9 @@ use Amp\Http\Server\Middleware; use Amp\Http\Server\Request; use Amp\Http\Server\RequestHandler; +use Amp\Http\Server\Response; use Amp\Http\Status; -use Amp\Promise; use TelegramApiServer\Config; -use function Amp\call; class Authorization implements Middleware { @@ -17,22 +16,20 @@ class Authorization implements Middleware public function __construct() { - $this->ipWhitelist = (array) Config::getInstance()->get('api.ip_whitelist', []); + $this->ipWhitelist = (array)Config::getInstance()->get('api.ip_whitelist', []); $this->selfIp = ip2long(getHostByName(php_uname('n'))); } - public function handleRequest(Request $request, RequestHandler $next): Promise { - return call(function () use ($request, $next) { - - $host = $request->getClient()->getRemoteAddress()->getHost(); - if ($this->isIpAllowed($host)) { - $response = yield $next->handleRequest($request); - } else { - $response = ErrorResponses::get(Status::FORBIDDEN, 'Your host is not allowed'); - } + public function handleRequest(Request $request, RequestHandler $next): Response + { + $host = explode(':', $request->getClient()->getRemoteAddress()->toString())[0]; + if ($this->isIpAllowed($host)) { + $response = $next->handleRequest($request); + } else { + $response = ErrorResponses::get(Status::FORBIDDEN, 'Your host is not allowed: ' . $host); + } - return $response; - }); + return $response; } private function isIpAllowed(string $host): bool diff --git a/src/Server/HealthCheck.php b/src/Server/HealthCheck.php index b88f87e..3550cfd 100644 --- a/src/Server/HealthCheck.php +++ b/src/Server/HealthCheck.php @@ -2,14 +2,15 @@ namespace TelegramApiServer\Server; +use Amp\Future; use Amp\Http\Client\HttpClientBuilder; use Amp\Http\Client\Request; -use Amp\Loop; -use Amp\Promise; +use Revolt\EventLoop; use RuntimeException; use TelegramApiServer\Config; use TelegramApiServer\Logger; -use function Amp\call; +use function Amp\async; +use function Amp\Future\awaitAll; class HealthCheck { @@ -20,10 +21,10 @@ class HealthCheck /** * Sends requests to /system and /api - * In case of failure will shutdown main process. + * In case of failure will shut down main process. * * @param int $parentPid - * Pid of process to shutdown in case of failure. + * Pid of process to shut down in case of failure. */ public static function start(int $parentPid): void { @@ -37,23 +38,22 @@ public static function start(int $parentPid): void static::$requestTimeout = (int) Config::getInstance()->get('health_check.timeout'); try { - Loop::repeat(static::$checkInterval*1000, function() use($parentPid){ + EventLoop::repeat(static::$checkInterval, static function() use($parentPid) { Logger::getInstance()->info('Start health check'); if (!self::isProcessAlive($parentPid)) { throw new RuntimeException('Parent process died'); } - $sessions = yield from static::getSessionList(); + $sessions = static::getSessionList(); $sessionsForCheck = static::getLoggedInSessions($sessions); - $promises = []; + $futures = []; foreach ($sessionsForCheck as $session) { - $promises[] = static::checkSession($session); + $futures[] = static::checkSession($session); } - yield $promises; + awaitAll($futures); Logger::getInstance()->info('Health check ok. Sessions checked: ' . count($sessionsForCheck)); }); - - Loop::run(); + EventLoop::run(); } catch (\Throwable $e) { Logger::getInstance()->error($e->getMessage()); Logger::getInstance()->critical('Health check failed'); @@ -71,11 +71,11 @@ public static function start(int $parentPid): void } - private static function getSessionList() + private static function getSessionList(): array { $url = sprintf("http://%s:%s/system/getSessionList", static::$host, static::$port); - $response = yield static::sendRequest($url); + $response = static::sendRequest($url); if ($response === false) { throw new \UnexpectedValueException('No response from /system'); @@ -96,11 +96,11 @@ private static function getLoggedInSessions(array $sessions): array return $loggedInSessions; } - private static function checkSession(string $sessionName): Promise + private static function checkSession(string $sessionName): Future { - return call(static function() use($sessionName) { + return async(function() use($sessionName) { $url = sprintf("http://%s:%s/api/%s/getSelf", static::$host, static::$port, $sessionName); - $response = yield static::sendRequest($url); + $response = static::sendRequest($url); $response = json_decode($response, true, 10, JSON_THROW_ON_ERROR); if (empty($response['response'])) { Logger::getInstance()->error('Health check response: ', $response); @@ -111,17 +111,15 @@ private static function checkSession(string $sessionName): Promise } - private static function sendRequest(string $url): Promise + private static function sendRequest(string $url): string { - return call(function() use($url) { - $client = (new HttpClientBuilder)::buildDefault(); - $request = new Request($url); - $request->setInactivityTimeout(static::$requestTimeout*1000); - $request->setTransferTimeout(static::$requestTimeout*1000); - - $response = yield $client->request($request); - return yield $response->getBody()->buffer(); - }); + $client = (new HttpClientBuilder)::buildDefault(); + $request = new Request($url); + $request->setInactivityTimeout(static::$requestTimeout); + $request->setTransferTimeout(static::$requestTimeout); + + $response = $client->request($request); + return $response->getBody()->buffer(); } private static function isProcessAlive(int $pid): bool diff --git a/src/Server/Router.php b/src/Server/Router.php index 9820bc0..625869f 100644 --- a/src/Server/Router.php +++ b/src/Server/Router.php @@ -2,8 +2,10 @@ namespace TelegramApiServer\Server; +use Amp\Http\Server\ErrorHandler; use Amp\Http\Server\Request; -use Amp\Http\Server\RequestHandler\CallableRequestHandler; +use Amp\Http\Server\RequestHandler\ClosureRequestHandler; +use Amp\Http\Server\SocketHttpServer; use TelegramApiServer\Controllers\LogController; use TelegramApiServer\Controllers\SystemController; use TelegramApiServer\Controllers\ApiController; @@ -17,9 +19,9 @@ class Router { private \Amp\Http\Server\Router $router; - public function __construct() + public function __construct(SocketHttpServer $server, ErrorHandler $errorHandler) { - $this->router = new \Amp\Http\Server\Router(); + $this->router = new \Amp\Http\Server\Router($server, $errorHandler); $this->setRoutes(); $this->setFallback(); } @@ -31,7 +33,7 @@ public function getRouter(): \Amp\Http\Server\Router private function setFallback(): void { - $this->router->setFallback(new CallableRequestHandler(static function (Request $request) { + $this->router->setFallback(new ClosureRequestHandler(static function (Request $request) { return ErrorResponses::get(Status::NOT_FOUND, 'Path not found'); })); } diff --git a/src/Server/Server.php b/src/Server/Server.php index e056bb5..4bf902b 100644 --- a/src/Server/Server.php +++ b/src/Server/Server.php @@ -3,6 +3,12 @@ namespace TelegramApiServer\Server; use Amp; +use Amp\Http\Server\DefaultErrorHandler; +use Amp\Http\Server\Driver\ConnectionLimitingServerSocketFactory; +use Amp\Http\Server\Driver\DefaultHttpDriverFactory; +use Amp\Http\Server\SocketHttpServer; +use Amp\Socket\InternetAddress; +use Amp\Sync\LocalSemaphore; use TelegramApiServer\Client; use TelegramApiServer\Config; use TelegramApiServer\Logger; @@ -17,55 +23,44 @@ class Server */ public function __construct(array $options, ?array $sessionFiles) { - Amp\Loop::defer(function () use ($options, $sessionFiles) { - $server = new Amp\Http\Server\Server( - $this->getServerAddresses(static::getConfig($options)), - (new Router())->getRouter(), - Logger::getInstance(), - (new Amp\Http\Server\Options()) - ->withoutCompression() - ->withBodySizeLimit(2*1024*1024*1024)//2Gb - ->withHttp1Timeout(600) - ->withHttp2Timeout(600) - ->withConnectionsPerIpLimit(PHP_INT_MAX) - ); - - yield from Client::getInstance()->connect($sessionFiles); - $server->start(); + $server = new SocketHttpServer( + logger: Logger::getInstance(), + serverSocketFactory: new ConnectionLimitingServerSocketFactory(new LocalSemaphore(1000)), + clientFactory: new Amp\Http\Server\Driver\SocketClientFactory( + logger: Logger::getInstance(), + ), + httpDriverFactory: new DefaultHttpDriverFactory( + logger: Logger::getInstance(), + streamTimeout: 600, + connectionTimeout: 60, + bodySizeLimit: 5*(1024**3), //5Gb + ) + ); - $this->registerShutdown($server); - }); + $config = self::getConfig($options); + $server->expose(new InternetAddress($config['address'], $config['port'])); + Client::getInstance()->connect($sessionFiles); + $errorHandler = new DefaultErrorHandler(); + $server->start((new Router($server, $errorHandler))->getRouter(), $errorHandler); - while (true) { - Amp\Loop::run(); - } + self::registerShutdown($server); } - private static function getServerAddresses(array $config): array - { - return [ - Amp\Socket\Server::listen("{$config['address']}:{$config['port']}"), - ]; - } /** * Stop the server gracefully when SIGINT is received. * This is technically optional, but it is best to call Server::stop(). * - * @param Amp\Http\Server\Server $server * - * @throws Amp\Loop\UnsupportedFeatureException */ - private static function registerShutdown(Amp\Http\Server\Server $server) + private static function registerShutdown(SocketHttpServer $server) { if (defined('SIGINT')) { - Amp\Loop::onSignal(SIGINT, static function (string $watcherId) use ($server) { - emergency('Got SIGINT'); - Amp\Loop::cancel($watcherId); - yield $server->stop(); - exit; - }); + // Await SIGINT or SIGTERM to be received. + $signal = Amp\trapSignal([\SIGINT, \SIGTERM]); + info(\sprintf("Received signal %d, stopping HTTP server", $signal)); + $server->stop(); } } From 8ab0dbd8cdafc28c48a2531f72648d164de78bb3 Mon Sep 17 00:00:00 2001 From: Alexander Pankratov Date: Tue, 11 Apr 2023 01:56:45 +0200 Subject: [PATCH 049/270] Codestyle --- config.php | 37 ++++++++++--------- examples/websocket-events.php | 7 ++-- server.php | 4 +- src/Client.php | 11 ++---- src/Config.php | 2 +- src/Controllers/AbstractApiController.php | 17 +++++---- src/Controllers/ApiController.php | 3 +- src/Controllers/EventsController.php | 18 +++++---- src/Controllers/LogController.php | 23 +++++++++--- src/Controllers/SystemController.php | 3 +- src/EventObservers/EventObserver.php | 8 ++-- src/Exceptions/NoticeException.php | 4 +- src/Files.php | 4 +- src/Logger.php | 8 ++-- src/MadelineProtoExtensions/ApiExtensions.php | 10 ++--- .../SystemApiExtensions.php | 13 ++++--- src/Migrations/EnvUpgrade.php | 3 +- src/Migrations/StartUpFixes.php | 10 ++--- src/Migrations/SwooleToAmpMigration.php | 7 +++- src/Server/Fork.php | 4 +- src/Server/HealthCheck.php | 18 +++++---- src/Server/Router.php | 8 ++-- src/Server/Server.php | 11 ++++-- 23 files changed, 136 insertions(+), 97 deletions(-) diff --git a/config.php b/config.php index a71875f..b855f48 100644 --- a/config.php +++ b/config.php @@ -1,19 +1,22 @@ [ - 'address' => (string) getenv('SERVER_ADDRESS'), - 'port' => (int) getenv('SERVER_PORT'), + 'address' => (string)getenv('SERVER_ADDRESS'), + 'port' => (int)getenv('SERVER_PORT'), ], 'telegram' => [ 'app_info' => [ // obtained in https://my.telegram.org - 'api_id' => (int) getenv('TELEGRAM_API_ID'), - 'api_hash' => (string) getenv('TELEGRAM_API_HASH'), + 'api_id' => (int)getenv('TELEGRAM_API_ID'), + 'api_hash' => (string)getenv('TELEGRAM_API_HASH'), ], 'logger' => [ // Logger settings - 'logger' => \danog\MadelineProto\Logger::CALLABLE_LOGGER, // 0 - Logs disabled, 3 - echo logs. - 'logger_param' => \TelegramApiServer\EventObservers\LogObserver::class . '::log', - 'logger_level' => (int) getenv('LOGGER_LEVEL'), // Logging level, available logging levels are: ULTRA_VERBOSE - 5, VERBOSE - 4 , NOTICE - 3, WARNING - 2, ERROR - 1, FATAL_ERROR - 0. + 'logger' => Logger::CALLABLE_LOGGER, // 0 - Logs disabled, 3 - echo logs. + 'logger_param' => LogObserver::class . '::log', + 'logger_level' => (int)getenv('LOGGER_LEVEL'), // Logging level, available logging levels are: ULTRA_VERBOSE - 5, VERBOSE - 4 , NOTICE - 3, WARNING - 2, ERROR - 1, FATAL_ERROR - 0. ], 'updates' => [ 'handle_updates' => true, // Should I handle updates? @@ -23,8 +26,8 @@ 'all' => [ 'proxy' => '\SocksProxy', 'proxy_extra' => [ - 'address' => (string) getenv('TELEGRAM_PROXY_ADDRESS'), - 'port' => (int) getenv('TELEGRAM_PROXY_PORT'), + 'address' => (string)getenv('TELEGRAM_PROXY_ADDRESS'), + 'port' => (int)getenv('TELEGRAM_PROXY_PORT'), 'username' => getenv('TELEGRAM_PROXY_USERNAME'), 'password' => getenv('TELEGRAM_PROXY_PASSWORD'), ] @@ -40,17 +43,17 @@ 'db' => [ 'type' => getenv('DB_TYPE'), getenv('DB_TYPE') => [ - 'host' => (string) getenv('DB_HOST'), - 'port' => (int) getenv('DB_PORT'), + 'host' => (string)getenv('DB_HOST'), + 'port' => (int)getenv('DB_PORT'), 'user' => getenv('DB_USER'), 'password' => getenv('DB_PASSWORD'), 'database' => getenv('DB_DATABASE'), - 'max_connections' => (int) getenv('DB_MAX_CONNECTIONS'), - 'idle_timeout' => (int) getenv('DB_IDLE_TIMEOUT'), + 'max_connections' => (int)getenv('DB_MAX_CONNECTIONS'), + 'idle_timeout' => (int)getenv('DB_IDLE_TIMEOUT'), 'cache_ttl' => getenv('DB_CACHE_TTL'), ] ], - 'download'=>[ + 'download' => [ 'report_broken_media' => false, ], 'ipc' => [ @@ -66,9 +69,9 @@ ), ], 'health_check' => [ - 'enabled' => (bool) filter_var((string)getenv('HEALTHCHECK_ENABLED'), FILTER_VALIDATE_BOOL), - 'interval' => ((int) getenv('HEALTHCHECK_INTERVAL') ?: 30), - 'timeout' => ((int) getenv('HEALTHCHECK_REQUEST_TIMEOUT') ?: 60), + 'enabled' => (bool)filter_var((string)getenv('HEALTHCHECK_ENABLED'), FILTER_VALIDATE_BOOL), + 'interval' => ((int)getenv('HEALTHCHECK_INTERVAL') ?: 30), + 'timeout' => ((int)getenv('HEALTHCHECK_REQUEST_TIMEOUT') ?: 60), ] ]; diff --git a/examples/websocket-events.php b/examples/websocket-events.php index bb211da..42225bb 100644 --- a/examples/websocket-events.php +++ b/examples/websocket-events.php @@ -5,7 +5,6 @@ * @see \TelegramApiServer\Controllers\EventsController */ -use Amp\Future; use Amp\Websocket\Client\WebsocketHandshake; use function Amp\async; use function Amp\delay; @@ -25,7 +24,7 @@ echo "Connecting to: {$options['url']}" . PHP_EOL; -async(function() use($options) { +async(function () use ($options) { while (true) { try { $handshake = (new WebsocketHandshake($options['url'])); @@ -43,7 +42,7 @@ $payload = $message->buffer(); printf("[%s] Received event: %s\n", date('Y-m-d H:i:s'), $payload); } - } catch (\Throwable $e) { + } catch (Throwable $e) { printf("Error: %s\n", $e->getMessage()); } delay(0.1); @@ -51,4 +50,4 @@ } }); -$signal = Amp\trapSignal([\SIGINT, \SIGTERM]); +$signal = Amp\trapSignal([SIGINT, SIGTERM]); diff --git a/server.php b/server.php index de90350..df730a1 100644 --- a/server.php +++ b/server.php @@ -25,7 +25,7 @@ $options = [ 'address' => $options['address'] ?? $options['a'] ?? '', 'port' => $options['port'] ?? $options['p'] ?? '', - 'session' => (array) ($options['session'] ?? $options['s'] ?? []), + 'session' => (array)($options['session'] ?? $options['s'] ?? []), 'env' => $options['env'] ?? $options['e'] ?? '.env', 'docker' => isset($options['docker']), 'help' => isset($options['help']), @@ -74,7 +74,7 @@ $mainProcessPid = getmypid(); if (Config::getInstance()->get('health_check.enabled')) { - Fork::run(static function() use($mainProcessPid) { + Fork::run(static function () use ($mainProcessPid) { HealthCheck::start($mainProcessPid); }); } diff --git a/src/Client.php b/src/Client.php index 23d27bf..6d02604 100644 --- a/src/Client.php +++ b/src/Client.php @@ -8,12 +8,8 @@ use InvalidArgumentException; use Psr\Log\LogLevel; use ReflectionProperty; -use Revolt\EventLoop; use RuntimeException; use TelegramApiServer\EventObservers\EventObserver; -use function Amp\async; -use function Amp\Future\await; -use function Amp\Future\awaitAll; class Client { @@ -21,7 +17,8 @@ class Client /** @var API[] */ public array $instances = []; - public static function getInstance(): Client { + public static function getInstance(): Client + { if (empty(static::$self)) { static::$self = new static(); } @@ -59,7 +56,7 @@ public function addSession(string $session, array $settings = []): API Files::saveSessionSettings($session, $settings); } $settings = array_replace_recursive( - (array) Config::getInstance()->get('telegram'), + (array)Config::getInstance()->get('telegram'), Files::getSessionSettings($session), ); $instance = new API($file, $settings); @@ -101,7 +98,7 @@ public function getSession(?string $session = null): API if (!$session) { if (count($this->instances) === 1) { - $session = (string) array_key_first($this->instances); + $session = (string)array_key_first($this->instances); } else { throw new InvalidArgumentException( 'Multiple sessions detected. Specify which session to use. See README for examples.' diff --git a/src/Config.php b/src/Config.php index 03ee2cb..27d2ad7 100644 --- a/src/Config.php +++ b/src/Config.php @@ -39,7 +39,7 @@ public function get($key = '', $default = null) private function findByKey($key) { - $key = (string) $key; + $key = (string)$key; $path = explode('.', $key); $value = &$this->config; diff --git a/src/Controllers/AbstractApiController.php b/src/Controllers/AbstractApiController.php index 551a096..a624235 100644 --- a/src/Controllers/AbstractApiController.php +++ b/src/Controllers/AbstractApiController.php @@ -10,10 +10,13 @@ use Amp\Http\Server\Response; use Amp\Http\Server\Router; use danog\MadelineProto\API; +use JsonException; use TelegramApiServer\Exceptions\NoticeException; use TelegramApiServer\Logger; use TelegramApiServer\MadelineProtoExtensions\ApiExtensions; use TelegramApiServer\MadelineProtoExtensions\SystemApiExtensions; +use Throwable; +use UnexpectedValueException; use function mb_strpos; abstract class AbstractApiController @@ -66,7 +69,7 @@ public function __construct(Request $request, string $extensionClass) /** * @return Response|string - * @throws \Throwable + * @throws Throwable */ public function process() { @@ -141,7 +144,7 @@ private function generateResponse(): void $this->page['response'] = $this->page['response']->await(); } - } catch (\Throwable $e) { + } catch (Throwable $e) { if (!$e instanceof NoticeException) { error($e->getMessage(), Logger::getExceptionAsArray($e)); } else { @@ -172,7 +175,7 @@ protected function callApiCommon(API $madelineProto) $result = $madelineProto->{$this->api[0]}->{$this->api[1]}->{$this->api[2]}(...$this->parameters); break; default: - throw new \UnexpectedValueException('Incorrect method format'); + throw new UnexpectedValueException('Incorrect method format'); } } @@ -180,12 +183,12 @@ protected function callApiCommon(API $madelineProto) } /** - * @param \Throwable $e + * @param Throwable $e * * @return AbstractApiController - * @throws \Throwable + * @throws Throwable */ - private function setError(\Throwable $e): self + private function setError(Throwable $e): self { $errorCode = $e->getCode(); if ($errorCode >= 400 && $errorCode < 500) { @@ -203,7 +206,7 @@ private function setError(\Throwable $e): self * Кодирует ответ в нужный формат: json * * @return Response|string - * @throws \JsonException + * @throws JsonException */ private function getResponse(): string|Response { diff --git a/src/Controllers/ApiController.php b/src/Controllers/ApiController.php index 868f156..c153f27 100644 --- a/src/Controllers/ApiController.php +++ b/src/Controllers/ApiController.php @@ -2,6 +2,7 @@ namespace TelegramApiServer\Controllers; +use Exception; use TelegramApiServer\Client; class ApiController extends AbstractApiController @@ -22,7 +23,7 @@ protected function resolvePath(array $path): void } /** - * @throws \Exception + * @throws Exception */ protected function callApi() { diff --git a/src/Controllers/EventsController.php b/src/Controllers/EventsController.php index 6d96359..38d3462 100644 --- a/src/Controllers/EventsController.php +++ b/src/Controllers/EventsController.php @@ -5,16 +5,18 @@ use Amp\Http\Server\Request; use Amp\Http\Server\Response; use Amp\Http\Server\Router; -use Amp\Http\Status; +use Amp\Http\HttpStatus; use Amp\Websocket\Server\Websocket as WebsocketServer; use Amp\Websocket\Server\WebsocketClientGateway; use Amp\Websocket\Server\WebsocketClientHandler; use Amp\Websocket\Server\WebsocketHandshakeHandler; use Amp\Websocket\WebsocketClient; use Revolt\EventLoop; +use RuntimeException; use TelegramApiServer\Client; use TelegramApiServer\EventObservers\EventObserver; use TelegramApiServer\Logger; +use Throwable; class EventsController implements WebsocketClientHandler, WebsocketHandshakeHandler { @@ -44,10 +46,10 @@ public function handleHandshake(Request $request, Response $response): Response if ($session) { Client::getInstance()->getSession($session); } elseif (empty(Client::getInstance()->instances)) { - throw new \RuntimeException('No sessions available'); + throw new RuntimeException('No sessions available'); } - } catch (\Throwable $e){ - $response->setStatus(Status::NOT_FOUND); + } catch (Throwable $e) { + $response->setStatus(HttpStatus::NOT_FOUND); $response->setBody($e->getMessage()); } @@ -61,7 +63,7 @@ public function handleClient(WebsocketClient $client, Request $request, Response $this->gateway->addClient($client); while ($message = $client->receive()) { - notice('Recieved websocket message: ' . $message->buffer()); + notice('Recieved websocket message: ' . $message->buffer()); // Messages received on the connection are ignored and discarded. // Messages must be received properly to maintain connection with client (ping-pong check). } @@ -73,15 +75,15 @@ private function subscribeForUpdates(WebsocketClient $client, ?string $requested EventObserver::startEventHandler($requestedSession); - $pingLoop = EventLoop::repeat(self::PING_INTERVAL_MS, static fn () => $client->ping()); + $pingLoop = EventLoop::repeat(self::PING_INTERVAL_MS, static fn() => $client->ping()); - $client->onClose(static function() use($clientId, $requestedSession, $pingLoop) { + $client->onClose(static function () use ($clientId, $requestedSession, $pingLoop) { EventLoop::cancel($pingLoop); EventObserver::removeSubscriber($clientId); EventObserver::stopEventHandler($requestedSession); }); - EventObserver::addSubscriber($clientId, function($update, ?string $session) use($clientId, $requestedSession) { + EventObserver::addSubscriber($clientId, function ($update, ?string $session) use ($clientId, $requestedSession) { if ($requestedSession && $session !== $requestedSession) { return; } diff --git a/src/Controllers/LogController.php b/src/Controllers/LogController.php index d0c6f75..214f079 100644 --- a/src/Controllers/LogController.php +++ b/src/Controllers/LogController.php @@ -6,15 +6,24 @@ use Amp\Http\Server\Response; use Amp\Http\Server\Router; use Amp\Websocket\Server\Websocket; +use Amp\Websocket\Server\WebsocketClientGateway; use Amp\Websocket\Server\WebsocketClientHandler; use Amp\Websocket\Server\WebsocketHandshakeHandler; use Amp\Websocket\WebsocketClient; use Psr\Log\LogLevel; +use Revolt\EventLoop; use TelegramApiServer\EventObservers\LogObserver; use TelegramApiServer\Logger; class LogController implements WebsocketClientHandler, WebsocketHandshakeHandler { + private const PING_INTERVAL_MS = 10_000; + private WebsocketClientGateway $gateway; + + public function __construct() + { + $this->gateway = new WebsocketClientGateway(); + } public static function getRouterCallback(): Websocket { @@ -38,7 +47,8 @@ public function handleHandshake(Request $request, Response $response): Response public function handleClient(WebsocketClient $client, Request $request, Response $response): void { $level = $request->getAttribute(Router::class)['level'] ?? LogLevel::DEBUG; - static::subscribeForUpdates($client, $level); + $this->subscribeForUpdates($client, $level); + $this->gateway->addClient($client); while ($message = $client->receive()) { notice('Recived log websocket message: ' . $message->buffer()); @@ -47,15 +57,18 @@ public function handleClient(WebsocketClient $client, Request $request, Response } } - private static function subscribeForUpdates(WebsocketClient $client, string $requestedLevel): void + private function subscribeForUpdates(WebsocketClient $client, string $requestedLevel): void { $clientId = $client->getId(); - $client->onClose(static function() use($clientId) { + $pingLoop = EventLoop::repeat(self::PING_INTERVAL_MS, static fn() => $client->ping()); + + $client->onClose(static function () use ($clientId, $pingLoop) { + EventLoop::cancel($pingLoop); LogObserver::removeSubscriber($clientId); }); - LogObserver::addSubscriber($clientId, static function(string $level, string $message, array $context = []) use($endpoint, $clientId, $requestedLevel) { + LogObserver::addSubscriber($clientId, function (string $level, string $message, array $context = []) use ($clientId, $requestedLevel) { if ($requestedLevel && Logger::$levels[$level] < Logger::$levels[$requestedLevel]) { return; } @@ -69,7 +82,7 @@ private static function subscribeForUpdates(WebsocketClient $client, string $req 'id' => null, ]; - $endpoint->multicast( + $this->gateway->multicast( json_encode( $update, JSON_THROW_ON_ERROR | diff --git a/src/Controllers/SystemController.php b/src/Controllers/SystemController.php index b55bcb9..1159b4c 100644 --- a/src/Controllers/SystemController.php +++ b/src/Controllers/SystemController.php @@ -2,6 +2,7 @@ namespace TelegramApiServer\Controllers; +use Exception; use TelegramApiServer\Client; class SystemController extends AbstractApiController @@ -19,7 +20,7 @@ protected function resolvePath(array $path): void /** * @return mixed - * @throws \Exception + * @throws Exception */ protected function callApi() { diff --git a/src/EventObservers/EventObserver.php b/src/EventObservers/EventObserver.php index f1922ab..f32f0ad 100644 --- a/src/EventObservers/EventObserver.php +++ b/src/EventObservers/EventObserver.php @@ -7,15 +7,17 @@ use ReflectionProperty; use TelegramApiServer\Client; use TelegramApiServer\Logger; +use Throwable; class EventObserver { use ObserverTrait; - /** @var int[] */ + /** @var int[] */ public static array $sessionClients = []; - public static function notify(array $update, string $sessionName) { + public static function notify(array $update, string $sessionName) + { foreach (static::$subscribers as $clientId => $callback) { notice("Pass update to callback. ClientId: {$clientId}"); $callback($update, $sessionName); @@ -56,7 +58,7 @@ public static function startEventHandler(?string $requestedSession = null): void /** @var APIWrapper $wrapper */ $wrapper = $property->getValue($instance); $wrapper->getAPI()->setEventHandler(EventHandler::class); - } catch (\Throwable $e) { + } catch (Throwable $e) { static::removeSessionClient($session); error('Cant set EventHandler', [ 'session' => $session, diff --git a/src/Exceptions/NoticeException.php b/src/Exceptions/NoticeException.php index ad9a27d..54e8d22 100644 --- a/src/Exceptions/NoticeException.php +++ b/src/Exceptions/NoticeException.php @@ -2,7 +2,9 @@ namespace TelegramApiServer\Exceptions; -class NoticeException extends \Exception +use Exception; + +class NoticeException extends Exception { } \ No newline at end of file diff --git a/src/Files.php b/src/Files.php index 178199e..c98956e 100644 --- a/src/Files.php +++ b/src/Files.php @@ -90,8 +90,8 @@ public static function saveSessionSettings(string $session, array $settings = [] public static function globRecursive($pattern, $flags = 0): array { $files = glob($pattern, $flags) ?: []; - foreach (glob(dirname($pattern).'/*', GLOB_ONLYDIR|GLOB_NOSORT) as $dir) { - $files = [...$files, ...static::globRecursive($dir.'/'.basename($pattern), $flags)]; + foreach (glob(dirname($pattern) . '/*', GLOB_ONLYDIR | GLOB_NOSORT) as $dir) { + $files = [...$files, ...static::globRecursive($dir . '/' . basename($pattern), $flags)]; } return $files; } diff --git a/src/Logger.php b/src/Logger.php index f1fa990..bccfa08 100644 --- a/src/Logger.php +++ b/src/Logger.php @@ -17,6 +17,7 @@ use Psr\Log\InvalidArgumentException; use Psr\Log\LogLevel; use TelegramApiServer\EventObservers\LogObserver; +use Throwable; use function get_class; use function gettype; use function is_object; @@ -59,7 +60,7 @@ protected function __construct(string $minLevel = LogLevel::WARNING, callable $f { if (null === $minLevel) { if (isset($_ENV['SHELL_VERBOSITY']) || isset($_SERVER['SHELL_VERBOSITY'])) { - switch ((int) (isset($_ENV['SHELL_VERBOSITY']) ? $_ENV['SHELL_VERBOSITY'] : + switch ((int)(isset($_ENV['SHELL_VERBOSITY']) ? $_ENV['SHELL_VERBOSITY'] : $_SERVER['SHELL_VERBOSITY'])) { case -1: $minLevel = LogLevel::ERROR; @@ -122,7 +123,7 @@ private function format(string $level, string $message, array $context): string if (false !== strpos($message, '{')) { $replacements = []; foreach ($context as $key => $val) { - if ($val instanceof \Throwable) { + if ($val instanceof Throwable) { $context[$key] = self::getExceptionAsArray($val); } if (null === $val || is_scalar($val) || (is_object($val) && method_exists($val, '__toString'))) { @@ -158,7 +159,8 @@ private function format(string $level, string $message, array $context): string ) . PHP_EOL; } - public static function getExceptionAsArray(\Throwable $exception) { + public static function getExceptionAsArray(Throwable $exception) + { return [ 'exception' => get_class($exception), 'message' => $exception->getMessage(), diff --git a/src/MadelineProtoExtensions/ApiExtensions.php b/src/MadelineProtoExtensions/ApiExtensions.php index 946deed..19fd221 100644 --- a/src/MadelineProtoExtensions/ApiExtensions.php +++ b/src/MadelineProtoExtensions/ApiExtensions.php @@ -211,7 +211,7 @@ public function copyMessages(array $data) $result[] = $this->sendMessage($messageData); } if ($key > 0) { - delay(random_int(300, 2000)/1000); + delay(random_int(300, 2000) / 1000); } } @@ -343,9 +343,9 @@ public function getMedia(array $data): Response $webpage = $message['media']['webpage']; if (!empty($webpage['embed_url'])) { return new Response(302, ['Location' => $webpage['embed_url']]); - } elseif(!empty($webpage['document'])) { + } elseif (!empty($webpage['document'])) { $info = $this->madelineProto->getDownloadInfo($webpage['document']); - } elseif(!empty($webpage['photo'])) { + } elseif (!empty($webpage['photo'])) { $info = $this->madelineProto->getDownloadInfo($webpage['photo']); } else { return $this->getMediaPreview($data); @@ -451,11 +451,11 @@ public function getMessages(array $data): array $response = $this->madelineProto->channels->getMessages( [ 'channel' => $data['peer'], - 'id' => (array) $data['id'], + 'id' => (array)$data['id'], ] ); } else { - $response = $this->madelineProto->messages->getMessages(['id' => (array) $data['id']]); + $response = $this->madelineProto->messages->getMessages(['id' => (array)$data['id']]); } return $response; diff --git a/src/MadelineProtoExtensions/SystemApiExtensions.php b/src/MadelineProtoExtensions/SystemApiExtensions.php index cb76208..8097834 100644 --- a/src/MadelineProtoExtensions/SystemApiExtensions.php +++ b/src/MadelineProtoExtensions/SystemApiExtensions.php @@ -4,9 +4,11 @@ use danog\MadelineProto; use danog\MadelineProto\MTProto; +use InvalidArgumentException; use Revolt\EventLoop; use TelegramApiServer\Client; use TelegramApiServer\Files; +use Throwable; use function Amp\async; use function Amp\File\deleteFile; use function Amp\Future\awaitAll; @@ -23,7 +25,7 @@ public function __construct(Client $client) public function addSession(string $session, array $settings = []): array { if (!empty($settings['app_info']['api_id'])) { - $settings['app_info']['api_id'] = (int) $settings['app_info']['api_id']; + $settings['app_info']['api_id'] = (int)$settings['app_info']['api_id']; } $instance = $this->client->addSession($session, $settings); @@ -34,7 +36,7 @@ public function addSession(string $session, array $settings = []): array $fullSettings->getAppInfo()->getApiId(); $fullSettings->getAppInfo()->getApiHash(); } - } catch (\Throwable $e) { + } catch (Throwable $e) { unset($fullSettings, $instance); $this->removeSession($session); $this->unlinkSessionFile($session); @@ -101,11 +103,11 @@ public function unlinkSessionFile($session): string if (is_file($file)) { $futures = []; foreach (glob("$file*") as $file) { - $futures[] = async(fn()=>deleteFile($file)); + $futures[] = async(fn() => deleteFile($file)); } awaitAll($futures); } else { - throw new \InvalidArgumentException('Session file not found'); + throw new InvalidArgumentException('Session file not found'); } $this->unlinkSessionSettings($session); @@ -130,7 +132,8 @@ public function unlinkSessionSettings($session): string return 'ok'; } - public function exit(): string { + public function exit(): string + { EventLoop::defer(static fn() => exit()); return 'ok'; } diff --git a/src/Migrations/EnvUpgrade.php b/src/Migrations/EnvUpgrade.php index e2d9878..7c6d4fb 100644 --- a/src/Migrations/EnvUpgrade.php +++ b/src/Migrations/EnvUpgrade.php @@ -4,7 +4,8 @@ class EnvUpgrade { - public static function mysqlToDbPrefix() { + public static function mysqlToDbPrefix() + { foreach (glob(ROOT_DIR . '/.env*') as $envFile) { $text = file_get_contents($envFile); diff --git a/src/Migrations/StartUpFixes.php b/src/Migrations/StartUpFixes.php index 414817c..8f035af 100644 --- a/src/Migrations/StartUpFixes.php +++ b/src/Migrations/StartUpFixes.php @@ -8,10 +8,10 @@ public static function fix(): void { define('MADELINE_WORKER_TYPE', 'madeline-ipc'); - info('Removing ipc sockets from sessions to fix startup' . PHP_EOL); - foreach (glob(ROOT_DIR . '/sessions/*/*ipc') as $file) { - info("removing: $file"); - unlink($file); - } + info('Removing ipc sockets from sessions to fix startup' . PHP_EOL); + foreach (glob(ROOT_DIR . '/sessions/*/*ipc') as $file) { + info("removing: $file"); + unlink($file); + } } } \ No newline at end of file diff --git a/src/Migrations/SwooleToAmpMigration.php b/src/Migrations/SwooleToAmpMigration.php index ff6a5e3..1aafb92 100644 --- a/src/Migrations/SwooleToAmpMigration.php +++ b/src/Migrations/SwooleToAmpMigration.php @@ -2,11 +2,14 @@ namespace TelegramApiServer\Migrations; +use UnexpectedValueException; + class SwooleToAmpMigration { - public static function check() { + public static function check() + { if (getenv('SWOOLE_SERVER_ADDRESS')) { - throw new \UnexpectedValueException('Please, update .env file! See .env.example'); + throw new UnexpectedValueException('Please, update .env file! See .env.example'); } } diff --git a/src/Server/Fork.php b/src/Server/Fork.php index 9450f89..9b46da1 100644 --- a/src/Server/Fork.php +++ b/src/Server/Fork.php @@ -2,13 +2,15 @@ namespace TelegramApiServer\Server; +use RuntimeException; + class Fork { public static function run(callable $callback) { $pid = pcntl_fork(); if ($pid === -1) { - throw new \RuntimeException('Could not fork'); + throw new RuntimeException('Could not fork'); } if ($pid !== 0) { return; diff --git a/src/Server/HealthCheck.php b/src/Server/HealthCheck.php index 3550cfd..ed20aba 100644 --- a/src/Server/HealthCheck.php +++ b/src/Server/HealthCheck.php @@ -9,6 +9,8 @@ use RuntimeException; use TelegramApiServer\Config; use TelegramApiServer\Logger; +use Throwable; +use UnexpectedValueException; use function Amp\async; use function Amp\Future\awaitAll; @@ -28,17 +30,17 @@ class HealthCheck */ public static function start(int $parentPid): void { - static::$host = (string) Config::getInstance()->get('server.address'); + static::$host = (string)Config::getInstance()->get('server.address'); if (static::$host === '0.0.0.0') { static::$host = '127.0.0.1'; } - static::$port = (int) Config::getInstance()->get('server.port'); + static::$port = (int)Config::getInstance()->get('server.port'); - static::$checkInterval = (int) Config::getInstance()->get('health_check.interval'); - static::$requestTimeout = (int) Config::getInstance()->get('health_check.timeout'); + static::$checkInterval = (int)Config::getInstance()->get('health_check.interval'); + static::$requestTimeout = (int)Config::getInstance()->get('health_check.timeout'); try { - EventLoop::repeat(static::$checkInterval, static function() use($parentPid) { + EventLoop::repeat(static::$checkInterval, static function () use ($parentPid) { Logger::getInstance()->info('Start health check'); if (!self::isProcessAlive($parentPid)) { throw new RuntimeException('Parent process died'); @@ -54,7 +56,7 @@ public static function start(int $parentPid): void Logger::getInstance()->info('Health check ok. Sessions checked: ' . count($sessionsForCheck)); }); EventLoop::run(); - } catch (\Throwable $e) { + } catch (Throwable $e) { Logger::getInstance()->error($e->getMessage()); Logger::getInstance()->critical('Health check failed'); if (self::isProcessAlive($parentPid)) { @@ -78,7 +80,7 @@ private static function getSessionList(): array $response = static::sendRequest($url); if ($response === false) { - throw new \UnexpectedValueException('No response from /system'); + throw new UnexpectedValueException('No response from /system'); } return json_decode($response, true, 10, JSON_THROW_ON_ERROR)['response']['sessions']; @@ -98,7 +100,7 @@ private static function getLoggedInSessions(array $sessions): array private static function checkSession(string $sessionName): Future { - return async(function() use($sessionName) { + return async(function () use ($sessionName) { $url = sprintf("http://%s:%s/api/%s/getSelf", static::$host, static::$port, $sessionName); $response = static::sendRequest($url); $response = json_decode($response, true, 10, JSON_THROW_ON_ERROR); diff --git a/src/Server/Router.php b/src/Server/Router.php index 625869f..f6ac2f9 100644 --- a/src/Server/Router.php +++ b/src/Server/Router.php @@ -6,11 +6,11 @@ use Amp\Http\Server\Request; use Amp\Http\Server\RequestHandler\ClosureRequestHandler; use Amp\Http\Server\SocketHttpServer; -use TelegramApiServer\Controllers\LogController; -use TelegramApiServer\Controllers\SystemController; +use Amp\Http\HttpStatus; use TelegramApiServer\Controllers\ApiController; use TelegramApiServer\Controllers\EventsController; -use Amp\Http\Status; +use TelegramApiServer\Controllers\LogController; +use TelegramApiServer\Controllers\SystemController; use TelegramApiServer\MadelineProtoExtensions\ApiExtensions; use TelegramApiServer\MadelineProtoExtensions\SystemApiExtensions; use function Amp\Http\Server\Middleware\stack; @@ -34,7 +34,7 @@ public function getRouter(): \Amp\Http\Server\Router private function setFallback(): void { $this->router->setFallback(new ClosureRequestHandler(static function (Request $request) { - return ErrorResponses::get(Status::NOT_FOUND, 'Path not found'); + return ErrorResponses::get(HttpStatus::NOT_FOUND, 'Path not found'); })); } diff --git a/src/Server/Server.php b/src/Server/Server.php index 4bf902b..10312fa 100644 --- a/src/Server/Server.php +++ b/src/Server/Server.php @@ -12,6 +12,9 @@ use TelegramApiServer\Client; use TelegramApiServer\Config; use TelegramApiServer\Logger; +use function sprintf; +use const SIGINT; +use const SIGTERM; class Server { @@ -33,7 +36,7 @@ public function __construct(array $options, ?array $sessionFiles) logger: Logger::getInstance(), streamTimeout: 600, connectionTimeout: 60, - bodySizeLimit: 5*(1024**3), //5Gb + bodySizeLimit: 5 * (1024 ** 3), //5Gb ) ); @@ -58,8 +61,8 @@ private static function registerShutdown(SocketHttpServer $server) { if (defined('SIGINT')) { // Await SIGINT or SIGTERM to be received. - $signal = Amp\trapSignal([\SIGINT, \SIGTERM]); - info(\sprintf("Received signal %d, stopping HTTP server", $signal)); + $signal = Amp\trapSignal([SIGINT, SIGTERM]); + info(sprintf("Received signal %d, stopping HTTP server", $signal)); $server->stop(); } } @@ -72,7 +75,7 @@ private static function registerShutdown(SocketHttpServer $server) */ private function getConfig(array $config = []): array { - $config = array_filter($config); + $config = array_filter($config); $config = array_merge( Config::getInstance()->get('server', []), From c2d355eb077669e4ba79de9470b05d0b186d8684 Mon Sep 17 00:00:00 2001 From: Alexander Pankratov Date: Tue, 11 Apr 2023 01:57:10 +0200 Subject: [PATCH 050/270] Fix log controller --- src/EventObservers/LogObserver.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/EventObservers/LogObserver.php b/src/EventObservers/LogObserver.php index ce29a3d..e6b08f3 100644 --- a/src/EventObservers/LogObserver.php +++ b/src/EventObservers/LogObserver.php @@ -3,6 +3,7 @@ namespace TelegramApiServer\EventObservers; use TelegramApiServer\Logger; +use Throwable; class LogObserver { @@ -22,9 +23,9 @@ public static function notify(string $level, string $message, array $context = [ public static function log($message, int $level) { if (is_scalar($message)) { - Logger::getInstance()->log(Logger::$madelineLevels[$level], (string) $message); + Logger::getInstance()->log(Logger::$madelineLevels[$level], (string)$message); } else { - if ($message instanceof \Throwable) { + if ($message instanceof Throwable) { $message = Logger::getExceptionAsArray($message); } if (is_array($message)) { From 3e2314eeeb458cdafeb9c1f0f8a53c18c083cb45 Mon Sep 17 00:00:00 2001 From: Alexander Pankratov Date: Tue, 11 Apr 2023 13:05:38 +0200 Subject: [PATCH 051/270] Update madeline --- composer.lock | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/composer.lock b/composer.lock index d1c27af..ae6d3f9 100644 --- a/composer.lock +++ b/composer.lock @@ -814,12 +814,12 @@ "source": { "type": "git", "url": "https://github.com/amphp/http-server-form-parser.git", - "reference": "43ef1a70a69465b4a5dadfcda78c54125f721fd5" + "reference": "547c1d0f16b248cdf8c8092fea390812eec6a8a5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/amphp/http-server-form-parser/zipball/43ef1a70a69465b4a5dadfcda78c54125f721fd5", - "reference": "43ef1a70a69465b4a5dadfcda78c54125f721fd5", + "url": "https://api.github.com/repos/amphp/http-server-form-parser/zipball/547c1d0f16b248cdf8c8092fea390812eec6a8a5", + "reference": "547c1d0f16b248cdf8c8092fea390812eec6a8a5", "shasum": "" }, "require": { @@ -888,7 +888,7 @@ "type": "github" } ], - "time": "2023-02-02T05:07:33+00:00" + "time": "2023-04-10T20:57:17+00:00" }, { "name": "amphp/http-server-router", @@ -2452,12 +2452,12 @@ "source": { "type": "git", "url": "https://github.com/danog/MadelineProto.git", - "reference": "31eff9db1fe27b60a84d35da3844fb8ee18e43bf" + "reference": "f4413860c742bc4d098a39e4235258b09a5b4728" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/danog/MadelineProto/zipball/31eff9db1fe27b60a84d35da3844fb8ee18e43bf", - "reference": "31eff9db1fe27b60a84d35da3844fb8ee18e43bf", + "url": "https://api.github.com/repos/danog/MadelineProto/zipball/f4413860c742bc4d098a39e4235258b09a5b4728", + "reference": "f4413860c742bc4d098a39e4235258b09a5b4728", "shasum": "" }, "require": { @@ -2563,7 +2563,7 @@ ], "support": { "issues": "https://github.com/danog/MadelineProto/issues", - "source": "https://github.com/danog/MadelineProto/tree/8.0.0-beta68" + "source": "https://github.com/danog/MadelineProto/tree/v8" }, "funding": [ { @@ -2571,7 +2571,7 @@ "type": "github" } ], - "time": "2023-04-03T10:07:27+00:00" + "time": "2023-04-11T08:50:45+00:00" }, { "name": "danog/primemodule", @@ -3625,21 +3625,21 @@ }, { "name": "psr/http-factory", - "version": "1.0.1", + "version": "1.0.2", "source": { "type": "git", "url": "https://github.com/php-fig/http-factory.git", - "reference": "12ac7fcd07e5b077433f5f2bee95b3a771bf61be" + "reference": "e616d01114759c4c489f93b099585439f795fe35" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/http-factory/zipball/12ac7fcd07e5b077433f5f2bee95b3a771bf61be", - "reference": "12ac7fcd07e5b077433f5f2bee95b3a771bf61be", + "url": "https://api.github.com/repos/php-fig/http-factory/zipball/e616d01114759c4c489f93b099585439f795fe35", + "reference": "e616d01114759c4c489f93b099585439f795fe35", "shasum": "" }, "require": { "php": ">=7.0.0", - "psr/http-message": "^1.0" + "psr/http-message": "^1.0 || ^2.0" }, "type": "library", "extra": { @@ -3659,7 +3659,7 @@ "authors": [ { "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" + "homepage": "https://www.php-fig.org/" } ], "description": "Common interfaces for PSR-7 HTTP message factories", @@ -3674,9 +3674,9 @@ "response" ], "support": { - "source": "https://github.com/php-fig/http-factory/tree/master" + "source": "https://github.com/php-fig/http-factory/tree/1.0.2" }, - "time": "2019-04-30T12:38:16+00:00" + "time": "2023-04-10T20:10:41+00:00" }, { "name": "psr/http-message", From 8f95b16ed335dac41de66a8a7bb0dbefb22a6bd8 Mon Sep 17 00:00:00 2001 From: Alexander Pankratov Date: Sun, 16 Apr 2023 21:56:53 +0200 Subject: [PATCH 052/270] Update readme --- README.md | 91 +++++++++++++++++-------------------------------------- 1 file changed, 28 insertions(+), 63 deletions(-) diff --git a/README.md b/README.md index 9a518bc..61e37a9 100644 --- a/README.md +++ b/README.md @@ -21,47 +21,44 @@ Fast, simple, async php telegram api server: ## Installation -### Docker: -1. `git clone https://github.com/xtrime-ru/TelegramApiServer.git TelegramApiServer` -1. `cd TelegramApiServer` -1. Start container: `docker compose up` - Folder will be linked inside container to store all necessary data: sessions, env, db. - -### Manual: -1. Requirements: - * ssh / cli - * php 8.1+ - * composer - * git - * Mysql/MariaDB (optional) - * [MadelindeProto Requirements](https://docs.madelineproto.xyz/docs/REQUIREMENTS.html) - * [Amp Requirements](https://github.com/amphp/amp#requirements) - * XAMPP (for Windows) - -1. `git clone https://github.com/xtrime-ru/TelegramApiServer.git TelegramApiServer` -1. `cd TelegramApiServer` -1. `composer install -o --no-dev` -1. `php server.php` +```shell +git clone https://github.com/xtrime-ru/TelegramApiServer.git TelegramApiServer +cd TelegramApiServer +cp .env.docker.example .env.docker +docker compose pull +``` -## First start +## Authorization 1. Get app_id and app_hash at [my.telegram.org](https://my.telegram.org/). Only one app_id needed for any amount of users and bots. -1. Create .env file: `cp .env.docker.example .env.docker` or `cp .env.example .env` 1. Fill app_id and app_hash in `.env.docker` or `.env`. 1. Start TelegramApiServer in cli: - * docker: 1. Start container interactively: `docker compose run --rm api` - 2. If you need to start multiple sessions, create docker-compose.override.yml. Add additional containers there. Use unique ports and session names in command. - * manual: - 1. `php server.php --session=session` + 2. If you need to start multiple sessions, create docker-compose.override.yml. Add additional containers there. Use unique ports and session names in `command`. 1. Authorize your session: 1. Chose account type: user (`u`) or bot (`b`) 1. Follow instructions -1. Wait 10-30 seconds until authorization is end and exit with `Ctrl + C`. -1. Run TAS in screen, tmux, supervisor (see below) or docker. +1. Wait 10-30 seconds until session is started. + You will see logs: + ```text + TelegramApiServer ready. + Number of sessions: 1. + ``` +1. Exit with `Ctrl + C` +1. Run container in background `docker compose up -d`. -## Usage +## Update +* `git pull` or `git fetch && git reset --hard origin/master` +* `rm -rf vendor/` +* Compare `.env.docker` or `.env` with corresponding `.env.example`. Update if needed. +* Recreate containers: + ```shell + docker compose pull + docker compose down + docker compose up -d + ``` +## Usage 1. Run server/parser ``` usage: php server.php [--help] [-a=|--address=127.0.0.1] [-p=|--port=9503] [-s=|--session=] [-e=|--env=.env] [--docker] @@ -89,7 +86,6 @@ Fast, simple, async php telegram api server: Also some options can be set in .env file (see .env.example) ``` 1. Access Telegram API with simple GET/POST requests. - Regular and application/json POST supported. It's recommended to use http_build_query, when using GET requests. @@ -120,37 +116,6 @@ Fast, simple, async php telegram api server: * search: `http://127.0.0.1:9503/api/searchGlobal/?data[q]=Hello%20World&data[limit]=10` * sendMessage: `http://127.0.0.1:9503/api/sendMessage/?data[peer]=@xtrime&data[message]=Hello!` * copy message from one channel to another (not repost): `http://127.0.0.1:9503/api/copyMessages/?data[from_peer]=@xtrime&data[to_peer]=@xtrime&data[id][0]=1` - -## Run in background -* Docker: `docker compose up -d` - Docker will monitor and restart containers. -* Manual: - 1. Use [supervisor](http://supervisord.org) to monitor and restart swoole/amphp servers. - 1. `apt-get install supervisor` - 1. Put config file in `/etc/supervisor/conf.d/telegram_api_server.conf`. Example: - ``` - [program:telegram_api_server] - command=/usr/bin/php /home/admin/web/tg.i-c-a.su/TelegramApiServer/server.php --session=* - numprocs=1 - directory=/home/admin/web/tg.i-c-a.su/TelegramApiServer/ - autostart=true - autorestart=true - startretries=10 - stdout_logfile=/var/log/telegram/stdout.log - redirect_stderr=true - ``` - 1. Load new config: `supervisorctl update` - 1. View/control processes: `supervisorctl` - -## Update -* `git pull` or `git fetch && git reset --hard origin/master` -* `composer install -o --no-dev` -* Compare `.env.docker` or `.env` with corresponding `.env.example`. Update if needed. -* Docker: - * `docker compose pull` - * `docker compose down` - * `docker compose up` -* Manual: `supervisorctl restart telegram_api_server` ## Advanced features ### Uploading files. @@ -346,10 +311,10 @@ Full list of custom methods and their parameters available in [ApiExtensions cla * `getMediaPreview` - download media preview to stream/browser * `uploadMediaForm` - upload document from POST request. - ## Contacts * Telegram: * Author: [@xtrime](https://t.me/xtrime) * [MadelineProto and Amp Support Groups](https://t.me/pwrtelegramgroup) + * Use madelineProto support groups to get support for TelegramApiServer. * Email: alexander(at)i-c-a.su From c133da0e8e57a9228925ee1a29c39a406f3c39d6 Mon Sep 17 00:00:00 2001 From: Alexander Pankratov Date: Sun, 23 Apr 2023 19:54:32 +0200 Subject: [PATCH 053/270] Update madelineProto --- composer.lock | 90 ++++++++++++++++++++++++++------------------------- 1 file changed, 46 insertions(+), 44 deletions(-) diff --git a/composer.lock b/composer.lock index ae6d3f9..92d374a 100644 --- a/composer.lock +++ b/composer.lock @@ -474,16 +474,16 @@ }, { "name": "amphp/http", - "version": "v2.0.0-beta.3", + "version": "v2.0.0", "source": { "type": "git", "url": "https://github.com/amphp/http.git", - "reference": "90b524d58461c0a47e18d15a9cdce3ebb2f94166" + "reference": "f8bb94a2b079aa8e30ad78b5374df787a2122dfe" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/amphp/http/zipball/90b524d58461c0a47e18d15a9cdce3ebb2f94166", - "reference": "90b524d58461c0a47e18d15a9cdce3ebb2f94166", + "url": "https://api.github.com/repos/amphp/http/zipball/f8bb94a2b079aa8e30ad78b5374df787a2122dfe", + "reference": "f8bb94a2b079aa8e30ad78b5374df787a2122dfe", "shasum": "" }, "require": { @@ -491,7 +491,7 @@ "amphp/parser": "^1.1", "league/uri-components": "^2.4", "php": ">=8.1", - "psr/http-message": "^1" + "psr/http-message": "^1 || ^2" }, "require-dev": { "amphp/php-cs-fixer-config": "^2", @@ -526,7 +526,7 @@ "description": "Basic HTTP primitives which can be shared by servers and clients.", "support": { "issues": "https://github.com/amphp/http/issues", - "source": "https://github.com/amphp/http/tree/v2.0.0-beta.3" + "source": "https://github.com/amphp/http/tree/v2.0.0" }, "funding": [ { @@ -534,20 +534,20 @@ "type": "github" } ], - "time": "2023-04-08T14:32:00+00:00" + "time": "2023-04-12T19:20:53+00:00" }, { "name": "amphp/http-client", - "version": "v5.0.0-beta.10", + "version": "v5.0.0-beta.11", "source": { "type": "git", "url": "https://github.com/amphp/http-client.git", - "reference": "1e1fc7d70023f62aa35f85531ef00cf3aaa0b222" + "reference": "0fd30c4ff2231b044ead0e7a5d3aedafcbca59b1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/amphp/http-client/zipball/1e1fc7d70023f62aa35f85531ef00cf3aaa0b222", - "reference": "1e1fc7d70023f62aa35f85531ef00cf3aaa0b222", + "url": "https://api.github.com/repos/amphp/http-client/zipball/0fd30c4ff2231b044ead0e7a5d3aedafcbca59b1", + "reference": "0fd30c4ff2231b044ead0e7a5d3aedafcbca59b1", "shasum": "" }, "require": { @@ -559,13 +559,14 @@ "amphp/socket": "^2", "amphp/sync": "^2", "league/uri": "^6", + "league/uri-components": "^2.4", "php": ">=8.1", "psr/http-message": "^1", "revolt/event-loop": "^1" }, "require-dev": { "amphp/file": "^3", - "amphp/http-server": "^3", + "amphp/http-server": "^3-dev", "amphp/php-cs-fixer-config": "^2", "amphp/phpunit-util": "^3", "ext-json": "*", @@ -623,7 +624,7 @@ ], "support": { "issues": "https://github.com/amphp/http-client/issues", - "source": "https://github.com/amphp/http-client/tree/v5.0.0-beta.10" + "source": "https://github.com/amphp/http-client/tree/v5.0.0-beta.11" }, "funding": [ { @@ -631,7 +632,7 @@ "type": "github" } ], - "time": "2023-04-09T15:03:50+00:00" + "time": "2023-04-13T05:19:15+00:00" }, { "name": "amphp/http-client-cookies", @@ -716,12 +717,12 @@ "source": { "type": "git", "url": "https://github.com/amphp/http-server.git", - "reference": "76c48d8e5295f2cf20b41fc3dfccc7cb6ae9bb4d" + "reference": "b86f0d43418dc8141ad4bf5f821a23f7d3abf639" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/amphp/http-server/zipball/76c48d8e5295f2cf20b41fc3dfccc7cb6ae9bb4d", - "reference": "76c48d8e5295f2cf20b41fc3dfccc7cb6ae9bb4d", + "url": "https://api.github.com/repos/amphp/http-server/zipball/b86f0d43418dc8141ad4bf5f821a23f7d3abf639", + "reference": "b86f0d43418dc8141ad4bf5f821a23f7d3abf639", "shasum": "" }, "require": { @@ -731,7 +732,7 @@ "amphp/hpack": "^3", "amphp/http": "^2", "amphp/pipeline": "^1", - "amphp/socket": "^2", + "amphp/socket": "^2.1", "amphp/sync": "^2", "league/uri": "^6", "league/uri-interfaces": "^2.3", @@ -798,7 +799,7 @@ ], "support": { "issues": "https://github.com/amphp/http-server/issues", - "source": "https://github.com/amphp/http-server/tree/3.x" + "source": "https://github.com/amphp/http-server/tree/v3.0.0-beta.8" }, "funding": [ { @@ -806,30 +807,30 @@ "type": "github" } ], - "time": "2023-04-09T16:12:16+00:00" + "time": "2023-04-22T14:22:35+00:00" }, { "name": "amphp/http-server-form-parser", - "version": "v2.x-dev", + "version": "v2.0.0-beta.3", "source": { "type": "git", "url": "https://github.com/amphp/http-server-form-parser.git", - "reference": "547c1d0f16b248cdf8c8092fea390812eec6a8a5" + "reference": "42193795723ea72e950b74f0a9075bb794c542f0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/amphp/http-server-form-parser/zipball/547c1d0f16b248cdf8c8092fea390812eec6a8a5", - "reference": "547c1d0f16b248cdf8c8092fea390812eec6a8a5", + "url": "https://api.github.com/repos/amphp/http-server-form-parser/zipball/42193795723ea72e950b74f0a9075bb794c542f0", + "reference": "42193795723ea72e950b74f0a9075bb794c542f0", "shasum": "" }, "require": { "amphp/amp": "^3", "amphp/byte-stream": "^2", - "amphp/http": "^2-dev", + "amphp/http": "^2", "amphp/http-server": "^3", "amphp/pipeline": "^1", "php": ">=8.1", - "revolt/event-loop": "^1 || ^0.2.4" + "revolt/event-loop": "^1" }, "require-dev": { "amphp/log": "^2", @@ -880,7 +881,7 @@ ], "support": { "issues": "https://github.com/amphp/http-server-form-parser/issues", - "source": "https://github.com/amphp/http-server-form-parser/tree/v2" + "source": "https://github.com/amphp/http-server-form-parser/tree/v2.0.0-beta.3" }, "funding": [ { @@ -888,20 +889,20 @@ "type": "github" } ], - "time": "2023-04-10T20:57:17+00:00" + "time": "2023-04-22T15:36:02+00:00" }, { "name": "amphp/http-server-router", - "version": "v2.0.0-beta.2", + "version": "v2.0.0-beta.3", "source": { "type": "git", "url": "https://github.com/amphp/http-server-router.git", - "reference": "01ba5e8c92a1d8290fc7cc8a0c1685da501c67df" + "reference": "d08be2868ca5e0a0882b6149c3e2546b1e2b3a53" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/amphp/http-server-router/zipball/01ba5e8c92a1d8290fc7cc8a0c1685da501c67df", - "reference": "01ba5e8c92a1d8290fc7cc8a0c1685da501c67df", + "url": "https://api.github.com/repos/amphp/http-server-router/zipball/d08be2868ca5e0a0882b6149c3e2546b1e2b3a53", + "reference": "d08be2868ca5e0a0882b6149c3e2546b1e2b3a53", "shasum": "" }, "require": { @@ -956,7 +957,7 @@ ], "support": { "issues": "https://github.com/amphp/http-server-router/issues", - "source": "https://github.com/amphp/http-server-router/tree/v2.0.0-beta.2" + "source": "https://github.com/amphp/http-server-router/tree/v2.0.0-beta.3" }, "funding": [ { @@ -964,7 +965,7 @@ "type": "github" } ], - "time": "2023-02-02T01:05:48+00:00" + "time": "2023-04-22T15:05:05+00:00" }, { "name": "amphp/log", @@ -2452,12 +2453,12 @@ "source": { "type": "git", "url": "https://github.com/danog/MadelineProto.git", - "reference": "f4413860c742bc4d098a39e4235258b09a5b4728" + "reference": "ed02391d0039f178f232b3a5ab1d677a8d325ae2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/danog/MadelineProto/zipball/f4413860c742bc4d098a39e4235258b09a5b4728", - "reference": "f4413860c742bc4d098a39e4235258b09a5b4728", + "url": "https://api.github.com/repos/danog/MadelineProto/zipball/ed02391d0039f178f232b3a5ab1d677a8d325ae2", + "reference": "ed02391d0039f178f232b3a5ab1d677a8d325ae2", "shasum": "" }, "require": { @@ -2483,6 +2484,7 @@ "ext-dom": "*", "ext-fileinfo": "*", "ext-filter": "*", + "ext-gmp": "*", "ext-hash": "*", "ext-json": "*", "ext-mbstring": "*", @@ -2571,20 +2573,20 @@ "type": "github" } ], - "time": "2023-04-11T08:50:45+00:00" + "time": "2023-04-23T12:32:38+00:00" }, { "name": "danog/primemodule", - "version": "1.0.11.9999", + "version": "1.0.12", "source": { "type": "git", "url": "https://github.com/danog/PrimeModule.git", - "reference": "2328b1ec43b4a2a318602f4b16d6bf628ca96d04" + "reference": "1fcfddc25347ed21de26150ba1fbe95b0a2b2862" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/danog/PrimeModule/zipball/2328b1ec43b4a2a318602f4b16d6bf628ca96d04", - "reference": "2328b1ec43b4a2a318602f4b16d6bf628ca96d04", + "url": "https://api.github.com/repos/danog/PrimeModule/zipball/1fcfddc25347ed21de26150ba1fbe95b0a2b2862", + "reference": "1fcfddc25347ed21de26150ba1fbe95b0a2b2862", "shasum": "" }, "require": { @@ -2620,9 +2622,9 @@ "description": "Prime module capable of doing prime factorization of huge numbers very quickly.\"", "support": { "issues": "https://github.com/danog/PrimeModule/issues", - "source": "https://github.com/danog/PrimeModule/tree/1.0.11.9999" + "source": "https://github.com/danog/PrimeModule/tree/1.0.12" }, - "time": "2022-12-03T20:53:15+00:00" + "time": "2023-04-12T14:19:15+00:00" }, { "name": "danog/tg-file-decoder", From 5bd0974ada9d628bc8e0639e1061a4203f49b148 Mon Sep 17 00:00:00 2001 From: Alexander Pankratov Date: Sun, 23 Apr 2023 21:46:16 +0200 Subject: [PATCH 054/270] Update madelineProto --- composer.lock | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/composer.lock b/composer.lock index 92d374a..fb9e2a2 100644 --- a/composer.lock +++ b/composer.lock @@ -2453,12 +2453,12 @@ "source": { "type": "git", "url": "https://github.com/danog/MadelineProto.git", - "reference": "ed02391d0039f178f232b3a5ab1d677a8d325ae2" + "reference": "537299b5a3b60c35b5134ff75b8780f60ee9d2a0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/danog/MadelineProto/zipball/ed02391d0039f178f232b3a5ab1d677a8d325ae2", - "reference": "ed02391d0039f178f232b3a5ab1d677a8d325ae2", + "url": "https://api.github.com/repos/danog/MadelineProto/zipball/537299b5a3b60c35b5134ff75b8780f60ee9d2a0", + "reference": "537299b5a3b60c35b5134ff75b8780f60ee9d2a0", "shasum": "" }, "require": { @@ -2573,7 +2573,7 @@ "type": "github" } ], - "time": "2023-04-23T12:32:38+00:00" + "time": "2023-04-23T20:05:03+00:00" }, { "name": "danog/primemodule", From 45506c53c8dcba7ab87668fc122902fb1f110568 Mon Sep 17 00:00:00 2001 From: Alexander Pankratov Date: Wed, 26 Apr 2023 13:36:13 +0200 Subject: [PATCH 055/270] Fix: peer not present in internal database --- composer.lock | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/composer.lock b/composer.lock index fb9e2a2..63312ea 100644 --- a/composer.lock +++ b/composer.lock @@ -1949,29 +1949,29 @@ }, { "name": "amphp/websocket-client", - "version": "v2.0.0-beta.2", + "version": "v2.0.0-beta.3", "source": { "type": "git", "url": "https://github.com/amphp/websocket-client.git", - "reference": "fee0aa6ae98efb0a4eea588382f64e11aa248498" + "reference": "24daf3cb8cbf25aa3d16a9434ca72e0af9b005b5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/amphp/websocket-client/zipball/fee0aa6ae98efb0a4eea588382f64e11aa248498", - "reference": "fee0aa6ae98efb0a4eea588382f64e11aa248498", + "url": "https://api.github.com/repos/amphp/websocket-client/zipball/24daf3cb8cbf25aa3d16a9434ca72e0af9b005b5", + "reference": "24daf3cb8cbf25aa3d16a9434ca72e0af9b005b5", "shasum": "" }, "require": { "amphp/amp": "^3", "amphp/byte-stream": "^2", - "amphp/http": "^2-dev", + "amphp/http": "^2", "amphp/http-client": "^5", "amphp/socket": "^2", "amphp/websocket": "^2", "league/uri": "^6", "php": ">=8.1", "psr/http-message": "^1", - "revolt/event-loop": "^1 || ^0.2.4" + "revolt/event-loop": "^1" }, "require-dev": { "amphp/http-server": "^3", @@ -2021,7 +2021,7 @@ ], "support": { "issues": "https://github.com/amphp/websocket-client/issues", - "source": "https://github.com/amphp/websocket-client/tree/v2.0.0-beta.2" + "source": "https://github.com/amphp/websocket-client/tree/v2.0.0-beta.3" }, "funding": [ { @@ -2029,7 +2029,7 @@ "type": "github" } ], - "time": "2023-02-06T05:26:05+00:00" + "time": "2023-04-26T03:42:33+00:00" }, { "name": "amphp/websocket-server", @@ -2453,12 +2453,12 @@ "source": { "type": "git", "url": "https://github.com/danog/MadelineProto.git", - "reference": "537299b5a3b60c35b5134ff75b8780f60ee9d2a0" + "reference": "4bba26df105bacb801c1654e1f3440008cd7bc58" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/danog/MadelineProto/zipball/537299b5a3b60c35b5134ff75b8780f60ee9d2a0", - "reference": "537299b5a3b60c35b5134ff75b8780f60ee9d2a0", + "url": "https://api.github.com/repos/danog/MadelineProto/zipball/4bba26df105bacb801c1654e1f3440008cd7bc58", + "reference": "4bba26df105bacb801c1654e1f3440008cd7bc58", "shasum": "" }, "require": { @@ -2573,7 +2573,7 @@ "type": "github" } ], - "time": "2023-04-23T20:05:03+00:00" + "time": "2023-04-26T11:26:29+00:00" }, { "name": "danog/primemodule", From 0a05740cb71ddacdc3794a5c1965c3e7af0cb3dd Mon Sep 17 00:00:00 2001 From: Alexander Pankratov Date: Thu, 27 Apr 2023 16:37:27 +0200 Subject: [PATCH 056/270] Update config --- config.php | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/config.php b/config.php index b855f48..7e86c90 100644 --- a/config.php +++ b/config.php @@ -18,10 +18,6 @@ 'logger_param' => LogObserver::class . '::log', 'logger_level' => (int)getenv('LOGGER_LEVEL'), // Logging level, available logging levels are: ULTRA_VERBOSE - 5, VERBOSE - 4 , NOTICE - 3, WARNING - 2, ERROR - 1, FATAL_ERROR - 0. ], - 'updates' => [ - 'handle_updates' => true, // Should I handle updates? - 'handle_old_updates' => false, // Should I handle old updates on startup? - ], 'connection_settings' => [ 'all' => [ 'proxy' => '\SocksProxy', @@ -33,12 +29,11 @@ ] ], 'media_socket_count' => [ - 'max' => 50 + 'max' => 1000, ] ], 'serialization' => [ - 'serialization_interval' => 30, - 'cleanup_before_serialization' => true, + 'serialization_interval' => 60, ], 'db' => [ 'type' => getenv('DB_TYPE'), @@ -56,9 +51,6 @@ 'download' => [ 'report_broken_media' => false, ], - 'ipc' => [ - 'slow' => true - ] ], 'api' => [ 'ip_whitelist' => array_filter( From a5d7ea6e13ddea83e494f080c89f014f0a88a82c Mon Sep 17 00:00:00 2001 From: Alexander Pankratov Date: Mon, 15 May 2023 11:58:52 +0200 Subject: [PATCH 057/270] Update madeline --- composer.lock | 81 +++++++++++++++++++++++++-------------------------- 1 file changed, 40 insertions(+), 41 deletions(-) diff --git a/composer.lock b/composer.lock index 63312ea..c1fabd6 100644 --- a/composer.lock +++ b/composer.lock @@ -1043,16 +1043,16 @@ }, { "name": "amphp/mysql", - "version": "v3.0.0-beta.5", + "version": "v3.0.0-beta.6", "source": { "type": "git", "url": "https://github.com/amphp/mysql.git", - "reference": "857b0adfff0c84d22a81e9a6226efc67f820a7f6" + "reference": "8a7d4ac964d7efd3f83f4a0a05fa3af2b6978a8f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/amphp/mysql/zipball/857b0adfff0c84d22a81e9a6226efc67f820a7f6", - "reference": "857b0adfff0c84d22a81e9a6226efc67f820a7f6", + "url": "https://api.github.com/repos/amphp/mysql/zipball/8a7d4ac964d7efd3f83f4a0a05fa3af2b6978a8f", + "reference": "8a7d4ac964d7efd3f83f4a0a05fa3af2b6978a8f", "shasum": "" }, "require": { @@ -1101,7 +1101,7 @@ "description": "Asynchronous MySQL client for PHP based on Amp.", "support": { "issues": "https://github.com/amphp/mysql/issues", - "source": "https://github.com/amphp/mysql/tree/v3.0.0-beta.5" + "source": "https://github.com/amphp/mysql/tree/v3.0.0-beta.6" }, "funding": [ { @@ -1109,20 +1109,20 @@ "type": "github" } ], - "time": "2023-02-12T15:40:51+00:00" + "time": "2023-05-07T13:48:11+00:00" }, { "name": "amphp/parallel", - "version": "v2.1.0", + "version": "v2.2.0", "source": { "type": "git", "url": "https://github.com/amphp/parallel.git", - "reference": "409a8f2a091a1eacf239695cb7f37bda4f635e83" + "reference": "37850ff591155c6f5c662173c3fc75682752c918" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/amphp/parallel/zipball/409a8f2a091a1eacf239695cb7f37bda4f635e83", - "reference": "409a8f2a091a1eacf239695cb7f37bda4f635e83", + "url": "https://api.github.com/repos/amphp/parallel/zipball/37850ff591155c6f5c662173c3fc75682752c918", + "reference": "37850ff591155c6f5c662173c3fc75682752c918", "shasum": "" }, "require": { @@ -1135,7 +1135,7 @@ "amphp/socket": "^2", "amphp/sync": "^2", "php": ">=8.1", - "revolt/event-loop": "^1 || ^0.2.1" + "revolt/event-loop": "^1" }, "require-dev": { "amphp/php-cs-fixer-config": "^2", @@ -1184,7 +1184,7 @@ ], "support": { "issues": "https://github.com/amphp/parallel/issues", - "source": "https://github.com/amphp/parallel/tree/v2.1.0" + "source": "https://github.com/amphp/parallel/tree/v2.2.0" }, "funding": [ { @@ -1192,7 +1192,7 @@ "type": "github" } ], - "time": "2023-03-02T22:01:04+00:00" + "time": "2023-05-12T22:42:36+00:00" }, { "name": "amphp/parser", @@ -1325,16 +1325,16 @@ }, { "name": "amphp/postgres", - "version": "v2.0.0-beta.2", + "version": "v2.0.0-beta.4", "source": { "type": "git", "url": "https://github.com/amphp/postgres.git", - "reference": "70599b5a1851efad8b4ab6617db35dcbbd41f589" + "reference": "4e23b380a9cecdcc7c0ba8a99814c227284aa07c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/amphp/postgres/zipball/70599b5a1851efad8b4ab6617db35dcbbd41f589", - "reference": "70599b5a1851efad8b4ab6617db35dcbbd41f589", + "url": "https://api.github.com/repos/amphp/postgres/zipball/4e23b380a9cecdcc7c0ba8a99814c227284aa07c", + "reference": "4e23b380a9cecdcc7c0ba8a99814c227284aa07c", "shasum": "" }, "require": { @@ -1350,7 +1350,7 @@ "ext-pgsql": "*", "ext-pq": "*", "phpunit/phpunit": "^9", - "psalm/phar": "^4.10" + "psalm/phar": "^5.4" }, "type": "library", "autoload": { @@ -1385,7 +1385,7 @@ ], "support": { "issues": "https://github.com/amphp/postgres/issues", - "source": "https://github.com/amphp/postgres/tree/v2.0.0-beta.2" + "source": "https://github.com/amphp/postgres/tree/v2.0.0-beta.4" }, "funding": [ { @@ -1393,7 +1393,7 @@ "type": "github" } ], - "time": "2022-12-18T22:45:21+00:00" + "time": "2023-05-07T05:05:00+00:00" }, { "name": "amphp/process", @@ -1682,16 +1682,16 @@ }, { "name": "amphp/sql", - "version": "v2.0.0-beta.3", + "version": "v2.0.0-beta.4", "source": { "type": "git", "url": "https://github.com/amphp/sql.git", - "reference": "1f93ed0e0d3d7e61c3a6fc1dace3dbe5aeb6e675" + "reference": "2eeb178acaf0d83191d3cf9b397a79dfc50d9b5f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/amphp/sql/zipball/1f93ed0e0d3d7e61c3a6fc1dace3dbe5aeb6e675", - "reference": "1f93ed0e0d3d7e61c3a6fc1dace3dbe5aeb6e675", + "url": "https://api.github.com/repos/amphp/sql/zipball/2eeb178acaf0d83191d3cf9b397a79dfc50d9b5f", + "reference": "2eeb178acaf0d83191d3cf9b397a79dfc50d9b5f", "shasum": "" }, "require": { @@ -1699,10 +1699,9 @@ "php": ">=8.1" }, "require-dev": { - "amphp/php-cs-fixer-config": "^2-dev", - "amphp/phpunit-util": "^3", + "amphp/php-cs-fixer-config": "^2", "phpunit/phpunit": "^9", - "psalm/phar": "^4.10" + "psalm/phar": "^5.4" }, "type": "library", "autoload": { @@ -1725,7 +1724,7 @@ ], "support": { "issues": "https://github.com/amphp/sql/issues", - "source": "https://github.com/amphp/sql/tree/v2.0.0-beta.3" + "source": "https://github.com/amphp/sql/tree/v2.0.0-beta.4" }, "funding": [ { @@ -1733,20 +1732,20 @@ "type": "github" } ], - "time": "2022-12-18T03:44:57+00:00" + "time": "2023-01-16T03:38:22+00:00" }, { "name": "amphp/sql-common", - "version": "v2.0.0-beta.3", + "version": "v2.0.0-beta.5", "source": { "type": "git", "url": "https://github.com/amphp/sql-common.git", - "reference": "9fef16bed8b437b2fc43a52ee98679b89ebd32ef" + "reference": "aeab5d741043cc39685563ab827e26a69b75e2d7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/amphp/sql-common/zipball/9fef16bed8b437b2fc43a52ee98679b89ebd32ef", - "reference": "9fef16bed8b437b2fc43a52ee98679b89ebd32ef", + "url": "https://api.github.com/repos/amphp/sql-common/zipball/aeab5d741043cc39685563ab827e26a69b75e2d7", + "reference": "aeab5d741043cc39685563ab827e26a69b75e2d7", "shasum": "" }, "require": { @@ -1755,10 +1754,10 @@ "php": ">=8.1" }, "require-dev": { - "amphp/php-cs-fixer-config": "^2-dev", + "amphp/php-cs-fixer-config": "^2", "amphp/phpunit-util": "^3", "phpunit/phpunit": "^9", - "psalm/phar": "^4.10" + "psalm/phar": "^5.4" }, "type": "library", "autoload": { @@ -1781,7 +1780,7 @@ ], "support": { "issues": "https://github.com/amphp/sql-common/issues", - "source": "https://github.com/amphp/sql-common/tree/v2.0.0-beta.3" + "source": "https://github.com/amphp/sql-common/tree/v2.0.0-beta.5" }, "funding": [ { @@ -1789,7 +1788,7 @@ "type": "github" } ], - "time": "2022-12-18T05:14:36+00:00" + "time": "2023-05-07T12:42:32+00:00" }, { "name": "amphp/sync", @@ -2453,12 +2452,12 @@ "source": { "type": "git", "url": "https://github.com/danog/MadelineProto.git", - "reference": "4bba26df105bacb801c1654e1f3440008cd7bc58" + "reference": "d863b40df729c8ad438916cb08b977ebbb41a714" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/danog/MadelineProto/zipball/4bba26df105bacb801c1654e1f3440008cd7bc58", - "reference": "4bba26df105bacb801c1654e1f3440008cd7bc58", + "url": "https://api.github.com/repos/danog/MadelineProto/zipball/d863b40df729c8ad438916cb08b977ebbb41a714", + "reference": "d863b40df729c8ad438916cb08b977ebbb41a714", "shasum": "" }, "require": { @@ -2573,7 +2572,7 @@ "type": "github" } ], - "time": "2023-04-26T11:26:29+00:00" + "time": "2023-05-15T09:44:17+00:00" }, { "name": "danog/primemodule", From 6ee61530c456e707cbfac78d5c69acc61e7a66ac Mon Sep 17 00:00:00 2001 From: Alexander Pankratov Date: Fri, 19 May 2023 17:25:07 +0200 Subject: [PATCH 058/270] Allow call API methods. --- src/Controllers/AbstractApiController.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/Controllers/AbstractApiController.php b/src/Controllers/AbstractApiController.php index a624235..1b358d1 100644 --- a/src/Controllers/AbstractApiController.php +++ b/src/Controllers/AbstractApiController.php @@ -11,6 +11,7 @@ use Amp\Http\Server\Router; use danog\MadelineProto\API; use JsonException; +use TelegramApiServer\Client; use TelegramApiServer\Exceptions\NoticeException; use TelegramApiServer\Logger; use TelegramApiServer\MadelineProtoExtensions\ApiExtensions; @@ -163,6 +164,11 @@ protected function callApiCommon(API $madelineProto) $madelineProtoExtensions = new $this->extensionClass($madelineProto, $this->request, $this->file); $result = $madelineProtoExtensions->{$this->api[0]}(...$this->parameters); } else { + if ($this->api[0] === 'API') { + $madelineProto = Client::getWrapper($madelineProto)->getAPI(); + array_shift($this->api); + $pathCount = count($this->api); + } //Проверяем нет ли в MadilineProto такого метода. switch ($pathCount) { case 1: From 149149b2815284ac6f5f8808459ef04a052cffd5 Mon Sep 17 00:00:00 2001 From: Alexander Pankratov Date: Mon, 22 May 2023 19:45:44 +0200 Subject: [PATCH 059/270] Fix downloadToDir method --- composer.lock | 20 ++++++++++---------- src/Controllers/AbstractApiController.php | 11 ++++++----- 2 files changed, 16 insertions(+), 15 deletions(-) diff --git a/composer.lock b/composer.lock index c1fabd6..d3b7a92 100644 --- a/composer.lock +++ b/composer.lock @@ -1113,16 +1113,16 @@ }, { "name": "amphp/parallel", - "version": "v2.2.0", + "version": "v2.2.1", "source": { "type": "git", "url": "https://github.com/amphp/parallel.git", - "reference": "37850ff591155c6f5c662173c3fc75682752c918" + "reference": "ba11031b8664134b13c150530ae041a75e631858" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/amphp/parallel/zipball/37850ff591155c6f5c662173c3fc75682752c918", - "reference": "37850ff591155c6f5c662173c3fc75682752c918", + "url": "https://api.github.com/repos/amphp/parallel/zipball/ba11031b8664134b13c150530ae041a75e631858", + "reference": "ba11031b8664134b13c150530ae041a75e631858", "shasum": "" }, "require": { @@ -1184,7 +1184,7 @@ ], "support": { "issues": "https://github.com/amphp/parallel/issues", - "source": "https://github.com/amphp/parallel/tree/v2.2.0" + "source": "https://github.com/amphp/parallel/tree/v2.2.1" }, "funding": [ { @@ -1192,7 +1192,7 @@ "type": "github" } ], - "time": "2023-05-12T22:42:36+00:00" + "time": "2023-05-22T03:33:27+00:00" }, { "name": "amphp/parser", @@ -2452,12 +2452,12 @@ "source": { "type": "git", "url": "https://github.com/danog/MadelineProto.git", - "reference": "d863b40df729c8ad438916cb08b977ebbb41a714" + "reference": "ea44d93f1c5a8898f25bc5fd04a097de835e7acc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/danog/MadelineProto/zipball/d863b40df729c8ad438916cb08b977ebbb41a714", - "reference": "d863b40df729c8ad438916cb08b977ebbb41a714", + "url": "https://api.github.com/repos/danog/MadelineProto/zipball/ea44d93f1c5a8898f25bc5fd04a097de835e7acc", + "reference": "ea44d93f1c5a8898f25bc5fd04a097de835e7acc", "shasum": "" }, "require": { @@ -2572,7 +2572,7 @@ "type": "github" } ], - "time": "2023-05-15T09:44:17+00:00" + "time": "2023-05-22T17:44:42+00:00" }, { "name": "danog/primemodule", diff --git a/src/Controllers/AbstractApiController.php b/src/Controllers/AbstractApiController.php index 1b358d1..2920f9d 100644 --- a/src/Controllers/AbstractApiController.php +++ b/src/Controllers/AbstractApiController.php @@ -164,11 +164,11 @@ protected function callApiCommon(API $madelineProto) $madelineProtoExtensions = new $this->extensionClass($madelineProto, $this->request, $this->file); $result = $madelineProtoExtensions->{$this->api[0]}(...$this->parameters); } else { - if ($this->api[0] === 'API') { - $madelineProto = Client::getWrapper($madelineProto)->getAPI(); - array_shift($this->api); - $pathCount = count($this->api); - } + if ($this->api[0] === 'API') { + $madelineProto = Client::getWrapper($madelineProto)->getAPI(); + array_shift($this->api); + $pathCount = count($this->api); + } //Проверяем нет ли в MadilineProto такого метода. switch ($pathCount) { case 1: @@ -237,6 +237,7 @@ private function getResponse(): string|Response $data, JSON_THROW_ON_ERROR | JSON_INVALID_UTF8_SUBSTITUTE | + JSON_PARTIAL_OUTPUT_ON_ERROR | JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE From 56bcfa5a2fe32fcb275948f63efde777bbab371e Mon Sep 17 00:00:00 2001 From: Alexander Pankratov Date: Tue, 23 May 2023 01:18:57 +0200 Subject: [PATCH 060/270] Reduce media sockets --- config.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config.php b/config.php index 7e86c90..6d3a633 100644 --- a/config.php +++ b/config.php @@ -29,7 +29,7 @@ ] ], 'media_socket_count' => [ - 'max' => 1000, + 'max' => 10, ] ], 'serialization' => [ From 9cfd578695734a1f663541815e9b48c4a218d8f2 Mon Sep 17 00:00:00 2001 From: Alexander Pankratov Date: Tue, 23 May 2023 23:40:47 +0200 Subject: [PATCH 061/270] Override memory limit --- bootstrap.php | 11 ++++++++--- src/Server/Server.php | 1 - 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/bootstrap.php b/bootstrap.php index 6193c41..baf94b5 100644 --- a/bootstrap.php +++ b/bootstrap.php @@ -1,5 +1,6 @@ connect($sessionFiles); $errorHandler = new DefaultErrorHandler(); $server->start((new Router($server, $errorHandler))->getRouter(), $errorHandler); - self::registerShutdown($server); } From e07c7e4e436bea7672984f5465729b2553787fe6 Mon Sep 17 00:00:00 2001 From: Alexander Pankratov Date: Tue, 23 May 2023 23:54:57 +0200 Subject: [PATCH 062/270] Fix zombie healthcheck --- src/Server/HealthCheck.php | 28 +++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/src/Server/HealthCheck.php b/src/Server/HealthCheck.php index ed20aba..ae0aeab 100644 --- a/src/Server/HealthCheck.php +++ b/src/Server/HealthCheck.php @@ -13,6 +13,7 @@ use UnexpectedValueException; use function Amp\async; use function Amp\Future\awaitAll; +use function Amp\trapSignal; class HealthCheck { @@ -39,8 +40,8 @@ public static function start(int $parentPid): void static::$checkInterval = (int)Config::getInstance()->get('health_check.interval'); static::$requestTimeout = (int)Config::getInstance()->get('health_check.timeout'); - try { - EventLoop::repeat(static::$checkInterval, static function () use ($parentPid) { + EventLoop::repeat(static::$checkInterval, static function () use ($parentPid) { + try { Logger::getInstance()->info('Start health check'); if (!self::isProcessAlive($parentPid)) { throw new RuntimeException('Parent process died'); @@ -54,21 +55,22 @@ public static function start(int $parentPid): void awaitAll($futures); Logger::getInstance()->info('Health check ok. Sessions checked: ' . count($sessionsForCheck)); - }); - EventLoop::run(); - } catch (Throwable $e) { - Logger::getInstance()->error($e->getMessage()); - Logger::getInstance()->critical('Health check failed'); - if (self::isProcessAlive($parentPid)) { - Logger::getInstance()->critical('Killing parent process'); - - exec("kill -2 $parentPid"); + } catch (Throwable $e) { + Logger::getInstance()->error($e->getMessage()); + Logger::getInstance()->critical('Health check failed'); if (self::isProcessAlive($parentPid)) { - exec("kill -9 $parentPid"); + Logger::getInstance()->critical('Killing parent process'); + + exec("kill -2 $parentPid"); + if (self::isProcessAlive($parentPid)) { + exec("kill -9 $parentPid"); + } } + exit(1); } - } + }); + trapSignal([SIGINT, SIGTERM]); Logger::getInstance()->critical('Health check process exit'); } From 58125b9e1ef43efc2ca9db3388f7c47dc7519b4a Mon Sep 17 00:00:00 2001 From: Alexander Pankratov Date: Wed, 24 May 2023 13:40:14 +0200 Subject: [PATCH 063/270] Fix: update HttpStatus old name --- src/Server/Authorization.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Server/Authorization.php b/src/Server/Authorization.php index 842eb20..bdd0be9 100644 --- a/src/Server/Authorization.php +++ b/src/Server/Authorization.php @@ -2,11 +2,11 @@ namespace TelegramApiServer\Server; +use Amp\Http\HttpStatus; use Amp\Http\Server\Middleware; use Amp\Http\Server\Request; use Amp\Http\Server\RequestHandler; use Amp\Http\Server\Response; -use Amp\Http\Status; use TelegramApiServer\Config; class Authorization implements Middleware @@ -20,13 +20,13 @@ public function __construct() $this->selfIp = ip2long(getHostByName(php_uname('n'))); } - public function handleRequest(Request $request, RequestHandler $next): Response + public function handleRequest(Request $request, RequestHandler $requestHandler): Response { $host = explode(':', $request->getClient()->getRemoteAddress()->toString())[0]; if ($this->isIpAllowed($host)) { - $response = $next->handleRequest($request); + $response = $requestHandler->handleRequest($request); } else { - $response = ErrorResponses::get(Status::FORBIDDEN, 'Your host is not allowed: ' . $host); + $response = ErrorResponses::get(HttpStatus::FORBIDDEN, 'Your host is not allowed: ' . $host); } return $response; From c8110c3cadcc20cadca602e466b71ec831b85540 Mon Sep 17 00:00:00 2001 From: Alexander Pankratov Date: Wed, 24 May 2023 17:18:16 +0200 Subject: [PATCH 064/270] Refactor mysql cmds --- docker-compose.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docker-compose.yml b/docker-compose.yml index a82bc89..cd98c08 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -32,7 +32,9 @@ services: environment: MARIADB_ALLOW_EMPTY_ROOT_PASSWORD: 'yes' MARIADB_AUTO_UPGRADE: 'yes' - command: ["mysqld", "--innodb-buffer-pool-size=32M", "--wait_timeout=65", "--skip-grant-tables"] + command: + - --innodb-buffer-pool-size=32M + - --wait_timeout=65 networks: default: name: telegram-api-server \ No newline at end of file From 3305281fa838a1842e705976cccb05a143b379f7 Mon Sep 17 00:00:00 2001 From: Alexander Pankratov Date: Fri, 26 May 2023 15:13:31 +0200 Subject: [PATCH 065/270] Fix mysql --- docker-compose.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/docker-compose.yml b/docker-compose.yml index cd98c08..3388893 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -33,6 +33,7 @@ services: MARIADB_ALLOW_EMPTY_ROOT_PASSWORD: 'yes' MARIADB_AUTO_UPGRADE: 'yes' command: + - --skip-grant-tables - --innodb-buffer-pool-size=32M - --wait_timeout=65 networks: From 6efae8f53157474128013ee99f37a8318ad7464b Mon Sep 17 00:00:00 2001 From: Alexander Pankratov Date: Sat, 27 May 2023 01:33:19 +0200 Subject: [PATCH 066/270] Composer update --- composer.lock | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/composer.lock b/composer.lock index d3b7a92..e3bf5bd 100644 --- a/composer.lock +++ b/composer.lock @@ -2452,12 +2452,12 @@ "source": { "type": "git", "url": "https://github.com/danog/MadelineProto.git", - "reference": "ea44d93f1c5a8898f25bc5fd04a097de835e7acc" + "reference": "2217a8160fed2fe7204ca5f4d51249eecf9493d8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/danog/MadelineProto/zipball/ea44d93f1c5a8898f25bc5fd04a097de835e7acc", - "reference": "ea44d93f1c5a8898f25bc5fd04a097de835e7acc", + "url": "https://api.github.com/repos/danog/MadelineProto/zipball/2217a8160fed2fe7204ca5f4d51249eecf9493d8", + "reference": "2217a8160fed2fe7204ca5f4d51249eecf9493d8", "shasum": "" }, "require": { @@ -2508,7 +2508,8 @@ "danog/phpdoc": "^0.1.7", "dg/bypass-finals": "dev-master", "ext-ctype": "*", - "phpdocumentor/reflection-docblock": "^5.2", + "phpdocumentor/reflection-docblock": "dev-master", + "phpdocumentor/type-resolver": "1.x-dev@dev", "phpunit/phpunit": "^9", "roave/security-advisories": "dev-latest", "symfony/yaml": "^6.0" @@ -2572,7 +2573,7 @@ "type": "github" } ], - "time": "2023-05-22T17:44:42+00:00" + "time": "2023-05-26T23:27:05+00:00" }, { "name": "danog/primemodule", From 330df5f49a2cf6459699b6d421b1ce69296ec36c Mon Sep 17 00:00:00 2001 From: Alexander Pankratov Date: Sun, 28 May 2023 00:28:32 +0200 Subject: [PATCH 067/270] Update madelineProto --- composer.lock | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/composer.lock b/composer.lock index e3bf5bd..984377f 100644 --- a/composer.lock +++ b/composer.lock @@ -2452,12 +2452,12 @@ "source": { "type": "git", "url": "https://github.com/danog/MadelineProto.git", - "reference": "2217a8160fed2fe7204ca5f4d51249eecf9493d8" + "reference": "edacca9f3d97ac95d7749cfcebeb644fea99ee21" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/danog/MadelineProto/zipball/2217a8160fed2fe7204ca5f4d51249eecf9493d8", - "reference": "2217a8160fed2fe7204ca5f4d51249eecf9493d8", + "url": "https://api.github.com/repos/danog/MadelineProto/zipball/edacca9f3d97ac95d7749cfcebeb644fea99ee21", + "reference": "edacca9f3d97ac95d7749cfcebeb644fea99ee21", "shasum": "" }, "require": { @@ -2565,7 +2565,7 @@ ], "support": { "issues": "https://github.com/danog/MadelineProto/issues", - "source": "https://github.com/danog/MadelineProto/tree/v8" + "source": "https://github.com/danog/MadelineProto/tree/8.0.0-beta82" }, "funding": [ { @@ -2573,20 +2573,20 @@ "type": "github" } ], - "time": "2023-05-26T23:27:05+00:00" + "time": "2023-05-27T17:11:44+00:00" }, { "name": "danog/primemodule", - "version": "1.0.12", + "version": "1.0.13", "source": { "type": "git", "url": "https://github.com/danog/PrimeModule.git", - "reference": "1fcfddc25347ed21de26150ba1fbe95b0a2b2862" + "reference": "e7ebfc1ea64c24186e49064cd4b76bc76c28600e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/danog/PrimeModule/zipball/1fcfddc25347ed21de26150ba1fbe95b0a2b2862", - "reference": "1fcfddc25347ed21de26150ba1fbe95b0a2b2862", + "url": "https://api.github.com/repos/danog/PrimeModule/zipball/e7ebfc1ea64c24186e49064cd4b76bc76c28600e", + "reference": "e7ebfc1ea64c24186e49064cd4b76bc76c28600e", "shasum": "" }, "require": { @@ -2622,9 +2622,9 @@ "description": "Prime module capable of doing prime factorization of huge numbers very quickly.\"", "support": { "issues": "https://github.com/danog/PrimeModule/issues", - "source": "https://github.com/danog/PrimeModule/tree/1.0.12" + "source": "https://github.com/danog/PrimeModule/tree/1.0.13" }, - "time": "2023-04-12T14:19:15+00:00" + "time": "2023-05-27T14:41:40+00:00" }, { "name": "danog/tg-file-decoder", From 04dcd01004b4453aa0c3f8efa418855c2be11a89 Mon Sep 17 00:00:00 2001 From: Alexander Pankratov Date: Fri, 23 Jun 2023 20:27:26 +0200 Subject: [PATCH 068/270] Support systems without pcintl ext --- composer.json | 4 +++- examples/websocket-events.php | 7 ++++++- server.php | 3 +++ src/Server/Server.php | 5 +++++ 4 files changed, 17 insertions(+), 2 deletions(-) diff --git a/composer.json b/composer.json index 99e91b3..7393e7d 100644 --- a/composer.json +++ b/composer.json @@ -21,7 +21,6 @@ "php": "^8.1", "ext-json": "*", "ext-mbstring": "*", - "ext-pcntl": "*", "amphp/http-server": "^v3.x-dev", "amphp/http": "^v2", "amphp/http-server-router": "^2", @@ -31,6 +30,9 @@ "vlucas/phpdotenv": "^4", "danog/madelineproto": "v8.x-dev" }, + "suggest": { + "ext-pcntl": "Install pcintl for propper signal handling and healthcheck (enabled in .env)" + }, "minimum-stability": "dev", "prefer-stable": true, "authors": [ diff --git a/examples/websocket-events.php b/examples/websocket-events.php index 42225bb..48c3ee6 100644 --- a/examples/websocket-events.php +++ b/examples/websocket-events.php @@ -6,6 +6,7 @@ */ use Amp\Websocket\Client\WebsocketHandshake; +use Revolt\EventLoop; use function Amp\async; use function Amp\delay; use function Amp\Websocket\Client\connect; @@ -50,4 +51,8 @@ } }); -$signal = Amp\trapSignal([SIGINT, SIGTERM]); +if (defined('SIGINT')) { + $signal = Amp\trapSignal([SIGINT, SIGTERM]); +} else { + EventLoop::run(); +} \ No newline at end of file diff --git a/server.php b/server.php index df730a1..cc69d49 100644 --- a/server.php +++ b/server.php @@ -74,6 +74,9 @@ $mainProcessPid = getmypid(); if (Config::getInstance()->get('health_check.enabled')) { + if (!defined('SIGINT')) { + throw new RuntimeException('pcintl required for healthcheck. Use docker.'); + } Fork::run(static function () use ($mainProcessPid) { HealthCheck::start($mainProcessPid); }); diff --git a/src/Server/Server.php b/src/Server/Server.php index 17b4ddd..1e63e69 100644 --- a/src/Server/Server.php +++ b/src/Server/Server.php @@ -9,6 +9,7 @@ use Amp\Http\Server\SocketHttpServer; use Amp\Socket\InternetAddress; use Amp\Sync\LocalSemaphore; +use Revolt\EventLoop; use TelegramApiServer\Client; use TelegramApiServer\Config; use TelegramApiServer\Logger; @@ -63,6 +64,10 @@ private static function registerShutdown(SocketHttpServer $server) $signal = Amp\trapSignal([SIGINT, SIGTERM]); info(sprintf("Received signal %d, stopping HTTP server", $signal)); $server->stop(); + } else { + EventLoop::run(); + info("Stopping http server"); + $server->stop(); } } From 566e618d13c595ca24c0d3581d2649964b0d5ada Mon Sep 17 00:00:00 2001 From: Alexander Pankratov Date: Tue, 4 Jul 2023 22:20:49 +0200 Subject: [PATCH 069/270] Update madelineProto --- composer.lock | 175 +++++++++++++++++++++++++++++++++++++++----------- 1 file changed, 139 insertions(+), 36 deletions(-) diff --git a/composer.lock b/composer.lock index 984377f..441b424 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "ad486b083ffb76c3b96979c0bf925f5f", + "content-hash": "e40b582b83978f01d9ae3a52870ca190", "packages": [ { "name": "amphp/amp", @@ -717,12 +717,12 @@ "source": { "type": "git", "url": "https://github.com/amphp/http-server.git", - "reference": "b86f0d43418dc8141ad4bf5f821a23f7d3abf639" + "reference": "b9f6a9e039dd5b9ecc224c6e46d1a410691bbdca" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/amphp/http-server/zipball/b86f0d43418dc8141ad4bf5f821a23f7d3abf639", - "reference": "b86f0d43418dc8141ad4bf5f821a23f7d3abf639", + "url": "https://api.github.com/repos/amphp/http-server/zipball/b9f6a9e039dd5b9ecc224c6e46d1a410691bbdca", + "reference": "b9f6a9e039dd5b9ecc224c6e46d1a410691bbdca", "shasum": "" }, "require": { @@ -799,7 +799,7 @@ ], "support": { "issues": "https://github.com/amphp/http-server/issues", - "source": "https://github.com/amphp/http-server/tree/v3.0.0-beta.8" + "source": "https://github.com/amphp/http-server/tree/3.x" }, "funding": [ { @@ -807,7 +807,7 @@ "type": "github" } ], - "time": "2023-04-22T14:22:35+00:00" + "time": "2023-06-03T16:00:02+00:00" }, { "name": "amphp/http-server-form-parser", @@ -1736,16 +1736,16 @@ }, { "name": "amphp/sql-common", - "version": "v2.0.0-beta.5", + "version": "v2.0.0-beta.6", "source": { "type": "git", "url": "https://github.com/amphp/sql-common.git", - "reference": "aeab5d741043cc39685563ab827e26a69b75e2d7" + "reference": "a6cef9fb4c9d87e9ab7d40c762ef490dda43f04f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/amphp/sql-common/zipball/aeab5d741043cc39685563ab827e26a69b75e2d7", - "reference": "aeab5d741043cc39685563ab827e26a69b75e2d7", + "url": "https://api.github.com/repos/amphp/sql-common/zipball/a6cef9fb4c9d87e9ab7d40c762ef490dda43f04f", + "reference": "a6cef9fb4c9d87e9ab7d40c762ef490dda43f04f", "shasum": "" }, "require": { @@ -1780,7 +1780,7 @@ ], "support": { "issues": "https://github.com/amphp/sql-common/issues", - "source": "https://github.com/amphp/sql-common/tree/v2.0.0-beta.5" + "source": "https://github.com/amphp/sql-common/tree/v2.0.0-beta.6" }, "funding": [ { @@ -1788,7 +1788,7 @@ "type": "github" } ], - "time": "2023-05-07T12:42:32+00:00" + "time": "2023-06-17T15:45:22+00:00" }, { "name": "amphp/sync", @@ -2167,6 +2167,60 @@ ], "time": "2023-01-09T22:29:20+00:00" }, + { + "name": "bacon/bacon-qr-code", + "version": "2.0.8", + "source": { + "type": "git", + "url": "https://github.com/Bacon/BaconQrCode.git", + "reference": "8674e51bb65af933a5ffaf1c308a660387c35c22" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/Bacon/BaconQrCode/zipball/8674e51bb65af933a5ffaf1c308a660387c35c22", + "reference": "8674e51bb65af933a5ffaf1c308a660387c35c22", + "shasum": "" + }, + "require": { + "dasprid/enum": "^1.0.3", + "ext-iconv": "*", + "php": "^7.1 || ^8.0" + }, + "require-dev": { + "phly/keep-a-changelog": "^2.1", + "phpunit/phpunit": "^7 | ^8 | ^9", + "spatie/phpunit-snapshot-assertions": "^4.2.9", + "squizlabs/php_codesniffer": "^3.4" + }, + "suggest": { + "ext-imagick": "to generate QR code images" + }, + "type": "library", + "autoload": { + "psr-4": { + "BaconQrCode\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-2-Clause" + ], + "authors": [ + { + "name": "Ben Scholzen 'DASPRiD'", + "email": "mail@dasprids.de", + "homepage": "https://dasprids.de/", + "role": "Developer" + } + ], + "description": "BaconQrCode is a QR code generator for PHP.", + "homepage": "https://github.com/Bacon/BaconQrCode", + "support": { + "issues": "https://github.com/Bacon/BaconQrCode/issues", + "source": "https://github.com/Bacon/BaconQrCode/tree/2.0.8" + }, + "time": "2022-12-07T17:46:57+00:00" + }, { "name": "danog/dns-over-https", "version": "v1.0.0-beta4", @@ -2452,12 +2506,12 @@ "source": { "type": "git", "url": "https://github.com/danog/MadelineProto.git", - "reference": "edacca9f3d97ac95d7749cfcebeb644fea99ee21" + "reference": "a157f277c15a793773a936c1882c2976bce955b9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/danog/MadelineProto/zipball/edacca9f3d97ac95d7749cfcebeb644fea99ee21", - "reference": "edacca9f3d97ac95d7749cfcebeb644fea99ee21", + "url": "https://api.github.com/repos/danog/MadelineProto/zipball/a157f277c15a793773a936c1882c2976bce955b9", + "reference": "a157f277c15a793773a936c1882c2976bce955b9", "shasum": "" }, "require": { @@ -2474,6 +2528,7 @@ "amphp/redis": "^2", "amphp/socket": "^2", "amphp/websocket-client": "^2", + "bacon/bacon-qr-code": "^2.0", "danog/dns-over-https": "^1", "danog/ipc": "^1", "danog/loop": "^1", @@ -2483,7 +2538,6 @@ "ext-dom": "*", "ext-fileinfo": "*", "ext-filter": "*", - "ext-gmp": "*", "ext-hash": "*", "ext-json": "*", "ext-mbstring": "*", @@ -2516,9 +2570,9 @@ }, "suggest": { "ext-ffi": "Install the primemodule and FFI extensions to speed up MadelineProto (https://prime.madelineproto.xyz)", - "ext-gmp": "Install the gmp extension for faster crypto", + "ext-gmp": "Install the gmp extension to speed up authorization", "ext-openssl": "Install the openssl extension for faster crypto", - "ext-pdo": "Install the pdo extension to store session data on MySQL or PostgreSQL", + "ext-pdo": "Install the pdo extension to store session data on MySQL", "ext-primemodule": "Install the primemodule and FFI extensions to speed up MadelineProto (https://prime.madelineproto.xyz)" }, "default-branch": true, @@ -2565,7 +2619,7 @@ ], "support": { "issues": "https://github.com/danog/MadelineProto/issues", - "source": "https://github.com/danog/MadelineProto/tree/8.0.0-beta82" + "source": "https://github.com/danog/MadelineProto/tree/v8" }, "funding": [ { @@ -2573,7 +2627,7 @@ "type": "github" } ], - "time": "2023-05-27T17:11:44+00:00" + "time": "2023-07-04T17:48:23+00:00" }, { "name": "danog/primemodule", @@ -2689,6 +2743,56 @@ ], "time": "2022-11-16T16:22:45+00:00" }, + { + "name": "dasprid/enum", + "version": "1.0.4", + "source": { + "type": "git", + "url": "https://github.com/DASPRiD/Enum.git", + "reference": "8e6b6ea76eabbf19ea2bf5b67b98e1860474012f" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/DASPRiD/Enum/zipball/8e6b6ea76eabbf19ea2bf5b67b98e1860474012f", + "reference": "8e6b6ea76eabbf19ea2bf5b67b98e1860474012f", + "shasum": "" + }, + "require": { + "php": ">=7.1 <9.0" + }, + "require-dev": { + "phpunit/phpunit": "^7 | ^8 | ^9", + "squizlabs/php_codesniffer": "*" + }, + "type": "library", + "autoload": { + "psr-4": { + "DASPRiD\\Enum\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-2-Clause" + ], + "authors": [ + { + "name": "Ben Scholzen 'DASPRiD'", + "email": "mail@dasprids.de", + "homepage": "https://dasprids.de/", + "role": "Developer" + } + ], + "description": "PHP 7.1 enum implementation", + "keywords": [ + "enum", + "map" + ], + "support": { + "issues": "https://github.com/DASPRiD/Enum/issues", + "source": "https://github.com/DASPRiD/Enum/tree/1.0.4" + }, + "time": "2023-03-01T18:44:03+00:00" + }, { "name": "daverandom/libdns", "version": "v2.0.3", @@ -3174,16 +3278,16 @@ }, { "name": "monolog/monolog", - "version": "3.3.1", + "version": "3.4.0", "source": { "type": "git", "url": "https://github.com/Seldaek/monolog.git", - "reference": "9b5daeaffce5b926cac47923798bba91059e60e2" + "reference": "e2392369686d420ca32df3803de28b5d6f76867d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Seldaek/monolog/zipball/9b5daeaffce5b926cac47923798bba91059e60e2", - "reference": "9b5daeaffce5b926cac47923798bba91059e60e2", + "url": "https://api.github.com/repos/Seldaek/monolog/zipball/e2392369686d420ca32df3803de28b5d6f76867d", + "reference": "e2392369686d420ca32df3803de28b5d6f76867d", "shasum": "" }, "require": { @@ -3198,7 +3302,7 @@ "doctrine/couchdb": "~1.0@dev", "elasticsearch/elasticsearch": "^7 || ^8", "ext-json": "*", - "graylog2/gelf-php": "^1.4.2 || ^2@dev", + "graylog2/gelf-php": "^1.4.2 || ^2.0", "guzzlehttp/guzzle": "^7.4.5", "guzzlehttp/psr7": "^2.2", "mongodb/mongodb": "^1.8", @@ -3206,7 +3310,7 @@ "phpstan/phpstan": "^1.9", "phpstan/phpstan-deprecation-rules": "^1.0", "phpstan/phpstan-strict-rules": "^1.4", - "phpunit/phpunit": "^9.5.26", + "phpunit/phpunit": "^10.1", "predis/predis": "^1.1 || ^2", "ruflin/elastica": "^7", "symfony/mailer": "^5.4 || ^6", @@ -3259,7 +3363,7 @@ ], "support": { "issues": "https://github.com/Seldaek/monolog/issues", - "source": "https://github.com/Seldaek/monolog/tree/3.3.1" + "source": "https://github.com/Seldaek/monolog/tree/3.4.0" }, "funding": [ { @@ -3271,7 +3375,7 @@ "type": "tidelift" } ], - "time": "2023-02-06T13:46:10+00:00" + "time": "2023-06-21T08:46:11+00:00" }, { "name": "nikic/fast-route", @@ -3517,16 +3621,16 @@ }, { "name": "phpseclib/phpseclib", - "version": "3.0.19", + "version": "3.0.20", "source": { "type": "git", "url": "https://github.com/phpseclib/phpseclib.git", - "reference": "cc181005cf548bfd8a4896383bb825d859259f95" + "reference": "543a1da81111a0bfd6ae7bbc2865c5e89ed3fc67" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpseclib/phpseclib/zipball/cc181005cf548bfd8a4896383bb825d859259f95", - "reference": "cc181005cf548bfd8a4896383bb825d859259f95", + "url": "https://api.github.com/repos/phpseclib/phpseclib/zipball/543a1da81111a0bfd6ae7bbc2865c5e89ed3fc67", + "reference": "543a1da81111a0bfd6ae7bbc2865c5e89ed3fc67", "shasum": "" }, "require": { @@ -3607,7 +3711,7 @@ ], "support": { "issues": "https://github.com/phpseclib/phpseclib/issues", - "source": "https://github.com/phpseclib/phpseclib/tree/3.0.19" + "source": "https://github.com/phpseclib/phpseclib/tree/3.0.20" }, "funding": [ { @@ -3623,7 +3727,7 @@ "type": "tidelift" } ], - "time": "2023-03-05T17:13:09+00:00" + "time": "2023-06-13T06:30:34+00:00" }, { "name": "psr/http-factory", @@ -4173,8 +4277,7 @@ "platform": { "php": "^8.1", "ext-json": "*", - "ext-mbstring": "*", - "ext-pcntl": "*" + "ext-mbstring": "*" }, "platform-dev": [], "plugin-api-version": "2.3.0" From e6d400e6665808fc2dea5e0fdfee59c36e7473f2 Mon Sep 17 00:00:00 2001 From: Alexander Pankratov Date: Tue, 4 Jul 2023 22:33:27 +0200 Subject: [PATCH 070/270] Update madelineProto --- src/Client.php | 5 ++--- .../SystemApiExtensions.php | 16 ++++++++-------- 2 files changed, 10 insertions(+), 11 deletions(-) diff --git a/src/Client.php b/src/Client.php index 6d02604..c76d90d 100644 --- a/src/Client.php +++ b/src/Client.php @@ -4,7 +4,6 @@ use danog\MadelineProto\API; use danog\MadelineProto\APIWrapper; -use danog\MadelineProto\MTProto; use InvalidArgumentException; use Psr\Log\LogLevel; use ReflectionProperty; @@ -116,7 +115,7 @@ public function getSession(?string $session = null): API private function startNotLoggedInSessions(): void { foreach ($this->instances as $name => $instance) { - if ($instance->getAuthorization() !== MTProto::LOGGED_IN) { + if ($instance->getAuthorization() !== API::LOGGED_IN) { { //Disable logging to stdout $logLevel = Logger::getInstance()->minLevelIndex; @@ -134,7 +133,7 @@ private function startNotLoggedInSessions(): void public function startLoggedInSession(string $sessionName): void { - if ($this->instances[$sessionName]->getAuthorization() === MTProto::LOGGED_IN) { + if ($this->instances[$sessionName]->getAuthorization() === API::LOGGED_IN) { if (empty(EventObserver::$sessionClients[$sessionName])) { $this->instances[$sessionName]->unsetEventHandler(); } diff --git a/src/MadelineProtoExtensions/SystemApiExtensions.php b/src/MadelineProtoExtensions/SystemApiExtensions.php index 8097834..5a41017 100644 --- a/src/MadelineProtoExtensions/SystemApiExtensions.php +++ b/src/MadelineProtoExtensions/SystemApiExtensions.php @@ -3,7 +3,7 @@ namespace TelegramApiServer\MadelineProtoExtensions; use danog\MadelineProto; -use danog\MadelineProto\MTProto; +use danog\MadelineProto\API; use InvalidArgumentException; use Revolt\EventLoop; use TelegramApiServer\Client; @@ -32,7 +32,7 @@ public function addSession(string $session, array $settings = []): array /** @var null|MadelineProto\Settings $fullSettings */ $fullSettings = $instance->getSettings(); try { - if ($fullSettings !== null && $instance->getAuthorization() !== MTProto::LOGGED_IN) { + if ($fullSettings !== null && $instance->getAuthorization() !== API::LOGGED_IN) { $fullSettings->getAppInfo()->getApiId(); $fullSettings->getAppInfo()->getApiHash(); } @@ -57,22 +57,22 @@ public function getSessionList(): array { $sessions = []; foreach ($this->client->instances as $session => $instance) { - /** @var MadelineProto\API $instance */ + /** @var API $instance */ $authorized = $instance->API->authorized ?? null; switch ($authorized) { - case MTProto::NOT_LOGGED_IN; + case API::NOT_LOGGED_IN; $status = 'NOT_LOGGED_IN'; break; - case MTProto::WAITING_CODE: + case API::WAITING_CODE: $status = 'WAITING_CODE'; break; - case MTProto::WAITING_PASSWORD: + case API::WAITING_PASSWORD: $status = 'WAITING_PASSWORD'; break; - case MTProto::WAITING_SIGNUP: + case API::WAITING_SIGNUP: $status = 'WAITING_SIGNUP'; break; - case MTProto::LOGGED_IN: + case API::LOGGED_IN: $status = 'LOGGED_IN'; break; case null: From 97f8a95d668b8a8c36eabb06f658c39a82b67bb4 Mon Sep 17 00:00:00 2001 From: Alexander Pankratov Date: Wed, 5 Jul 2023 16:39:54 +0200 Subject: [PATCH 071/270] Fix: reduce flood_timeout --- config.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/config.php b/config.php index 6d3a633..b520f66 100644 --- a/config.php +++ b/config.php @@ -18,8 +18,12 @@ 'logger_param' => LogObserver::class . '::log', 'logger_level' => (int)getenv('LOGGER_LEVEL'), // Logging level, available logging levels are: ULTRA_VERBOSE - 5, VERBOSE - 4 , NOTICE - 3, WARNING - 2, ERROR - 1, FATAL_ERROR - 0. ], + 'flood_timeout' => [ + 'wait_if_lt' => 5, + ], 'connection_settings' => [ 'all' => [ + 'drop_timeout' => 2, 'proxy' => '\SocksProxy', 'proxy_extra' => [ 'address' => (string)getenv('TELEGRAM_PROXY_ADDRESS'), From 9ef088f39ac560be472b9d2dc92b4707b4daaa04 Mon Sep 17 00:00:00 2001 From: Alexander Pankratov Date: Wed, 5 Jul 2023 18:45:55 +0200 Subject: [PATCH 072/270] Fix: reduce flood_timeout --- config.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config.php b/config.php index b520f66..6c495ca 100644 --- a/config.php +++ b/config.php @@ -23,7 +23,7 @@ ], 'connection_settings' => [ 'all' => [ - 'drop_timeout' => 2, + 'drop_timeout' => 10, 'proxy' => '\SocksProxy', 'proxy_extra' => [ 'address' => (string)getenv('TELEGRAM_PROXY_ADDRESS'), From 3c35d24129acf43ed7170d511739f428ca9f2fc8 Mon Sep 17 00:00:00 2001 From: Alexander Pankratov Date: Fri, 7 Jul 2023 20:29:46 +0200 Subject: [PATCH 073/270] Fix: getSessionList statuses --- src/MadelineProtoExtensions/SystemApiExtensions.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/MadelineProtoExtensions/SystemApiExtensions.php b/src/MadelineProtoExtensions/SystemApiExtensions.php index 5a41017..abb38aa 100644 --- a/src/MadelineProtoExtensions/SystemApiExtensions.php +++ b/src/MadelineProtoExtensions/SystemApiExtensions.php @@ -57,8 +57,7 @@ public function getSessionList(): array { $sessions = []; foreach ($this->client->instances as $session => $instance) { - /** @var API $instance */ - $authorized = $instance->API->authorized ?? null; + $authorized = $instance->getAuthorization(); switch ($authorized) { case API::NOT_LOGGED_IN; $status = 'NOT_LOGGED_IN'; From 040f3472a38bd3066d7987a14e438f9f60bb2539 Mon Sep 17 00:00:00 2001 From: Alexander Pankratov Date: Sun, 9 Jul 2023 22:40:54 +0200 Subject: [PATCH 074/270] Feat: mention getUpdates in docs --- README.md | 12 +++ composer.lock | 77 ++++++++++++++++--- src/MadelineProtoExtensions/ApiExtensions.php | 12 +++ 3 files changed, 91 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 61e37a9..b4a5629 100644 --- a/README.md +++ b/README.md @@ -118,6 +118,18 @@ docker compose pull * copy message from one channel to another (not repost): `http://127.0.0.1:9503/api/copyMessages/?data[from_peer]=@xtrime&data[to_peer]=@xtrime&data[id][0]=1` ## Advanced features +### Get events/updates +Telegram is event driven platform. For example: every time your account receives a message you immediately get an update. +There are multiple ways of [getting updates](https://docs.madelineproto.xyz/docs/UPDATES.html) in TelegramApiServer / MadelineProto: + 1. [Websocket](#eventhandler-updates-webhooks) + 2. Long Polling: + send request to getUpdates endpoint + `curl "127.0.0.1:9503/api/getUpdates?data[limit]=3&data[offset]=0&data[timeout]=10.0" -g` + 3. Webhook: + Redirect all updates to your endpoint, just like bot api! + `curl "127.0.0.1:9503/api/setWebhook?url=http%3A%2F%2Fexample.com%2Fsome_webhook" -g ` + Example uses urlencoded url in query. + ### Uploading files. There are few options to upload and send media files: diff --git a/composer.lock b/composer.lock index 441b424..898b2d9 100644 --- a/composer.lock +++ b/composer.lock @@ -2506,12 +2506,12 @@ "source": { "type": "git", "url": "https://github.com/danog/MadelineProto.git", - "reference": "a157f277c15a793773a936c1882c2976bce955b9" + "reference": "8fd4aa7e2d7e6b9bd201ac5f0717438740e5725d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/danog/MadelineProto/zipball/a157f277c15a793773a936c1882c2976bce955b9", - "reference": "a157f277c15a793773a936c1882c2976bce955b9", + "url": "https://api.github.com/repos/danog/MadelineProto/zipball/8fd4aa7e2d7e6b9bd201ac5f0717438740e5725d", + "reference": "8fd4aa7e2d7e6b9bd201ac5f0717438740e5725d", "shasum": "" }, "require": { @@ -2544,6 +2544,7 @@ "ext-xml": "*", "ext-zlib": "*", "league/uri": "^6", + "nikic/php-parser": "^4.16", "php-64bit": ">=8.1", "phpseclib/phpseclib": "^3", "psr/http-factory": "^1.0", @@ -2627,7 +2628,7 @@ "type": "github" } ], - "time": "2023-07-04T17:48:23+00:00" + "time": "2023-07-09T16:42:42+00:00" }, { "name": "danog/primemodule", @@ -3427,6 +3428,62 @@ }, "time": "2018-02-13T20:26:39+00:00" }, + { + "name": "nikic/php-parser", + "version": "v4.16.0", + "source": { + "type": "git", + "url": "https://github.com/nikic/PHP-Parser.git", + "reference": "19526a33fb561ef417e822e85f08a00db4059c17" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/19526a33fb561ef417e822e85f08a00db4059c17", + "reference": "19526a33fb561ef417e822e85f08a00db4059c17", + "shasum": "" + }, + "require": { + "ext-tokenizer": "*", + "php": ">=7.0" + }, + "require-dev": { + "ircmaxell/php-yacc": "^0.0.7", + "phpunit/phpunit": "^6.5 || ^7.0 || ^8.0 || ^9.0" + }, + "bin": [ + "bin/php-parse" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.9-dev" + } + }, + "autoload": { + "psr-4": { + "PhpParser\\": "lib/PhpParser" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Nikita Popov" + } + ], + "description": "A PHP parser written in PHP", + "keywords": [ + "parser", + "php" + ], + "support": { + "issues": "https://github.com/nikic/PHP-Parser/issues", + "source": "https://github.com/nikic/PHP-Parser/tree/v4.16.0" + }, + "time": "2023-06-25T14:52:30+00:00" + }, { "name": "paragonie/constant_time_encoding", "version": "v2.6.3", @@ -3621,16 +3678,16 @@ }, { "name": "phpseclib/phpseclib", - "version": "3.0.20", + "version": "3.0.21", "source": { "type": "git", "url": "https://github.com/phpseclib/phpseclib.git", - "reference": "543a1da81111a0bfd6ae7bbc2865c5e89ed3fc67" + "reference": "4580645d3fc05c189024eb3b834c6c1e4f0f30a1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpseclib/phpseclib/zipball/543a1da81111a0bfd6ae7bbc2865c5e89ed3fc67", - "reference": "543a1da81111a0bfd6ae7bbc2865c5e89ed3fc67", + "url": "https://api.github.com/repos/phpseclib/phpseclib/zipball/4580645d3fc05c189024eb3b834c6c1e4f0f30a1", + "reference": "4580645d3fc05c189024eb3b834c6c1e4f0f30a1", "shasum": "" }, "require": { @@ -3711,7 +3768,7 @@ ], "support": { "issues": "https://github.com/phpseclib/phpseclib/issues", - "source": "https://github.com/phpseclib/phpseclib/tree/3.0.20" + "source": "https://github.com/phpseclib/phpseclib/tree/3.0.21" }, "funding": [ { @@ -3727,7 +3784,7 @@ "type": "tidelift" } ], - "time": "2023-06-13T06:30:34+00:00" + "time": "2023-07-09T15:24:48+00:00" }, { "name": "psr/http-factory", diff --git a/src/MadelineProtoExtensions/ApiExtensions.php b/src/MadelineProtoExtensions/ApiExtensions.php index 19fd221..a2f2ed5 100644 --- a/src/MadelineProtoExtensions/ApiExtensions.php +++ b/src/MadelineProtoExtensions/ApiExtensions.php @@ -517,4 +517,16 @@ public function setEventHandler(): void Client::getWrapper($this->madelineProto)->getAPI()->setEventHandler(EventHandler::class); } + public function getUpdates(array $params): array { + foreach ($params as $key => $value) { + $params[$key] = match($key) { + 'offset', 'limit' => (int) $value, + 'timeout' => (float) $value, + default => throw new \InvalidArgumentException("Unknown parameter: {$key}"), + }; + } + + return $this->madelineProto->getUpdates($params); + } + } \ No newline at end of file From ac648dc9d0b9d66859ccc4696ef8e81fff8dfc5e Mon Sep 17 00:00:00 2001 From: Alexander Pankratov Date: Sun, 9 Jul 2023 23:52:51 +0200 Subject: [PATCH 075/270] Upgrade mariadb --- docker-compose.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker-compose.yml b/docker-compose.yml index 3388893..3b91e48 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -23,7 +23,7 @@ services: command: - "-s=session" mysql: - image: mariadb:10.8 + image: mariadb:11.0 restart: unless-stopped ports: - "127.0.0.1:9507:3306" From 406d9dd4e18340a95b4a1b3441d8f5a8e695cc47 Mon Sep 17 00:00:00 2001 From: Alexander Pankratov Date: Mon, 10 Jul 2023 00:52:53 +0200 Subject: [PATCH 076/270] Upgrade madelineProto --- composer.lock | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/composer.lock b/composer.lock index 898b2d9..16b26c1 100644 --- a/composer.lock +++ b/composer.lock @@ -2506,12 +2506,12 @@ "source": { "type": "git", "url": "https://github.com/danog/MadelineProto.git", - "reference": "8fd4aa7e2d7e6b9bd201ac5f0717438740e5725d" + "reference": "7e69782e742e9006de134651931241214080bf31" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/danog/MadelineProto/zipball/8fd4aa7e2d7e6b9bd201ac5f0717438740e5725d", - "reference": "8fd4aa7e2d7e6b9bd201ac5f0717438740e5725d", + "url": "https://api.github.com/repos/danog/MadelineProto/zipball/7e69782e742e9006de134651931241214080bf31", + "reference": "7e69782e742e9006de134651931241214080bf31", "shasum": "" }, "require": { @@ -2628,7 +2628,7 @@ "type": "github" } ], - "time": "2023-07-09T16:42:42+00:00" + "time": "2023-07-09T23:50:47+00:00" }, { "name": "danog/primemodule", From cff088fa897e4d31446841ea28cfbf53348cbd17 Mon Sep 17 00:00:00 2001 From: Alexander Pankratov Date: Sun, 23 Jul 2023 16:35:56 +0200 Subject: [PATCH 077/270] Upgrade madelineProto --- composer.lock | 71 ++++++++------------------------------------------- config.php | 4 +-- 2 files changed, 12 insertions(+), 63 deletions(-) diff --git a/composer.lock b/composer.lock index 16b26c1..31d4e05 100644 --- a/composer.lock +++ b/composer.lock @@ -2506,12 +2506,12 @@ "source": { "type": "git", "url": "https://github.com/danog/MadelineProto.git", - "reference": "7e69782e742e9006de134651931241214080bf31" + "reference": "6e3312917e5374f5747c6dd2db6da561f8ec70da" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/danog/MadelineProto/zipball/7e69782e742e9006de134651931241214080bf31", - "reference": "7e69782e742e9006de134651931241214080bf31", + "url": "https://api.github.com/repos/danog/MadelineProto/zipball/6e3312917e5374f5747c6dd2db6da561f8ec70da", + "reference": "6e3312917e5374f5747c6dd2db6da561f8ec70da", "shasum": "" }, "require": { @@ -2534,7 +2534,6 @@ "danog/loop": "^1", "danog/primemodule": "^1", "danog/tg-file-decoder": "^0.1", - "erusev/parsedown": "^1.7", "ext-dom": "*", "ext-fileinfo": "*", "ext-filter": "*", @@ -2628,7 +2627,7 @@ "type": "github" } ], - "time": "2023-07-09T23:50:47+00:00" + "time": "2023-07-23T14:33:02+00:00" }, { "name": "danog/primemodule", @@ -2838,56 +2837,6 @@ }, "time": "2022-09-20T18:15:38+00:00" }, - { - "name": "erusev/parsedown", - "version": "1.7.4", - "source": { - "type": "git", - "url": "https://github.com/erusev/parsedown.git", - "reference": "cb17b6477dfff935958ba01325f2e8a2bfa6dab3" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/erusev/parsedown/zipball/cb17b6477dfff935958ba01325f2e8a2bfa6dab3", - "reference": "cb17b6477dfff935958ba01325f2e8a2bfa6dab3", - "shasum": "" - }, - "require": { - "ext-mbstring": "*", - "php": ">=5.3.0" - }, - "require-dev": { - "phpunit/phpunit": "^4.8.35" - }, - "type": "library", - "autoload": { - "psr-0": { - "Parsedown": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Emanuil Rusev", - "email": "hello@erusev.com", - "homepage": "http://erusev.com" - } - ], - "description": "Parser for Markdown.", - "homepage": "http://parsedown.org", - "keywords": [ - "markdown", - "parser" - ], - "support": { - "issues": "https://github.com/erusev/parsedown/issues", - "source": "https://github.com/erusev/parsedown/tree/1.7.x" - }, - "time": "2019-12-30T22:54:17+00:00" - }, { "name": "kelunik/certificate", "version": "v1.1.3", @@ -3946,16 +3895,16 @@ }, { "name": "revolt/event-loop", - "version": "v1.0.1", + "version": "v1.0.2", "source": { "type": "git", "url": "https://github.com/revoltphp/event-loop.git", - "reference": "9ac31d36635c60a9b28bb2a476384c5ec55c95cc" + "reference": "b018d0ff141636d69a8054194675fe0050cf3aa9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/revoltphp/event-loop/zipball/9ac31d36635c60a9b28bb2a476384c5ec55c95cc", - "reference": "9ac31d36635c60a9b28bb2a476384c5ec55c95cc", + "url": "https://api.github.com/repos/revoltphp/event-loop/zipball/b018d0ff141636d69a8054194675fe0050cf3aa9", + "reference": "b018d0ff141636d69a8054194675fe0050cf3aa9", "shasum": "" }, "require": { @@ -4012,9 +3961,9 @@ ], "support": { "issues": "https://github.com/revoltphp/event-loop/issues", - "source": "https://github.com/revoltphp/event-loop/tree/v1.0.1" + "source": "https://github.com/revoltphp/event-loop/tree/v1.0.2" }, - "time": "2023-04-02T16:25:26+00:00" + "time": "2023-07-20T20:16:11+00:00" }, { "name": "symfony/polyfill-ctype", diff --git a/config.php b/config.php index 6c495ca..731fa59 100644 --- a/config.php +++ b/config.php @@ -19,11 +19,11 @@ 'logger_level' => (int)getenv('LOGGER_LEVEL'), // Logging level, available logging levels are: ULTRA_VERBOSE - 5, VERBOSE - 4 , NOTICE - 3, WARNING - 2, ERROR - 1, FATAL_ERROR - 0. ], 'flood_timeout' => [ - 'wait_if_lt' => 5, + 'wait_if_lt' => 10, ], 'connection_settings' => [ 'all' => [ - 'drop_timeout' => 10, + 'drop_timeout' => 30, 'proxy' => '\SocksProxy', 'proxy_extra' => [ 'address' => (string)getenv('TELEGRAM_PROXY_ADDRESS'), From 8ac36c691f36124f49efabb6f96c102a67fb9008 Mon Sep 17 00:00:00 2001 From: Alexander Pankratov Date: Sun, 23 Jul 2023 17:45:40 +0200 Subject: [PATCH 078/270] Upgrade ev && eio --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 57bc67a..15ccf88 100644 --- a/Dockerfile +++ b/Dockerfile @@ -7,7 +7,7 @@ RUN true \ && docker-php-ext-install -j$(nproc) sockets zip gmp pcntl bcmath ffi mysqli pdo pdo_mysql \ # Install additional extension && mkdir -p /usr/src/php/ext/ && cd /usr/src/php/ext/ \ - && pecl bundle ev && pecl bundle eio-3.0.0RC4 \ + && pecl bundle ev-beta && pecl bundle eio-beta \ && docker-php-ext-install -j$(nproc) ev eio \ # Install PrimeModule for AuthKey generation speedup && git clone https://github.com/danog/PrimeModule-ext \ From 83b1f8a9a4d699bbe45ff6ce7c3790494ec86c62 Mon Sep 17 00:00:00 2001 From: Alexander Pankratov Date: Thu, 27 Jul 2023 22:29:09 +0200 Subject: [PATCH 079/270] Fix: /events --- composer.lock | 22 +++++++++++----------- src/EventObservers/EventObserver.php | 1 + 2 files changed, 12 insertions(+), 11 deletions(-) diff --git a/composer.lock b/composer.lock index 31d4e05..4690958 100644 --- a/composer.lock +++ b/composer.lock @@ -316,16 +316,16 @@ }, { "name": "amphp/file", - "version": "v3.0.0", + "version": "v3.0.1", "source": { "type": "git", "url": "https://github.com/amphp/file.git", - "reference": "1c9f0ebdb20ae05f1540fca3e7a517f7f166652b" + "reference": "efeb737b1f19a7fcfe8a763c5ef2ad80dbac93dd" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/amphp/file/zipball/1c9f0ebdb20ae05f1540fca3e7a517f7f166652b", - "reference": "1c9f0ebdb20ae05f1540fca3e7a517f7f166652b", + "url": "https://api.github.com/repos/amphp/file/zipball/efeb737b1f19a7fcfe8a763c5ef2ad80dbac93dd", + "reference": "efeb737b1f19a7fcfe8a763c5ef2ad80dbac93dd", "shasum": "" }, "require": { @@ -389,7 +389,7 @@ ], "support": { "issues": "https://github.com/amphp/file/issues", - "source": "https://github.com/amphp/file/tree/v3.0.0" + "source": "https://github.com/amphp/file/tree/v3.0.1" }, "funding": [ { @@ -397,7 +397,7 @@ "type": "github" } ], - "time": "2023-03-02T22:29:08+00:00" + "time": "2023-07-23T18:54:06+00:00" }, { "name": "amphp/hpack", @@ -2506,12 +2506,12 @@ "source": { "type": "git", "url": "https://github.com/danog/MadelineProto.git", - "reference": "6e3312917e5374f5747c6dd2db6da561f8ec70da" + "reference": "266370354708e850254e7db76822801026aeee6e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/danog/MadelineProto/zipball/6e3312917e5374f5747c6dd2db6da561f8ec70da", - "reference": "6e3312917e5374f5747c6dd2db6da561f8ec70da", + "url": "https://api.github.com/repos/danog/MadelineProto/zipball/266370354708e850254e7db76822801026aeee6e", + "reference": "266370354708e850254e7db76822801026aeee6e", "shasum": "" }, "require": { @@ -2619,7 +2619,7 @@ ], "support": { "issues": "https://github.com/danog/MadelineProto/issues", - "source": "https://github.com/danog/MadelineProto/tree/v8" + "source": "https://github.com/danog/MadelineProto/tree/8.0.0-beta127" }, "funding": [ { @@ -2627,7 +2627,7 @@ "type": "github" } ], - "time": "2023-07-23T14:33:02+00:00" + "time": "2023-07-27T11:21:21+00:00" }, { "name": "danog/primemodule", diff --git a/src/EventObservers/EventObserver.php b/src/EventObservers/EventObserver.php index f32f0ad..47b42bc 100644 --- a/src/EventObservers/EventObserver.php +++ b/src/EventObservers/EventObserver.php @@ -57,6 +57,7 @@ public static function startEventHandler(?string $requestedSession = null): void $property = new ReflectionProperty($instance, "wrapper"); /** @var APIWrapper $wrapper */ $wrapper = $property->getValue($instance); + EventHandler::cachePlugins(EventHandler::class); $wrapper->getAPI()->setEventHandler(EventHandler::class); } catch (Throwable $e) { static::removeSessionClient($session); From 2b3d162bf3a7f0875ea27440a1bec19319ee026f Mon Sep 17 00:00:00 2001 From: Alexander Pankratov Date: Fri, 28 Jul 2023 14:21:29 +0200 Subject: [PATCH 080/270] Switch serializer --- config.php | 1 + 1 file changed, 1 insertion(+) diff --git a/config.php b/config.php index 731fa59..edf5dd3 100644 --- a/config.php +++ b/config.php @@ -50,6 +50,7 @@ 'max_connections' => (int)getenv('DB_MAX_CONNECTIONS'), 'idle_timeout' => (int)getenv('DB_IDLE_TIMEOUT'), 'cache_ttl' => getenv('DB_CACHE_TTL'), + 'serializer' => 'serialize', ] ], 'download' => [ From 2fb2c3a9e0b5e727ad78522b4a65d67295046472 Mon Sep 17 00:00:00 2001 From: Alexander Pankratov Date: Mon, 7 Aug 2023 10:38:37 +0200 Subject: [PATCH 081/270] Upgrade amp http server --- composer.lock | 106 +++++++++++++++++++++--------------------- src/Server/Router.php | 17 ++++--- 2 files changed, 65 insertions(+), 58 deletions(-) diff --git a/composer.lock b/composer.lock index 4690958..330daca 100644 --- a/composer.lock +++ b/composer.lock @@ -538,16 +538,16 @@ }, { "name": "amphp/http-client", - "version": "v5.0.0-beta.11", + "version": "v5.0.0-beta.12", "source": { "type": "git", "url": "https://github.com/amphp/http-client.git", - "reference": "0fd30c4ff2231b044ead0e7a5d3aedafcbca59b1" + "reference": "4a962fe1d96ca0ca956401f08eb3eb72e90e5d2b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/amphp/http-client/zipball/0fd30c4ff2231b044ead0e7a5d3aedafcbca59b1", - "reference": "0fd30c4ff2231b044ead0e7a5d3aedafcbca59b1", + "url": "https://api.github.com/repos/amphp/http-client/zipball/4a962fe1d96ca0ca956401f08eb3eb72e90e5d2b", + "reference": "4a962fe1d96ca0ca956401f08eb3eb72e90e5d2b", "shasum": "" }, "require": { @@ -559,10 +559,8 @@ "amphp/socket": "^2", "amphp/sync": "^2", "league/uri": "^6", - "league/uri-components": "^2.4", "php": ">=8.1", - "psr/http-message": "^1", - "revolt/event-loop": "^1" + "psr/http-message": "^1 | ^2" }, "require-dev": { "amphp/file": "^3", @@ -624,7 +622,7 @@ ], "support": { "issues": "https://github.com/amphp/http-client/issues", - "source": "https://github.com/amphp/http-client/tree/v5.0.0-beta.11" + "source": "https://github.com/amphp/http-client/tree/v5.0.0-beta.12" }, "funding": [ { @@ -632,7 +630,7 @@ "type": "github" } ], - "time": "2023-04-13T05:19:15+00:00" + "time": "2023-08-05T15:21:21+00:00" }, { "name": "amphp/http-client-cookies", @@ -717,12 +715,12 @@ "source": { "type": "git", "url": "https://github.com/amphp/http-server.git", - "reference": "b9f6a9e039dd5b9ecc224c6e46d1a410691bbdca" + "reference": "33bd2a0c272e16cb51493f0aaabd11c7a9da73ef" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/amphp/http-server/zipball/b9f6a9e039dd5b9ecc224c6e46d1a410691bbdca", - "reference": "b9f6a9e039dd5b9ecc224c6e46d1a410691bbdca", + "url": "https://api.github.com/repos/amphp/http-server/zipball/33bd2a0c272e16cb51493f0aaabd11c7a9da73ef", + "reference": "33bd2a0c272e16cb51493f0aaabd11c7a9da73ef", "shasum": "" }, "require": { @@ -807,7 +805,7 @@ "type": "github" } ], - "time": "2023-06-03T16:00:02+00:00" + "time": "2023-07-31T23:21:23+00:00" }, { "name": "amphp/http-server-form-parser", @@ -893,30 +891,33 @@ }, { "name": "amphp/http-server-router", - "version": "v2.0.0-beta.3", + "version": "v2.0.0", "source": { "type": "git", "url": "https://github.com/amphp/http-server-router.git", - "reference": "d08be2868ca5e0a0882b6149c3e2546b1e2b3a53" + "reference": "8a166efa10bc3fc887a7a42b8a55c7b16bc9fc61" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/amphp/http-server-router/zipball/d08be2868ca5e0a0882b6149c3e2546b1e2b3a53", - "reference": "d08be2868ca5e0a0882b6149c3e2546b1e2b3a53", + "url": "https://api.github.com/repos/amphp/http-server-router/zipball/8a166efa10bc3fc887a7a42b8a55c7b16bc9fc61", + "reference": "8a166efa10bc3fc887a7a42b8a55c7b16bc9fc61", "shasum": "" }, "require": { + "amphp/amp": "^3", "amphp/cache": "^2", - "amphp/http": "^2-dev", + "amphp/http": "^2", "amphp/http-server": "^3", "amphp/socket": "^2", "nikic/fast-route": "^1", - "php": ">=8.1" + "php": ">=8.1", + "psr/log": "^1|^2|^3" }, "require-dev": { "amphp/log": "^2", "amphp/php-cs-fixer-config": "^2", "amphp/phpunit-util": "^3", + "colinodell/psr-testlogger": "^1.2", "league/uri": "^6", "phpunit/phpunit": "^9", "psalm/phar": "^5.6" @@ -948,7 +949,7 @@ "email": "aaron@trowski.com" } ], - "description": "Router responder for Amp's HTTP server.", + "description": "Routes to request handlers based on HTTP method and path for amphp/http-server.", "homepage": "https://github.com/amphp/http-server-router", "keywords": [ "http", @@ -957,7 +958,7 @@ ], "support": { "issues": "https://github.com/amphp/http-server-router/issues", - "source": "https://github.com/amphp/http-server-router/tree/v2.0.0-beta.3" + "source": "https://github.com/amphp/http-server-router/tree/v2.0.0" }, "funding": [ { @@ -965,20 +966,20 @@ "type": "github" } ], - "time": "2023-04-22T15:05:05+00:00" + "time": "2023-08-05T19:16:57+00:00" }, { "name": "amphp/log", - "version": "v2.0.0-beta.2", + "version": "v2.0.0", "source": { "type": "git", "url": "https://github.com/amphp/log.git", - "reference": "f65226ffa4dfe0dd63805f2af31aced9ed27efb6" + "reference": "bf1562b8a18a3f30efa069ed740f412ac70a8a6c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/amphp/log/zipball/f65226ffa4dfe0dd63805f2af31aced9ed27efb6", - "reference": "f65226ffa4dfe0dd63805f2af31aced9ed27efb6", + "url": "https://api.github.com/repos/amphp/log/zipball/bf1562b8a18a3f30efa069ed740f412ac70a8a6c", + "reference": "bf1562b8a18a3f30efa069ed740f412ac70a8a6c", "shasum": "" }, "require": { @@ -1031,7 +1032,7 @@ ], "support": { "issues": "https://github.com/amphp/log/issues", - "source": "https://github.com/amphp/log/tree/v2.0.0-beta.2" + "source": "https://github.com/amphp/log/tree/v2.0.0" }, "funding": [ { @@ -1039,7 +1040,7 @@ "type": "github" } ], - "time": "2023-02-03T03:34:16+00:00" + "time": "2023-08-05T18:59:54+00:00" }, { "name": "amphp/mysql", @@ -1397,16 +1398,16 @@ }, { "name": "amphp/process", - "version": "v2.0.0", + "version": "v2.0.1", "source": { "type": "git", "url": "https://github.com/amphp/process.git", - "reference": "9c9247fe8283b22e00a254746bf822da4b0b5ea4" + "reference": "a65d3bc1f36ef12d44df42a68f0f0643183f1052" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/amphp/process/zipball/9c9247fe8283b22e00a254746bf822da4b0b5ea4", - "reference": "9c9247fe8283b22e00a254746bf822da4b0b5ea4", + "url": "https://api.github.com/repos/amphp/process/zipball/a65d3bc1f36ef12d44df42a68f0f0643183f1052", + "reference": "a65d3bc1f36ef12d44df42a68f0f0643183f1052", "shasum": "" }, "require": { @@ -1453,7 +1454,7 @@ "homepage": "https://amphp.org/process", "support": { "issues": "https://github.com/amphp/process/issues", - "source": "https://github.com/amphp/process/tree/v2.0.0" + "source": "https://github.com/amphp/process/tree/v2.0.1" }, "funding": [ { @@ -1461,7 +1462,7 @@ "type": "github" } ], - "time": "2023-01-09T21:32:38+00:00" + "time": "2023-01-15T16:00:57+00:00" }, { "name": "amphp/redis", @@ -2506,12 +2507,12 @@ "source": { "type": "git", "url": "https://github.com/danog/MadelineProto.git", - "reference": "266370354708e850254e7db76822801026aeee6e" + "reference": "28269b1b7631435f42f8be718004f7f0f9ab3f53" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/danog/MadelineProto/zipball/266370354708e850254e7db76822801026aeee6e", - "reference": "266370354708e850254e7db76822801026aeee6e", + "url": "https://api.github.com/repos/danog/MadelineProto/zipball/28269b1b7631435f42f8be718004f7f0f9ab3f53", + "reference": "28269b1b7631435f42f8be718004f7f0f9ab3f53", "shasum": "" }, "require": { @@ -2573,7 +2574,8 @@ "ext-gmp": "Install the gmp extension to speed up authorization", "ext-openssl": "Install the openssl extension for faster crypto", "ext-pdo": "Install the pdo extension to store session data on MySQL", - "ext-primemodule": "Install the primemodule and FFI extensions to speed up MadelineProto (https://prime.madelineproto.xyz)" + "ext-primemodule": "Install the primemodule and FFI extensions to speed up MadelineProto (https://prime.madelineproto.xyz)", + "ext-uv": "Install the uv extension to greatly speed up MadelineProto!" }, "default-branch": true, "type": "project", @@ -2619,7 +2621,7 @@ ], "support": { "issues": "https://github.com/danog/MadelineProto/issues", - "source": "https://github.com/danog/MadelineProto/tree/8.0.0-beta127" + "source": "https://github.com/danog/MadelineProto/tree/8.0.0-beta130" }, "funding": [ { @@ -2627,7 +2629,7 @@ "type": "github" } ], - "time": "2023-07-27T11:21:21+00:00" + "time": "2023-08-07T07:04:07+00:00" }, { "name": "danog/primemodule", @@ -2682,16 +2684,16 @@ }, { "name": "danog/tg-file-decoder", - "version": "0.1.12", + "version": "0.1.13", "source": { "type": "git", "url": "https://github.com/danog/tg-file-decoder.git", - "reference": "fd9827e7af8f3b47dc6db4b1c12bfeb6654dde4f" + "reference": "5cdb05816aad20583592635eddd90e9c6aae8930" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/danog/tg-file-decoder/zipball/fd9827e7af8f3b47dc6db4b1c12bfeb6654dde4f", - "reference": "fd9827e7af8f3b47dc6db4b1c12bfeb6654dde4f", + "url": "https://api.github.com/repos/danog/tg-file-decoder/zipball/5cdb05816aad20583592635eddd90e9c6aae8930", + "reference": "5cdb05816aad20583592635eddd90e9c6aae8930", "shasum": "" }, "require": { @@ -2733,7 +2735,7 @@ ], "support": { "issues": "https://github.com/danog/tg-file-decoder/issues", - "source": "https://github.com/danog/tg-file-decoder/tree/0.1.12" + "source": "https://github.com/danog/tg-file-decoder/tree/0.1.13" }, "funding": [ { @@ -2741,7 +2743,7 @@ "type": "github" } ], - "time": "2022-11-16T16:22:45+00:00" + "time": "2023-08-05T21:04:20+00:00" }, { "name": "dasprid/enum", @@ -3895,16 +3897,16 @@ }, { "name": "revolt/event-loop", - "version": "v1.0.2", + "version": "v1.0.3", "source": { "type": "git", "url": "https://github.com/revoltphp/event-loop.git", - "reference": "b018d0ff141636d69a8054194675fe0050cf3aa9" + "reference": "0fe2d31e1cddd26664e55d383d3d5da613334c03" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/revoltphp/event-loop/zipball/b018d0ff141636d69a8054194675fe0050cf3aa9", - "reference": "b018d0ff141636d69a8054194675fe0050cf3aa9", + "url": "https://api.github.com/repos/revoltphp/event-loop/zipball/0fe2d31e1cddd26664e55d383d3d5da613334c03", + "reference": "0fe2d31e1cddd26664e55d383d3d5da613334c03", "shasum": "" }, "require": { @@ -3961,9 +3963,9 @@ ], "support": { "issues": "https://github.com/revoltphp/event-loop/issues", - "source": "https://github.com/revoltphp/event-loop/tree/v1.0.2" + "source": "https://github.com/revoltphp/event-loop/tree/v1.0.3" }, - "time": "2023-07-20T20:16:11+00:00" + "time": "2023-07-29T17:07:12+00:00" }, { "name": "symfony/polyfill-ctype", diff --git a/src/Server/Router.php b/src/Server/Router.php index f6ac2f9..bd9688f 100644 --- a/src/Server/Router.php +++ b/src/Server/Router.php @@ -11,9 +11,10 @@ use TelegramApiServer\Controllers\EventsController; use TelegramApiServer\Controllers\LogController; use TelegramApiServer\Controllers\SystemController; +use TelegramApiServer\Logger; use TelegramApiServer\MadelineProtoExtensions\ApiExtensions; use TelegramApiServer\MadelineProtoExtensions\SystemApiExtensions; -use function Amp\Http\Server\Middleware\stack; +use function Amp\Http\Server\Middleware\stackMiddleware; class Router { @@ -21,7 +22,11 @@ class Router public function __construct(SocketHttpServer $server, ErrorHandler $errorHandler) { - $this->router = new \Amp\Http\Server\Router($server, $errorHandler); + $this->router = new \Amp\Http\Server\Router( + httpServer: $server, + logger: Logger::getInstance(), + errorHandler: $errorHandler, + ); $this->setRoutes(); $this->setFallback(); } @@ -41,10 +46,10 @@ private function setFallback(): void private function setRoutes(): void { $authorization = new Authorization(); - $apiHandler = stack(ApiController::getRouterCallback(ApiExtensions::class), $authorization); - $systemApiHandler = stack(SystemController::getRouterCallback(SystemApiExtensions::class), $authorization); - $eventsHandler = stack(EventsController::getRouterCallback(), $authorization); - $logHandler = stack(LogController::getRouterCallback(), $authorization); + $apiHandler = stackMiddleware(ApiController::getRouterCallback(ApiExtensions::class), $authorization); + $systemApiHandler = stackMiddleware(SystemController::getRouterCallback(SystemApiExtensions::class), $authorization); + $eventsHandler = stackMiddleware(EventsController::getRouterCallback(), $authorization); + $logHandler = stackMiddleware(LogController::getRouterCallback(), $authorization); foreach (['GET', 'POST'] as $method) { $this->router->addRoute($method, '/api/{method}[/]', $apiHandler); From 8f5eeb338ee2428058a533d77061e3261f2fb23a Mon Sep 17 00:00:00 2001 From: Alexander Pankratov Date: Tue, 8 Aug 2023 18:47:58 +0200 Subject: [PATCH 082/270] Fix: bytes to string conversion --- composer.lock | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/composer.lock b/composer.lock index 330daca..a0da21d 100644 --- a/composer.lock +++ b/composer.lock @@ -2507,12 +2507,12 @@ "source": { "type": "git", "url": "https://github.com/danog/MadelineProto.git", - "reference": "28269b1b7631435f42f8be718004f7f0f9ab3f53" + "reference": "0689c16309a8a404f920f5e5543b64ad8a3309b2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/danog/MadelineProto/zipball/28269b1b7631435f42f8be718004f7f0f9ab3f53", - "reference": "28269b1b7631435f42f8be718004f7f0f9ab3f53", + "url": "https://api.github.com/repos/danog/MadelineProto/zipball/0689c16309a8a404f920f5e5543b64ad8a3309b2", + "reference": "0689c16309a8a404f920f5e5543b64ad8a3309b2", "shasum": "" }, "require": { @@ -2621,7 +2621,7 @@ ], "support": { "issues": "https://github.com/danog/MadelineProto/issues", - "source": "https://github.com/danog/MadelineProto/tree/8.0.0-beta130" + "source": "https://github.com/danog/MadelineProto/tree/v8" }, "funding": [ { @@ -2629,7 +2629,7 @@ "type": "github" } ], - "time": "2023-08-07T07:04:07+00:00" + "time": "2023-08-08T16:47:22+00:00" }, { "name": "danog/primemodule", From 8baff1d12c9b7d1db35a0b697a6f4614e5a9181d Mon Sep 17 00:00:00 2001 From: Alexander Pankratov Date: Sun, 13 Aug 2023 18:17:58 +0200 Subject: [PATCH 083/270] Upgrade settings format --- composer.lock | 41 +++++++++++++++---------------- config.php | 43 ++++++++++----------------------- src/Client.php | 35 ++++++++++++++++++++++++++- src/Logger.php | 2 +- src/Migrations/StartUpFixes.php | 10 ++++++++ 5 files changed, 77 insertions(+), 54 deletions(-) diff --git a/composer.lock b/composer.lock index a0da21d..9573bc9 100644 --- a/composer.lock +++ b/composer.lock @@ -401,25 +401,25 @@ }, { "name": "amphp/hpack", - "version": "v3.1.1", + "version": "v3.1.2", "source": { "type": "git", "url": "https://github.com/amphp/hpack.git", - "reference": "cf4f1663e9fd58f60258c06177098655ca6377a5" + "reference": "500aa8e42b025c1a4aa15e91e9defeb8d4397517" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/amphp/hpack/zipball/cf4f1663e9fd58f60258c06177098655ca6377a5", - "reference": "cf4f1663e9fd58f60258c06177098655ca6377a5", + "url": "https://api.github.com/repos/amphp/hpack/zipball/500aa8e42b025c1a4aa15e91e9defeb8d4397517", + "reference": "500aa8e42b025c1a4aa15e91e9defeb8d4397517", "shasum": "" }, "require": { "php": ">=7.1" }, "require-dev": { - "amphp/php-cs-fixer-config": "dev-master", + "amphp/php-cs-fixer-config": "^2", "http2jp/hpack-test-case": "^1", - "phpunit/phpunit": "^6 | ^7" + "phpunit/phpunit": "^9" }, "type": "library", "extra": { @@ -462,7 +462,7 @@ ], "support": { "issues": "https://github.com/amphp/hpack/issues", - "source": "https://github.com/amphp/hpack/tree/v3.1.1" + "source": "https://github.com/amphp/hpack/tree/v3.1.2" }, "funding": [ { @@ -470,7 +470,7 @@ "type": "github" } ], - "time": "2021-06-11T20:03:34+00:00" + "time": "2023-07-31T23:43:59+00:00" }, { "name": "amphp/http", @@ -2507,12 +2507,12 @@ "source": { "type": "git", "url": "https://github.com/danog/MadelineProto.git", - "reference": "0689c16309a8a404f920f5e5543b64ad8a3309b2" + "reference": "fdcc9f7244c651b57bd4f3c1944d4f5d193843cd" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/danog/MadelineProto/zipball/0689c16309a8a404f920f5e5543b64ad8a3309b2", - "reference": "0689c16309a8a404f920f5e5543b64ad8a3309b2", + "url": "https://api.github.com/repos/danog/MadelineProto/zipball/fdcc9f7244c651b57bd4f3c1944d4f5d193843cd", + "reference": "fdcc9f7244c651b57bd4f3c1944d4f5d193843cd", "shasum": "" }, "require": { @@ -2549,6 +2549,7 @@ "phpseclib/phpseclib": "^3", "psr/http-factory": "^1.0", "psr/log": "^3", + "revolt/event-loop": "^1.0.3", "symfony/polyfill-mbstring": "*", "webmozart/assert": "^1.11" }, @@ -2585,10 +2586,6 @@ } }, "autoload": { - "files": [ - "src/polyfill.php", - "src/loop.php" - ], "psr-4": { "danog\\MadelineProto\\": "src" } @@ -2629,7 +2626,7 @@ "type": "github" } ], - "time": "2023-08-08T16:47:22+00:00" + "time": "2023-08-13T15:59:20+00:00" }, { "name": "danog/primemodule", @@ -3381,16 +3378,16 @@ }, { "name": "nikic/php-parser", - "version": "v4.16.0", + "version": "v4.17.0", "source": { "type": "git", "url": "https://github.com/nikic/PHP-Parser.git", - "reference": "19526a33fb561ef417e822e85f08a00db4059c17" + "reference": "844c228bf2b34a25ea8fed58f7929d14cf0c068e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/19526a33fb561ef417e822e85f08a00db4059c17", - "reference": "19526a33fb561ef417e822e85f08a00db4059c17", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/844c228bf2b34a25ea8fed58f7929d14cf0c068e", + "reference": "844c228bf2b34a25ea8fed58f7929d14cf0c068e", "shasum": "" }, "require": { @@ -3431,9 +3428,9 @@ ], "support": { "issues": "https://github.com/nikic/PHP-Parser/issues", - "source": "https://github.com/nikic/PHP-Parser/tree/v4.16.0" + "source": "https://github.com/nikic/PHP-Parser/tree/v4.17.0" }, - "time": "2023-06-25T14:52:30+00:00" + "time": "2023-08-13T14:53:08+00:00" }, { "name": "paragonie/constant_time_encoding", diff --git a/config.php b/config.php index edf5dd3..9844eae 100644 --- a/config.php +++ b/config.php @@ -14,46 +14,34 @@ 'api_hash' => (string)getenv('TELEGRAM_API_HASH'), ], 'logger' => [ // Logger settings - 'logger' => Logger::CALLABLE_LOGGER, // 0 - Logs disabled, 3 - echo logs. - 'logger_param' => LogObserver::class . '::log', - 'logger_level' => (int)getenv('LOGGER_LEVEL'), // Logging level, available logging levels are: ULTRA_VERBOSE - 5, VERBOSE - 4 , NOTICE - 3, WARNING - 2, ERROR - 1, FATAL_ERROR - 0. + 'type' => Logger::CALLABLE_LOGGER, // 0 - Logs disabled, 3 - echo logs. + 'extra' => LogObserver::class . '::log', + 'level' => (int)getenv('LOGGER_LEVEL'), // Logging level, available logging levels are: ULTRA_VERBOSE - 5, VERBOSE - 4 , NOTICE - 3, WARNING - 2, ERROR - 1, FATAL_ERROR - 0. ], - 'flood_timeout' => [ - 'wait_if_lt' => 10, + 'rpc' => [ + 'flood_timeout' => 10, + 'rpc_drop_timeout' => 30, ], - 'connection_settings' => [ - 'all' => [ - 'drop_timeout' => 30, - 'proxy' => '\SocksProxy', - 'proxy_extra' => [ - 'address' => (string)getenv('TELEGRAM_PROXY_ADDRESS'), - 'port' => (int)getenv('TELEGRAM_PROXY_PORT'), - 'username' => getenv('TELEGRAM_PROXY_USERNAME'), - 'password' => getenv('TELEGRAM_PROXY_PASSWORD'), - ] - ], - 'media_socket_count' => [ - 'max' => 10, - ] + 'connection' => [ + 'max_media_socket_count' => 10 ], 'serialization' => [ - 'serialization_interval' => 60, + 'interval' => 60, ], 'db' => [ 'type' => getenv('DB_TYPE'), getenv('DB_TYPE') => [ - 'host' => (string)getenv('DB_HOST'), - 'port' => (int)getenv('DB_PORT'), - 'user' => getenv('DB_USER'), + 'uri' => 'tcp://' . getenv('DB_HOST') . ':' . getenv('DB_PORT'), + 'username' => getenv('DB_USER'), 'password' => getenv('DB_PASSWORD'), 'database' => getenv('DB_DATABASE'), 'max_connections' => (int)getenv('DB_MAX_CONNECTIONS'), 'idle_timeout' => (int)getenv('DB_IDLE_TIMEOUT'), 'cache_ttl' => getenv('DB_CACHE_TTL'), - 'serializer' => 'serialize', + 'serializer' => danog\MadelineProto\Settings\Database\SerializerType::from('serialize'), ] ], - 'download' => [ + 'files' => [ 'report_broken_media' => false, ], ], @@ -72,11 +60,6 @@ ] ]; -if (empty($settings['telegram']['connection_settings']['all']['proxy_extra']['address'])) { - $settings['telegram']['connection_settings']['all']['proxy'] = '\Socket'; - $settings['telegram']['connection_settings']['all']['proxy_extra'] = []; -} - if (empty($settings['telegram']['app_info']['api_id'])) { throw new InvalidArgumentException('Need to fill TELEGRAM_API_ID in .env.docker or .env'); } diff --git a/src/Client.php b/src/Client.php index c76d90d..cd5850f 100644 --- a/src/Client.php +++ b/src/Client.php @@ -4,6 +4,8 @@ use danog\MadelineProto\API; use danog\MadelineProto\APIWrapper; +use danog\MadelineProto\Settings; +use danog\MadelineProto\SettingsAbstract; use InvalidArgumentException; use Psr\Log\LogLevel; use ReflectionProperty; @@ -58,7 +60,10 @@ public function addSession(string $session, array $settings = []): API (array)Config::getInstance()->get('telegram'), Files::getSessionSettings($session), ); - $instance = new API($file, $settings); + + $settingsObject = self::getSettingsFromArray($settings); + + $instance = new API($file, $settingsObject); $this->instances[$session] = $instance; return $instance; @@ -150,4 +155,32 @@ public static function getWrapper(API $madelineProto): APIWrapper return $wrapper; } + private static function getSettingsFromArray(array $settings, SettingsAbstract $settingsObject = new Settings()): SettingsAbstract { + + foreach ($settings as $key => $value) { + if (is_array($value)) { + if ($key === 'db') { + $type = match ($value['type']) { + 'memory' => new Settings\Database\Memory(), + 'mysql' => new Settings\Database\Mysql(), + 'postgres' => new Settings\Database\Postgres(), + 'redis' => new Settings\Database\Redis(), + }; + $settingsObject->setDb($type); + self::getSettingsFromArray($value[$value['type']], $type); + continue; + } + + $method = 'get' . ucfirst(str_replace('_', '', ucwords($key, '_'))); + self::getSettingsFromArray($value, $settingsObject->$method()); + } else { + + $method = 'set' . ucfirst(str_replace('_', '', ucwords($key, '_'))); + $settingsObject->$method($value); + } + } + return $settingsObject; + } + + } diff --git a/src/Logger.php b/src/Logger.php index bccfa08..bd0bf58 100644 --- a/src/Logger.php +++ b/src/Logger.php @@ -91,7 +91,7 @@ public static function getInstance(): Logger if (!static::$instanse) { $settings = Config::getInstance()->get('telegram'); - $loggerLevel = static::$madelineLevels[$settings['logger']['logger_level']]; + $loggerLevel = static::$madelineLevels[$settings['logger']['level']]; static::$instanse = new static($loggerLevel); } diff --git a/src/Migrations/StartUpFixes.php b/src/Migrations/StartUpFixes.php index 8f035af..f6b60eb 100644 --- a/src/Migrations/StartUpFixes.php +++ b/src/Migrations/StartUpFixes.php @@ -13,5 +13,15 @@ public static function fix(): void info("removing: $file"); unlink($file); } + + + foreach (glob(ROOT_DIR . '/sessions/*/safe.php') as $file) { + $content = file_get_contents($file); + $oldLine = 'O:43:"danog\MadelineProto\Db\NullCache\MysqlArray"'; + if (str_contains($content, $oldLine)) { + $content = str_replace('O:43:"danog\MadelineProto\Db\NullCache\MysqlArray"', 'O:33:"danog\MadelineProto\Db\MysqlArray"', $content); + file_put_contents($file, $content); + } + } } } \ No newline at end of file From b2d77cbfc1ee81cbb06b3126dcc020aa434e811b Mon Sep 17 00:00:00 2001 From: Alexander Pankratov Date: Sun, 13 Aug 2023 20:01:09 +0200 Subject: [PATCH 084/270] Update madelineProto --- composer.lock | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/composer.lock b/composer.lock index 9573bc9..ab0c9a2 100644 --- a/composer.lock +++ b/composer.lock @@ -401,16 +401,16 @@ }, { "name": "amphp/hpack", - "version": "v3.1.2", + "version": "v3.1.3", "source": { "type": "git", "url": "https://github.com/amphp/hpack.git", - "reference": "500aa8e42b025c1a4aa15e91e9defeb8d4397517" + "reference": "65b34cb8dec9ea1bbd6d23e3c06c8601fc051548" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/amphp/hpack/zipball/500aa8e42b025c1a4aa15e91e9defeb8d4397517", - "reference": "500aa8e42b025c1a4aa15e91e9defeb8d4397517", + "url": "https://api.github.com/repos/amphp/hpack/zipball/65b34cb8dec9ea1bbd6d23e3c06c8601fc051548", + "reference": "65b34cb8dec9ea1bbd6d23e3c06c8601fc051548", "shasum": "" }, "require": { @@ -462,7 +462,7 @@ ], "support": { "issues": "https://github.com/amphp/hpack/issues", - "source": "https://github.com/amphp/hpack/tree/v3.1.2" + "source": "https://github.com/amphp/hpack/tree/v3.1.3" }, "funding": [ { @@ -470,7 +470,7 @@ "type": "github" } ], - "time": "2023-07-31T23:43:59+00:00" + "time": "2023-08-13T16:26:34+00:00" }, { "name": "amphp/http", @@ -2507,12 +2507,12 @@ "source": { "type": "git", "url": "https://github.com/danog/MadelineProto.git", - "reference": "fdcc9f7244c651b57bd4f3c1944d4f5d193843cd" + "reference": "726a6ba1e27716c2214bd5535284853649a261a2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/danog/MadelineProto/zipball/fdcc9f7244c651b57bd4f3c1944d4f5d193843cd", - "reference": "fdcc9f7244c651b57bd4f3c1944d4f5d193843cd", + "url": "https://api.github.com/repos/danog/MadelineProto/zipball/726a6ba1e27716c2214bd5535284853649a261a2", + "reference": "726a6ba1e27716c2214bd5535284853649a261a2", "shasum": "" }, "require": { @@ -2626,7 +2626,7 @@ "type": "github" } ], - "time": "2023-08-13T15:59:20+00:00" + "time": "2023-08-13T16:41:37+00:00" }, { "name": "danog/primemodule", From ac3630a53063b332f4eb6a1659ea70d5cc9c9dad Mon Sep 17 00:00:00 2001 From: Alexander Pankratov Date: Mon, 14 Aug 2023 01:22:07 +0200 Subject: [PATCH 085/270] Disable minDatabase by default --- .env.docker.example | 2 ++ .env.example | 2 ++ composer.json | 2 +- composer.lock | 54 ++++++++++++++++++++++----------------------- config.php | 15 +++++++------ src/Client.php | 8 ++++--- 6 files changed, 44 insertions(+), 39 deletions(-) diff --git a/.env.docker.example b/.env.docker.example index e3b49bc..cc8b38a 100644 --- a/.env.docker.example +++ b/.env.docker.example @@ -49,6 +49,8 @@ DB_MAX_CONNECTIONS=10 DB_IDLE_TIMEOUT=60 # Recent data will be stored in memory this amount of time: DB_CACHE_TTL="+5 minutes" +# Enable to add cache info about users to database. Disable if you only read data from channels. +DB_ENABLE_MIN_DATABASE=0 # HEALTHCHECK # If server stops responding to requests it will be stoped diff --git a/.env.example b/.env.example index 9f95801..c9f8f71 100644 --- a/.env.example +++ b/.env.example @@ -48,6 +48,8 @@ DB_MAX_CONNECTIONS=10 DB_IDLE_TIMEOUT=60 # Recent data will be stored in memory this amount of time: DB_CACHE_TTL="+5 minutes" +# Enable to add cache info about users to database. Disable if you only read data from channels. +DB_ENABLE_MIN_DATABASE=0 # HEALTHCHECK # If server stops responding to requests it will be stoped diff --git a/composer.json b/composer.json index 7393e7d..4f5fdd2 100644 --- a/composer.json +++ b/composer.json @@ -28,7 +28,7 @@ "amphp/websocket-server": "^v3", "amphp/websocket-client": "^v2", "vlucas/phpdotenv": "^4", - "danog/madelineproto": "v8.x-dev" + "danog/madelineproto": "dev-v8_fix_cleanup" }, "suggest": { "ext-pcntl": "Install pcintl for propper signal handling and healthcheck (enabled in .env)" diff --git a/composer.lock b/composer.lock index ab0c9a2..17544f9 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "e40b582b83978f01d9ae3a52870ca190", + "content-hash": "2ff06dc2d59bf60d0a5647a682595d0a", "packages": [ { "name": "amphp/amp", @@ -2503,16 +2503,16 @@ }, { "name": "danog/madelineproto", - "version": "v8.x-dev", + "version": "dev-v8_fix_cleanup", "source": { "type": "git", "url": "https://github.com/danog/MadelineProto.git", - "reference": "726a6ba1e27716c2214bd5535284853649a261a2" + "reference": "e2d5fa405430228807b89d3e6ea722e7a9322678" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/danog/MadelineProto/zipball/726a6ba1e27716c2214bd5535284853649a261a2", - "reference": "726a6ba1e27716c2214bd5535284853649a261a2", + "url": "https://api.github.com/repos/danog/MadelineProto/zipball/e2d5fa405430228807b89d3e6ea722e7a9322678", + "reference": "e2d5fa405430228807b89d3e6ea722e7a9322678", "shasum": "" }, "require": { @@ -2578,7 +2578,6 @@ "ext-primemodule": "Install the primemodule and FFI extensions to speed up MadelineProto (https://prime.madelineproto.xyz)", "ext-uv": "Install the uv extension to greatly speed up MadelineProto!" }, - "default-branch": true, "type": "project", "extra": { "phabel": { @@ -2618,7 +2617,7 @@ ], "support": { "issues": "https://github.com/danog/MadelineProto/issues", - "source": "https://github.com/danog/MadelineProto/tree/v8" + "source": "https://github.com/danog/MadelineProto/tree/v8_fix_cleanup" }, "funding": [ { @@ -2626,7 +2625,7 @@ "type": "github" } ], - "time": "2023-08-13T16:41:37+00:00" + "time": "2023-08-13T23:10:13+00:00" }, { "name": "danog/primemodule", @@ -2996,16 +2995,16 @@ }, { "name": "league/uri-components", - "version": "2.4.1", + "version": "2.4.2", "source": { "type": "git", "url": "https://github.com/thephpleague/uri-components.git", - "reference": "06f49e726a7fd06063e80f5f8b045fb9128e6c43" + "reference": "c93837294fe9021d518fd3ea4c5f3fbba8b8ddeb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thephpleague/uri-components/zipball/06f49e726a7fd06063e80f5f8b045fb9128e6c43", - "reference": "06f49e726a7fd06063e80f5f8b045fb9128e6c43", + "url": "https://api.github.com/repos/thephpleague/uri-components/zipball/c93837294fe9021d518fd3ea4c5f3fbba8b8ddeb", + "reference": "c93837294fe9021d518fd3ea4c5f3fbba8b8ddeb", "shasum": "" }, "require": { @@ -3015,15 +3014,15 @@ "psr/http-message": "^1.0" }, "require-dev": { - "friendsofphp/php-cs-fixer": "^v3.8.0", + "friendsofphp/php-cs-fixer": "^v3.22.0", "guzzlehttp/psr7": "^2.2", - "laminas/laminas-diactoros": "^2.11.0", + "laminas/laminas-diactoros": "^2.11", "league/uri": "^6.0", - "phpstan/phpstan": "^1.7", - "phpstan/phpstan-deprecation-rules": "^1.0", - "phpstan/phpstan-phpunit": "^1.1", - "phpstan/phpstan-strict-rules": "^1.2", - "phpunit/phpunit": "^9.5.20" + "phpstan/phpstan": "^1.10.28", + "phpstan/phpstan-deprecation-rules": "^1.1.4", + "phpstan/phpstan-phpunit": "^1.3.13", + "phpstan/phpstan-strict-rules": "^1.5.1", + "phpunit/phpunit": "^9.6.10" }, "suggest": { "ext-fileinfo": "Needed to create Data URI from a filepath", @@ -3073,8 +3072,7 @@ "userinfo" ], "support": { - "issues": "https://github.com/thephpleague/uri-components/issues", - "source": "https://github.com/thephpleague/uri-components/tree/2.4.1" + "source": "https://github.com/thephpleague/uri-components/tree/2.4.2" }, "funding": [ { @@ -3082,7 +3080,7 @@ "type": "github" } ], - "time": "2022-05-26T05:50:46+00:00" + "time": "2023-08-13T19:53:57+00:00" }, { "name": "league/uri-interfaces", @@ -3378,16 +3376,16 @@ }, { "name": "nikic/php-parser", - "version": "v4.17.0", + "version": "v4.17.1", "source": { "type": "git", "url": "https://github.com/nikic/PHP-Parser.git", - "reference": "844c228bf2b34a25ea8fed58f7929d14cf0c068e" + "reference": "a6303e50c90c355c7eeee2c4a8b27fe8dc8fef1d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/844c228bf2b34a25ea8fed58f7929d14cf0c068e", - "reference": "844c228bf2b34a25ea8fed58f7929d14cf0c068e", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/a6303e50c90c355c7eeee2c4a8b27fe8dc8fef1d", + "reference": "a6303e50c90c355c7eeee2c4a8b27fe8dc8fef1d", "shasum": "" }, "require": { @@ -3428,9 +3426,9 @@ ], "support": { "issues": "https://github.com/nikic/PHP-Parser/issues", - "source": "https://github.com/nikic/PHP-Parser/tree/v4.17.0" + "source": "https://github.com/nikic/PHP-Parser/tree/v4.17.1" }, - "time": "2023-08-13T14:53:08+00:00" + "time": "2023-08-13T19:53:39+00:00" }, { "name": "paragonie/constant_time_encoding", diff --git a/config.php b/config.php index 9844eae..ec2894a 100644 --- a/config.php +++ b/config.php @@ -29,15 +29,16 @@ 'interval' => 60, ], 'db' => [ - 'type' => getenv('DB_TYPE'), + 'enable_min_db' => (bool)filter_var((string)getenv('DB_ENABLE_MIN_DATABASE'), FILTER_VALIDATE_BOOL), + 'type' => (string)getenv('DB_TYPE'), getenv('DB_TYPE') => [ - 'uri' => 'tcp://' . getenv('DB_HOST') . ':' . getenv('DB_PORT'), - 'username' => getenv('DB_USER'), - 'password' => getenv('DB_PASSWORD'), - 'database' => getenv('DB_DATABASE'), + 'uri' => 'tcp://' . getenv('DB_HOST') . ':' . (int)getenv('DB_PORT'), + 'username' => (string)getenv('DB_USER'), + 'password' => (string)getenv('DB_PASSWORD'), + 'database' => (string)getenv('DB_DATABASE'), 'max_connections' => (int)getenv('DB_MAX_CONNECTIONS'), 'idle_timeout' => (int)getenv('DB_IDLE_TIMEOUT'), - 'cache_ttl' => getenv('DB_CACHE_TTL'), + 'cache_ttl' => (string)getenv('DB_CACHE_TTL'), 'serializer' => danog\MadelineProto\Settings\Database\SerializerType::from('serialize'), ] ], @@ -49,7 +50,7 @@ 'ip_whitelist' => array_filter( array_map( 'trim', - explode(',', getenv('IP_WHITELIST')) + explode(',', (string)getenv('IP_WHITELIST')) ) ), ], diff --git a/src/Client.php b/src/Client.php index cd5850f..b8d9b90 100644 --- a/src/Client.php +++ b/src/Client.php @@ -159,7 +159,7 @@ private static function getSettingsFromArray(array $settings, SettingsAbstract $ foreach ($settings as $key => $value) { if (is_array($value)) { - if ($key === 'db') { + if ($key === 'db' && isset($value['type'])) { $type = match ($value['type']) { 'memory' => new Settings\Database\Memory(), 'mysql' => new Settings\Database\Mysql(), @@ -168,13 +168,15 @@ private static function getSettingsFromArray(array $settings, SettingsAbstract $ }; $settingsObject->setDb($type); self::getSettingsFromArray($value[$value['type']], $type); - continue; + unset($value[$value['type']], $value['type']); + if (count($value) === 0) { + continue; + } } $method = 'get' . ucfirst(str_replace('_', '', ucwords($key, '_'))); self::getSettingsFromArray($value, $settingsObject->$method()); } else { - $method = 'set' . ucfirst(str_replace('_', '', ucwords($key, '_'))); $settingsObject->$method($value); } From 169a99089783845bacbec14b505943a46e7544b4 Mon Sep 17 00:00:00 2001 From: Alexander Pankratov Date: Mon, 14 Aug 2023 01:23:52 +0200 Subject: [PATCH 086/270] Remove unsupported proxy settings --- .env.docker.example | 6 ------ .env.example | 6 ------ 2 files changed, 12 deletions(-) diff --git a/.env.docker.example b/.env.docker.example index cc8b38a..22c8d79 100644 --- a/.env.docker.example +++ b/.env.docker.example @@ -21,12 +21,6 @@ TELEGRAM_API_HASH= # FATAL_ERROR = 0; ERROR = 1; WARNING = 2; const NOTICE = 3; VERBOSE = 4; ULTRA_VERBOSE = 5; LOGGER_LEVEL=2 -# TELEGRAM SOCKS5 PROXY (optional) -TELEGRAM_PROXY_ADDRESS= -TELEGRAM_PROXY_PORT= -TELEGRAM_PROXY_USERNAME= -TELEGRAM_PROXY_PASSWORD= - # DB # memory # Keep all data in memory/session file. diff --git a/.env.example b/.env.example index c9f8f71..19fd09b 100644 --- a/.env.example +++ b/.env.example @@ -20,12 +20,6 @@ TELEGRAM_API_HASH= # FATAL_ERROR = 0; ERROR = 1; WARNING = 2; const NOTICE = 3; VERBOSE = 4; ULTRA_VERBOSE = 5; LOGGER_LEVEL=2 -# TELEGRAM SOCKS5 PROXY (optional) -TELEGRAM_PROXY_ADDRESS= -TELEGRAM_PROXY_PORT= -TELEGRAM_PROXY_USERNAME= -TELEGRAM_PROXY_PASSWORD= - # DB # memory # Keep all data in memory/session file. From 38e7790d3e1f982c4b902d5095b8b458c76067ba Mon Sep 17 00:00:00 2001 From: Alexander Pankratov Date: Wed, 16 Aug 2023 17:15:48 +0200 Subject: [PATCH 087/270] Update madeline --- composer.lock | 46 ++++++++++++++++++++++++++-------------------- 1 file changed, 26 insertions(+), 20 deletions(-) diff --git a/composer.lock b/composer.lock index 17544f9..d009dd7 100644 --- a/composer.lock +++ b/composer.lock @@ -401,16 +401,16 @@ }, { "name": "amphp/hpack", - "version": "v3.1.3", + "version": "v3.1.5", "source": { "type": "git", "url": "https://github.com/amphp/hpack.git", - "reference": "65b34cb8dec9ea1bbd6d23e3c06c8601fc051548" + "reference": "5835a1414a52892562338dc76c2df926fa52a480" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/amphp/hpack/zipball/65b34cb8dec9ea1bbd6d23e3c06c8601fc051548", - "reference": "65b34cb8dec9ea1bbd6d23e3c06c8601fc051548", + "url": "https://api.github.com/repos/amphp/hpack/zipball/5835a1414a52892562338dc76c2df926fa52a480", + "reference": "5835a1414a52892562338dc76c2df926fa52a480", "shasum": "" }, "require": { @@ -462,7 +462,7 @@ ], "support": { "issues": "https://github.com/amphp/hpack/issues", - "source": "https://github.com/amphp/hpack/tree/v3.1.3" + "source": "https://github.com/amphp/hpack/tree/v3.1.5" }, "funding": [ { @@ -470,7 +470,7 @@ "type": "github" } ], - "time": "2023-08-13T16:26:34+00:00" + "time": "2023-08-15T19:29:20+00:00" }, { "name": "amphp/http", @@ -538,16 +538,16 @@ }, { "name": "amphp/http-client", - "version": "v5.0.0-beta.12", + "version": "v5.0.0-beta.13", "source": { "type": "git", "url": "https://github.com/amphp/http-client.git", - "reference": "4a962fe1d96ca0ca956401f08eb3eb72e90e5d2b" + "reference": "fd5b005d9799aab0e67764cf889586660516cd14" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/amphp/http-client/zipball/4a962fe1d96ca0ca956401f08eb3eb72e90e5d2b", - "reference": "4a962fe1d96ca0ca956401f08eb3eb72e90e5d2b", + "url": "https://api.github.com/repos/amphp/http-client/zipball/fd5b005d9799aab0e67764cf889586660516cd14", + "reference": "fd5b005d9799aab0e67764cf889586660516cd14", "shasum": "" }, "require": { @@ -558,9 +558,11 @@ "amphp/pipeline": "^1", "amphp/socket": "^2", "amphp/sync": "^2", - "league/uri": "^6", + "league/uri": "^6 | ^7", + "league/uri-components": "^2.4 | ^7", "php": ">=8.1", - "psr/http-message": "^1 | ^2" + "psr/http-message": "^1 | ^2", + "revolt/event-loop": "^1" }, "require-dev": { "amphp/file": "^3", @@ -622,7 +624,7 @@ ], "support": { "issues": "https://github.com/amphp/http-client/issues", - "source": "https://github.com/amphp/http-client/tree/v5.0.0-beta.12" + "source": "https://github.com/amphp/http-client/tree/v5.0.0-beta.13" }, "funding": [ { @@ -630,7 +632,7 @@ "type": "github" } ], - "time": "2023-08-05T15:21:21+00:00" + "time": "2023-08-15T20:25:04+00:00" }, { "name": "amphp/http-client-cookies", @@ -2507,19 +2509,19 @@ "source": { "type": "git", "url": "https://github.com/danog/MadelineProto.git", - "reference": "e2d5fa405430228807b89d3e6ea722e7a9322678" + "reference": "e20fe4b400059c3f4f1dab2713a9e171f8b8faea" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/danog/MadelineProto/zipball/e2d5fa405430228807b89d3e6ea722e7a9322678", - "reference": "e2d5fa405430228807b89d3e6ea722e7a9322678", + "url": "https://api.github.com/repos/danog/MadelineProto/zipball/e20fe4b400059c3f4f1dab2713a9e171f8b8faea", + "reference": "e20fe4b400059c3f4f1dab2713a9e171f8b8faea", "shasum": "" }, "require": { "amphp/amp": "^3", "amphp/byte-stream": "^2", "amphp/dns": "^2", - "amphp/file": "^3", + "amphp/file": "^3.0.1", "amphp/http": "^2", "amphp/http-client": "^5", "amphp/http-client-cookies": "^2", @@ -2564,10 +2566,11 @@ "danog/phpdoc": "^0.1.7", "dg/bypass-finals": "dev-master", "ext-ctype": "*", + "leproxy/leproxy": "^0.2.2", "phpdocumentor/reflection-docblock": "dev-master", "phpdocumentor/type-resolver": "1.x-dev@dev", "phpunit/phpunit": "^9", - "roave/security-advisories": "dev-latest", + "revolt/event-loop-adapter-react": "^1", "symfony/yaml": "^6.0" }, "suggest": { @@ -2585,6 +2588,9 @@ } }, "autoload": { + "files": [ + "src/polyfill.php" + ], "psr-4": { "danog\\MadelineProto\\": "src" } @@ -2625,7 +2631,7 @@ "type": "github" } ], - "time": "2023-08-13T23:10:13+00:00" + "time": "2023-08-16T15:14:36+00:00" }, { "name": "danog/primemodule", From c489a2b415a8e9540583889742a42aded217b002 Mon Sep 17 00:00:00 2001 From: Alexander Pankratov Date: Wed, 16 Aug 2023 17:19:07 +0200 Subject: [PATCH 088/270] Remove unused db settings to prevent fail. --- src/Client.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Client.php b/src/Client.php index b8d9b90..96c96ca 100644 --- a/src/Client.php +++ b/src/Client.php @@ -168,7 +168,7 @@ private static function getSettingsFromArray(array $settings, SettingsAbstract $ }; $settingsObject->setDb($type); self::getSettingsFromArray($value[$value['type']], $type); - unset($value[$value['type']], $value['type']); + unset($value['type'], $value['mysql'], $value['memory'], $value['postgres'], $value['redis']); if (count($value) === 0) { continue; } From 5063f60b8938052cb7a40ceb313802373aa4df69 Mon Sep 17 00:00:00 2001 From: Alexander Pankratov Date: Thu, 17 Aug 2023 17:30:44 +0200 Subject: [PATCH 089/270] Update madeline --- composer.lock | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/composer.lock b/composer.lock index d009dd7..9fb19e8 100644 --- a/composer.lock +++ b/composer.lock @@ -2509,12 +2509,12 @@ "source": { "type": "git", "url": "https://github.com/danog/MadelineProto.git", - "reference": "e20fe4b400059c3f4f1dab2713a9e171f8b8faea" + "reference": "3e854f4d2f2139a2a78591869bbda362109a229a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/danog/MadelineProto/zipball/e20fe4b400059c3f4f1dab2713a9e171f8b8faea", - "reference": "e20fe4b400059c3f4f1dab2713a9e171f8b8faea", + "url": "https://api.github.com/repos/danog/MadelineProto/zipball/3e854f4d2f2139a2a78591869bbda362109a229a", + "reference": "3e854f4d2f2139a2a78591869bbda362109a229a", "shasum": "" }, "require": { @@ -2631,7 +2631,7 @@ "type": "github" } ], - "time": "2023-08-16T15:14:36+00:00" + "time": "2023-08-17T15:29:46+00:00" }, { "name": "danog/primemodule", From 3c6c843fe66e3e705f4c0fe900aef2a5d8b2ba12 Mon Sep 17 00:00:00 2001 From: Alexander Pankratov Date: Fri, 18 Aug 2023 19:30:40 +0200 Subject: [PATCH 090/270] Fix: memory db settings --- src/Client.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/Client.php b/src/Client.php index 96c96ca..4403778 100644 --- a/src/Client.php +++ b/src/Client.php @@ -167,8 +167,13 @@ private static function getSettingsFromArray(array $settings, SettingsAbstract $ 'redis' => new Settings\Database\Redis(), }; $settingsObject->setDb($type); - self::getSettingsFromArray($value[$value['type']], $type); - unset($value['type'], $value['mysql'], $value['memory'], $value['postgres'], $value['redis']); + if ($value['type'] === 'memory') { + self::getSettingsFromArray([], $type); + } else { + self::getSettingsFromArray($value[$value['type']], $type); + } + + unset($value[$value['type']], $value['type'],); if (count($value) === 0) { continue; } From 38b5d3ea22871778ba86a19d3123689bf5ad4462 Mon Sep 17 00:00:00 2001 From: Alexander Pankratov Date: Sun, 20 Aug 2023 00:46:25 +0200 Subject: [PATCH 091/270] Update settings and madeline --- composer.lock | 35 ++++++++++++++++++----------------- config.php | 2 +- 2 files changed, 19 insertions(+), 18 deletions(-) diff --git a/composer.lock b/composer.lock index 9fb19e8..4401489 100644 --- a/composer.lock +++ b/composer.lock @@ -1602,16 +1602,16 @@ }, { "name": "amphp/socket", - "version": "v2.1.0", + "version": "v2.2.0", "source": { "type": "git", "url": "https://github.com/amphp/socket.git", - "reference": "70a72fb8b4fbc0117b65c6fb927651ecb8a4b325" + "reference": "3418a0c5c0d4978b0e8e0619ce1da0851c4053d3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/amphp/socket/zipball/70a72fb8b4fbc0117b65c6fb927651ecb8a4b325", - "reference": "70a72fb8b4fbc0117b65c6fb927651ecb8a4b325", + "url": "https://api.github.com/repos/amphp/socket/zipball/3418a0c5c0d4978b0e8e0619ce1da0851c4053d3", + "reference": "3418a0c5c0d4978b0e8e0619ce1da0851c4053d3", "shasum": "" }, "require": { @@ -1620,7 +1620,8 @@ "amphp/dns": "^2", "ext-openssl": "*", "kelunik/certificate": "^1.1", - "league/uri": "^6.5", + "league/uri": "^6.5 | ^7", + "league/uri-interfaces": "^2.3 | ^7", "php": ">=8.1", "revolt/event-loop": "^1 || ^0.2" }, @@ -1673,7 +1674,7 @@ ], "support": { "issues": "https://github.com/amphp/socket/issues", - "source": "https://github.com/amphp/socket/tree/v2.1.0" + "source": "https://github.com/amphp/socket/tree/v2.2.0" }, "funding": [ { @@ -1681,7 +1682,7 @@ "type": "github" } ], - "time": "2023-04-06T16:56:35+00:00" + "time": "2023-08-19T15:28:34+00:00" }, { "name": "amphp/sql", @@ -1795,16 +1796,16 @@ }, { "name": "amphp/sync", - "version": "v2.0.0", + "version": "v2.1.0", "source": { "type": "git", "url": "https://github.com/amphp/sync.git", - "reference": "ad8a0e80cc586cece4f8ce57460f8bbf442ba8fc" + "reference": "50ddc7392cc8034b3e4798cef3cc90d3f4c0441c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/amphp/sync/zipball/ad8a0e80cc586cece4f8ce57460f8bbf442ba8fc", - "reference": "ad8a0e80cc586cece4f8ce57460f8bbf442ba8fc", + "url": "https://api.github.com/repos/amphp/sync/zipball/50ddc7392cc8034b3e4798cef3cc90d3f4c0441c", + "reference": "50ddc7392cc8034b3e4798cef3cc90d3f4c0441c", "shasum": "" }, "require": { @@ -1858,7 +1859,7 @@ ], "support": { "issues": "https://github.com/amphp/sync/issues", - "source": "https://github.com/amphp/sync/tree/v2.0.0" + "source": "https://github.com/amphp/sync/tree/v2.1.0" }, "funding": [ { @@ -1866,7 +1867,7 @@ "type": "github" } ], - "time": "2022-12-30T22:11:37+00:00" + "time": "2023-08-19T13:53:40+00:00" }, { "name": "amphp/websocket", @@ -2509,12 +2510,12 @@ "source": { "type": "git", "url": "https://github.com/danog/MadelineProto.git", - "reference": "3e854f4d2f2139a2a78591869bbda362109a229a" + "reference": "47737ffb8c779c83e27cee5ded7a4ebab6d01086" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/danog/MadelineProto/zipball/3e854f4d2f2139a2a78591869bbda362109a229a", - "reference": "3e854f4d2f2139a2a78591869bbda362109a229a", + "url": "https://api.github.com/repos/danog/MadelineProto/zipball/47737ffb8c779c83e27cee5ded7a4ebab6d01086", + "reference": "47737ffb8c779c83e27cee5ded7a4ebab6d01086", "shasum": "" }, "require": { @@ -2631,7 +2632,7 @@ "type": "github" } ], - "time": "2023-08-17T15:29:46+00:00" + "time": "2023-08-19T22:47:23+00:00" }, { "name": "danog/primemodule", diff --git a/config.php b/config.php index ec2894a..7979431 100644 --- a/config.php +++ b/config.php @@ -20,7 +20,7 @@ ], 'rpc' => [ 'flood_timeout' => 10, - 'rpc_drop_timeout' => 30, + 'rpc_drop_timeout' => 11, ], 'connection' => [ 'max_media_socket_count' => 10 From 3fe69b5c600990ae4940a9df995408c6edf0465c Mon Sep 17 00:00:00 2001 From: Alexander Pankratov Date: Sun, 20 Aug 2023 18:47:28 +0200 Subject: [PATCH 092/270] Update settings and madeline --- composer.lock | 115 +++++++++++-------------------------------------- src/Client.php | 1 + 2 files changed, 26 insertions(+), 90 deletions(-) diff --git a/composer.lock b/composer.lock index 4401489..a8ced69 100644 --- a/composer.lock +++ b/composer.lock @@ -1468,44 +1468,44 @@ }, { "name": "amphp/redis", - "version": "v2.0.0-beta.3", + "version": "v2.0.0", "source": { "type": "git", "url": "https://github.com/amphp/redis.git", - "reference": "6a19255ae5b1393b4347e613b2aa4f323e916e8e" + "reference": "5c14a57549140f053bef42ee1388b713fb200b36" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/amphp/redis/zipball/6a19255ae5b1393b4347e613b2aa4f323e916e8e", - "reference": "6a19255ae5b1393b4347e613b2aa4f323e916e8e", + "url": "https://api.github.com/repos/amphp/redis/zipball/5c14a57549140f053bef42ee1388b713fb200b36", + "reference": "5c14a57549140f053bef42ee1388b713fb200b36", "shasum": "" }, "require": { "amphp/amp": "^3", "amphp/byte-stream": "^2", "amphp/cache": "^2", + "amphp/parser": "^1", "amphp/pipeline": "^1", "amphp/serialization": "^1", "amphp/socket": "^2", "amphp/sync": "^2", - "league/uri": "^6.5", - "league/uri-parser": "^1.4", + "league/uri": "^6.5|^7", "php": ">=8.1", "psr/log": "^1|^2|^3", - "revolt/event-loop": "^1 || ^0.2.4" + "revolt/event-loop": "^1" }, "require-dev": { - "amphp/php-cs-fixer-config": "^2-dev", + "amphp/php-cs-fixer-config": "^2", "amphp/phpunit-util": "^3", "amphp/process": "^2", "phpunit/phpunit": "^9", - "psalm/phar": "^4.22" + "psalm/phar": "^5.4" }, "type": "library", "autoload": { "files": [ - "src/Connection/functions.php", - "src/functions.php" + "src/functions.php", + "src/Internal/functions.php" ], "psr-4": { "Amp\\Redis\\": "src" @@ -1519,20 +1519,25 @@ { "name": "Niklas Keller", "email": "me@kelunik.com" + }, + { + "name": "Aaron Piotrowski", + "email": "aaron@trowski.com" } ], - "description": "A non-blocking Redis client for Amp.", - "homepage": "https://github.com/amphp/redis", + "description": "Efficient asynchronous communication with Redis servers, enabling scalable and responsive data storage and retrieval.", + "homepage": "https://amphp.org/redis", "keywords": [ "amp", "amphp", "async", "client", - "redis" + "redis", + "revolt" ], "support": { "issues": "https://github.com/amphp/redis/issues", - "source": "https://github.com/amphp/redis/tree/v2.0.0-beta.3" + "source": "https://github.com/amphp/redis/tree/v2.0.0" }, "funding": [ { @@ -1540,7 +1545,7 @@ "type": "github" } ], - "time": "2022-11-07T22:43:56+00:00" + "time": "2023-08-20T16:35:39+00:00" }, { "name": "amphp/serialization", @@ -2510,12 +2515,12 @@ "source": { "type": "git", "url": "https://github.com/danog/MadelineProto.git", - "reference": "47737ffb8c779c83e27cee5ded7a4ebab6d01086" + "reference": "d1f1cce9467b9e67392d4d1d101d11815d9a1e00" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/danog/MadelineProto/zipball/47737ffb8c779c83e27cee5ded7a4ebab6d01086", - "reference": "47737ffb8c779c83e27cee5ded7a4ebab6d01086", + "url": "https://api.github.com/repos/danog/MadelineProto/zipball/d1f1cce9467b9e67392d4d1d101d11815d9a1e00", + "reference": "d1f1cce9467b9e67392d4d1d101d11815d9a1e00", "shasum": "" }, "require": { @@ -2632,7 +2637,7 @@ "type": "github" } ], - "time": "2023-08-19T22:47:23+00:00" + "time": "2023-08-20T16:38:06+00:00" }, { "name": "danog/primemodule", @@ -3160,76 +3165,6 @@ ], "time": "2021-06-28T04:27:21+00:00" }, - { - "name": "league/uri-parser", - "version": "1.4.1", - "source": { - "type": "git", - "url": "https://github.com/thephpleague/uri-parser.git", - "reference": "671548427e4c932352d9b9279fdfa345bf63fa00" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/thephpleague/uri-parser/zipball/671548427e4c932352d9b9279fdfa345bf63fa00", - "reference": "671548427e4c932352d9b9279fdfa345bf63fa00", - "shasum": "" - }, - "require": { - "php": ">=7.0.0" - }, - "require-dev": { - "friendsofphp/php-cs-fixer": "^2.0", - "phpstan/phpstan": "^0.9.2", - "phpstan/phpstan-phpunit": "^0.9.4", - "phpstan/phpstan-strict-rules": "^0.9.0", - "phpunit/phpunit": "^6.0" - }, - "suggest": { - "ext-intl": "Allow parsing RFC3987 compliant hosts", - "league/uri-schemes": "Allow validating and normalizing URI parsing results" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.x-dev" - } - }, - "autoload": { - "files": [ - "src/functions_include.php" - ], - "psr-4": { - "League\\Uri\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Ignace Nyamagana Butera", - "email": "nyamsprod@gmail.com", - "homepage": "https://nyamsprod.com" - } - ], - "description": "userland URI parser RFC 3986 compliant", - "homepage": "https://github.com/thephpleague/uri-parser", - "keywords": [ - "parse_url", - "parser", - "rfc3986", - "rfc3987", - "uri", - "url" - ], - "support": { - "issues": "https://github.com/thephpleague/uri-parser/issues", - "source": "https://github.com/thephpleague/uri-parser/tree/master" - }, - "abandoned": true, - "time": "2018-11-22T07:55:51+00:00" - }, { "name": "monolog/monolog", "version": "3.4.0", diff --git a/src/Client.php b/src/Client.php index 4403778..a0d5bb5 100644 --- a/src/Client.php +++ b/src/Client.php @@ -64,6 +64,7 @@ public function addSession(string $session, array $settings = []): API $settingsObject = self::getSettingsFromArray($settings); $instance = new API($file, $settingsObject); + $instance->updateSettings($settingsObject); $this->instances[$session] = $instance; return $instance; From 0a0305dc272f684409c0811fd34f619c9623683b Mon Sep 17 00:00:00 2001 From: Alexander Pankratov Date: Mon, 21 Aug 2023 15:11:47 +0200 Subject: [PATCH 093/270] Update madeline --- composer.lock | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/composer.lock b/composer.lock index a8ced69..1057f66 100644 --- a/composer.lock +++ b/composer.lock @@ -717,12 +717,12 @@ "source": { "type": "git", "url": "https://github.com/amphp/http-server.git", - "reference": "33bd2a0c272e16cb51493f0aaabd11c7a9da73ef" + "reference": "4e6e8b1e23c55ff8b1377f6eaccda3f49894723e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/amphp/http-server/zipball/33bd2a0c272e16cb51493f0aaabd11c7a9da73ef", - "reference": "33bd2a0c272e16cb51493f0aaabd11c7a9da73ef", + "url": "https://api.github.com/repos/amphp/http-server/zipball/4e6e8b1e23c55ff8b1377f6eaccda3f49894723e", + "reference": "4e6e8b1e23c55ff8b1377f6eaccda3f49894723e", "shasum": "" }, "require": { @@ -807,7 +807,7 @@ "type": "github" } ], - "time": "2023-07-31T23:21:23+00:00" + "time": "2023-08-20T19:03:40+00:00" }, { "name": "amphp/http-server-form-parser", @@ -2515,12 +2515,12 @@ "source": { "type": "git", "url": "https://github.com/danog/MadelineProto.git", - "reference": "d1f1cce9467b9e67392d4d1d101d11815d9a1e00" + "reference": "dc34a380b3dd936c0dfc753dc89aa7389d5ac377" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/danog/MadelineProto/zipball/d1f1cce9467b9e67392d4d1d101d11815d9a1e00", - "reference": "d1f1cce9467b9e67392d4d1d101d11815d9a1e00", + "url": "https://api.github.com/repos/danog/MadelineProto/zipball/dc34a380b3dd936c0dfc753dc89aa7389d5ac377", + "reference": "dc34a380b3dd936c0dfc753dc89aa7389d5ac377", "shasum": "" }, "require": { @@ -2637,7 +2637,7 @@ "type": "github" } ], - "time": "2023-08-20T16:38:06+00:00" + "time": "2023-08-21T13:09:02+00:00" }, { "name": "danog/primemodule", From c554bda966987fca8b1174218a8c7568e1fe7a74 Mon Sep 17 00:00:00 2001 From: Alexander Pankratov Date: Sat, 2 Sep 2023 23:45:01 +0200 Subject: [PATCH 094/270] Feat: group requests in bulks. --- .env.docker.example | 6 + .env.example | 6 + composer.lock | 146 +++++++++++----------- config.php | 3 +- src/Controllers/AbstractApiController.php | 5 +- src/Controllers/ApiController.php | 50 +++++++- 6 files changed, 139 insertions(+), 77 deletions(-) diff --git a/.env.docker.example b/.env.docker.example index 22c8d79..5239205 100644 --- a/.env.docker.example +++ b/.env.docker.example @@ -8,6 +8,12 @@ SERVER_PORT=9503 MEMORY_LIMIT=256M TIMEZONE=UTC +# REQUEST WILL BE GROUPED INTO BULKS AND EXECUTED AS SINGLE BULK +# VALUE IN SECOND +# DECREASE TO REDUCE LATENCY, INCREASE TO REDUCE LOAD ON SERVER. +# SET to 0 to DISABLE +REQUESTS_BULK_INTERVAL=0.5 + # List of allowed clients. Separate with comma. # Leave blanc, to allow requests from all IP (THIS WILL MAKE API UNSECURE!) # To recieve requests from internet also need to (THIS WILL MAKE API UNSECURE!): diff --git a/.env.example b/.env.example index 19fd09b..7a67e77 100644 --- a/.env.example +++ b/.env.example @@ -10,6 +10,12 @@ SERVER_PORT=9503 MEMORY_LIMIT=256M TIMEZONE=UTC +# REQUEST WILL BE GROUPED INTO BULKS AND EXECUTED AS SINGLE BULK +# VALUE IN SECOND +# DECREASE TO REDUCE LATENCY, INCREASE TO REDUCE LOAD ON SERVER. +# SET to 0 to DISABLE +REQUESTS_BULK_INTERVAL=0.5 + # List of allowed clients. Separate with comma. # Leave blanc, to allow requests from all IP (THIS WILL MAKE API UNSECURE!) IP_WHITELIST=127.0.0.1 diff --git a/composer.lock b/composer.lock index 1057f66..bcbe6c5 100644 --- a/composer.lock +++ b/composer.lock @@ -89,16 +89,16 @@ }, { "name": "amphp/byte-stream", - "version": "v2.0.1", + "version": "v2.0.2", "source": { "type": "git", "url": "https://github.com/amphp/byte-stream.git", - "reference": "7e7a77579f3e90c6fbd56e49628e6ace02d8f88a" + "reference": "408a3b4fc4f4c7604575dc8704f18c1bd91c3ceb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/amphp/byte-stream/zipball/7e7a77579f3e90c6fbd56e49628e6ace02d8f88a", - "reference": "7e7a77579f3e90c6fbd56e49628e6ace02d8f88a", + "url": "https://api.github.com/repos/amphp/byte-stream/zipball/408a3b4fc4f4c7604575dc8704f18c1bd91c3ceb", + "reference": "408a3b4fc4f4c7604575dc8704f18c1bd91c3ceb", "shasum": "" }, "require": { @@ -119,7 +119,8 @@ "type": "library", "autoload": { "files": [ - "src/functions.php" + "src/functions.php", + "src/Internal/functions.php" ], "psr-4": { "Amp\\ByteStream\\": "src" @@ -151,7 +152,7 @@ ], "support": { "issues": "https://github.com/amphp/byte-stream/issues", - "source": "https://github.com/amphp/byte-stream/tree/v2.0.1" + "source": "https://github.com/amphp/byte-stream/tree/v2.0.2" }, "funding": [ { @@ -159,7 +160,7 @@ "type": "github" } ], - "time": "2023-02-03T04:06:20+00:00" + "time": "2023-09-01T04:41:26+00:00" }, { "name": "amphp/cache", @@ -474,28 +475,28 @@ }, { "name": "amphp/http", - "version": "v2.0.0", + "version": "v2.1.0", "source": { "type": "git", "url": "https://github.com/amphp/http.git", - "reference": "f8bb94a2b079aa8e30ad78b5374df787a2122dfe" + "reference": "9f3500bef4bb15cf41987f21136539c0a06555a3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/amphp/http/zipball/f8bb94a2b079aa8e30ad78b5374df787a2122dfe", - "reference": "f8bb94a2b079aa8e30ad78b5374df787a2122dfe", + "url": "https://api.github.com/repos/amphp/http/zipball/9f3500bef4bb15cf41987f21136539c0a06555a3", + "reference": "9f3500bef4bb15cf41987f21136539c0a06555a3", "shasum": "" }, "require": { "amphp/hpack": "^3", "amphp/parser": "^1.1", - "league/uri-components": "^2.4", + "league/uri-components": "^2.4.2 | ^7.1", "php": ">=8.1", - "psr/http-message": "^1 || ^2" + "psr/http-message": "^1 | ^2" }, "require-dev": { "amphp/php-cs-fixer-config": "^2", - "league/uri": "^6.8", + "league/uri": "^6.8 | ^7.1", "phpunit/phpunit": "^9", "psalm/phar": "^5.4" }, @@ -526,7 +527,7 @@ "description": "Basic HTTP primitives which can be shared by servers and clients.", "support": { "issues": "https://github.com/amphp/http/issues", - "source": "https://github.com/amphp/http/tree/v2.0.0" + "source": "https://github.com/amphp/http/tree/v2.1.0" }, "funding": [ { @@ -534,20 +535,20 @@ "type": "github" } ], - "time": "2023-04-12T19:20:53+00:00" + "time": "2023-08-22T19:50:46+00:00" }, { "name": "amphp/http-client", - "version": "v5.0.0-beta.13", + "version": "v5.0.0-beta.14", "source": { "type": "git", "url": "https://github.com/amphp/http-client.git", - "reference": "fd5b005d9799aab0e67764cf889586660516cd14" + "reference": "a9f2bebe03baaac7fa029b5d01bb66ab4a9c5b5b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/amphp/http-client/zipball/fd5b005d9799aab0e67764cf889586660516cd14", - "reference": "fd5b005d9799aab0e67764cf889586660516cd14", + "url": "https://api.github.com/repos/amphp/http-client/zipball/a9f2bebe03baaac7fa029b5d01bb66ab4a9c5b5b", + "reference": "a9f2bebe03baaac7fa029b5d01bb66ab4a9c5b5b", "shasum": "" }, "require": { @@ -588,6 +589,7 @@ }, "autoload": { "files": [ + "src/functions.php", "src/Internal/functions.php" ], "psr-4": { @@ -624,7 +626,7 @@ ], "support": { "issues": "https://github.com/amphp/http-client/issues", - "source": "https://github.com/amphp/http-client/tree/v5.0.0-beta.13" + "source": "https://github.com/amphp/http-client/tree/v5.0.0-beta.14" }, "funding": [ { @@ -632,7 +634,7 @@ "type": "github" } ], - "time": "2023-08-15T20:25:04+00:00" + "time": "2023-08-23T20:15:15+00:00" }, { "name": "amphp/http-client-cookies", @@ -717,12 +719,12 @@ "source": { "type": "git", "url": "https://github.com/amphp/http-server.git", - "reference": "4e6e8b1e23c55ff8b1377f6eaccda3f49894723e" + "reference": "5057e59b7119314f2f1f5c7740daf3bcbbd1f163" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/amphp/http-server/zipball/4e6e8b1e23c55ff8b1377f6eaccda3f49894723e", - "reference": "4e6e8b1e23c55ff8b1377f6eaccda3f49894723e", + "url": "https://api.github.com/repos/amphp/http-server/zipball/5057e59b7119314f2f1f5c7740daf3bcbbd1f163", + "reference": "5057e59b7119314f2f1f5c7740daf3bcbbd1f163", "shasum": "" }, "require": { @@ -734,11 +736,11 @@ "amphp/pipeline": "^1", "amphp/socket": "^2.1", "amphp/sync": "^2", - "league/uri": "^6", - "league/uri-interfaces": "^2.3", + "league/uri": "^6.8 | ^7.1", + "league/uri-interfaces": "^2.3 | ^7.1", "php": ">=8.1", - "psr/http-message": "^1", - "psr/log": "^1|^2|^3", + "psr/http-message": "^1 | ^2", + "psr/log": "^1 | ^2 | ^3", "revolt/event-loop": "^1" }, "require-dev": { @@ -746,7 +748,7 @@ "amphp/log": "^2", "amphp/php-cs-fixer-config": "^2", "amphp/phpunit-util": "^3", - "league/uri-components": "^2", + "league/uri-components": "^2.4.2 | ^7.1", "monolog/monolog": "^3", "phpunit/phpunit": "^9", "psalm/phar": "^5.4" @@ -807,27 +809,27 @@ "type": "github" } ], - "time": "2023-08-20T19:03:40+00:00" + "time": "2023-09-01T05:04:07+00:00" }, { "name": "amphp/http-server-form-parser", - "version": "v2.0.0-beta.3", + "version": "v2.0.0", "source": { "type": "git", "url": "https://github.com/amphp/http-server-form-parser.git", - "reference": "42193795723ea72e950b74f0a9075bb794c542f0" + "reference": "6f160914a1cd9aaa104b589c0c590613600bfa70" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/amphp/http-server-form-parser/zipball/42193795723ea72e950b74f0a9075bb794c542f0", - "reference": "42193795723ea72e950b74f0a9075bb794c542f0", + "url": "https://api.github.com/repos/amphp/http-server-form-parser/zipball/6f160914a1cd9aaa104b589c0c590613600bfa70", + "reference": "6f160914a1cd9aaa104b589c0c590613600bfa70", "shasum": "" }, "require": { "amphp/amp": "^3", "amphp/byte-stream": "^2", "amphp/http": "^2", - "amphp/http-server": "^3", + "amphp/http-server": "^3.2", "amphp/pipeline": "^1", "php": ">=8.1", "revolt/event-loop": "^1" @@ -869,19 +871,20 @@ "email": "aaron@trowski.com" } ], - "description": "A form parser for Amp's HTTP parser.", - "homepage": "https://github.com/amphp/http-server-form-parser", + "description": "An HTTP server plugin that simplifies form data handling. Effortlessly parse incoming form submissions and extracting its data.", + "homepage": "https://amphp.org/http-server-form-parser", "keywords": [ "amp", "amphp", "async", "form", "http", - "non-blocking" + "non-blocking", + "revolt" ], "support": { "issues": "https://github.com/amphp/http-server-form-parser/issues", - "source": "https://github.com/amphp/http-server-form-parser/tree/v2.0.0-beta.3" + "source": "https://github.com/amphp/http-server-form-parser/tree/v2.0.0" }, "funding": [ { @@ -889,7 +892,7 @@ "type": "github" } ], - "time": "2023-04-22T15:36:02+00:00" + "time": "2023-08-25T02:52:20+00:00" }, { "name": "amphp/http-server-router", @@ -1116,16 +1119,16 @@ }, { "name": "amphp/parallel", - "version": "v2.2.1", + "version": "v2.2.2", "source": { "type": "git", "url": "https://github.com/amphp/parallel.git", - "reference": "ba11031b8664134b13c150530ae041a75e631858" + "reference": "f54bb4090670397544f74e14a1e650bf2cfd853b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/amphp/parallel/zipball/ba11031b8664134b13c150530ae041a75e631858", - "reference": "ba11031b8664134b13c150530ae041a75e631858", + "url": "https://api.github.com/repos/amphp/parallel/zipball/f54bb4090670397544f74e14a1e650bf2cfd853b", + "reference": "f54bb4090670397544f74e14a1e650bf2cfd853b", "shasum": "" }, "require": { @@ -1187,7 +1190,7 @@ ], "support": { "issues": "https://github.com/amphp/parallel/issues", - "source": "https://github.com/amphp/parallel/tree/v2.2.1" + "source": "https://github.com/amphp/parallel/tree/v2.2.2" }, "funding": [ { @@ -1195,7 +1198,7 @@ "type": "github" } ], - "time": "2023-05-22T03:33:27+00:00" + "time": "2023-08-30T17:43:42+00:00" }, { "name": "amphp/parser", @@ -2515,12 +2518,12 @@ "source": { "type": "git", "url": "https://github.com/danog/MadelineProto.git", - "reference": "dc34a380b3dd936c0dfc753dc89aa7389d5ac377" + "reference": "546e9a0d23ad4f05a5e2b3446be7315d4e53b95b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/danog/MadelineProto/zipball/dc34a380b3dd936c0dfc753dc89aa7389d5ac377", - "reference": "dc34a380b3dd936c0dfc753dc89aa7389d5ac377", + "url": "https://api.github.com/repos/danog/MadelineProto/zipball/546e9a0d23ad4f05a5e2b3446be7315d4e53b95b", + "reference": "546e9a0d23ad4f05a5e2b3446be7315d4e53b95b", "shasum": "" }, "require": { @@ -2572,7 +2575,6 @@ "danog/phpdoc": "^0.1.7", "dg/bypass-finals": "dev-master", "ext-ctype": "*", - "leproxy/leproxy": "^0.2.2", "phpdocumentor/reflection-docblock": "dev-master", "phpdocumentor/type-resolver": "1.x-dev@dev", "phpunit/phpunit": "^9", @@ -2637,7 +2639,7 @@ "type": "github" } ], - "time": "2023-08-21T13:09:02+00:00" + "time": "2023-09-02T20:24:26+00:00" }, { "name": "danog/primemodule", @@ -2755,16 +2757,16 @@ }, { "name": "dasprid/enum", - "version": "1.0.4", + "version": "1.0.5", "source": { "type": "git", "url": "https://github.com/DASPRiD/Enum.git", - "reference": "8e6b6ea76eabbf19ea2bf5b67b98e1860474012f" + "reference": "6faf451159fb8ba4126b925ed2d78acfce0dc016" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/DASPRiD/Enum/zipball/8e6b6ea76eabbf19ea2bf5b67b98e1860474012f", - "reference": "8e6b6ea76eabbf19ea2bf5b67b98e1860474012f", + "url": "https://api.github.com/repos/DASPRiD/Enum/zipball/6faf451159fb8ba4126b925ed2d78acfce0dc016", + "reference": "6faf451159fb8ba4126b925ed2d78acfce0dc016", "shasum": "" }, "require": { @@ -2799,9 +2801,9 @@ ], "support": { "issues": "https://github.com/DASPRiD/Enum/issues", - "source": "https://github.com/DASPRiD/Enum/tree/1.0.4" + "source": "https://github.com/DASPRiD/Enum/tree/1.0.5" }, - "time": "2023-03-01T18:44:03+00:00" + "time": "2023-08-25T16:18:39+00:00" }, { "name": "daverandom/libdns", @@ -3906,16 +3908,16 @@ }, { "name": "symfony/polyfill-ctype", - "version": "v1.27.0", + "version": "v1.28.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-ctype.git", - "reference": "5bbc823adecdae860bb64756d639ecfec17b050a" + "reference": "ea208ce43cbb04af6867b4fdddb1bdbf84cc28cb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/5bbc823adecdae860bb64756d639ecfec17b050a", - "reference": "5bbc823adecdae860bb64756d639ecfec17b050a", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/ea208ce43cbb04af6867b4fdddb1bdbf84cc28cb", + "reference": "ea208ce43cbb04af6867b4fdddb1bdbf84cc28cb", "shasum": "" }, "require": { @@ -3930,7 +3932,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.27-dev" + "dev-main": "1.28-dev" }, "thanks": { "name": "symfony/polyfill", @@ -3968,7 +3970,7 @@ "portable" ], "support": { - "source": "https://github.com/symfony/polyfill-ctype/tree/v1.27.0" + "source": "https://github.com/symfony/polyfill-ctype/tree/v1.28.0" }, "funding": [ { @@ -3984,20 +3986,20 @@ "type": "tidelift" } ], - "time": "2022-11-03T14:55:06+00:00" + "time": "2023-01-26T09:26:14+00:00" }, { "name": "symfony/polyfill-mbstring", - "version": "v1.27.0", + "version": "v1.28.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "8ad114f6b39e2c98a8b0e3bd907732c207c2b534" + "reference": "42292d99c55abe617799667f454222c54c60e229" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/8ad114f6b39e2c98a8b0e3bd907732c207c2b534", - "reference": "8ad114f6b39e2c98a8b0e3bd907732c207c2b534", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/42292d99c55abe617799667f454222c54c60e229", + "reference": "42292d99c55abe617799667f454222c54c60e229", "shasum": "" }, "require": { @@ -4012,7 +4014,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.27-dev" + "dev-main": "1.28-dev" }, "thanks": { "name": "symfony/polyfill", @@ -4051,7 +4053,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.27.0" + "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.28.0" }, "funding": [ { @@ -4067,7 +4069,7 @@ "type": "tidelift" } ], - "time": "2022-11-03T14:55:06+00:00" + "time": "2023-07-28T09:04:16+00:00" }, { "name": "vlucas/phpdotenv", diff --git a/config.php b/config.php index 7979431..ca9a61c 100644 --- a/config.php +++ b/config.php @@ -15,7 +15,7 @@ ], 'logger' => [ // Logger settings 'type' => Logger::CALLABLE_LOGGER, // 0 - Logs disabled, 3 - echo logs. - 'extra' => LogObserver::class . '::log', + 'extra' => LogObserver::log(...), 'level' => (int)getenv('LOGGER_LEVEL'), // Logging level, available logging levels are: ULTRA_VERBOSE - 5, VERBOSE - 4 , NOTICE - 3, WARNING - 2, ERROR - 1, FATAL_ERROR - 0. ], 'rpc' => [ @@ -53,6 +53,7 @@ explode(',', (string)getenv('IP_WHITELIST')) ) ), + 'bulk_interval' => (float)getenv('REQUESTS_BULK_INTERVAL') ], 'health_check' => [ 'enabled' => (bool)filter_var((string)getenv('HEALTHCHECK_ENABLED'), FILTER_VALIDATE_BOOL), diff --git a/src/Controllers/AbstractApiController.php b/src/Controllers/AbstractApiController.php index 2920f9d..ba98cc0 100644 --- a/src/Controllers/AbstractApiController.php +++ b/src/Controllers/AbstractApiController.php @@ -4,7 +4,7 @@ use Amp\Future; use Amp\Http\Server\FormParser\StreamedField; -use Amp\Http\Server\FormParser\StreamingParser; +use Amp\Http\Server\FormParser\StreamingFormParser; use Amp\Http\Server\Request; use Amp\Http\Server\RequestHandler\ClosureRequestHandler; use Amp\Http\Server\Response; @@ -18,6 +18,7 @@ use TelegramApiServer\MadelineProtoExtensions\SystemApiExtensions; use Throwable; use UnexpectedValueException; +use function Amp\delay; use function mb_strpos; abstract class AbstractApiController @@ -95,7 +96,7 @@ private function resolveRequest(): void switch (true) { case $contentType === 'application/x-www-form-urlencoded': case mb_strpos($contentType, 'multipart/form-data') !== false: - $form = (new StreamingParser())->parseForm($this->request); + $form = (new StreamingFormParser())->parseForm($this->request); $post = []; while ($form->continue()) { diff --git a/src/Controllers/ApiController.php b/src/Controllers/ApiController.php index c153f27..8bd7969 100644 --- a/src/Controllers/ApiController.php +++ b/src/Controllers/ApiController.php @@ -2,8 +2,18 @@ namespace TelegramApiServer\Controllers; +use Amp\Sync\LocalKeyedMutex; +use Amp\Sync\LocalMutex; +use Amp\Sync\StaticKeyMutex; +use Amp\Sync\SyncException; use Exception; +use Revolt\EventLoop; use TelegramApiServer\Client; +use TelegramApiServer\Config; +use TelegramApiServer\Logger; +use function Amp\async; +use function Amp\delay; +use function Amp\Future\awaitAll; class ApiController extends AbstractApiController { @@ -25,10 +35,46 @@ protected function resolvePath(array $path): void /** * @throws Exception */ - protected function callApi() + protected function callApi(): mixed { $madelineProto = Client::getInstance()->getSession($this->session); - return $this->callApiCommon($madelineProto); + $tick = Config::getInstance()->get('api.bulk_interval'); + + if (!$tick) { + return $this->callApiCommon($madelineProto); + } + + //GROUP REQUESTS IN BULKS + static $futures = []; + + $futures[] = $future = async($this->callApiCommon(...), $madelineProto); + delay($this->waitNextTick()); + + if ($futures) { + awaitAll($futures); + Logger::getInstance()->notice("Executed bulk requests:" . count($futures)); + $futures = []; + } + + return $future->await(); + } + + /** + * Sync threads execution via time ticks + * Need to enable madelineProto futures bulk execution + * @param float $tick interval of execution in seconds. + */ + protected function waitNextTick(float $tick = 0.5): float { + $tickMs = $tick * 1000; + $now = (int)(microtime(true) * 1000); + $currentTick = intdiv((int)(microtime(true) * 1000), $tickMs); + $nextTick = ($currentTick + 1); + $nextTickTime = $nextTick * $tickMs; + $wait = round(($nextTickTime - $now)/1000, 3); + + Logger::getInstance()->notice("Waiting $wait seconds before tick"); + + return $wait; } } \ No newline at end of file From ba43eef8625caae554c067fbefb05eff1793824f Mon Sep 17 00:00:00 2001 From: Alexander Pankratov Date: Mon, 4 Sep 2023 14:25:42 +0200 Subject: [PATCH 095/270] Fix: stop only own event handlers --- src/Client.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/Client.php b/src/Client.php index a0d5bb5..ff82d03 100644 --- a/src/Client.php +++ b/src/Client.php @@ -10,6 +10,7 @@ use Psr\Log\LogLevel; use ReflectionProperty; use RuntimeException; +use TelegramApiServer\EventObservers\EventHandler; use TelegramApiServer\EventObservers\EventObserver; class Client @@ -140,7 +141,13 @@ private function startNotLoggedInSessions(): void public function startLoggedInSession(string $sessionName): void { if ($this->instances[$sessionName]->getAuthorization() === API::LOGGED_IN) { - if (empty(EventObserver::$sessionClients[$sessionName])) { + if ( + empty(EventObserver::$sessionClients[$sessionName]) + && ( + $this->instances[$sessionName]->getEventHandler() instanceof EventHandler + || $this->instances[$sessionName]->getEventHandler() instanceof \__PHP_Incomplete_Class + ) + ) { $this->instances[$sessionName]->unsetEventHandler(); } $this->instances[$sessionName]->start(); From 574ffa9711df7b06a9e55d6d80c0c4089783922d Mon Sep 17 00:00:00 2001 From: Alexander Pankratov Date: Thu, 7 Sep 2023 11:15:36 +0200 Subject: [PATCH 096/270] Update amp websocket --- composer.json | 2 +- composer.lock | 288 +++++++++++++-------------- src/Controllers/EventsController.php | 6 +- src/Controllers/LogController.php | 6 +- src/Server/Router.php | 6 +- 5 files changed, 155 insertions(+), 153 deletions(-) diff --git a/composer.json b/composer.json index 4f5fdd2..5592f17 100644 --- a/composer.json +++ b/composer.json @@ -25,7 +25,7 @@ "amphp/http": "^v2", "amphp/http-server-router": "^2", "amphp/http-server-form-parser": "^v2", - "amphp/websocket-server": "^v3", + "amphp/websocket-server": "3.x-dev", "amphp/websocket-client": "^v2", "vlucas/phpdotenv": "^4", "danog/madelineproto": "dev-v8_fix_cleanup" diff --git a/composer.lock b/composer.lock index bcbe6c5..c24c3be 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "2ff06dc2d59bf60d0a5647a682595d0a", + "content-hash": "ef688c3f6b03504945ac5f31f0f69775", "packages": [ { "name": "amphp/amp", @@ -402,16 +402,16 @@ }, { "name": "amphp/hpack", - "version": "v3.1.5", + "version": "v3.2.0", "source": { "type": "git", "url": "https://github.com/amphp/hpack.git", - "reference": "5835a1414a52892562338dc76c2df926fa52a480" + "reference": "95895d29ae577a3a5995b46d16def04e11e39947" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/amphp/hpack/zipball/5835a1414a52892562338dc76c2df926fa52a480", - "reference": "5835a1414a52892562338dc76c2df926fa52a480", + "url": "https://api.github.com/repos/amphp/hpack/zipball/95895d29ae577a3a5995b46d16def04e11e39947", + "reference": "95895d29ae577a3a5995b46d16def04e11e39947", "shasum": "" }, "require": { @@ -420,7 +420,8 @@ "require-dev": { "amphp/php-cs-fixer-config": "^2", "http2jp/hpack-test-case": "^1", - "phpunit/phpunit": "^9" + "nikic/php-fuzzer": "^0.0.10", + "phpunit/phpunit": "^7 | ^8 | ^9" }, "type": "library", "extra": { @@ -463,7 +464,7 @@ ], "support": { "issues": "https://github.com/amphp/hpack/issues", - "source": "https://github.com/amphp/hpack/tree/v3.1.5" + "source": "https://github.com/amphp/hpack/tree/v3.2.0" }, "funding": [ { @@ -471,7 +472,7 @@ "type": "github" } ], - "time": "2023-08-15T19:29:20+00:00" + "time": "2023-09-05T19:59:20+00:00" }, { "name": "amphp/http", @@ -539,16 +540,16 @@ }, { "name": "amphp/http-client", - "version": "v5.0.0-beta.14", + "version": "v5.0.0-beta.17", "source": { "type": "git", "url": "https://github.com/amphp/http-client.git", - "reference": "a9f2bebe03baaac7fa029b5d01bb66ab4a9c5b5b" + "reference": "9cd91e1f8ec9242fcfda12781f1c124e33ab87bd" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/amphp/http-client/zipball/a9f2bebe03baaac7fa029b5d01bb66ab4a9c5b5b", - "reference": "a9f2bebe03baaac7fa029b5d01bb66ab4a9c5b5b", + "url": "https://api.github.com/repos/amphp/http-client/zipball/9cd91e1f8ec9242fcfda12781f1c124e33ab87bd", + "reference": "9cd91e1f8ec9242fcfda12781f1c124e33ab87bd", "shasum": "" }, "require": { @@ -561,13 +562,14 @@ "amphp/sync": "^2", "league/uri": "^6 | ^7", "league/uri-components": "^2.4 | ^7", + "league/uri-interfaces": "^7.1", "php": ">=8.1", "psr/http-message": "^1 | ^2", "revolt/event-loop": "^1" }, "require-dev": { "amphp/file": "^3", - "amphp/http-server": "^3-dev", + "amphp/http-server": "^3", "amphp/php-cs-fixer-config": "^2", "amphp/phpunit-util": "^3", "ext-json": "*", @@ -582,11 +584,6 @@ "ext-zlib": "Allows using compression for response bodies." }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.x-dev" - } - }, "autoload": { "files": [ "src/functions.php", @@ -614,8 +611,8 @@ "email": "aaron@trowski.com" } ], - "description": "Non-blocking concurrent HTTP/2 and HTTP/1.1 client based on Amp and Revolt.", - "homepage": "https://github.com/amphp/http-client", + "description": "An advanced async HTTP client library for PHP, enabling efficient, non-blocking, and concurrent requests and responses.", + "homepage": "https://amphp.org/http-client", "keywords": [ "async", "client", @@ -626,7 +623,7 @@ ], "support": { "issues": "https://github.com/amphp/http-client/issues", - "source": "https://github.com/amphp/http-client/tree/v5.0.0-beta.14" + "source": "https://github.com/amphp/http-client/tree/v5.0.0-beta.17" }, "funding": [ { @@ -634,7 +631,7 @@ "type": "github" } ], - "time": "2023-08-23T20:15:15+00:00" + "time": "2023-09-05T20:56:21+00:00" }, { "name": "amphp/http-client-cookies", @@ -719,12 +716,12 @@ "source": { "type": "git", "url": "https://github.com/amphp/http-server.git", - "reference": "5057e59b7119314f2f1f5c7740daf3bcbbd1f163" + "reference": "e984728667de7394629618e4f603a962981a4f91" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/amphp/http-server/zipball/5057e59b7119314f2f1f5c7740daf3bcbbd1f163", - "reference": "5057e59b7119314f2f1f5c7740daf3bcbbd1f163", + "url": "https://api.github.com/repos/amphp/http-server/zipball/e984728667de7394629618e4f603a962981a4f91", + "reference": "e984728667de7394629618e4f603a962981a4f91", "shasum": "" }, "require": { @@ -809,7 +806,7 @@ "type": "github" } ], - "time": "2023-09-01T05:04:07+00:00" + "time": "2023-09-04T04:43:25+00:00" }, { "name": "amphp/http-server-form-parser", @@ -1879,16 +1876,16 @@ }, { "name": "amphp/websocket", - "version": "v2.0.0-beta.4", + "version": "v2.0.0", "source": { "type": "git", "url": "https://github.com/amphp/websocket.git", - "reference": "1bdf01a832ff85677e2cf200cde1096a7d66179a" + "reference": "227e285606a2d7edfd5f5573623810ea1b568ba7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/amphp/websocket/zipball/1bdf01a832ff85677e2cf200cde1096a7d66179a", - "reference": "1bdf01a832ff85677e2cf200cde1096a7d66179a", + "url": "https://api.github.com/repos/amphp/websocket/zipball/227e285606a2d7edfd5f5573623810ea1b568ba7", + "reference": "227e285606a2d7edfd5f5573623810ea1b568ba7", "shasum": "" }, "require": { @@ -1898,7 +1895,7 @@ "amphp/pipeline": "^1", "amphp/socket": "^2", "php": ">=8.1", - "revolt/event-loop": "^1 || ^0.2.4" + "revolt/event-loop": "^1" }, "require-dev": { "amphp/php-cs-fixer-config": "^2", @@ -1948,7 +1945,7 @@ ], "support": { "issues": "https://github.com/amphp/websocket/issues", - "source": "https://github.com/amphp/websocket/tree/v2.0.0-beta.4" + "source": "https://github.com/amphp/websocket/tree/v2.0.0" }, "funding": [ { @@ -1956,43 +1953,44 @@ "type": "github" } ], - "time": "2023-02-06T04:25:31+00:00" + "time": "2023-09-03T23:00:48+00:00" }, { "name": "amphp/websocket-client", - "version": "v2.0.0-beta.3", + "version": "2.x-dev", "source": { "type": "git", "url": "https://github.com/amphp/websocket-client.git", - "reference": "24daf3cb8cbf25aa3d16a9434ca72e0af9b005b5" + "reference": "434254c42cb9b667594e703b54f0d025fc4b3ac9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/amphp/websocket-client/zipball/24daf3cb8cbf25aa3d16a9434ca72e0af9b005b5", - "reference": "24daf3cb8cbf25aa3d16a9434ca72e0af9b005b5", + "url": "https://api.github.com/repos/amphp/websocket-client/zipball/434254c42cb9b667594e703b54f0d025fc4b3ac9", + "reference": "434254c42cb9b667594e703b54f0d025fc4b3ac9", "shasum": "" }, "require": { "amphp/amp": "^3", "amphp/byte-stream": "^2", "amphp/http": "^2", - "amphp/http-client": "^5", + "amphp/http-client": "^5-dev", "amphp/socket": "^2", "amphp/websocket": "^2", - "league/uri": "^6", + "league/uri": "^6.8 | ^7.1", "php": ">=8.1", - "psr/http-message": "^1", + "psr/http-message": "^1 | ^2", "revolt/event-loop": "^1" }, "require-dev": { "amphp/http-server": "^3", "amphp/php-cs-fixer-config": "^2", "amphp/phpunit-util": "^3", - "amphp/websocket-server": "^3", + "amphp/websocket-server": "^3-dev", "phpunit/phpunit": "^9", "psalm/phar": "^5.4", "psr/log": "^1" }, + "default-branch": true, "type": "library", "autoload": { "files": [ @@ -2032,7 +2030,7 @@ ], "support": { "issues": "https://github.com/amphp/websocket-client/issues", - "source": "https://github.com/amphp/websocket-client/tree/v2.0.0-beta.3" + "source": "https://github.com/amphp/websocket-client/tree/2.x" }, "funding": [ { @@ -2040,26 +2038,26 @@ "type": "github" } ], - "time": "2023-04-26T03:42:33+00:00" + "time": "2023-09-06T03:40:42+00:00" }, { "name": "amphp/websocket-server", - "version": "v3.0.0-beta.2", + "version": "3.x-dev", "source": { "type": "git", "url": "https://github.com/amphp/websocket-server.git", - "reference": "d3a7b9623fdddb01bfa87274d037eff5654559d1" + "reference": "9dc24cc3ca8c8db14f0be04f51f9b4d40b384096" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/amphp/websocket-server/zipball/d3a7b9623fdddb01bfa87274d037eff5654559d1", - "reference": "d3a7b9623fdddb01bfa87274d037eff5654559d1", + "url": "https://api.github.com/repos/amphp/websocket-server/zipball/9dc24cc3ca8c8db14f0be04f51f9b4d40b384096", + "reference": "9dc24cc3ca8c8db14f0be04f51f9b4d40b384096", "shasum": "" }, "require": { "amphp/amp": "^3", "amphp/byte-stream": "^2", - "amphp/http": "^2-dev", + "amphp/http": "^2", "amphp/http-server": "^3", "amphp/socket": "^2", "amphp/websocket": "^2", @@ -2068,12 +2066,14 @@ "revolt/event-loop": "^1 || ^0.2.4" }, "require-dev": { - "amphp/http-client": "^5", + "amphp/http-client": "^5-dev", "amphp/http-server-router": "^2", "amphp/http-server-static-content": "^2", "amphp/log": "^2", "amphp/php-cs-fixer-config": "^2", "amphp/phpunit-util": "^3", + "amphp/websocket-client": "^2-dev", + "colinodell/psr-testlogger": "^1.2", "league/climate": "^3", "phpunit/phpunit": "^9", "psalm/phar": "^5.4" @@ -2081,6 +2081,7 @@ "suggest": { "ext-zlib": "Required for compression" }, + "default-branch": true, "type": "library", "autoload": { "psr-4": { @@ -2117,7 +2118,7 @@ ], "support": { "issues": "https://github.com/amphp/websocket-server/issues", - "source": "https://github.com/amphp/websocket-server/tree/v3.0.0-beta.2" + "source": "https://github.com/amphp/websocket-server/tree/3.x" }, "funding": [ { @@ -2125,7 +2126,7 @@ "type": "github" } ], - "time": "2023-02-06T05:13:58+00:00" + "time": "2023-09-07T04:04:35+00:00" }, { "name": "amphp/windows-registry", @@ -2453,16 +2454,16 @@ }, { "name": "danog/loop", - "version": "1.0.3", + "version": "1.0.4", "source": { "type": "git", "url": "https://github.com/danog/loop.git", - "reference": "bf3ef5d4d26fe1b61109f19e3f84b89cb76f37fb" + "reference": "73f1574f37b7b6dbd84b2f22010e6f85be95d6ea" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/danog/loop/zipball/bf3ef5d4d26fe1b61109f19e3f84b89cb76f37fb", - "reference": "bf3ef5d4d26fe1b61109f19e3f84b89cb76f37fb", + "url": "https://api.github.com/repos/danog/loop/zipball/73f1574f37b7b6dbd84b2f22010e6f85be95d6ea", + "reference": "73f1574f37b7b6dbd84b2f22010e6f85be95d6ea", "shasum": "" }, "require": { @@ -2502,7 +2503,7 @@ ], "support": { "issues": "https://github.com/danog/loop/issues", - "source": "https://github.com/danog/loop/tree/1.0.3" + "source": "https://github.com/danog/loop/tree/1.0.4" }, "funding": [ { @@ -2510,7 +2511,7 @@ "type": "github" } ], - "time": "2023-01-24T17:58:51+00:00" + "time": "2023-09-03T14:31:18+00:00" }, { "name": "danog/madelineproto", @@ -2518,12 +2519,12 @@ "source": { "type": "git", "url": "https://github.com/danog/MadelineProto.git", - "reference": "546e9a0d23ad4f05a5e2b3446be7315d4e53b95b" + "reference": "3978976921b1ad1f0a43b204a1b58969a6109be1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/danog/MadelineProto/zipball/546e9a0d23ad4f05a5e2b3446be7315d4e53b95b", - "reference": "546e9a0d23ad4f05a5e2b3446be7315d4e53b95b", + "url": "https://api.github.com/repos/danog/MadelineProto/zipball/3978976921b1ad1f0a43b204a1b58969a6109be1", + "reference": "3978976921b1ad1f0a43b204a1b58969a6109be1", "shasum": "" }, "require": { @@ -2532,14 +2533,13 @@ "amphp/dns": "^2", "amphp/file": "^3.0.1", "amphp/http": "^2", - "amphp/http-client": "^5", + "amphp/http-client": "^5.0.0-beta.17", "amphp/http-client-cookies": "^2", "amphp/log": "^2", "amphp/mysql": "^3", "amphp/postgres": "^2", "amphp/redis": "^2", "amphp/socket": "^2", - "amphp/websocket-client": "^2", "bacon/bacon-qr-code": "^2.0", "danog/dns-over-https": "^1", "danog/ipc": "^1", @@ -2554,7 +2554,7 @@ "ext-mbstring": "*", "ext-xml": "*", "ext-zlib": "*", - "league/uri": "^6", + "league/uri": "^7", "nikic/php-parser": "^4.16", "php-64bit": ">=8.1", "phpseclib/phpseclib": "^3", @@ -2639,7 +2639,7 @@ "type": "github" } ], - "time": "2023-09-02T20:24:26+00:00" + "time": "2023-09-07T09:03:31+00:00" }, { "name": "danog/primemodule", @@ -2909,54 +2909,44 @@ }, { "name": "league/uri", - "version": "6.8.0", + "version": "7.2.1", "source": { "type": "git", "url": "https://github.com/thephpleague/uri.git", - "reference": "a700b4656e4c54371b799ac61e300ab25a2d1d39" + "reference": "8b644f8ff80352530bbc0ea467d5b5a89b60d832" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thephpleague/uri/zipball/a700b4656e4c54371b799ac61e300ab25a2d1d39", - "reference": "a700b4656e4c54371b799ac61e300ab25a2d1d39", + "url": "https://api.github.com/repos/thephpleague/uri/zipball/8b644f8ff80352530bbc0ea467d5b5a89b60d832", + "reference": "8b644f8ff80352530bbc0ea467d5b5a89b60d832", "shasum": "" }, "require": { - "ext-json": "*", - "league/uri-interfaces": "^2.3", - "php": "^8.1", - "psr/http-message": "^1.0.1" + "league/uri-interfaces": "^7.2", + "php": "^8.1" }, "conflict": { "league/uri-schemes": "^1.0" }, - "require-dev": { - "friendsofphp/php-cs-fixer": "^v3.9.5", - "nyholm/psr7": "^1.5.1", - "php-http/psr7-integration-tests": "^1.1.1", - "phpbench/phpbench": "^1.2.6", - "phpstan/phpstan": "^1.8.5", - "phpstan/phpstan-deprecation-rules": "^1.0", - "phpstan/phpstan-phpunit": "^1.1.1", - "phpstan/phpstan-strict-rules": "^1.4.3", - "phpunit/phpunit": "^9.5.24", - "psr/http-factory": "^1.0.1" - }, "suggest": { - "ext-fileinfo": "Needed to create Data URI from a filepath", - "ext-intl": "Needed to improve host validation", - "league/uri-components": "Needed to easily manipulate URI objects", - "psr/http-factory": "Needed to use the URI factory" + "ext-bcmath": "to improve IPV4 host parsing", + "ext-fileinfo": "to create Data URI from file contennts", + "ext-gmp": "to improve IPV4 host parsing", + "ext-intl": "to handle IDN host with the best performance", + "jeremykendall/php-domain-parser": "to resolve Public Suffix and Top Level Domain", + "league/uri-components": "Needed to easily manipulate URI objects components", + "php-64bit": "to improve IPV4 host parsing", + "symfony/polyfill-intl-idn": "to handle IDN host via the Symfony polyfill if ext-intl is not present" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "6.x-dev" + "dev-master": "7.x-dev" } }, "autoload": { "psr-4": { - "League\\Uri\\": "src" + "League\\Uri\\": "" } }, "notification-url": "https://packagist.org/downloads/", @@ -2996,8 +2986,8 @@ "support": { "docs": "https://uri.thephpleague.com", "forum": "https://thephpleague.slack.com", - "issues": "https://github.com/thephpleague/uri/issues", - "source": "https://github.com/thephpleague/uri/tree/6.8.0" + "issues": "https://github.com/thephpleague/uri-src/issues", + "source": "https://github.com/thephpleague/uri/tree/7.2.1" }, "funding": [ { @@ -3005,57 +2995,44 @@ "type": "github" } ], - "time": "2022-09-13T19:58:47+00:00" + "time": "2023-08-30T21:06:57+00:00" }, { "name": "league/uri-components", - "version": "2.4.2", + "version": "7.2.1", "source": { "type": "git", "url": "https://github.com/thephpleague/uri-components.git", - "reference": "c93837294fe9021d518fd3ea4c5f3fbba8b8ddeb" + "reference": "cd187940b9ea1626c2b6e6ab9a5aba5b7c59fc7b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thephpleague/uri-components/zipball/c93837294fe9021d518fd3ea4c5f3fbba8b8ddeb", - "reference": "c93837294fe9021d518fd3ea4c5f3fbba8b8ddeb", + "url": "https://api.github.com/repos/thephpleague/uri-components/zipball/cd187940b9ea1626c2b6e6ab9a5aba5b7c59fc7b", + "reference": "cd187940b9ea1626c2b6e6ab9a5aba5b7c59fc7b", "shasum": "" }, "require": { - "ext-json": "*", - "league/uri-interfaces": "^2.3", - "php": "^7.4 || ^8.0", - "psr/http-message": "^1.0" - }, - "require-dev": { - "friendsofphp/php-cs-fixer": "^v3.22.0", - "guzzlehttp/psr7": "^2.2", - "laminas/laminas-diactoros": "^2.11", - "league/uri": "^6.0", - "phpstan/phpstan": "^1.10.28", - "phpstan/phpstan-deprecation-rules": "^1.1.4", - "phpstan/phpstan-phpunit": "^1.3.13", - "phpstan/phpstan-strict-rules": "^1.5.1", - "phpunit/phpunit": "^9.6.10" + "league/uri": "^7.2", + "php": "^8.1" }, "suggest": { - "ext-fileinfo": "Needed to create Data URI from a filepath", - "ext-gmp": "to improve handle IPV4 parsing", - "ext-intl": "to handle IDN host", - "jeremykendall/php-domain-parser": "Public Suffix and Top Level Domain parsing implemented in PHP", - "league/uri": "to allow manipulating URI objects", - "php-64bit": "to improve handle IPV4 parsing", - "psr/http-message-implementation": "to allow manipulating PSR-7 Uri objects" + "ext-bcmath": "to improve IPV4 host parsing", + "ext-fileinfo": "to create Data URI from file contennts", + "ext-gmp": "to improve IPV4 host parsing", + "ext-intl": "to handle IDN host with the best performance", + "jeremykendall/php-domain-parser": "to resolve Public Suffix and Top Level Domain", + "php-64bit": "to improve IPV4 host parsing", + "symfony/polyfill-intl-idn": "to handle IDN host via the Symfony polyfill if ext-intl is not present" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.x-dev" + "dev-master": "7.x-dev" } }, "autoload": { "psr-4": { - "League\\Uri\\": "src" + "League\\Uri\\": "" } }, "notification-url": "https://packagist.org/downloads/", @@ -3076,6 +3053,8 @@ "components", "fragment", "host", + "middleware", + "modifier", "path", "port", "query", @@ -3086,7 +3065,10 @@ "userinfo" ], "support": { - "source": "https://github.com/thephpleague/uri-components/tree/2.4.2" + "docs": "https://uri.thephpleague.com", + "forum": "https://thephpleague.slack.com", + "issues": "https://github.com/thephpleague/uri-src/issues", + "source": "https://github.com/thephpleague/uri-components/tree/7.2.1" }, "funding": [ { @@ -3094,46 +3076,44 @@ "type": "github" } ], - "time": "2023-08-13T19:53:57+00:00" + "time": "2023-08-30T21:06:57+00:00" }, { "name": "league/uri-interfaces", - "version": "2.3.0", + "version": "7.2.0", "source": { "type": "git", "url": "https://github.com/thephpleague/uri-interfaces.git", - "reference": "00e7e2943f76d8cb50c7dfdc2f6dee356e15e383" + "reference": "43fa071050fcba89aefb5d4789a4a5a73874c44b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thephpleague/uri-interfaces/zipball/00e7e2943f76d8cb50c7dfdc2f6dee356e15e383", - "reference": "00e7e2943f76d8cb50c7dfdc2f6dee356e15e383", + "url": "https://api.github.com/repos/thephpleague/uri-interfaces/zipball/43fa071050fcba89aefb5d4789a4a5a73874c44b", + "reference": "43fa071050fcba89aefb5d4789a4a5a73874c44b", "shasum": "" }, "require": { - "ext-json": "*", - "php": "^7.2 || ^8.0" - }, - "require-dev": { - "friendsofphp/php-cs-fixer": "^2.19", - "phpstan/phpstan": "^0.12.90", - "phpstan/phpstan-phpunit": "^0.12.19", - "phpstan/phpstan-strict-rules": "^0.12.9", - "phpunit/phpunit": "^8.5.15 || ^9.5" + "ext-filter": "*", + "php": "^8.1", + "psr/http-factory": "^1", + "psr/http-message": "^1.1 || ^2.0" }, "suggest": { - "ext-intl": "to use the IDNA feature", - "symfony/intl": "to use the IDNA feature via Symfony Polyfill" + "ext-bcmath": "to improve IPV4 host parsing", + "ext-gmp": "to improve IPV4 host parsing", + "ext-intl": "to handle IDN host with the best performance", + "php-64bit": "to improve IPV4 host parsing", + "symfony/polyfill-intl-idn": "to handle IDN host via the Symfony polyfill if ext-intl is not present" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.x-dev" + "dev-master": "7.x-dev" } }, "autoload": { "psr-4": { - "League\\Uri\\": "src/" + "League\\Uri\\": "" } }, "notification-url": "https://packagist.org/downloads/", @@ -3147,17 +3127,32 @@ "homepage": "https://nyamsprod.com" } ], - "description": "Common interface for URI representation", - "homepage": "http://github.com/thephpleague/uri-interfaces", + "description": "Common interfaces and classes for URI representation and interaction", + "homepage": "https://uri.thephpleague.com", "keywords": [ + "data-uri", + "file-uri", + "ftp", + "hostname", + "http", + "https", + "parse_str", + "parse_url", + "psr-7", + "query-string", + "querystring", "rfc3986", "rfc3987", + "rfc6570", "uri", - "url" + "url", + "ws" ], "support": { - "issues": "https://github.com/thephpleague/uri-interfaces/issues", - "source": "https://github.com/thephpleague/uri-interfaces/tree/2.3.0" + "docs": "https://uri.thephpleague.com", + "forum": "https://thephpleague.slack.com", + "issues": "https://github.com/thephpleague/uri-src/issues", + "source": "https://github.com/thephpleague/uri-interfaces/tree/7.2.0" }, "funding": [ { @@ -3165,7 +3160,7 @@ "type": "github" } ], - "time": "2021-06-28T04:27:21+00:00" + "time": "2023-08-30T19:43:38+00:00" }, { "name": "monolog/monolog", @@ -4217,6 +4212,7 @@ "minimum-stability": "dev", "stability-flags": { "amphp/http-server": 20, + "amphp/websocket-server": 20, "danog/madelineproto": 20 }, "prefer-stable": true, diff --git a/src/Controllers/EventsController.php b/src/Controllers/EventsController.php index 38d3462..19cc95f 100644 --- a/src/Controllers/EventsController.php +++ b/src/Controllers/EventsController.php @@ -6,6 +6,7 @@ use Amp\Http\Server\Response; use Amp\Http\Server\Router; use Amp\Http\HttpStatus; +use Amp\Http\Server\SocketHttpServer; use Amp\Websocket\Server\Websocket as WebsocketServer; use Amp\Websocket\Server\WebsocketClientGateway; use Amp\Websocket\Server\WebsocketClientHandler; @@ -28,10 +29,11 @@ public function __construct() $this->gateway = new WebsocketClientGateway(); } - public static function getRouterCallback(): WebsocketServer + public static function getRouterCallback(SocketHttpServer $server): WebsocketServer { $class = new static(); return new WebsocketServer( + httpServer: $server, logger: Logger::getInstance(), handshakeHandler: $class, clientHandler: $class, @@ -96,7 +98,7 @@ private function subscribeForUpdates(WebsocketClient $client, ?string $requested 'id' => null, ]; - $this->gateway->multicast( + $this->gateway->multicastText( json_encode( $update, JSON_THROW_ON_ERROR | diff --git a/src/Controllers/LogController.php b/src/Controllers/LogController.php index 214f079..812b7c4 100644 --- a/src/Controllers/LogController.php +++ b/src/Controllers/LogController.php @@ -5,6 +5,7 @@ use Amp\Http\Server\Request; use Amp\Http\Server\Response; use Amp\Http\Server\Router; +use Amp\Http\Server\SocketHttpServer; use Amp\Websocket\Server\Websocket; use Amp\Websocket\Server\WebsocketClientGateway; use Amp\Websocket\Server\WebsocketClientHandler; @@ -25,10 +26,11 @@ public function __construct() $this->gateway = new WebsocketClientGateway(); } - public static function getRouterCallback(): Websocket + public static function getRouterCallback(SocketHttpServer $server): Websocket { $class = new static(); return new Websocket( + httpServer: $server, logger: Logger::getInstance(), handshakeHandler: $class, clientHandler: $class, @@ -82,7 +84,7 @@ private function subscribeForUpdates(WebsocketClient $client, string $requestedL 'id' => null, ]; - $this->gateway->multicast( + $this->gateway->multicastText( json_encode( $update, JSON_THROW_ON_ERROR | diff --git a/src/Server/Router.php b/src/Server/Router.php index bd9688f..e3b03da 100644 --- a/src/Server/Router.php +++ b/src/Server/Router.php @@ -19,9 +19,11 @@ class Router { private \Amp\Http\Server\Router $router; + private SocketHttpServer $server; public function __construct(SocketHttpServer $server, ErrorHandler $errorHandler) { + $this->server = $server; $this->router = new \Amp\Http\Server\Router( httpServer: $server, logger: Logger::getInstance(), @@ -48,8 +50,8 @@ private function setRoutes(): void $authorization = new Authorization(); $apiHandler = stackMiddleware(ApiController::getRouterCallback(ApiExtensions::class), $authorization); $systemApiHandler = stackMiddleware(SystemController::getRouterCallback(SystemApiExtensions::class), $authorization); - $eventsHandler = stackMiddleware(EventsController::getRouterCallback(), $authorization); - $logHandler = stackMiddleware(LogController::getRouterCallback(), $authorization); + $eventsHandler = stackMiddleware(EventsController::getRouterCallback($this->server), $authorization); + $logHandler = stackMiddleware(LogController::getRouterCallback($this->server), $authorization); foreach (['GET', 'POST'] as $method) { $this->router->addRoute($method, '/api/{method}[/]', $apiHandler); From 4ecff738cc0333999a76fc8c21fe10b953152464 Mon Sep 17 00:00:00 2001 From: Alexander Pankratov Date: Thu, 7 Sep 2023 22:32:25 +0200 Subject: [PATCH 097/270] Update madeline --- composer.lock | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/composer.lock b/composer.lock index c24c3be..cd75444 100644 --- a/composer.lock +++ b/composer.lock @@ -2519,12 +2519,12 @@ "source": { "type": "git", "url": "https://github.com/danog/MadelineProto.git", - "reference": "3978976921b1ad1f0a43b204a1b58969a6109be1" + "reference": "bad83000a874c401a099895288f96624fe69a8c0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/danog/MadelineProto/zipball/3978976921b1ad1f0a43b204a1b58969a6109be1", - "reference": "3978976921b1ad1f0a43b204a1b58969a6109be1", + "url": "https://api.github.com/repos/danog/MadelineProto/zipball/bad83000a874c401a099895288f96624fe69a8c0", + "reference": "bad83000a874c401a099895288f96624fe69a8c0", "shasum": "" }, "require": { @@ -2639,7 +2639,7 @@ "type": "github" } ], - "time": "2023-09-07T09:03:31+00:00" + "time": "2023-09-07T20:31:14+00:00" }, { "name": "danog/primemodule", From 1e96b4ede38a9673b5749ac285349c32599c95b3 Mon Sep 17 00:00:00 2001 From: Alexander Pankratov Date: Thu, 28 Sep 2023 12:57:34 +0200 Subject: [PATCH 098/270] Upgrade madelineProto and amp websocket --- composer.json | 4 +- composer.lock | 132 +++++++++++++-------------- examples/websocket-events.php | 2 +- src/Controllers/EventsController.php | 15 ++- src/Controllers/LogController.php | 15 ++- 5 files changed, 88 insertions(+), 80 deletions(-) diff --git a/composer.json b/composer.json index 5592f17..97c67d8 100644 --- a/composer.json +++ b/composer.json @@ -21,11 +21,11 @@ "php": "^8.1", "ext-json": "*", "ext-mbstring": "*", - "amphp/http-server": "^v3.x-dev", + "amphp/http-server": "^v3", "amphp/http": "^v2", "amphp/http-server-router": "^2", "amphp/http-server-form-parser": "^v2", - "amphp/websocket-server": "3.x-dev", + "amphp/websocket-server": "^v3", "amphp/websocket-client": "^v2", "vlucas/phpdotenv": "^4", "danog/madelineproto": "dev-v8_fix_cleanup" diff --git a/composer.lock b/composer.lock index cd75444..0cdb0f1 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "ef688c3f6b03504945ac5f31f0f69775", + "content-hash": "7999d0b15d74aafe194545856812c5d7", "packages": [ { "name": "amphp/amp", @@ -712,16 +712,16 @@ }, { "name": "amphp/http-server", - "version": "3.x-dev", + "version": "v3.2.0", "source": { "type": "git", "url": "https://github.com/amphp/http-server.git", - "reference": "e984728667de7394629618e4f603a962981a4f91" + "reference": "0f658ebb8dcc0d352b26f8021288ff101e3888b5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/amphp/http-server/zipball/e984728667de7394629618e4f603a962981a4f91", - "reference": "e984728667de7394629618e4f603a962981a4f91", + "url": "https://api.github.com/repos/amphp/http-server/zipball/0f658ebb8dcc0d352b26f8021288ff101e3888b5", + "reference": "0f658ebb8dcc0d352b26f8021288ff101e3888b5", "shasum": "" }, "require": { @@ -753,7 +753,6 @@ "suggest": { "ext-zlib": "Allows GZip compression of response bodies" }, - "default-branch": true, "type": "library", "autoload": { "files": [ @@ -798,7 +797,7 @@ ], "support": { "issues": "https://github.com/amphp/http-server/issues", - "source": "https://github.com/amphp/http-server/tree/3.x" + "source": "https://github.com/amphp/http-server/tree/v3.2.0" }, "funding": [ { @@ -806,7 +805,7 @@ "type": "github" } ], - "time": "2023-09-04T04:43:25+00:00" + "time": "2023-08-24T23:40:38+00:00" }, { "name": "amphp/http-server-form-parser", @@ -1876,16 +1875,16 @@ }, { "name": "amphp/websocket", - "version": "v2.0.0", + "version": "v2.0.1", "source": { "type": "git", "url": "https://github.com/amphp/websocket.git", - "reference": "227e285606a2d7edfd5f5573623810ea1b568ba7" + "reference": "f40de822dde0dfe4273e7d6ee4306dbc4d363d44" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/amphp/websocket/zipball/227e285606a2d7edfd5f5573623810ea1b568ba7", - "reference": "227e285606a2d7edfd5f5573623810ea1b568ba7", + "url": "https://api.github.com/repos/amphp/websocket/zipball/f40de822dde0dfe4273e7d6ee4306dbc4d363d44", + "reference": "f40de822dde0dfe4273e7d6ee4306dbc4d363d44", "shasum": "" }, "require": { @@ -1945,7 +1944,7 @@ ], "support": { "issues": "https://github.com/amphp/websocket/issues", - "source": "https://github.com/amphp/websocket/tree/v2.0.0" + "source": "https://github.com/amphp/websocket/tree/v2.0.1" }, "funding": [ { @@ -1953,7 +1952,7 @@ "type": "github" } ], - "time": "2023-09-03T23:00:48+00:00" + "time": "2023-09-14T04:17:20+00:00" }, { "name": "amphp/websocket-client", @@ -1961,12 +1960,12 @@ "source": { "type": "git", "url": "https://github.com/amphp/websocket-client.git", - "reference": "434254c42cb9b667594e703b54f0d025fc4b3ac9" + "reference": "846373b90f056c64792b9a2ec2d094d1e5f00ab8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/amphp/websocket-client/zipball/434254c42cb9b667594e703b54f0d025fc4b3ac9", - "reference": "434254c42cb9b667594e703b54f0d025fc4b3ac9", + "url": "https://api.github.com/repos/amphp/websocket-client/zipball/846373b90f056c64792b9a2ec2d094d1e5f00ab8", + "reference": "846373b90f056c64792b9a2ec2d094d1e5f00ab8", "shasum": "" }, "require": { @@ -2038,20 +2037,20 @@ "type": "github" } ], - "time": "2023-09-06T03:40:42+00:00" + "time": "2023-09-09T16:09:04+00:00" }, { "name": "amphp/websocket-server", - "version": "3.x-dev", + "version": "v3.0.0", "source": { "type": "git", "url": "https://github.com/amphp/websocket-server.git", - "reference": "9dc24cc3ca8c8db14f0be04f51f9b4d40b384096" + "reference": "8a57456e4afc5594514923ebd1ace2e6b46b9e78" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/amphp/websocket-server/zipball/9dc24cc3ca8c8db14f0be04f51f9b4d40b384096", - "reference": "9dc24cc3ca8c8db14f0be04f51f9b4d40b384096", + "url": "https://api.github.com/repos/amphp/websocket-server/zipball/8a57456e4afc5594514923ebd1ace2e6b46b9e78", + "reference": "8a57456e4afc5594514923ebd1ace2e6b46b9e78", "shasum": "" }, "require": { @@ -2063,7 +2062,7 @@ "amphp/websocket": "^2", "php": ">=8.1", "psr/log": "^1|^2|^3", - "revolt/event-loop": "^1 || ^0.2.4" + "revolt/event-loop": "^1" }, "require-dev": { "amphp/http-client": "^5-dev", @@ -2081,7 +2080,6 @@ "suggest": { "ext-zlib": "Required for compression" }, - "default-branch": true, "type": "library", "autoload": { "psr-4": { @@ -2118,7 +2116,7 @@ ], "support": { "issues": "https://github.com/amphp/websocket-server/issues", - "source": "https://github.com/amphp/websocket-server/tree/3.x" + "source": "https://github.com/amphp/websocket-server/tree/v3.0.0" }, "funding": [ { @@ -2126,7 +2124,7 @@ "type": "github" } ], - "time": "2023-09-07T04:04:35+00:00" + "time": "2023-09-09T15:46:35+00:00" }, { "name": "amphp/windows-registry", @@ -2454,16 +2452,16 @@ }, { "name": "danog/loop", - "version": "1.0.4", + "version": "1.1.1", "source": { "type": "git", "url": "https://github.com/danog/loop.git", - "reference": "73f1574f37b7b6dbd84b2f22010e6f85be95d6ea" + "reference": "83c42b26c1d8d070c56bc9c03e2e8a147b45c60f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/danog/loop/zipball/73f1574f37b7b6dbd84b2f22010e6f85be95d6ea", - "reference": "73f1574f37b7b6dbd84b2f22010e6f85be95d6ea", + "url": "https://api.github.com/repos/danog/loop/zipball/83c42b26c1d8d070c56bc9c03e2e8a147b45c60f", + "reference": "83c42b26c1d8d070c56bc9c03e2e8a147b45c60f", "shasum": "" }, "require": { @@ -2503,7 +2501,7 @@ ], "support": { "issues": "https://github.com/danog/loop/issues", - "source": "https://github.com/danog/loop/tree/1.0.4" + "source": "https://github.com/danog/loop/tree/1.1.1" }, "funding": [ { @@ -2511,7 +2509,7 @@ "type": "github" } ], - "time": "2023-09-03T14:31:18+00:00" + "time": "2023-09-30T12:45:07+00:00" }, { "name": "danog/madelineproto", @@ -2519,12 +2517,12 @@ "source": { "type": "git", "url": "https://github.com/danog/MadelineProto.git", - "reference": "bad83000a874c401a099895288f96624fe69a8c0" + "reference": "349cd4f6552da3aec0acdadd29ee04c515038be1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/danog/MadelineProto/zipball/bad83000a874c401a099895288f96624fe69a8c0", - "reference": "bad83000a874c401a099895288f96624fe69a8c0", + "url": "https://api.github.com/repos/danog/MadelineProto/zipball/349cd4f6552da3aec0acdadd29ee04c515038be1", + "reference": "349cd4f6552da3aec0acdadd29ee04c515038be1", "shasum": "" }, "require": { @@ -2543,7 +2541,7 @@ "bacon/bacon-qr-code": "^2.0", "danog/dns-over-https": "^1", "danog/ipc": "^1", - "danog/loop": "^1", + "danog/loop": "^1.1.0", "danog/primemodule": "^1", "danog/tg-file-decoder": "^0.1", "ext-dom": "*", @@ -2557,7 +2555,7 @@ "league/uri": "^7", "nikic/php-parser": "^4.16", "php-64bit": ">=8.1", - "phpseclib/phpseclib": "^3", + "phpseclib/phpseclib": "^3.0.22", "psr/http-factory": "^1.0", "psr/log": "^3", "revolt/event-loop": "^1.0.3", @@ -2582,6 +2580,7 @@ "symfony/yaml": "^6.0" }, "suggest": { + "ext-bcmath": "Install the bcmath extension to speed up authorization", "ext-ffi": "Install the primemodule and FFI extensions to speed up MadelineProto (https://prime.madelineproto.xyz)", "ext-gmp": "Install the gmp extension to speed up authorization", "ext-openssl": "Install the openssl extension for faster crypto", @@ -2639,7 +2638,7 @@ "type": "github" } ], - "time": "2023-09-07T20:31:14+00:00" + "time": "2023-10-02T16:52:02+00:00" }, { "name": "danog/primemodule", @@ -2909,20 +2908,20 @@ }, { "name": "league/uri", - "version": "7.2.1", + "version": "7.3.0", "source": { "type": "git", "url": "https://github.com/thephpleague/uri.git", - "reference": "8b644f8ff80352530bbc0ea467d5b5a89b60d832" + "reference": "36743c3961bb82bf93da91917b6bced0358a8d45" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thephpleague/uri/zipball/8b644f8ff80352530bbc0ea467d5b5a89b60d832", - "reference": "8b644f8ff80352530bbc0ea467d5b5a89b60d832", + "url": "https://api.github.com/repos/thephpleague/uri/zipball/36743c3961bb82bf93da91917b6bced0358a8d45", + "reference": "36743c3961bb82bf93da91917b6bced0358a8d45", "shasum": "" }, "require": { - "league/uri-interfaces": "^7.2", + "league/uri-interfaces": "^7.3", "php": "^8.1" }, "conflict": { @@ -2987,7 +2986,7 @@ "docs": "https://uri.thephpleague.com", "forum": "https://thephpleague.slack.com", "issues": "https://github.com/thephpleague/uri-src/issues", - "source": "https://github.com/thephpleague/uri/tree/7.2.1" + "source": "https://github.com/thephpleague/uri/tree/7.3.0" }, "funding": [ { @@ -2995,24 +2994,24 @@ "type": "github" } ], - "time": "2023-08-30T21:06:57+00:00" + "time": "2023-09-09T17:21:43+00:00" }, { "name": "league/uri-components", - "version": "7.2.1", + "version": "7.3.0", "source": { "type": "git", "url": "https://github.com/thephpleague/uri-components.git", - "reference": "cd187940b9ea1626c2b6e6ab9a5aba5b7c59fc7b" + "reference": "a9d155fad59d1d8dedf84d028bc166a1d76568bc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thephpleague/uri-components/zipball/cd187940b9ea1626c2b6e6ab9a5aba5b7c59fc7b", - "reference": "cd187940b9ea1626c2b6e6ab9a5aba5b7c59fc7b", + "url": "https://api.github.com/repos/thephpleague/uri-components/zipball/a9d155fad59d1d8dedf84d028bc166a1d76568bc", + "reference": "a9d155fad59d1d8dedf84d028bc166a1d76568bc", "shasum": "" }, "require": { - "league/uri": "^7.2", + "league/uri": "^7.3", "php": "^8.1" }, "suggest": { @@ -3020,6 +3019,7 @@ "ext-fileinfo": "to create Data URI from file contennts", "ext-gmp": "to improve IPV4 host parsing", "ext-intl": "to handle IDN host with the best performance", + "ext-mbstring": "to use the sorting algorithm of URLSearchParams", "jeremykendall/php-domain-parser": "to resolve Public Suffix and Top Level Domain", "php-64bit": "to improve IPV4 host parsing", "symfony/polyfill-intl-idn": "to handle IDN host via the Symfony polyfill if ext-intl is not present" @@ -3068,7 +3068,7 @@ "docs": "https://uri.thephpleague.com", "forum": "https://thephpleague.slack.com", "issues": "https://github.com/thephpleague/uri-src/issues", - "source": "https://github.com/thephpleague/uri-components/tree/7.2.1" + "source": "https://github.com/thephpleague/uri-components/tree/7.3.0" }, "funding": [ { @@ -3076,20 +3076,20 @@ "type": "github" } ], - "time": "2023-08-30T21:06:57+00:00" + "time": "2023-09-09T17:21:43+00:00" }, { "name": "league/uri-interfaces", - "version": "7.2.0", + "version": "7.3.0", "source": { "type": "git", "url": "https://github.com/thephpleague/uri-interfaces.git", - "reference": "43fa071050fcba89aefb5d4789a4a5a73874c44b" + "reference": "c409b60ed2245ff94c965a8c798a60166db53361" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thephpleague/uri-interfaces/zipball/43fa071050fcba89aefb5d4789a4a5a73874c44b", - "reference": "43fa071050fcba89aefb5d4789a4a5a73874c44b", + "url": "https://api.github.com/repos/thephpleague/uri-interfaces/zipball/c409b60ed2245ff94c965a8c798a60166db53361", + "reference": "c409b60ed2245ff94c965a8c798a60166db53361", "shasum": "" }, "require": { @@ -3152,7 +3152,7 @@ "docs": "https://uri.thephpleague.com", "forum": "https://thephpleague.slack.com", "issues": "https://github.com/thephpleague/uri-src/issues", - "source": "https://github.com/thephpleague/uri-interfaces/tree/7.2.0" + "source": "https://github.com/thephpleague/uri-interfaces/tree/7.3.0" }, "funding": [ { @@ -3160,7 +3160,7 @@ "type": "github" } ], - "time": "2023-08-30T19:43:38+00:00" + "time": "2023-09-09T17:21:43+00:00" }, { "name": "monolog/monolog", @@ -3563,16 +3563,16 @@ }, { "name": "phpseclib/phpseclib", - "version": "3.0.21", + "version": "3.0.23", "source": { "type": "git", "url": "https://github.com/phpseclib/phpseclib.git", - "reference": "4580645d3fc05c189024eb3b834c6c1e4f0f30a1" + "reference": "866cc78fbd82462ffd880e3f65692afe928bed50" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpseclib/phpseclib/zipball/4580645d3fc05c189024eb3b834c6c1e4f0f30a1", - "reference": "4580645d3fc05c189024eb3b834c6c1e4f0f30a1", + "url": "https://api.github.com/repos/phpseclib/phpseclib/zipball/866cc78fbd82462ffd880e3f65692afe928bed50", + "reference": "866cc78fbd82462ffd880e3f65692afe928bed50", "shasum": "" }, "require": { @@ -3653,7 +3653,7 @@ ], "support": { "issues": "https://github.com/phpseclib/phpseclib/issues", - "source": "https://github.com/phpseclib/phpseclib/tree/3.0.21" + "source": "https://github.com/phpseclib/phpseclib/tree/3.0.23" }, "funding": [ { @@ -3669,7 +3669,7 @@ "type": "tidelift" } ], - "time": "2023-07-09T15:24:48+00:00" + "time": "2023-09-18T17:22:01+00:00" }, { "name": "psr/http-factory", @@ -4211,8 +4211,6 @@ "aliases": [], "minimum-stability": "dev", "stability-flags": { - "amphp/http-server": 20, - "amphp/websocket-server": 20, "danog/madelineproto": 20 }, "prefer-stable": true, @@ -4223,5 +4221,5 @@ "ext-mbstring": "*" }, "platform-dev": [], - "plugin-api-version": "2.3.0" + "plugin-api-version": "2.6.0" } diff --git a/examples/websocket-events.php b/examples/websocket-events.php index 48c3ee6..9682bad 100644 --- a/examples/websocket-events.php +++ b/examples/websocket-events.php @@ -34,7 +34,7 @@ $connection->onClose(static function () use ($connection) { if ($connection->isClosed()) { - printf("Connection closed. Reason: %s\n", $connection->getCloseReason()); + printf("Connection closed. Reason: %s\n", $connection->getCloseInfo()->getReason()); } }); diff --git a/src/Controllers/EventsController.php b/src/Controllers/EventsController.php index 19cc95f..9d35878 100644 --- a/src/Controllers/EventsController.php +++ b/src/Controllers/EventsController.php @@ -7,10 +7,11 @@ use Amp\Http\Server\Router; use Amp\Http\HttpStatus; use Amp\Http\Server\SocketHttpServer; +use Amp\Websocket\Server\Rfc6455Acceptor; use Amp\Websocket\Server\Websocket as WebsocketServer; +use Amp\Websocket\Server\WebsocketAcceptor; use Amp\Websocket\Server\WebsocketClientGateway; use Amp\Websocket\Server\WebsocketClientHandler; -use Amp\Websocket\Server\WebsocketHandshakeHandler; use Amp\Websocket\WebsocketClient; use Revolt\EventLoop; use RuntimeException; @@ -19,29 +20,31 @@ use TelegramApiServer\Logger; use Throwable; -class EventsController implements WebsocketClientHandler, WebsocketHandshakeHandler +class EventsController implements WebsocketClientHandler, WebsocketAcceptor { private const PING_INTERVAL_MS = 10_000; private WebsocketClientGateway $gateway; + private Rfc6455Acceptor $handshake; public function __construct() { $this->gateway = new WebsocketClientGateway(); + $this->handshake = new Rfc6455Acceptor(); } public static function getRouterCallback(SocketHttpServer $server): WebsocketServer { $class = new static(); + return new WebsocketServer( httpServer: $server, logger: Logger::getInstance(), - handshakeHandler: $class, + acceptor: $class, clientHandler: $class, - ); } - public function handleHandshake(Request $request, Response $response): Response + public function handleHandshake(Request $request): Response { try { $session = $request->getAttribute(Router::class)['session'] ?? null; @@ -50,7 +53,9 @@ public function handleHandshake(Request $request, Response $response): Response } elseif (empty(Client::getInstance()->instances)) { throw new RuntimeException('No sessions available'); } + $response = $this->handshake->handleHandshake($request); } catch (Throwable $e) { + $response = new Response(); $response->setStatus(HttpStatus::NOT_FOUND); $response->setBody($e->getMessage()); } diff --git a/src/Controllers/LogController.php b/src/Controllers/LogController.php index 812b7c4..0f4bb14 100644 --- a/src/Controllers/LogController.php +++ b/src/Controllers/LogController.php @@ -6,24 +6,27 @@ use Amp\Http\Server\Response; use Amp\Http\Server\Router; use Amp\Http\Server\SocketHttpServer; +use Amp\Websocket\Server\Rfc6455Acceptor; use Amp\Websocket\Server\Websocket; +use Amp\Websocket\Server\WebsocketAcceptor; use Amp\Websocket\Server\WebsocketClientGateway; use Amp\Websocket\Server\WebsocketClientHandler; -use Amp\Websocket\Server\WebsocketHandshakeHandler; use Amp\Websocket\WebsocketClient; use Psr\Log\LogLevel; use Revolt\EventLoop; use TelegramApiServer\EventObservers\LogObserver; use TelegramApiServer\Logger; -class LogController implements WebsocketClientHandler, WebsocketHandshakeHandler +class LogController implements WebsocketClientHandler, WebsocketAcceptor { private const PING_INTERVAL_MS = 10_000; private WebsocketClientGateway $gateway; + private Rfc6455Acceptor $handshake; public function __construct() { $this->gateway = new WebsocketClientGateway(); + $this->handshake = new Rfc6455Acceptor(); } public static function getRouterCallback(SocketHttpServer $server): Websocket @@ -32,16 +35,18 @@ public static function getRouterCallback(SocketHttpServer $server): Websocket return new Websocket( httpServer: $server, logger: Logger::getInstance(), - handshakeHandler: $class, + acceptor: $class, clientHandler: $class, ); } - public function handleHandshake(Request $request, Response $response): Response + public function handleHandshake(Request $request): Response { $level = $request->getAttribute(Router::class)['level'] ?? LogLevel::DEBUG; if (!isset(Logger::$levels[$level])) { - $response->setStatus(400); + $response = new Response(400); + } else { + $response = $this->handshake->handleHandshake($request); } return $response; } From 163bcbd8268606ef008b87217d38c5dbc58ee3b4 Mon Sep 17 00:00:00 2001 From: Alexander Pankratov Date: Tue, 3 Oct 2023 23:51:08 +0200 Subject: [PATCH 099/270] Add request logs --- src/Server/AccessLoggerMiddleware.php | 79 +++++++++++++++++++++++++++ src/Server/Router.php | 13 +++-- src/Server/Server.php | 15 +++++ 3 files changed, 102 insertions(+), 5 deletions(-) create mode 100644 src/Server/AccessLoggerMiddleware.php diff --git a/src/Server/AccessLoggerMiddleware.php b/src/Server/AccessLoggerMiddleware.php new file mode 100644 index 0000000..a31194d --- /dev/null +++ b/src/Server/AccessLoggerMiddleware.php @@ -0,0 +1,79 @@ +getMethod(); + $uri = (string)$request->getUri(); + $protocolVersion = $request->getProtocolVersion(); + $remote = Server::getClientIp($request); + + $context = [ + 'method' => $method, + 'uri' => $uri, + 'client' => $remote, + ]; + + try { + $response = $requestHandler->handleRequest($request); + } catch (\Throwable $exception) { + $this->logger->warning( + \sprintf( + 'Client exception for "%s %s" HTTP/%s %s', + $method, + $uri, + $protocolVersion, + $remote + ), + $context + ); + + throw $exception; + } + + $status = $response->getStatus(); + $reason = $response->getReason(); + + $context = [ + 'request' => $context, + 'response' => [ + 'status' => $status, + 'reason' => $reason, + ], + ]; + + $level = $status < 400 ? LogLevel::INFO : LogLevel::NOTICE; + + $this->logger->log( + $level, + \sprintf( + '"%s %s" %d "%s" HTTP/%s %s', + $method, + $uri, + $status, + $reason, + $protocolVersion, + $remote + ), + $context + ); + + return $response; + } +} diff --git a/src/Server/Router.php b/src/Server/Router.php index e3b03da..7e96fb1 100644 --- a/src/Server/Router.php +++ b/src/Server/Router.php @@ -47,11 +47,14 @@ private function setFallback(): void private function setRoutes(): void { - $authorization = new Authorization(); - $apiHandler = stackMiddleware(ApiController::getRouterCallback(ApiExtensions::class), $authorization); - $systemApiHandler = stackMiddleware(SystemController::getRouterCallback(SystemApiExtensions::class), $authorization); - $eventsHandler = stackMiddleware(EventsController::getRouterCallback($this->server), $authorization); - $logHandler = stackMiddleware(LogController::getRouterCallback($this->server), $authorization); + $middlewares = [ + new AccessLoggerMiddleware(Logger::getInstance()), + new Authorization() + ]; + $apiHandler = stackMiddleware(ApiController::getRouterCallback(ApiExtensions::class), ...$middlewares); + $systemApiHandler = stackMiddleware(SystemController::getRouterCallback(SystemApiExtensions::class), ...$middlewares); + $eventsHandler = stackMiddleware(EventsController::getRouterCallback($this->server), ...$middlewares); + $logHandler = stackMiddleware(LogController::getRouterCallback($this->server), ...$middlewares); foreach (['GET', 'POST'] as $method) { $this->router->addRoute($method, '/api/{method}[/]', $apiHandler); diff --git a/src/Server/Server.php b/src/Server/Server.php index 1e63e69..30ec555 100644 --- a/src/Server/Server.php +++ b/src/Server/Server.php @@ -6,6 +6,7 @@ use Amp\Http\Server\DefaultErrorHandler; use Amp\Http\Server\Driver\ConnectionLimitingServerSocketFactory; use Amp\Http\Server\Driver\DefaultHttpDriverFactory; +use Amp\Http\Server\Request; use Amp\Http\Server\SocketHttpServer; use Amp\Socket\InternetAddress; use Amp\Sync\LocalSemaphore; @@ -89,4 +90,18 @@ private function getConfig(array $config = []): array return $config; } + public static function getClientIp(Request $request): string + { + $remote = $request->getClient()->getRemoteAddress()->toString(); + $hostArray = explode(':', $remote); + if (count($hostArray) >= 2) { + $port = (int)array_pop($hostArray); + if ($port > 0 && $port <= 65353) { + $remote = implode(':', $hostArray); + } + } + + return $remote; + } + } \ No newline at end of file From 18ea5265f29dae16edc2c81a892dd5ea7d8f6cb3 Mon Sep 17 00:00:00 2001 From: Alexander Pankratov Date: Fri, 6 Oct 2023 23:07:28 +0200 Subject: [PATCH 100/270] Update madelineProto --- composer.lock | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/composer.lock b/composer.lock index 0cdb0f1..85ec348 100644 --- a/composer.lock +++ b/composer.lock @@ -2517,12 +2517,12 @@ "source": { "type": "git", "url": "https://github.com/danog/MadelineProto.git", - "reference": "349cd4f6552da3aec0acdadd29ee04c515038be1" + "reference": "847bbf1cb3ae1cd4c68e3305b9da80b43e715e54" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/danog/MadelineProto/zipball/349cd4f6552da3aec0acdadd29ee04c515038be1", - "reference": "349cd4f6552da3aec0acdadd29ee04c515038be1", + "url": "https://api.github.com/repos/danog/MadelineProto/zipball/847bbf1cb3ae1cd4c68e3305b9da80b43e715e54", + "reference": "847bbf1cb3ae1cd4c68e3305b9da80b43e715e54", "shasum": "" }, "require": { @@ -2638,7 +2638,7 @@ "type": "github" } ], - "time": "2023-10-02T16:52:02+00:00" + "time": "2023-10-06T21:06:46+00:00" }, { "name": "danog/primemodule", From ed76c19a529138627451eca41f59da6af8182b3b Mon Sep 17 00:00:00 2001 From: Alexander Pankratov Date: Fri, 20 Oct 2023 23:20:12 +0200 Subject: [PATCH 101/270] Update madelineProto --- composer.lock | 69 +++++++++++++++++++++++++-------------------------- 1 file changed, 34 insertions(+), 35 deletions(-) diff --git a/composer.lock b/composer.lock index 85ec348..dfa3d2a 100644 --- a/composer.lock +++ b/composer.lock @@ -540,16 +540,16 @@ }, { "name": "amphp/http-client", - "version": "v5.0.0-beta.17", + "version": "v5.0.0", "source": { "type": "git", "url": "https://github.com/amphp/http-client.git", - "reference": "9cd91e1f8ec9242fcfda12781f1c124e33ab87bd" + "reference": "03476991480578deb2058b926c1be1479129779f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/amphp/http-client/zipball/9cd91e1f8ec9242fcfda12781f1c124e33ab87bd", - "reference": "9cd91e1f8ec9242fcfda12781f1c124e33ab87bd", + "url": "https://api.github.com/repos/amphp/http-client/zipball/03476991480578deb2058b926c1be1479129779f", + "reference": "03476991480578deb2058b926c1be1479129779f", "shasum": "" }, "require": { @@ -623,7 +623,7 @@ ], "support": { "issues": "https://github.com/amphp/http-client/issues", - "source": "https://github.com/amphp/http-client/tree/v5.0.0-beta.17" + "source": "https://github.com/amphp/http-client/tree/v5.0.0" }, "funding": [ { @@ -631,31 +631,31 @@ "type": "github" } ], - "time": "2023-09-05T20:56:21+00:00" + "time": "2023-10-08T16:24:43+00:00" }, { "name": "amphp/http-client-cookies", - "version": "v2.0.0-beta.2", + "version": "v2.0.0", "source": { "type": "git", "url": "https://github.com/amphp/http-client-cookies.git", - "reference": "ee07882d39818aef0556da13eeb050178f91d3a3" + "reference": "4124b37ffa4d15034e70d5d30e6fb9605ed6c1a7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/amphp/http-client-cookies/zipball/ee07882d39818aef0556da13eeb050178f91d3a3", - "reference": "ee07882d39818aef0556da13eeb050178f91d3a3", + "url": "https://api.github.com/repos/amphp/http-client-cookies/zipball/4124b37ffa4d15034e70d5d30e6fb9605ed6c1a7", + "reference": "4124b37ffa4d15034e70d5d30e6fb9605ed6c1a7", "shasum": "" }, "require": { "amphp/amp": "^3", "amphp/dns": "^2", - "amphp/http": "^2-dev", + "amphp/http": "^2", "amphp/http-client": "^5", "amphp/sync": "^2", "ext-filter": "*", "php": ">=8.1", - "psr/http-message": "^1" + "psr/http-message": "^1|^2" }, "conflict": { "amphp/file": "<3 || >=4" @@ -700,7 +700,7 @@ ], "support": { "issues": "https://github.com/amphp/http-client-cookies/issues", - "source": "https://github.com/amphp/http-client-cookies/tree/v2.0.0-beta.2" + "source": "https://github.com/amphp/http-client-cookies/tree/v2.0.0" }, "funding": [ { @@ -708,7 +708,7 @@ "type": "github" } ], - "time": "2023-02-03T00:13:11+00:00" + "time": "2023-10-08T17:29:36+00:00" }, { "name": "amphp/http-server", @@ -1956,23 +1956,23 @@ }, { "name": "amphp/websocket-client", - "version": "2.x-dev", + "version": "v2.0.0-beta.4", "source": { "type": "git", "url": "https://github.com/amphp/websocket-client.git", - "reference": "846373b90f056c64792b9a2ec2d094d1e5f00ab8" + "reference": "f6d27ccfffb7991d1c6927dfda7ccf81a6fdf069" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/amphp/websocket-client/zipball/846373b90f056c64792b9a2ec2d094d1e5f00ab8", - "reference": "846373b90f056c64792b9a2ec2d094d1e5f00ab8", + "url": "https://api.github.com/repos/amphp/websocket-client/zipball/f6d27ccfffb7991d1c6927dfda7ccf81a6fdf069", + "reference": "f6d27ccfffb7991d1c6927dfda7ccf81a6fdf069", "shasum": "" }, "require": { "amphp/amp": "^3", "amphp/byte-stream": "^2", "amphp/http": "^2", - "amphp/http-client": "^5-dev", + "amphp/http-client": "^5", "amphp/socket": "^2", "amphp/websocket": "^2", "league/uri": "^6.8 | ^7.1", @@ -1984,12 +1984,11 @@ "amphp/http-server": "^3", "amphp/php-cs-fixer-config": "^2", "amphp/phpunit-util": "^3", - "amphp/websocket-server": "^3-dev", + "amphp/websocket-server": "^3", "phpunit/phpunit": "^9", "psalm/phar": "^5.4", "psr/log": "^1" }, - "default-branch": true, "type": "library", "autoload": { "files": [ @@ -2029,7 +2028,7 @@ ], "support": { "issues": "https://github.com/amphp/websocket-client/issues", - "source": "https://github.com/amphp/websocket-client/tree/2.x" + "source": "https://github.com/amphp/websocket-client/tree/v2.0.0-beta.4" }, "funding": [ { @@ -2037,7 +2036,7 @@ "type": "github" } ], - "time": "2023-09-09T16:09:04+00:00" + "time": "2023-10-20T03:01:02+00:00" }, { "name": "amphp/websocket-server", @@ -2517,12 +2516,12 @@ "source": { "type": "git", "url": "https://github.com/danog/MadelineProto.git", - "reference": "847bbf1cb3ae1cd4c68e3305b9da80b43e715e54" + "reference": "9a2b5a9cfaa1ea7e4333350a804351fcc565c5c5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/danog/MadelineProto/zipball/847bbf1cb3ae1cd4c68e3305b9da80b43e715e54", - "reference": "847bbf1cb3ae1cd4c68e3305b9da80b43e715e54", + "url": "https://api.github.com/repos/danog/MadelineProto/zipball/9a2b5a9cfaa1ea7e4333350a804351fcc565c5c5", + "reference": "9a2b5a9cfaa1ea7e4333350a804351fcc565c5c5", "shasum": "" }, "require": { @@ -2638,7 +2637,7 @@ "type": "github" } ], - "time": "2023-10-06T21:06:46+00:00" + "time": "2023-10-20T21:01:52+00:00" }, { "name": "danog/primemodule", @@ -3728,16 +3727,16 @@ }, { "name": "psr/http-message", - "version": "1.1", + "version": "2.0", "source": { "type": "git", "url": "https://github.com/php-fig/http-message.git", - "reference": "cb6ce4845ce34a8ad9e68117c10ee90a29919eba" + "reference": "402d35bcb92c70c026d1a6a9883f06b2ead23d71" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/http-message/zipball/cb6ce4845ce34a8ad9e68117c10ee90a29919eba", - "reference": "cb6ce4845ce34a8ad9e68117c10ee90a29919eba", + "url": "https://api.github.com/repos/php-fig/http-message/zipball/402d35bcb92c70c026d1a6a9883f06b2ead23d71", + "reference": "402d35bcb92c70c026d1a6a9883f06b2ead23d71", "shasum": "" }, "require": { @@ -3746,7 +3745,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.1.x-dev" + "dev-master": "2.0.x-dev" } }, "autoload": { @@ -3761,7 +3760,7 @@ "authors": [ { "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" + "homepage": "https://www.php-fig.org/" } ], "description": "Common interface for HTTP messages", @@ -3775,9 +3774,9 @@ "response" ], "support": { - "source": "https://github.com/php-fig/http-message/tree/1.1" + "source": "https://github.com/php-fig/http-message/tree/2.0" }, - "time": "2023-04-04T09:50:52+00:00" + "time": "2023-04-04T09:54:51+00:00" }, { "name": "psr/log", From a7c2e0d44cedcd66d500d8382bf869217140bace Mon Sep 17 00:00:00 2001 From: Alexander Pankratov Date: Fri, 20 Oct 2023 23:37:55 +0200 Subject: [PATCH 102/270] Dont remove eventHandlers on start --- src/Client.php | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/Client.php b/src/Client.php index ff82d03..1b8c727 100644 --- a/src/Client.php +++ b/src/Client.php @@ -142,11 +142,7 @@ public function startLoggedInSession(string $sessionName): void { if ($this->instances[$sessionName]->getAuthorization() === API::LOGGED_IN) { if ( - empty(EventObserver::$sessionClients[$sessionName]) - && ( - $this->instances[$sessionName]->getEventHandler() instanceof EventHandler - || $this->instances[$sessionName]->getEventHandler() instanceof \__PHP_Incomplete_Class - ) + $this->instances[$sessionName]->getEventHandler() instanceof \__PHP_Incomplete_Class ) { $this->instances[$sessionName]->unsetEventHandler(); } From fbe6a8d02d80f52267ad0384f0130d70969a7c83 Mon Sep 17 00:00:00 2001 From: Alexander Pankratov Date: Sat, 21 Oct 2023 19:37:37 +0200 Subject: [PATCH 103/270] Update madeline --- composer.lock | 44 ++++++++++++++++++++++---------------------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/composer.lock b/composer.lock index dfa3d2a..450ff7b 100644 --- a/composer.lock +++ b/composer.lock @@ -1875,16 +1875,16 @@ }, { "name": "amphp/websocket", - "version": "v2.0.1", + "version": "v2.0.2", "source": { "type": "git", "url": "https://github.com/amphp/websocket.git", - "reference": "f40de822dde0dfe4273e7d6ee4306dbc4d363d44" + "reference": "49e6e4349453e799f1db3a350d23bd0aae9725dd" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/amphp/websocket/zipball/f40de822dde0dfe4273e7d6ee4306dbc4d363d44", - "reference": "f40de822dde0dfe4273e7d6ee4306dbc4d363d44", + "url": "https://api.github.com/repos/amphp/websocket/zipball/49e6e4349453e799f1db3a350d23bd0aae9725dd", + "reference": "49e6e4349453e799f1db3a350d23bd0aae9725dd", "shasum": "" }, "require": { @@ -1944,7 +1944,7 @@ ], "support": { "issues": "https://github.com/amphp/websocket/issues", - "source": "https://github.com/amphp/websocket/tree/v2.0.1" + "source": "https://github.com/amphp/websocket/tree/v2.0.2" }, "funding": [ { @@ -1952,7 +1952,7 @@ "type": "github" } ], - "time": "2023-09-14T04:17:20+00:00" + "time": "2023-10-21T17:09:30+00:00" }, { "name": "amphp/websocket-client", @@ -2040,16 +2040,16 @@ }, { "name": "amphp/websocket-server", - "version": "v3.0.0", + "version": "v3.0.1", "source": { "type": "git", "url": "https://github.com/amphp/websocket-server.git", - "reference": "8a57456e4afc5594514923ebd1ace2e6b46b9e78" + "reference": "904902cc0e60950e10b4fb7fa3cb054f5e0c0b6a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/amphp/websocket-server/zipball/8a57456e4afc5594514923ebd1ace2e6b46b9e78", - "reference": "8a57456e4afc5594514923ebd1ace2e6b46b9e78", + "url": "https://api.github.com/repos/amphp/websocket-server/zipball/904902cc0e60950e10b4fb7fa3cb054f5e0c0b6a", + "reference": "904902cc0e60950e10b4fb7fa3cb054f5e0c0b6a", "shasum": "" }, "require": { @@ -2115,7 +2115,7 @@ ], "support": { "issues": "https://github.com/amphp/websocket-server/issues", - "source": "https://github.com/amphp/websocket-server/tree/v3.0.0" + "source": "https://github.com/amphp/websocket-server/tree/v3.0.1" }, "funding": [ { @@ -2123,7 +2123,7 @@ "type": "github" } ], - "time": "2023-09-09T15:46:35+00:00" + "time": "2023-10-21T17:10:20+00:00" }, { "name": "amphp/windows-registry", @@ -2516,12 +2516,12 @@ "source": { "type": "git", "url": "https://github.com/danog/MadelineProto.git", - "reference": "9a2b5a9cfaa1ea7e4333350a804351fcc565c5c5" + "reference": "0de810c8042f35f39d26e4d173942d847b005423" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/danog/MadelineProto/zipball/9a2b5a9cfaa1ea7e4333350a804351fcc565c5c5", - "reference": "9a2b5a9cfaa1ea7e4333350a804351fcc565c5c5", + "url": "https://api.github.com/repos/danog/MadelineProto/zipball/0de810c8042f35f39d26e4d173942d847b005423", + "reference": "0de810c8042f35f39d26e4d173942d847b005423", "shasum": "" }, "require": { @@ -2637,7 +2637,7 @@ "type": "github" } ], - "time": "2023-10-20T21:01:52+00:00" + "time": "2023-10-21T17:27:13+00:00" }, { "name": "danog/primemodule", @@ -3562,16 +3562,16 @@ }, { "name": "phpseclib/phpseclib", - "version": "3.0.23", + "version": "3.0.33", "source": { "type": "git", "url": "https://github.com/phpseclib/phpseclib.git", - "reference": "866cc78fbd82462ffd880e3f65692afe928bed50" + "reference": "33fa69b2514a61138dd48e7a49f99445711e0ad0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpseclib/phpseclib/zipball/866cc78fbd82462ffd880e3f65692afe928bed50", - "reference": "866cc78fbd82462ffd880e3f65692afe928bed50", + "url": "https://api.github.com/repos/phpseclib/phpseclib/zipball/33fa69b2514a61138dd48e7a49f99445711e0ad0", + "reference": "33fa69b2514a61138dd48e7a49f99445711e0ad0", "shasum": "" }, "require": { @@ -3652,7 +3652,7 @@ ], "support": { "issues": "https://github.com/phpseclib/phpseclib/issues", - "source": "https://github.com/phpseclib/phpseclib/tree/3.0.23" + "source": "https://github.com/phpseclib/phpseclib/tree/3.0.33" }, "funding": [ { @@ -3668,7 +3668,7 @@ "type": "tidelift" } ], - "time": "2023-09-18T17:22:01+00:00" + "time": "2023-10-21T14:00:39+00:00" }, { "name": "psr/http-factory", From 4912c8b48b1ea4120cb8bd0cdbe6c936a326ce62 Mon Sep 17 00:00:00 2001 From: Alexander Pankratov Date: Mon, 23 Oct 2023 17:27:52 +0200 Subject: [PATCH 104/270] Update madeline --- composer.lock | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/composer.lock b/composer.lock index 450ff7b..f025cf5 100644 --- a/composer.lock +++ b/composer.lock @@ -1690,16 +1690,16 @@ }, { "name": "amphp/sql", - "version": "v2.0.0-beta.4", + "version": "v2.0.0-beta.5", "source": { "type": "git", "url": "https://github.com/amphp/sql.git", - "reference": "2eeb178acaf0d83191d3cf9b397a79dfc50d9b5f" + "reference": "2cd168c4a22925c24b74259ecf98ce39f5a73e50" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/amphp/sql/zipball/2eeb178acaf0d83191d3cf9b397a79dfc50d9b5f", - "reference": "2eeb178acaf0d83191d3cf9b397a79dfc50d9b5f", + "url": "https://api.github.com/repos/amphp/sql/zipball/2cd168c4a22925c24b74259ecf98ce39f5a73e50", + "reference": "2cd168c4a22925c24b74259ecf98ce39f5a73e50", "shasum": "" }, "require": { @@ -1732,7 +1732,7 @@ ], "support": { "issues": "https://github.com/amphp/sql/issues", - "source": "https://github.com/amphp/sql/tree/v2.0.0-beta.4" + "source": "https://github.com/amphp/sql/tree/v2.0.0-beta.5" }, "funding": [ { @@ -1740,7 +1740,7 @@ "type": "github" } ], - "time": "2023-01-16T03:38:22+00:00" + "time": "2023-10-22T03:09:29+00:00" }, { "name": "amphp/sql-common", @@ -2516,12 +2516,12 @@ "source": { "type": "git", "url": "https://github.com/danog/MadelineProto.git", - "reference": "0de810c8042f35f39d26e4d173942d847b005423" + "reference": "94e3b43834472ce6c52713bff17cfb82d3937828" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/danog/MadelineProto/zipball/0de810c8042f35f39d26e4d173942d847b005423", - "reference": "0de810c8042f35f39d26e4d173942d847b005423", + "url": "https://api.github.com/repos/danog/MadelineProto/zipball/94e3b43834472ce6c52713bff17cfb82d3937828", + "reference": "94e3b43834472ce6c52713bff17cfb82d3937828", "shasum": "" }, "require": { @@ -2557,7 +2557,7 @@ "phpseclib/phpseclib": "^3.0.22", "psr/http-factory": "^1.0", "psr/log": "^3", - "revolt/event-loop": "^1.0.3", + "revolt/event-loop": "^1.0.4", "symfony/polyfill-mbstring": "*", "webmozart/assert": "^1.11" }, @@ -2637,7 +2637,7 @@ "type": "github" } ], - "time": "2023-10-21T17:27:13+00:00" + "time": "2023-10-23T15:26:21+00:00" }, { "name": "danog/primemodule", @@ -3830,16 +3830,16 @@ }, { "name": "revolt/event-loop", - "version": "v1.0.3", + "version": "v1.0.4", "source": { "type": "git", "url": "https://github.com/revoltphp/event-loop.git", - "reference": "0fe2d31e1cddd26664e55d383d3d5da613334c03" + "reference": "40292c18e53d9a1b7e6c807f4fda5908552e1ba5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/revoltphp/event-loop/zipball/0fe2d31e1cddd26664e55d383d3d5da613334c03", - "reference": "0fe2d31e1cddd26664e55d383d3d5da613334c03", + "url": "https://api.github.com/repos/revoltphp/event-loop/zipball/40292c18e53d9a1b7e6c807f4fda5908552e1ba5", + "reference": "40292c18e53d9a1b7e6c807f4fda5908552e1ba5", "shasum": "" }, "require": { @@ -3896,9 +3896,9 @@ ], "support": { "issues": "https://github.com/revoltphp/event-loop/issues", - "source": "https://github.com/revoltphp/event-loop/tree/v1.0.3" + "source": "https://github.com/revoltphp/event-loop/tree/v1.0.4" }, - "time": "2023-07-29T17:07:12+00:00" + "time": "2023-10-22T03:19:00+00:00" }, { "name": "symfony/polyfill-ctype", From 66c9dbd08ad6b4272f75745e349793294c744d25 Mon Sep 17 00:00:00 2001 From: Alexander Pankratov Date: Tue, 24 Oct 2023 23:51:29 +0200 Subject: [PATCH 105/270] Update madeline --- composer.lock | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/composer.lock b/composer.lock index f025cf5..5458c4e 100644 --- a/composer.lock +++ b/composer.lock @@ -2516,12 +2516,12 @@ "source": { "type": "git", "url": "https://github.com/danog/MadelineProto.git", - "reference": "94e3b43834472ce6c52713bff17cfb82d3937828" + "reference": "6129bb1f6cb8d2669193a0f1690e43f6a71c5d8f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/danog/MadelineProto/zipball/94e3b43834472ce6c52713bff17cfb82d3937828", - "reference": "94e3b43834472ce6c52713bff17cfb82d3937828", + "url": "https://api.github.com/repos/danog/MadelineProto/zipball/6129bb1f6cb8d2669193a0f1690e43f6a71c5d8f", + "reference": "6129bb1f6cb8d2669193a0f1690e43f6a71c5d8f", "shasum": "" }, "require": { @@ -2637,7 +2637,7 @@ "type": "github" } ], - "time": "2023-10-23T15:26:21+00:00" + "time": "2023-10-24T21:50:53+00:00" }, { "name": "danog/primemodule", From 24ebeed9ec81856cce3828cee307bc7c68e7ad77 Mon Sep 17 00:00:00 2001 From: Alexander Pankratov Date: Wed, 25 Oct 2023 00:11:34 +0200 Subject: [PATCH 106/270] Feat: control file reference cache --- .env.docker.example | 2 ++ .env.example | 2 ++ config.php | 1 + 3 files changed, 5 insertions(+) diff --git a/.env.docker.example b/.env.docker.example index 5239205..6fec5f5 100644 --- a/.env.docker.example +++ b/.env.docker.example @@ -51,6 +51,8 @@ DB_IDLE_TIMEOUT=60 DB_CACHE_TTL="+5 minutes" # Enable to add cache info about users to database. Disable if you only read data from channels. DB_ENABLE_MIN_DATABASE=0 +# Enable file metadata cache +DB_ENABLE_FILE_REFERENCE_DATABASE=0 # HEALTHCHECK # If server stops responding to requests it will be stoped diff --git a/.env.example b/.env.example index 7a67e77..3805f8f 100644 --- a/.env.example +++ b/.env.example @@ -50,6 +50,8 @@ DB_IDLE_TIMEOUT=60 DB_CACHE_TTL="+5 minutes" # Enable to add cache info about users to database. Disable if you only read data from channels. DB_ENABLE_MIN_DATABASE=0 +# Enable file metadata cache +DB_ENABLE_FILE_REFERENCE_DATABASE=0 # HEALTHCHECK # If server stops responding to requests it will be stoped diff --git a/config.php b/config.php index ca9a61c..35eb070 100644 --- a/config.php +++ b/config.php @@ -30,6 +30,7 @@ ], 'db' => [ 'enable_min_db' => (bool)filter_var((string)getenv('DB_ENABLE_MIN_DATABASE'), FILTER_VALIDATE_BOOL), + 'enable_file_reference_db' => (bool)filter_var((string)getenv('DB_ENABLE_FILE_REFERENCE_DATABASE'), FILTER_VALIDATE_BOOL), 'type' => (string)getenv('DB_TYPE'), getenv('DB_TYPE') => [ 'uri' => 'tcp://' . getenv('DB_HOST') . ':' . (int)getenv('DB_PORT'), From 1deb477738456d73e1724e8c90592a55dde9ccfa Mon Sep 17 00:00:00 2001 From: Alexander Pankratov Date: Wed, 25 Oct 2023 00:18:07 +0200 Subject: [PATCH 107/270] Reduce db writes --- config.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config.php b/config.php index 35eb070..3153632 100644 --- a/config.php +++ b/config.php @@ -26,7 +26,7 @@ 'max_media_socket_count' => 10 ], 'serialization' => [ - 'interval' => 60, + 'interval' => 600, ], 'db' => [ 'enable_min_db' => (bool)filter_var((string)getenv('DB_ENABLE_MIN_DATABASE'), FILTER_VALIDATE_BOOL), From e0d38b51487d40f2e4571f3a4ac1e28325e97155 Mon Sep 17 00:00:00 2001 From: Alexander Pankratov Date: Wed, 25 Oct 2023 00:22:12 +0200 Subject: [PATCH 108/270] Upgrade mysql --- docker-compose.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker-compose.yml b/docker-compose.yml index 3b91e48..cc95abf 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -23,7 +23,7 @@ services: command: - "-s=session" mysql: - image: mariadb:11.0 + image: mariadb:11.1 restart: unless-stopped ports: - "127.0.0.1:9507:3306" From 334c366635654814d7cbf4c86548260a5594c0dd Mon Sep 17 00:00:00 2001 From: Alexander Pankratov Date: Thu, 16 Nov 2023 11:24:04 +0100 Subject: [PATCH 109/270] Upgrade madelineProto --- composer.lock | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/composer.lock b/composer.lock index 5458c4e..ab293d9 100644 --- a/composer.lock +++ b/composer.lock @@ -2516,12 +2516,12 @@ "source": { "type": "git", "url": "https://github.com/danog/MadelineProto.git", - "reference": "6129bb1f6cb8d2669193a0f1690e43f6a71c5d8f" + "reference": "16d1115bcc6eff6a6e717b5bfcb09868e9d420f7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/danog/MadelineProto/zipball/6129bb1f6cb8d2669193a0f1690e43f6a71c5d8f", - "reference": "6129bb1f6cb8d2669193a0f1690e43f6a71c5d8f", + "url": "https://api.github.com/repos/danog/MadelineProto/zipball/16d1115bcc6eff6a6e717b5bfcb09868e9d420f7", + "reference": "16d1115bcc6eff6a6e717b5bfcb09868e9d420f7", "shasum": "" }, "require": { @@ -2637,7 +2637,7 @@ "type": "github" } ], - "time": "2023-10-24T21:50:53+00:00" + "time": "2023-11-16T10:23:16+00:00" }, { "name": "danog/primemodule", @@ -3163,16 +3163,16 @@ }, { "name": "monolog/monolog", - "version": "3.4.0", + "version": "3.5.0", "source": { "type": "git", "url": "https://github.com/Seldaek/monolog.git", - "reference": "e2392369686d420ca32df3803de28b5d6f76867d" + "reference": "c915e2634718dbc8a4a15c61b0e62e7a44e14448" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Seldaek/monolog/zipball/e2392369686d420ca32df3803de28b5d6f76867d", - "reference": "e2392369686d420ca32df3803de28b5d6f76867d", + "url": "https://api.github.com/repos/Seldaek/monolog/zipball/c915e2634718dbc8a4a15c61b0e62e7a44e14448", + "reference": "c915e2634718dbc8a4a15c61b0e62e7a44e14448", "shasum": "" }, "require": { @@ -3248,7 +3248,7 @@ ], "support": { "issues": "https://github.com/Seldaek/monolog/issues", - "source": "https://github.com/Seldaek/monolog/tree/3.4.0" + "source": "https://github.com/Seldaek/monolog/tree/3.5.0" }, "funding": [ { @@ -3260,7 +3260,7 @@ "type": "tidelift" } ], - "time": "2023-06-21T08:46:11+00:00" + "time": "2023-10-27T15:32:31+00:00" }, { "name": "nikic/fast-route", @@ -3487,16 +3487,16 @@ }, { "name": "phpoption/phpoption", - "version": "1.9.1", + "version": "1.9.2", "source": { "type": "git", "url": "https://github.com/schmittjoh/php-option.git", - "reference": "dd3a383e599f49777d8b628dadbb90cae435b87e" + "reference": "80735db690fe4fc5c76dfa7f9b770634285fa820" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/schmittjoh/php-option/zipball/dd3a383e599f49777d8b628dadbb90cae435b87e", - "reference": "dd3a383e599f49777d8b628dadbb90cae435b87e", + "url": "https://api.github.com/repos/schmittjoh/php-option/zipball/80735db690fe4fc5c76dfa7f9b770634285fa820", + "reference": "80735db690fe4fc5c76dfa7f9b770634285fa820", "shasum": "" }, "require": { @@ -3504,7 +3504,7 @@ }, "require-dev": { "bamarni/composer-bin-plugin": "^1.8.2", - "phpunit/phpunit": "^8.5.32 || ^9.6.3 || ^10.0.12" + "phpunit/phpunit": "^8.5.34 || ^9.6.13 || ^10.4.2" }, "type": "library", "extra": { @@ -3546,7 +3546,7 @@ ], "support": { "issues": "https://github.com/schmittjoh/php-option/issues", - "source": "https://github.com/schmittjoh/php-option/tree/1.9.1" + "source": "https://github.com/schmittjoh/php-option/tree/1.9.2" }, "funding": [ { @@ -3558,7 +3558,7 @@ "type": "tidelift" } ], - "time": "2023-02-25T19:38:58+00:00" + "time": "2023-11-12T21:59:55+00:00" }, { "name": "phpseclib/phpseclib", From d2ae22ab80da0cec1231b9ea30f0c1069c3ed3c5 Mon Sep 17 00:00:00 2001 From: Alexander Pankratov Date: Fri, 17 Nov 2023 23:18:55 +0100 Subject: [PATCH 110/270] Upgrade madelineProto --- composer.lock | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/composer.lock b/composer.lock index ab293d9..836e112 100644 --- a/composer.lock +++ b/composer.lock @@ -2516,12 +2516,12 @@ "source": { "type": "git", "url": "https://github.com/danog/MadelineProto.git", - "reference": "16d1115bcc6eff6a6e717b5bfcb09868e9d420f7" + "reference": "6200e8613a8c55287e99599db67677205cfc3b4d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/danog/MadelineProto/zipball/16d1115bcc6eff6a6e717b5bfcb09868e9d420f7", - "reference": "16d1115bcc6eff6a6e717b5bfcb09868e9d420f7", + "url": "https://api.github.com/repos/danog/MadelineProto/zipball/6200e8613a8c55287e99599db67677205cfc3b4d", + "reference": "6200e8613a8c55287e99599db67677205cfc3b4d", "shasum": "" }, "require": { @@ -2637,7 +2637,7 @@ "type": "github" } ], - "time": "2023-11-16T10:23:16+00:00" + "time": "2023-11-17T22:18:17+00:00" }, { "name": "danog/primemodule", From df5a7b8fef2de8e8385547a7c4e0363eeea0a0da Mon Sep 17 00:00:00 2001 From: Alexander Pankratov Date: Sun, 19 Nov 2023 18:27:38 +0100 Subject: [PATCH 111/270] New database prefixes --- composer.lock | 48 ++++++++++++++++++++++++------------------------ src/Client.php | 15 ++++++++------- 2 files changed, 32 insertions(+), 31 deletions(-) diff --git a/composer.lock b/composer.lock index 836e112..faecd83 100644 --- a/composer.lock +++ b/composer.lock @@ -89,16 +89,16 @@ }, { "name": "amphp/byte-stream", - "version": "v2.0.2", + "version": "v2.1.0", "source": { "type": "git", "url": "https://github.com/amphp/byte-stream.git", - "reference": "408a3b4fc4f4c7604575dc8704f18c1bd91c3ceb" + "reference": "0a4b0e80dad92c75e6131f8ad253919211540338" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/amphp/byte-stream/zipball/408a3b4fc4f4c7604575dc8704f18c1bd91c3ceb", - "reference": "408a3b4fc4f4c7604575dc8704f18c1bd91c3ceb", + "url": "https://api.github.com/repos/amphp/byte-stream/zipball/0a4b0e80dad92c75e6131f8ad253919211540338", + "reference": "0a4b0e80dad92c75e6131f8ad253919211540338", "shasum": "" }, "require": { @@ -152,7 +152,7 @@ ], "support": { "issues": "https://github.com/amphp/byte-stream/issues", - "source": "https://github.com/amphp/byte-stream/tree/v2.0.2" + "source": "https://github.com/amphp/byte-stream/tree/v2.1.0" }, "funding": [ { @@ -160,7 +160,7 @@ "type": "github" } ], - "time": "2023-09-01T04:41:26+00:00" + "time": "2023-11-19T14:34:16+00:00" }, { "name": "amphp/cache", @@ -229,16 +229,16 @@ }, { "name": "amphp/dns", - "version": "v2.0.1", + "version": "v2.1.0", "source": { "type": "git", "url": "https://github.com/amphp/dns.git", - "reference": "e42876aa8306c754abd1b3e71a44e13066909fd1" + "reference": "c3b518f321f26e786554480de580f06b9f34d1cd" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/amphp/dns/zipball/e42876aa8306c754abd1b3e71a44e13066909fd1", - "reference": "e42876aa8306c754abd1b3e71a44e13066909fd1", + "url": "https://api.github.com/repos/amphp/dns/zipball/c3b518f321f26e786554480de580f06b9f34d1cd", + "reference": "c3b518f321f26e786554480de580f06b9f34d1cd", "shasum": "" }, "require": { @@ -305,7 +305,7 @@ ], "support": { "issues": "https://github.com/amphp/dns/issues", - "source": "https://github.com/amphp/dns/tree/v2.0.1" + "source": "https://github.com/amphp/dns/tree/v2.1.0" }, "funding": [ { @@ -313,7 +313,7 @@ "type": "github" } ], - "time": "2023-01-21T16:00:09+00:00" + "time": "2023-11-18T15:49:57+00:00" }, { "name": "amphp/file", @@ -2516,12 +2516,12 @@ "source": { "type": "git", "url": "https://github.com/danog/MadelineProto.git", - "reference": "6200e8613a8c55287e99599db67677205cfc3b4d" + "reference": "4ddfc859ee3837b8f32c53a57e7ed8d94b39c094" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/danog/MadelineProto/zipball/6200e8613a8c55287e99599db67677205cfc3b4d", - "reference": "6200e8613a8c55287e99599db67677205cfc3b4d", + "url": "https://api.github.com/repos/danog/MadelineProto/zipball/4ddfc859ee3837b8f32c53a57e7ed8d94b39c094", + "reference": "4ddfc859ee3837b8f32c53a57e7ed8d94b39c094", "shasum": "" }, "require": { @@ -2557,7 +2557,7 @@ "phpseclib/phpseclib": "^3.0.22", "psr/http-factory": "^1.0", "psr/log": "^3", - "revolt/event-loop": "^1.0.4", + "revolt/event-loop": "^1.0.5", "symfony/polyfill-mbstring": "*", "webmozart/assert": "^1.11" }, @@ -2637,7 +2637,7 @@ "type": "github" } ], - "time": "2023-11-17T22:18:17+00:00" + "time": "2023-11-19T17:54:55+00:00" }, { "name": "danog/primemodule", @@ -3830,16 +3830,16 @@ }, { "name": "revolt/event-loop", - "version": "v1.0.4", + "version": "v1.0.5", "source": { "type": "git", "url": "https://github.com/revoltphp/event-loop.git", - "reference": "40292c18e53d9a1b7e6c807f4fda5908552e1ba5" + "reference": "fce6063869513de56f639aa522b2ef2fedbf8d73" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/revoltphp/event-loop/zipball/40292c18e53d9a1b7e6c807f4fda5908552e1ba5", - "reference": "40292c18e53d9a1b7e6c807f4fda5908552e1ba5", + "url": "https://api.github.com/repos/revoltphp/event-loop/zipball/fce6063869513de56f639aa522b2ef2fedbf8d73", + "reference": "fce6063869513de56f639aa522b2ef2fedbf8d73", "shasum": "" }, "require": { @@ -3849,7 +3849,7 @@ "ext-json": "*", "jetbrains/phpstorm-stubs": "^2019.3", "phpunit/phpunit": "^9", - "psalm/phar": "^4.7" + "psalm/phar": "^5.15" }, "type": "library", "extra": { @@ -3896,9 +3896,9 @@ ], "support": { "issues": "https://github.com/revoltphp/event-loop/issues", - "source": "https://github.com/revoltphp/event-loop/tree/v1.0.4" + "source": "https://github.com/revoltphp/event-loop/tree/v1.0.5" }, - "time": "2023-10-22T03:19:00+00:00" + "time": "2023-11-19T14:45:35+00:00" }, { "name": "symfony/polyfill-ctype", diff --git a/src/Client.php b/src/Client.php index 1b8c727..9385c57 100644 --- a/src/Client.php +++ b/src/Client.php @@ -62,7 +62,7 @@ public function addSession(string $session, array $settings = []): API Files::getSessionSettings($session), ); - $settingsObject = self::getSettingsFromArray($settings); + $settingsObject = self::getSettingsFromArray($session, $settings); $instance = new API($file, $settingsObject); $instance->updateSettings($settingsObject); @@ -159,8 +159,7 @@ public static function getWrapper(API $madelineProto): APIWrapper return $wrapper; } - private static function getSettingsFromArray(array $settings, SettingsAbstract $settingsObject = new Settings()): SettingsAbstract { - + private static function getSettingsFromArray(string $session, array $settings, SettingsAbstract $settingsObject = new Settings()): SettingsAbstract { foreach ($settings as $key => $value) { if (is_array($value)) { if ($key === 'db' && isset($value['type'])) { @@ -171,10 +170,12 @@ private static function getSettingsFromArray(array $settings, SettingsAbstract $ 'redis' => new Settings\Database\Redis(), }; $settingsObject->setDb($type); - if ($value['type'] === 'memory') { - self::getSettingsFromArray([], $type); + + if ($type instanceof Settings\Database\Memory) { + self::getSettingsFromArray($session, [], $type); } else { - self::getSettingsFromArray($value[$value['type']], $type); + $type->setEphemeralFilesystemPrefix($session); + self::getSettingsFromArray($session, $value[$value['type']], $type); } unset($value[$value['type']], $value['type'],); @@ -184,7 +185,7 @@ private static function getSettingsFromArray(array $settings, SettingsAbstract $ } $method = 'get' . ucfirst(str_replace('_', '', ucwords($key, '_'))); - self::getSettingsFromArray($value, $settingsObject->$method()); + self::getSettingsFromArray($session, $value, $settingsObject->$method()); } else { $method = 'set' . ucfirst(str_replace('_', '', ucwords($key, '_'))); $settingsObject->$method($value); From ca1504afbc70cb1c17de28c6cf4d5db452b72581 Mon Sep 17 00:00:00 2001 From: Alexander Pankratov Date: Sun, 19 Nov 2023 19:04:07 +0100 Subject: [PATCH 112/270] Reduce floodwait timeout --- config.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config.php b/config.php index 3153632..c866d32 100644 --- a/config.php +++ b/config.php @@ -19,7 +19,7 @@ 'level' => (int)getenv('LOGGER_LEVEL'), // Logging level, available logging levels are: ULTRA_VERBOSE - 5, VERBOSE - 4 , NOTICE - 3, WARNING - 2, ERROR - 1, FATAL_ERROR - 0. ], 'rpc' => [ - 'flood_timeout' => 10, + 'flood_timeout' => 5, 'rpc_drop_timeout' => 11, ], 'connection' => [ From 6e237c4da527dc8e4a042323c12fde6d7f9be5e3 Mon Sep 17 00:00:00 2001 From: Alexander Pankratov Date: Mon, 20 Nov 2023 11:51:59 +0100 Subject: [PATCH 113/270] Add LOGGED_OUT to session list statuses --- src/MadelineProtoExtensions/SystemApiExtensions.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/MadelineProtoExtensions/SystemApiExtensions.php b/src/MadelineProtoExtensions/SystemApiExtensions.php index abb38aa..e806398 100644 --- a/src/MadelineProtoExtensions/SystemApiExtensions.php +++ b/src/MadelineProtoExtensions/SystemApiExtensions.php @@ -65,17 +65,17 @@ public function getSessionList(): array case API::WAITING_CODE: $status = 'WAITING_CODE'; break; - case API::WAITING_PASSWORD: - $status = 'WAITING_PASSWORD'; - break; case API::WAITING_SIGNUP: $status = 'WAITING_SIGNUP'; break; + case API::WAITING_PASSWORD: + $status = 'WAITING_PASSWORD'; + break; case API::LOGGED_IN: $status = 'LOGGED_IN'; break; - case null: - $status = 'LOADING'; + case API::LOGGED_OUT: + $status = 'LOGGED_OUT'; break; default: $status = $authorized; From 0ff111ed23558d6830eb9181c67bcebdb7085123 Mon Sep 17 00:00:00 2001 From: Alexander Pankratov Date: Sun, 3 Dec 2023 03:55:16 +0100 Subject: [PATCH 114/270] Update madelineProto --- composer.lock | 81 ++++++++++++++++++++++++++------------------------- 1 file changed, 41 insertions(+), 40 deletions(-) diff --git a/composer.lock b/composer.lock index faecd83..00e5b57 100644 --- a/composer.lock +++ b/composer.lock @@ -1115,16 +1115,16 @@ }, { "name": "amphp/parallel", - "version": "v2.2.2", + "version": "v2.2.4", "source": { "type": "git", "url": "https://github.com/amphp/parallel.git", - "reference": "f54bb4090670397544f74e14a1e650bf2cfd853b" + "reference": "8b8f33a742c2ba63a8bfff664f5836c26f1996ed" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/amphp/parallel/zipball/f54bb4090670397544f74e14a1e650bf2cfd853b", - "reference": "f54bb4090670397544f74e14a1e650bf2cfd853b", + "url": "https://api.github.com/repos/amphp/parallel/zipball/8b8f33a742c2ba63a8bfff664f5836c26f1996ed", + "reference": "8b8f33a742c2ba63a8bfff664f5836c26f1996ed", "shasum": "" }, "require": { @@ -1186,7 +1186,7 @@ ], "support": { "issues": "https://github.com/amphp/parallel/issues", - "source": "https://github.com/amphp/parallel/tree/v2.2.2" + "source": "https://github.com/amphp/parallel/tree/v2.2.4" }, "funding": [ { @@ -1194,7 +1194,7 @@ "type": "github" } ], - "time": "2023-08-30T17:43:42+00:00" + "time": "2023-11-29T04:21:30+00:00" }, { "name": "amphp/parser", @@ -2516,12 +2516,12 @@ "source": { "type": "git", "url": "https://github.com/danog/MadelineProto.git", - "reference": "4ddfc859ee3837b8f32c53a57e7ed8d94b39c094" + "reference": "4ca7151fc94c49e7f8bef8100204225d58e4deac" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/danog/MadelineProto/zipball/4ddfc859ee3837b8f32c53a57e7ed8d94b39c094", - "reference": "4ddfc859ee3837b8f32c53a57e7ed8d94b39c094", + "url": "https://api.github.com/repos/danog/MadelineProto/zipball/4ca7151fc94c49e7f8bef8100204225d58e4deac", + "reference": "4ca7151fc94c49e7f8bef8100204225d58e4deac", "shasum": "" }, "require": { @@ -2569,6 +2569,7 @@ "amphp/http-server": "^3", "amphp/phpunit-util": "^3", "bamarni/composer-bin-plugin": "1.8.2", + "brianium/paratest": "^6.11", "danog/phpdoc": "^0.1.7", "dg/bypass-finals": "dev-master", "ext-ctype": "*", @@ -2637,7 +2638,7 @@ "type": "github" } ], - "time": "2023-11-19T17:54:55+00:00" + "time": "2023-12-03T02:54:14+00:00" }, { "name": "danog/primemodule", @@ -2907,16 +2908,16 @@ }, { "name": "league/uri", - "version": "7.3.0", + "version": "7.4.0", "source": { "type": "git", "url": "https://github.com/thephpleague/uri.git", - "reference": "36743c3961bb82bf93da91917b6bced0358a8d45" + "reference": "bf414ba956d902f5d98bf9385fcf63954f09dce5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thephpleague/uri/zipball/36743c3961bb82bf93da91917b6bced0358a8d45", - "reference": "36743c3961bb82bf93da91917b6bced0358a8d45", + "url": "https://api.github.com/repos/thephpleague/uri/zipball/bf414ba956d902f5d98bf9385fcf63954f09dce5", + "reference": "bf414ba956d902f5d98bf9385fcf63954f09dce5", "shasum": "" }, "require": { @@ -2985,7 +2986,7 @@ "docs": "https://uri.thephpleague.com", "forum": "https://thephpleague.slack.com", "issues": "https://github.com/thephpleague/uri-src/issues", - "source": "https://github.com/thephpleague/uri/tree/7.3.0" + "source": "https://github.com/thephpleague/uri/tree/7.4.0" }, "funding": [ { @@ -2993,20 +2994,20 @@ "type": "github" } ], - "time": "2023-09-09T17:21:43+00:00" + "time": "2023-12-01T06:24:25+00:00" }, { "name": "league/uri-components", - "version": "7.3.0", + "version": "7.4.0", "source": { "type": "git", "url": "https://github.com/thephpleague/uri-components.git", - "reference": "a9d155fad59d1d8dedf84d028bc166a1d76568bc" + "reference": "9b710019639c1a37692c86159f134a8a6c11de0f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thephpleague/uri-components/zipball/a9d155fad59d1d8dedf84d028bc166a1d76568bc", - "reference": "a9d155fad59d1d8dedf84d028bc166a1d76568bc", + "url": "https://api.github.com/repos/thephpleague/uri-components/zipball/9b710019639c1a37692c86159f134a8a6c11de0f", + "reference": "9b710019639c1a37692c86159f134a8a6c11de0f", "shasum": "" }, "require": { @@ -3067,7 +3068,7 @@ "docs": "https://uri.thephpleague.com", "forum": "https://thephpleague.slack.com", "issues": "https://github.com/thephpleague/uri-src/issues", - "source": "https://github.com/thephpleague/uri-components/tree/7.3.0" + "source": "https://github.com/thephpleague/uri-components/tree/7.4.0" }, "funding": [ { @@ -3075,20 +3076,20 @@ "type": "github" } ], - "time": "2023-09-09T17:21:43+00:00" + "time": "2023-12-01T06:24:25+00:00" }, { "name": "league/uri-interfaces", - "version": "7.3.0", + "version": "7.4.0", "source": { "type": "git", "url": "https://github.com/thephpleague/uri-interfaces.git", - "reference": "c409b60ed2245ff94c965a8c798a60166db53361" + "reference": "bd8c487ec236930f7bbc42b8d374fa882fbba0f3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thephpleague/uri-interfaces/zipball/c409b60ed2245ff94c965a8c798a60166db53361", - "reference": "c409b60ed2245ff94c965a8c798a60166db53361", + "url": "https://api.github.com/repos/thephpleague/uri-interfaces/zipball/bd8c487ec236930f7bbc42b8d374fa882fbba0f3", + "reference": "bd8c487ec236930f7bbc42b8d374fa882fbba0f3", "shasum": "" }, "require": { @@ -3151,7 +3152,7 @@ "docs": "https://uri.thephpleague.com", "forum": "https://thephpleague.slack.com", "issues": "https://github.com/thephpleague/uri-src/issues", - "source": "https://github.com/thephpleague/uri-interfaces/tree/7.3.0" + "source": "https://github.com/thephpleague/uri-interfaces/tree/7.4.0" }, "funding": [ { @@ -3159,7 +3160,7 @@ "type": "github" } ], - "time": "2023-09-09T17:21:43+00:00" + "time": "2023-11-24T15:40:42+00:00" }, { "name": "monolog/monolog", @@ -3562,16 +3563,16 @@ }, { "name": "phpseclib/phpseclib", - "version": "3.0.33", + "version": "3.0.34", "source": { "type": "git", "url": "https://github.com/phpseclib/phpseclib.git", - "reference": "33fa69b2514a61138dd48e7a49f99445711e0ad0" + "reference": "56c79f16a6ae17e42089c06a2144467acc35348a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpseclib/phpseclib/zipball/33fa69b2514a61138dd48e7a49f99445711e0ad0", - "reference": "33fa69b2514a61138dd48e7a49f99445711e0ad0", + "url": "https://api.github.com/repos/phpseclib/phpseclib/zipball/56c79f16a6ae17e42089c06a2144467acc35348a", + "reference": "56c79f16a6ae17e42089c06a2144467acc35348a", "shasum": "" }, "require": { @@ -3652,7 +3653,7 @@ ], "support": { "issues": "https://github.com/phpseclib/phpseclib/issues", - "source": "https://github.com/phpseclib/phpseclib/tree/3.0.33" + "source": "https://github.com/phpseclib/phpseclib/tree/3.0.34" }, "funding": [ { @@ -3668,7 +3669,7 @@ "type": "tidelift" } ], - "time": "2023-10-21T14:00:39+00:00" + "time": "2023-11-27T11:13:31+00:00" }, { "name": "psr/http-factory", @@ -3830,16 +3831,16 @@ }, { "name": "revolt/event-loop", - "version": "v1.0.5", + "version": "v1.0.6", "source": { "type": "git", "url": "https://github.com/revoltphp/event-loop.git", - "reference": "fce6063869513de56f639aa522b2ef2fedbf8d73" + "reference": "25de49af7223ba039f64da4ae9a28ec2d10d0254" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/revoltphp/event-loop/zipball/fce6063869513de56f639aa522b2ef2fedbf8d73", - "reference": "fce6063869513de56f639aa522b2ef2fedbf8d73", + "url": "https://api.github.com/repos/revoltphp/event-loop/zipball/25de49af7223ba039f64da4ae9a28ec2d10d0254", + "reference": "25de49af7223ba039f64da4ae9a28ec2d10d0254", "shasum": "" }, "require": { @@ -3896,9 +3897,9 @@ ], "support": { "issues": "https://github.com/revoltphp/event-loop/issues", - "source": "https://github.com/revoltphp/event-loop/tree/v1.0.5" + "source": "https://github.com/revoltphp/event-loop/tree/v1.0.6" }, - "time": "2023-11-19T14:45:35+00:00" + "time": "2023-11-30T05:34:44+00:00" }, { "name": "symfony/polyfill-ctype", From 8ed4fe69fabbef557a677388f14f12772e55e072 Mon Sep 17 00:00:00 2001 From: Alexander Pankratov Date: Mon, 4 Dec 2023 02:23:29 +0100 Subject: [PATCH 115/270] Upgrade to php-8.3 in Docker --- Dockerfile | 6 +++--- composer.lock | 8 ++++---- docker-compose.yml | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Dockerfile b/Dockerfile index 15ccf88..043ed94 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,10 +1,10 @@ -FROM php:8.2-cli +FROM php:8.3-cli RUN apt-get update && apt-get upgrade -y RUN true \ # Install main extension - && apt-get install procps git zip vim libzip-dev libgmp-dev libevent-dev libssl-dev libnghttp2-dev libffi-dev -y \ - && docker-php-ext-install -j$(nproc) sockets zip gmp pcntl bcmath ffi mysqli pdo pdo_mysql \ + && apt-get install procps git zip vim libzip-dev libgmp-dev libevent-dev libssl-dev libnghttp2-dev libffi-dev libicu-dev libonig-dev libxml2-dev libpng-dev -y \ + && docker-php-ext-install -j$(nproc) sockets bcmath mysqli pdo_mysql pcntl ffi intl gmp zip gd \ # Install additional extension && mkdir -p /usr/src/php/ext/ && cd /usr/src/php/ext/ \ && pecl bundle ev-beta && pecl bundle eio-beta \ diff --git a/composer.lock b/composer.lock index 00e5b57..da42d73 100644 --- a/composer.lock +++ b/composer.lock @@ -2516,12 +2516,12 @@ "source": { "type": "git", "url": "https://github.com/danog/MadelineProto.git", - "reference": "4ca7151fc94c49e7f8bef8100204225d58e4deac" + "reference": "9420c1f1a3ad31eb2860e0475bedc1cee12709ec" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/danog/MadelineProto/zipball/4ca7151fc94c49e7f8bef8100204225d58e4deac", - "reference": "4ca7151fc94c49e7f8bef8100204225d58e4deac", + "url": "https://api.github.com/repos/danog/MadelineProto/zipball/9420c1f1a3ad31eb2860e0475bedc1cee12709ec", + "reference": "9420c1f1a3ad31eb2860e0475bedc1cee12709ec", "shasum": "" }, "require": { @@ -2638,7 +2638,7 @@ "type": "github" } ], - "time": "2023-12-03T02:54:14+00:00" + "time": "2023-12-04T01:11:10+00:00" }, { "name": "danog/primemodule", diff --git a/docker-compose.yml b/docker-compose.yml index cc95abf..e4dd4ee 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -34,7 +34,7 @@ services: MARIADB_AUTO_UPGRADE: 'yes' command: - --skip-grant-tables - - --innodb-buffer-pool-size=32M + - --innodb-buffer-pool-size=128M - --wait_timeout=65 networks: default: From 6fadafc8de55b0ce7d19d5cee24211ac8a5cabc9 Mon Sep 17 00:00:00 2001 From: Alexander Pankratov Date: Thu, 7 Dec 2023 14:57:33 +0100 Subject: [PATCH 116/270] Update madeline --- composer.lock | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/composer.lock b/composer.lock index da42d73..616856f 100644 --- a/composer.lock +++ b/composer.lock @@ -2516,12 +2516,12 @@ "source": { "type": "git", "url": "https://github.com/danog/MadelineProto.git", - "reference": "9420c1f1a3ad31eb2860e0475bedc1cee12709ec" + "reference": "982df5aec9973a032bb3327c162eb6f028e1692e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/danog/MadelineProto/zipball/9420c1f1a3ad31eb2860e0475bedc1cee12709ec", - "reference": "9420c1f1a3ad31eb2860e0475bedc1cee12709ec", + "url": "https://api.github.com/repos/danog/MadelineProto/zipball/982df5aec9973a032bb3327c162eb6f028e1692e", + "reference": "982df5aec9973a032bb3327c162eb6f028e1692e", "shasum": "" }, "require": { @@ -2638,7 +2638,7 @@ "type": "github" } ], - "time": "2023-12-04T01:11:10+00:00" + "time": "2023-12-07T13:35:29+00:00" }, { "name": "danog/primemodule", From 55506d6ec1ececc96f6ff1279c648814b5247794 Mon Sep 17 00:00:00 2001 From: Alexander Pankratov Date: Sat, 9 Dec 2023 02:07:03 +0100 Subject: [PATCH 117/270] Feat: unsubscribeFromUpdates --- src/MadelineProtoExtensions/ApiExtensions.php | 37 +++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/src/MadelineProtoExtensions/ApiExtensions.php b/src/MadelineProtoExtensions/ApiExtensions.php index a2f2ed5..c022f6e 100644 --- a/src/MadelineProtoExtensions/ApiExtensions.php +++ b/src/MadelineProtoExtensions/ApiExtensions.php @@ -8,7 +8,9 @@ use Amp\Http\Server\Request; use Amp\Http\Server\Response; use danog\MadelineProto; +use danog\MadelineProto\PeerNotInDbException; use danog\MadelineProto\StrTools; +use http\Exception\InvalidArgumentException; use TelegramApiServer\Client; use TelegramApiServer\EventObservers\EventHandler; use TelegramApiServer\Exceptions\MediaTooBig; @@ -529,4 +531,39 @@ public function getUpdates(array $params): array { return $this->madelineProto->getUpdates($params); } + public function unsubscribeFromUpdates(?string $channel = null): array { + $inputChannelId = null; + if ($channel) { + $id = (string) $this->madelineProto->getId($channel); + + $inputChannelId = (int)str_replace(['-100', '-'], '', $id); + if (!$inputChannelId) { + throw new InvalidArgumentException('Invalid id'); + } + } + $counter = 0; + foreach (Client::getWrapper($this->madelineProto)->getAPI()->feeders as $channelId => $_) { + if ($channelId === 0) { + continue; + } + if ($inputChannelId && $inputChannelId !== $channelId) { + continue; + } + Client::getWrapper($this->madelineProto)->getAPI()->feeders[$channelId]->stop(); + Client::getWrapper($this->madelineProto)->getAPI()->updaters[$channelId]->stop(); + unset( + Client::getWrapper($this->madelineProto)->getAPI()->feeders[$channelId], + Client::getWrapper($this->madelineProto)->getAPI()->updaters[$channelId] + ); + Client::getWrapper($this->madelineProto)->getAPI()->getChannelStates()->remove($channelId); + $counter++; + } + + + return [ + 'disabled_update_loops' => $counter, + 'current_update_loops' => count(Client::getWrapper($this->madelineProto)->getAPI()->feeders), + ]; + } + } \ No newline at end of file From 7eab19371e34c70185879ac884638d336a86e271 Mon Sep 17 00:00:00 2001 From: Alexander Pankratov Date: Mon, 11 Dec 2023 15:55:58 +0100 Subject: [PATCH 118/270] Feat: return proxy support --- .env.docker.example | 6 ++++++ .env.example | 6 ++++++ README.md | 27 ++++++++++++++++++--------- config.php | 16 +++++++++++++++- src/Client.php | 2 +- 5 files changed, 46 insertions(+), 11 deletions(-) diff --git a/.env.docker.example b/.env.docker.example index 6fec5f5..e0e8d9d 100644 --- a/.env.docker.example +++ b/.env.docker.example @@ -27,6 +27,12 @@ TELEGRAM_API_HASH= # FATAL_ERROR = 0; ERROR = 1; WARNING = 2; const NOTICE = 3; VERBOSE = 4; ULTRA_VERBOSE = 5; LOGGER_LEVEL=2 +# TELEGRAM SOCKS5 PROXY (optional) +TELEGRAM_PROXY_ADDRESS= +TELEGRAM_PROXY_PORT= +TELEGRAM_PROXY_USERNAME= +TELEGRAM_PROXY_PASSWORD= + # DB # memory # Keep all data in memory/session file. diff --git a/.env.example b/.env.example index 3805f8f..c8bd3fd 100644 --- a/.env.example +++ b/.env.example @@ -26,6 +26,12 @@ TELEGRAM_API_HASH= # FATAL_ERROR = 0; ERROR = 1; WARNING = 2; const NOTICE = 3; VERBOSE = 4; ULTRA_VERBOSE = 5; LOGGER_LEVEL=2 +# TELEGRAM SOCKS5 PROXY (optional) +TELEGRAM_PROXY_ADDRESS= +TELEGRAM_PROXY_PORT= +TELEGRAM_PROXY_USERNAME= +TELEGRAM_PROXY_PASSWORD= + # DB # memory # Keep all data in memory/session file. diff --git a/README.md b/README.md index b4a5629..24ffea1 100644 --- a/README.md +++ b/README.md @@ -232,15 +232,24 @@ Each session stored in `sessions/{$session}.madeline`. Nested folders supported. ```json { - "connection_settings": { - "all": { - "proxy": "\\SocksProxy", - "proxy_extra": { - "address": "127.0.0.1", - "port": 1234, - "username": "user", - "password": "pass" - } + "connection": { + "proxies": { + "\\danog\\MadelineProto\\Stream\\Proxy\\SocksProxy": [ + { + "address": "127.0.0.1", + "port": 1234, + "username": "user", + "password": "pass" + } + ], + "\\danog\\MadelineProto\\Stream\\Proxy\\HttpProxy": [ + { + "address": "127.0.0.1", + "port": 1234, + "username": "user", + "password": "pass" + } + ] } } } diff --git a/config.php b/config.php index c866d32..6b70050 100644 --- a/config.php +++ b/config.php @@ -23,7 +23,17 @@ 'rpc_drop_timeout' => 11, ], 'connection' => [ - 'max_media_socket_count' => 10 + 'max_media_socket_count' => 10, + 'proxies' => [ + '\danog\MadelineProto\Stream\Proxy\SocksProxy' => [ + [ + "address" => (string)getenv('TELEGRAM_PROXY_ADDRESS'), + "port"=> (int)getenv('TELEGRAM_PROXY_PORT'), + "username"=> (string)getenv('TELEGRAM_PROXY_USERNAME'), + "password"=> (string)getenv('TELEGRAM_PROXY_PASSWORD'), + ], + ] + ] ], 'serialization' => [ 'interval' => 600, @@ -63,6 +73,10 @@ ] ]; +if (empty($settings['telegram']['connection']['proxies']['\danog\MadelineProto\Stream\Proxy\SocksProxy'][0]['address'])) { + $settings['telegram']['connection']['proxies'] = []; +} + if (empty($settings['telegram']['app_info']['api_id'])) { throw new InvalidArgumentException('Need to fill TELEGRAM_API_ID in .env.docker or .env'); } diff --git a/src/Client.php b/src/Client.php index 9385c57..8b09594 100644 --- a/src/Client.php +++ b/src/Client.php @@ -161,7 +161,7 @@ public static function getWrapper(API $madelineProto): APIWrapper private static function getSettingsFromArray(string $session, array $settings, SettingsAbstract $settingsObject = new Settings()): SettingsAbstract { foreach ($settings as $key => $value) { - if (is_array($value)) { + if (is_array($value) && $key !== 'proxies') { if ($key === 'db' && isset($value['type'])) { $type = match ($value['type']) { 'memory' => new Settings\Database\Memory(), From c3f7ffaefc1e31f560b4eb1675041d1bc6e82484 Mon Sep 17 00:00:00 2001 From: Alexander Pankratov Date: Mon, 11 Dec 2023 17:50:59 +0100 Subject: [PATCH 119/270] Feat: allow switch serializer and support generating enum from string --- .env.docker.example | 2 ++ .env.example | 2 ++ Dockerfile | 4 ++-- config.php | 2 +- src/Client.php | 4 ++++ 5 files changed, 11 insertions(+), 3 deletions(-) diff --git a/.env.docker.example b/.env.docker.example index e0e8d9d..3662f9f 100644 --- a/.env.docker.example +++ b/.env.docker.example @@ -55,6 +55,8 @@ DB_MAX_CONNECTIONS=10 DB_IDLE_TIMEOUT=60 # Recent data will be stored in memory this amount of time: DB_CACHE_TTL="+5 minutes" +# Options: serialize, igbinary +DB_SERIALIZER=serialize # Enable to add cache info about users to database. Disable if you only read data from channels. DB_ENABLE_MIN_DATABASE=0 # Enable file metadata cache diff --git a/.env.example b/.env.example index c8bd3fd..cab1087 100644 --- a/.env.example +++ b/.env.example @@ -54,6 +54,8 @@ DB_MAX_CONNECTIONS=10 DB_IDLE_TIMEOUT=60 # Recent data will be stored in memory this amount of time: DB_CACHE_TTL="+5 minutes" +# Options: serialize, igbinary +DB_SERIALIZER=serialize # Enable to add cache info about users to database. Disable if you only read data from channels. DB_ENABLE_MIN_DATABASE=0 # Enable file metadata cache diff --git a/Dockerfile b/Dockerfile index 043ed94..2c778b0 100644 --- a/Dockerfile +++ b/Dockerfile @@ -7,8 +7,8 @@ RUN true \ && docker-php-ext-install -j$(nproc) sockets bcmath mysqli pdo_mysql pcntl ffi intl gmp zip gd \ # Install additional extension && mkdir -p /usr/src/php/ext/ && cd /usr/src/php/ext/ \ - && pecl bundle ev-beta && pecl bundle eio-beta \ - && docker-php-ext-install -j$(nproc) ev eio \ + && pecl bundle ev-beta && pecl bundle eio-beta && pecl bundle igbinary \ + && docker-php-ext-install -j$(nproc) ev eio igbinary \ # Install PrimeModule for AuthKey generation speedup && git clone https://github.com/danog/PrimeModule-ext \ && cd PrimeModule-ext && make -j$(nproc) \ diff --git a/config.php b/config.php index 6b70050..5e3a45f 100644 --- a/config.php +++ b/config.php @@ -50,7 +50,7 @@ 'max_connections' => (int)getenv('DB_MAX_CONNECTIONS'), 'idle_timeout' => (int)getenv('DB_IDLE_TIMEOUT'), 'cache_ttl' => (string)getenv('DB_CACHE_TTL'), - 'serializer' => danog\MadelineProto\Settings\Database\SerializerType::from('serialize'), + 'serializer' => ((string)getenv('DB_SERIALIZER')) ?: 'serialize', ] ], 'files' => [ diff --git a/src/Client.php b/src/Client.php index 8b09594..bc6c2a3 100644 --- a/src/Client.php +++ b/src/Client.php @@ -5,6 +5,7 @@ use danog\MadelineProto\API; use danog\MadelineProto\APIWrapper; use danog\MadelineProto\Settings; +use danog\MadelineProto\Settings\Database\SerializerType; use danog\MadelineProto\SettingsAbstract; use InvalidArgumentException; use Psr\Log\LogLevel; @@ -187,6 +188,9 @@ private static function getSettingsFromArray(string $session, array $settings, S $method = 'get' . ucfirst(str_replace('_', '', ucwords($key, '_'))); self::getSettingsFromArray($session, $value, $settingsObject->$method()); } else { + if ($key === 'serializer' && is_string($value)) { + $value = SerializerType::from($value); + } $method = 'set' . ucfirst(str_replace('_', '', ucwords($key, '_'))); $settingsObject->$method($value); } From 8036289ccc376707a7ed2ff4e9ea36297a667152 Mon Sep 17 00:00:00 2001 From: Alexander Pankratov <34161928+xtrime-ru@users.noreply.github.com> Date: Wed, 13 Dec 2023 11:59:14 +0100 Subject: [PATCH 120/270] Update README.md --- README.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 24ffea1..d676271 100644 --- a/README.md +++ b/README.md @@ -31,12 +31,13 @@ docker compose pull ## Authorization 1. Get app_id and app_hash at [my.telegram.org](https://my.telegram.org/). Only one app_id needed for any amount of users and bots. -1. Fill app_id and app_hash in `.env.docker` or `.env`. +1. Create `.env.docker` from `.env.docker.example`: `cp .env.docker.example .env.docker`. +2. Fill app_id and app_hash in `.env.docker`. 1. Start TelegramApiServer in cli: 1. Start container interactively: `docker compose run --rm api` 2. If you need to start multiple sessions, create docker-compose.override.yml. Add additional containers there. Use unique ports and session names in `command`. 1. Authorize your session: - 1. Chose account type: user (`u`) or bot (`b`) + 1. After promt fill your phone number, or bot hash. 1. Follow instructions 1. Wait 10-30 seconds until session is started. You will see logs: From 26fd2b8784165eae45d7301ba7a4d5b1503ab680 Mon Sep 17 00:00:00 2001 From: Alexander Pankratov <34161928+xtrime-ru@users.noreply.github.com> Date: Wed, 13 Dec 2023 12:47:15 +0100 Subject: [PATCH 121/270] Update README.md --- README.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/README.md b/README.md index d676271..f6e4b6a 100644 --- a/README.md +++ b/README.md @@ -31,8 +31,7 @@ docker compose pull ## Authorization 1. Get app_id and app_hash at [my.telegram.org](https://my.telegram.org/). Only one app_id needed for any amount of users and bots. -1. Create `.env.docker` from `.env.docker.example`: `cp .env.docker.example .env.docker`. -2. Fill app_id and app_hash in `.env.docker`. +1. Fill app_id and app_hash in `.env.docker`. 1. Start TelegramApiServer in cli: 1. Start container interactively: `docker compose run --rm api` 2. If you need to start multiple sessions, create docker-compose.override.yml. Add additional containers there. Use unique ports and session names in `command`. From 335eed63c124211c339cc6a581903b0e9ff7b5d0 Mon Sep 17 00:00:00 2001 From: Alexander Pankratov Date: Thu, 14 Dec 2023 01:57:47 +0100 Subject: [PATCH 122/270] Update madelineProto --- composer.lock | 94 +++++++++++++++++++++++++-------------------------- 1 file changed, 47 insertions(+), 47 deletions(-) diff --git a/composer.lock b/composer.lock index 616856f..7944419 100644 --- a/composer.lock +++ b/composer.lock @@ -540,16 +540,16 @@ }, { "name": "amphp/http-client", - "version": "v5.0.0", + "version": "v5.0.1", "source": { "type": "git", "url": "https://github.com/amphp/http-client.git", - "reference": "03476991480578deb2058b926c1be1479129779f" + "reference": "9b42ca1a5af9abd1dd8c3f9e45c2bb15957361b7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/amphp/http-client/zipball/03476991480578deb2058b926c1be1479129779f", - "reference": "03476991480578deb2058b926c1be1479129779f", + "url": "https://api.github.com/repos/amphp/http-client/zipball/9b42ca1a5af9abd1dd8c3f9e45c2bb15957361b7", + "reference": "9b42ca1a5af9abd1dd8c3f9e45c2bb15957361b7", "shasum": "" }, "require": { @@ -623,7 +623,7 @@ ], "support": { "issues": "https://github.com/amphp/http-client/issues", - "source": "https://github.com/amphp/http-client/tree/v5.0.0" + "source": "https://github.com/amphp/http-client/tree/v5.0.1" }, "funding": [ { @@ -631,7 +631,7 @@ "type": "github" } ], - "time": "2023-10-08T16:24:43+00:00" + "time": "2023-12-11T03:48:12+00:00" }, { "name": "amphp/http-client-cookies", @@ -1045,16 +1045,16 @@ }, { "name": "amphp/mysql", - "version": "v3.0.0-beta.6", + "version": "v3.0.0-beta.7", "source": { "type": "git", "url": "https://github.com/amphp/mysql.git", - "reference": "8a7d4ac964d7efd3f83f4a0a05fa3af2b6978a8f" + "reference": "90f99de80638e2ef486f786a047a15ab2d114d5e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/amphp/mysql/zipball/8a7d4ac964d7efd3f83f4a0a05fa3af2b6978a8f", - "reference": "8a7d4ac964d7efd3f83f4a0a05fa3af2b6978a8f", + "url": "https://api.github.com/repos/amphp/mysql/zipball/90f99de80638e2ef486f786a047a15ab2d114d5e", + "reference": "90f99de80638e2ef486f786a047a15ab2d114d5e", "shasum": "" }, "require": { @@ -1062,8 +1062,8 @@ "amphp/parser": "^1.1", "amphp/pipeline": "^1", "amphp/socket": "^2", - "amphp/sql": "^2", - "amphp/sql-common": "^2", + "amphp/sql": "^2-beta.6", + "amphp/sql-common": "^2-beta.7", "php": ">=8.1" }, "require-dev": { @@ -1103,7 +1103,7 @@ "description": "Asynchronous MySQL client for PHP based on Amp.", "support": { "issues": "https://github.com/amphp/mysql/issues", - "source": "https://github.com/amphp/mysql/tree/v3.0.0-beta.6" + "source": "https://github.com/amphp/mysql/tree/v3.0.0-beta.7" }, "funding": [ { @@ -1111,7 +1111,7 @@ "type": "github" } ], - "time": "2023-05-07T13:48:11+00:00" + "time": "2023-12-10T03:54:20+00:00" }, { "name": "amphp/parallel", @@ -1327,32 +1327,32 @@ }, { "name": "amphp/postgres", - "version": "v2.0.0-beta.4", + "version": "v2.0.0-beta.5", "source": { "type": "git", "url": "https://github.com/amphp/postgres.git", - "reference": "4e23b380a9cecdcc7c0ba8a99814c227284aa07c" + "reference": "ca59db500abc05f1f89424ce734f97989a791e8a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/amphp/postgres/zipball/4e23b380a9cecdcc7c0ba8a99814c227284aa07c", - "reference": "4e23b380a9cecdcc7c0ba8a99814c227284aa07c", + "url": "https://api.github.com/repos/amphp/postgres/zipball/ca59db500abc05f1f89424ce734f97989a791e8a", + "reference": "ca59db500abc05f1f89424ce734f97989a791e8a", "shasum": "" }, "require": { "amphp/amp": "^3", "amphp/pipeline": "^1", - "amphp/sql": "^2", - "amphp/sql-common": "^2", + "amphp/sql": "^2-beta.6", + "amphp/sql-common": "^2-beta.7", "php": ">=8.1" }, "require-dev": { - "amphp/php-cs-fixer-config": "^2-dev", + "amphp/php-cs-fixer-config": "^2", "amphp/phpunit-util": "^3", "ext-pgsql": "*", "ext-pq": "*", "phpunit/phpunit": "^9", - "psalm/phar": "^5.4" + "psalm/phar": "^5.11" }, "type": "library", "autoload": { @@ -1387,7 +1387,7 @@ ], "support": { "issues": "https://github.com/amphp/postgres/issues", - "source": "https://github.com/amphp/postgres/tree/v2.0.0-beta.4" + "source": "https://github.com/amphp/postgres/tree/v2.0.0-beta.5" }, "funding": [ { @@ -1395,7 +1395,7 @@ "type": "github" } ], - "time": "2023-05-07T05:05:00+00:00" + "time": "2023-12-09T15:40:47+00:00" }, { "name": "amphp/process", @@ -1690,16 +1690,16 @@ }, { "name": "amphp/sql", - "version": "v2.0.0-beta.5", + "version": "v2.0.0-beta.6", "source": { "type": "git", "url": "https://github.com/amphp/sql.git", - "reference": "2cd168c4a22925c24b74259ecf98ce39f5a73e50" + "reference": "94798059de6953707fc6e517bba42483bb5e5bf7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/amphp/sql/zipball/2cd168c4a22925c24b74259ecf98ce39f5a73e50", - "reference": "2cd168c4a22925c24b74259ecf98ce39f5a73e50", + "url": "https://api.github.com/repos/amphp/sql/zipball/94798059de6953707fc6e517bba42483bb5e5bf7", + "reference": "94798059de6953707fc6e517bba42483bb5e5bf7", "shasum": "" }, "require": { @@ -1732,7 +1732,7 @@ ], "support": { "issues": "https://github.com/amphp/sql/issues", - "source": "https://github.com/amphp/sql/tree/v2.0.0-beta.5" + "source": "https://github.com/amphp/sql/tree/v2.0.0-beta.6" }, "funding": [ { @@ -1740,25 +1740,25 @@ "type": "github" } ], - "time": "2023-10-22T03:09:29+00:00" + "time": "2023-12-08T23:57:41+00:00" }, { "name": "amphp/sql-common", - "version": "v2.0.0-beta.6", + "version": "v2.0.0-beta.8", "source": { "type": "git", "url": "https://github.com/amphp/sql-common.git", - "reference": "a6cef9fb4c9d87e9ab7d40c762ef490dda43f04f" + "reference": "ad61674a3137808add3a294ba86bf18496e4a1d5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/amphp/sql-common/zipball/a6cef9fb4c9d87e9ab7d40c762ef490dda43f04f", - "reference": "a6cef9fb4c9d87e9ab7d40c762ef490dda43f04f", + "url": "https://api.github.com/repos/amphp/sql-common/zipball/ad61674a3137808add3a294ba86bf18496e4a1d5", + "reference": "ad61674a3137808add3a294ba86bf18496e4a1d5", "shasum": "" }, "require": { "amphp/amp": "^3", - "amphp/sql": "^2", + "amphp/sql": "^2-beta.6", "php": ">=8.1" }, "require-dev": { @@ -1788,7 +1788,7 @@ ], "support": { "issues": "https://github.com/amphp/sql-common/issues", - "source": "https://github.com/amphp/sql-common/tree/v2.0.0-beta.6" + "source": "https://github.com/amphp/sql-common/tree/v2.0.0-beta.8" }, "funding": [ { @@ -1796,7 +1796,7 @@ "type": "github" } ], - "time": "2023-06-17T15:45:22+00:00" + "time": "2023-12-12T22:35:15+00:00" }, { "name": "amphp/sync", @@ -2516,12 +2516,12 @@ "source": { "type": "git", "url": "https://github.com/danog/MadelineProto.git", - "reference": "982df5aec9973a032bb3327c162eb6f028e1692e" + "reference": "f62e6c15ddf40f250587551db9f4ff20bf2f07ca" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/danog/MadelineProto/zipball/982df5aec9973a032bb3327c162eb6f028e1692e", - "reference": "982df5aec9973a032bb3327c162eb6f028e1692e", + "url": "https://api.github.com/repos/danog/MadelineProto/zipball/f62e6c15ddf40f250587551db9f4ff20bf2f07ca", + "reference": "f62e6c15ddf40f250587551db9f4ff20bf2f07ca", "shasum": "" }, "require": { @@ -2638,7 +2638,7 @@ "type": "github" } ], - "time": "2023-12-07T13:35:29+00:00" + "time": "2023-12-14T00:56:48+00:00" }, { "name": "danog/primemodule", @@ -3315,16 +3315,16 @@ }, { "name": "nikic/php-parser", - "version": "v4.17.1", + "version": "v4.18.0", "source": { "type": "git", "url": "https://github.com/nikic/PHP-Parser.git", - "reference": "a6303e50c90c355c7eeee2c4a8b27fe8dc8fef1d" + "reference": "1bcbb2179f97633e98bbbc87044ee2611c7d7999" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/a6303e50c90c355c7eeee2c4a8b27fe8dc8fef1d", - "reference": "a6303e50c90c355c7eeee2c4a8b27fe8dc8fef1d", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/1bcbb2179f97633e98bbbc87044ee2611c7d7999", + "reference": "1bcbb2179f97633e98bbbc87044ee2611c7d7999", "shasum": "" }, "require": { @@ -3365,9 +3365,9 @@ ], "support": { "issues": "https://github.com/nikic/PHP-Parser/issues", - "source": "https://github.com/nikic/PHP-Parser/tree/v4.17.1" + "source": "https://github.com/nikic/PHP-Parser/tree/v4.18.0" }, - "time": "2023-08-13T19:53:39+00:00" + "time": "2023-12-10T21:03:43+00:00" }, { "name": "paragonie/constant_time_encoding", From 478072e5c8e1bed6d24968206fc86c475a9db1ed Mon Sep 17 00:00:00 2001 From: Alexander Pankratov Date: Fri, 15 Dec 2023 01:30:08 +0100 Subject: [PATCH 123/270] Update madelineProto --- composer.lock | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/composer.lock b/composer.lock index 7944419..29a679a 100644 --- a/composer.lock +++ b/composer.lock @@ -2233,16 +2233,16 @@ }, { "name": "danog/dns-over-https", - "version": "v1.0.0-beta4", + "version": "1.0.0", "source": { "type": "git", "url": "https://github.com/danog/dns-over-https.git", - "reference": "5094c943caa383cd2a77920b363ca9a4c530b1ba" + "reference": "8c4ac578b8c7231b6df91e03a28a4d807a636a93" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/danog/dns-over-https/zipball/5094c943caa383cd2a77920b363ca9a4c530b1ba", - "reference": "5094c943caa383cd2a77920b363ca9a4c530b1ba", + "url": "https://api.github.com/repos/danog/dns-over-https/zipball/8c4ac578b8c7231b6df91e03a28a4d807a636a93", + "reference": "8c4ac578b8c7231b6df91e03a28a4d807a636a93", "shasum": "" }, "require": { @@ -2262,7 +2262,7 @@ "amphp/php-cs-fixer-config": "^2", "amphp/phpunit-util": "^3", "phpunit/phpunit": "^9", - "psalm/phar": "^5" + "vimeo/psalm": "dev-master" }, "type": "library", "autoload": { @@ -2315,9 +2315,9 @@ ], "support": { "issues": "https://github.com/danog/dns-over-https/issues", - "source": "https://github.com/danog/dns-over-https/tree/v1.0.0-beta4" + "source": "https://github.com/danog/dns-over-https/tree/1.0.0" }, - "time": "2023-02-15T17:28:06+00:00" + "time": "2023-12-14T20:00:28+00:00" }, { "name": "danog/ipc", @@ -2516,12 +2516,12 @@ "source": { "type": "git", "url": "https://github.com/danog/MadelineProto.git", - "reference": "f62e6c15ddf40f250587551db9f4ff20bf2f07ca" + "reference": "1b7bf377e09fcbf16b02b8f75af24206aacdfc61" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/danog/MadelineProto/zipball/f62e6c15ddf40f250587551db9f4ff20bf2f07ca", - "reference": "f62e6c15ddf40f250587551db9f4ff20bf2f07ca", + "url": "https://api.github.com/repos/danog/MadelineProto/zipball/1b7bf377e09fcbf16b02b8f75af24206aacdfc61", + "reference": "1b7bf377e09fcbf16b02b8f75af24206aacdfc61", "shasum": "" }, "require": { @@ -2638,7 +2638,7 @@ "type": "github" } ], - "time": "2023-12-14T00:56:48+00:00" + "time": "2023-12-15T00:20:23+00:00" }, { "name": "danog/primemodule", From 9ffe51f8c2bf8c8f6a9ae49a0a69f1b824a31a87 Mon Sep 17 00:00:00 2001 From: Alexander Pankratov Date: Fri, 15 Dec 2023 15:27:55 +0100 Subject: [PATCH 124/270] Update madelineProto --- composer.lock | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/composer.lock b/composer.lock index 29a679a..cf8397e 100644 --- a/composer.lock +++ b/composer.lock @@ -2516,12 +2516,12 @@ "source": { "type": "git", "url": "https://github.com/danog/MadelineProto.git", - "reference": "1b7bf377e09fcbf16b02b8f75af24206aacdfc61" + "reference": "d5b360067cb86f80edc22c19ee2f4b23130cd239" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/danog/MadelineProto/zipball/1b7bf377e09fcbf16b02b8f75af24206aacdfc61", - "reference": "1b7bf377e09fcbf16b02b8f75af24206aacdfc61", + "url": "https://api.github.com/repos/danog/MadelineProto/zipball/d5b360067cb86f80edc22c19ee2f4b23130cd239", + "reference": "d5b360067cb86f80edc22c19ee2f4b23130cd239", "shasum": "" }, "require": { @@ -2638,7 +2638,7 @@ "type": "github" } ], - "time": "2023-12-15T00:20:23+00:00" + "time": "2023-12-15T14:26:38+00:00" }, { "name": "danog/primemodule", From 9cc895d3bfefc357c3b6242b38d6af46fd59292f Mon Sep 17 00:00:00 2001 From: Alexander Pankratov Date: Mon, 18 Dec 2023 13:17:50 +0100 Subject: [PATCH 125/270] Remove old migrations --- bootstrap.php | 1 - server.php | 2 -- src/Migrations/EnvUpgrade.php | 20 ------------------ src/Migrations/SessionsMigration.php | 28 ------------------------- src/Migrations/StartUpFixes.php | 16 -------------- src/Migrations/SwooleToAmpMigration.php | 16 -------------- 6 files changed, 83 deletions(-) delete mode 100644 src/Migrations/EnvUpgrade.php delete mode 100644 src/Migrations/SessionsMigration.php delete mode 100644 src/Migrations/SwooleToAmpMigration.php diff --git a/bootstrap.php b/bootstrap.php index baf94b5..0705a7d 100644 --- a/bootstrap.php +++ b/bootstrap.php @@ -25,7 +25,6 @@ //Config init { if (!getenv('SERVER_ADDRESS')) { - EnvUpgrade::mysqlToDbPrefix(); $envFile = $options['env']; if (empty($envFile)) { diff --git a/server.php b/server.php index cc69d49..9c0d297 100644 --- a/server.php +++ b/server.php @@ -68,8 +68,6 @@ require_once __DIR__ . '/bootstrap.php'; -SessionsMigration::move(); -SwooleToAmpMigration::check(); StartUpFixes::fix(); $mainProcessPid = getmypid(); diff --git a/src/Migrations/EnvUpgrade.php b/src/Migrations/EnvUpgrade.php deleted file mode 100644 index 7c6d4fb..0000000 --- a/src/Migrations/EnvUpgrade.php +++ /dev/null @@ -1,20 +0,0 @@ - Date: Mon, 18 Dec 2023 13:20:51 +0100 Subject: [PATCH 126/270] Update madeline --- composer.lock | 56 +++++++++++++++++++++++++-------------------------- 1 file changed, 28 insertions(+), 28 deletions(-) diff --git a/composer.lock b/composer.lock index cf8397e..5456fa8 100644 --- a/composer.lock +++ b/composer.lock @@ -1045,16 +1045,16 @@ }, { "name": "amphp/mysql", - "version": "v3.0.0-beta.7", + "version": "v3.0.0-beta.8", "source": { "type": "git", "url": "https://github.com/amphp/mysql.git", - "reference": "90f99de80638e2ef486f786a047a15ab2d114d5e" + "reference": "e95eee910fdab24e26d4d0e86d6120e790d88c9b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/amphp/mysql/zipball/90f99de80638e2ef486f786a047a15ab2d114d5e", - "reference": "90f99de80638e2ef486f786a047a15ab2d114d5e", + "url": "https://api.github.com/repos/amphp/mysql/zipball/e95eee910fdab24e26d4d0e86d6120e790d88c9b", + "reference": "e95eee910fdab24e26d4d0e86d6120e790d88c9b", "shasum": "" }, "require": { @@ -1063,7 +1063,7 @@ "amphp/pipeline": "^1", "amphp/socket": "^2", "amphp/sql": "^2-beta.6", - "amphp/sql-common": "^2-beta.7", + "amphp/sql-common": "^2-beta.9", "php": ">=8.1" }, "require-dev": { @@ -1075,7 +1075,7 @@ "ext-openssl": "*", "phpbench/phpbench": "^1.2.6", "phpunit/phpunit": "^9", - "psalm/phar": "^5.4" + "psalm/phar": "^5.18" }, "type": "library", "autoload": { @@ -1103,7 +1103,7 @@ "description": "Asynchronous MySQL client for PHP based on Amp.", "support": { "issues": "https://github.com/amphp/mysql/issues", - "source": "https://github.com/amphp/mysql/tree/v3.0.0-beta.7" + "source": "https://github.com/amphp/mysql/tree/v3.0.0-beta.8" }, "funding": [ { @@ -1111,7 +1111,7 @@ "type": "github" } ], - "time": "2023-12-10T03:54:20+00:00" + "time": "2023-12-17T16:54:19+00:00" }, { "name": "amphp/parallel", @@ -1327,23 +1327,23 @@ }, { "name": "amphp/postgres", - "version": "v2.0.0-beta.5", + "version": "v2.0.0-beta.6", "source": { "type": "git", "url": "https://github.com/amphp/postgres.git", - "reference": "ca59db500abc05f1f89424ce734f97989a791e8a" + "reference": "81f2f192f8627794dc13a65d478f8ec517114d16" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/amphp/postgres/zipball/ca59db500abc05f1f89424ce734f97989a791e8a", - "reference": "ca59db500abc05f1f89424ce734f97989a791e8a", + "url": "https://api.github.com/repos/amphp/postgres/zipball/81f2f192f8627794dc13a65d478f8ec517114d16", + "reference": "81f2f192f8627794dc13a65d478f8ec517114d16", "shasum": "" }, "require": { "amphp/amp": "^3", "amphp/pipeline": "^1", "amphp/sql": "^2-beta.6", - "amphp/sql-common": "^2-beta.7", + "amphp/sql-common": "^2-beta.9", "php": ">=8.1" }, "require-dev": { @@ -1352,7 +1352,7 @@ "ext-pgsql": "*", "ext-pq": "*", "phpunit/phpunit": "^9", - "psalm/phar": "^5.11" + "psalm/phar": "^5.18" }, "type": "library", "autoload": { @@ -1387,7 +1387,7 @@ ], "support": { "issues": "https://github.com/amphp/postgres/issues", - "source": "https://github.com/amphp/postgres/tree/v2.0.0-beta.5" + "source": "https://github.com/amphp/postgres/tree/v2.0.0-beta.6" }, "funding": [ { @@ -1395,7 +1395,7 @@ "type": "github" } ], - "time": "2023-12-09T15:40:47+00:00" + "time": "2023-12-17T16:39:43+00:00" }, { "name": "amphp/process", @@ -1606,16 +1606,16 @@ }, { "name": "amphp/socket", - "version": "v2.2.0", + "version": "v2.2.1", "source": { "type": "git", "url": "https://github.com/amphp/socket.git", - "reference": "3418a0c5c0d4978b0e8e0619ce1da0851c4053d3" + "reference": "88ca6d2cfec2f40b1c7beac7316a26cd916fd209" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/amphp/socket/zipball/3418a0c5c0d4978b0e8e0619ce1da0851c4053d3", - "reference": "3418a0c5c0d4978b0e8e0619ce1da0851c4053d3", + "url": "https://api.github.com/repos/amphp/socket/zipball/88ca6d2cfec2f40b1c7beac7316a26cd916fd209", + "reference": "88ca6d2cfec2f40b1c7beac7316a26cd916fd209", "shasum": "" }, "require": { @@ -1678,7 +1678,7 @@ ], "support": { "issues": "https://github.com/amphp/socket/issues", - "source": "https://github.com/amphp/socket/tree/v2.2.0" + "source": "https://github.com/amphp/socket/tree/v2.2.1" }, "funding": [ { @@ -1686,7 +1686,7 @@ "type": "github" } ], - "time": "2023-08-19T15:28:34+00:00" + "time": "2023-12-16T00:08:33+00:00" }, { "name": "amphp/sql", @@ -1744,16 +1744,16 @@ }, { "name": "amphp/sql-common", - "version": "v2.0.0-beta.8", + "version": "v2.0.0-beta.9", "source": { "type": "git", "url": "https://github.com/amphp/sql-common.git", - "reference": "ad61674a3137808add3a294ba86bf18496e4a1d5" + "reference": "891749895e5de6fa7f38b1bc016f8d00a8dc8d3f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/amphp/sql-common/zipball/ad61674a3137808add3a294ba86bf18496e4a1d5", - "reference": "ad61674a3137808add3a294ba86bf18496e4a1d5", + "url": "https://api.github.com/repos/amphp/sql-common/zipball/891749895e5de6fa7f38b1bc016f8d00a8dc8d3f", + "reference": "891749895e5de6fa7f38b1bc016f8d00a8dc8d3f", "shasum": "" }, "require": { @@ -1788,7 +1788,7 @@ ], "support": { "issues": "https://github.com/amphp/sql-common/issues", - "source": "https://github.com/amphp/sql-common/tree/v2.0.0-beta.8" + "source": "https://github.com/amphp/sql-common/tree/v2.0.0-beta.9" }, "funding": [ { @@ -1796,7 +1796,7 @@ "type": "github" } ], - "time": "2023-12-12T22:35:15+00:00" + "time": "2023-12-17T16:24:08+00:00" }, { "name": "amphp/sync", From b791f6c8cd960d240827115b01e78d0b0b309abe Mon Sep 17 00:00:00 2001 From: Alexander Pankratov Date: Tue, 19 Dec 2023 11:16:04 +0100 Subject: [PATCH 127/270] Update madeline --- composer.lock | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/composer.lock b/composer.lock index 5456fa8..5ff8846 100644 --- a/composer.lock +++ b/composer.lock @@ -2516,12 +2516,12 @@ "source": { "type": "git", "url": "https://github.com/danog/MadelineProto.git", - "reference": "d5b360067cb86f80edc22c19ee2f4b23130cd239" + "reference": "a22a7d3717264f07eeec65de2914806668a087c1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/danog/MadelineProto/zipball/d5b360067cb86f80edc22c19ee2f4b23130cd239", - "reference": "d5b360067cb86f80edc22c19ee2f4b23130cd239", + "url": "https://api.github.com/repos/danog/MadelineProto/zipball/a22a7d3717264f07eeec65de2914806668a087c1", + "reference": "a22a7d3717264f07eeec65de2914806668a087c1", "shasum": "" }, "require": { @@ -2638,7 +2638,7 @@ "type": "github" } ], - "time": "2023-12-15T14:26:38+00:00" + "time": "2023-12-19T10:14:01+00:00" }, { "name": "danog/primemodule", From 2d09477018cbd014943498454b76f354f341cbfe Mon Sep 17 00:00:00 2001 From: Alexander Pankratov Date: Tue, 19 Dec 2023 23:10:34 +0100 Subject: [PATCH 128/270] Update madeline --- composer.lock | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/composer.lock b/composer.lock index 5ff8846..4907d27 100644 --- a/composer.lock +++ b/composer.lock @@ -2516,12 +2516,12 @@ "source": { "type": "git", "url": "https://github.com/danog/MadelineProto.git", - "reference": "a22a7d3717264f07eeec65de2914806668a087c1" + "reference": "cb6ce85c7bd0b13b9a9cab1f222ee289370f4069" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/danog/MadelineProto/zipball/a22a7d3717264f07eeec65de2914806668a087c1", - "reference": "a22a7d3717264f07eeec65de2914806668a087c1", + "url": "https://api.github.com/repos/danog/MadelineProto/zipball/cb6ce85c7bd0b13b9a9cab1f222ee289370f4069", + "reference": "cb6ce85c7bd0b13b9a9cab1f222ee289370f4069", "shasum": "" }, "require": { @@ -2638,7 +2638,7 @@ "type": "github" } ], - "time": "2023-12-19T10:14:01+00:00" + "time": "2023-12-19T22:10:09+00:00" }, { "name": "danog/primemodule", From c1c5f7d8d0e902d761b9ad28e97b8656bfa7f7bf Mon Sep 17 00:00:00 2001 From: Alexander Pankratov Date: Sat, 23 Dec 2023 13:18:35 +0100 Subject: [PATCH 129/270] Update madeline --- composer.lock | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/composer.lock b/composer.lock index 4907d27..6455d63 100644 --- a/composer.lock +++ b/composer.lock @@ -1260,28 +1260,28 @@ }, { "name": "amphp/pipeline", - "version": "v1.0.0", + "version": "v1.1.0", "source": { "type": "git", "url": "https://github.com/amphp/pipeline.git", - "reference": "810dee498d2fd7d2c9247b32d95f38c92c13169e" + "reference": "8a0ecc281bb0932d6b4a786453aff18c55756e63" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/amphp/pipeline/zipball/810dee498d2fd7d2c9247b32d95f38c92c13169e", - "reference": "810dee498d2fd7d2c9247b32d95f38c92c13169e", + "url": "https://api.github.com/repos/amphp/pipeline/zipball/8a0ecc281bb0932d6b4a786453aff18c55756e63", + "reference": "8a0ecc281bb0932d6b4a786453aff18c55756e63", "shasum": "" }, "require": { "amphp/amp": "^3", "php": ">=8.1", - "revolt/event-loop": "^1 || ^0.2" + "revolt/event-loop": "^1" }, "require-dev": { "amphp/php-cs-fixer-config": "^2", "amphp/phpunit-util": "^3", "phpunit/phpunit": "^9", - "psalm/phar": "^4.12" + "psalm/phar": "^5.18" }, "type": "library", "autoload": { @@ -1315,7 +1315,7 @@ ], "support": { "issues": "https://github.com/amphp/pipeline/issues", - "source": "https://github.com/amphp/pipeline/tree/v1.0.0" + "source": "https://github.com/amphp/pipeline/tree/v1.1.0" }, "funding": [ { @@ -1323,7 +1323,7 @@ "type": "github" } ], - "time": "2022-12-22T02:13:01+00:00" + "time": "2023-12-23T04:34:28+00:00" }, { "name": "amphp/postgres", @@ -2516,12 +2516,12 @@ "source": { "type": "git", "url": "https://github.com/danog/MadelineProto.git", - "reference": "cb6ce85c7bd0b13b9a9cab1f222ee289370f4069" + "reference": "b8f796d361451b30f203f9f1424ce44a3fd0f1df" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/danog/MadelineProto/zipball/cb6ce85c7bd0b13b9a9cab1f222ee289370f4069", - "reference": "cb6ce85c7bd0b13b9a9cab1f222ee289370f4069", + "url": "https://api.github.com/repos/danog/MadelineProto/zipball/b8f796d361451b30f203f9f1424ce44a3fd0f1df", + "reference": "b8f796d361451b30f203f9f1424ce44a3fd0f1df", "shasum": "" }, "require": { @@ -2638,7 +2638,7 @@ "type": "github" } ], - "time": "2023-12-19T22:10:09+00:00" + "time": "2023-12-23T12:18:08+00:00" }, { "name": "danog/primemodule", From 354421d7b0dc0fb9fd553a640d636834def9d233 Mon Sep 17 00:00:00 2001 From: Alexander Pankratov Date: Sat, 23 Dec 2023 13:32:39 +0100 Subject: [PATCH 130/270] Fix startup --- server.php | 7 ++++++- src/Migrations/StartUpFixes.php | 9 +++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/server.php b/server.php index 9c0d297..70ddd1c 100644 --- a/server.php +++ b/server.php @@ -68,7 +68,7 @@ require_once __DIR__ . '/bootstrap.php'; -StartUpFixes::fix(); + $mainProcessPid = getmypid(); if (Config::getInstance()->get('health_check.enabled')) { @@ -99,6 +99,11 @@ $sessions = array_unique($sessions); } +StartUpFixes::fix(); +foreach ($sessions as $session) { + StartUpFixes::removeBrokenIpc($session); +} + new TelegramApiServer\Server\Server( $options, $sessions diff --git a/src/Migrations/StartUpFixes.php b/src/Migrations/StartUpFixes.php index bbd78e7..8b93fa8 100644 --- a/src/Migrations/StartUpFixes.php +++ b/src/Migrations/StartUpFixes.php @@ -8,4 +8,13 @@ public static function fix(): void { define('MADELINE_WORKER_TYPE', 'madeline-ipc'); } + + public static function removeBrokenIpc(string $session): void + { + info('Removing ipc sockets from sessions to fix startup' . PHP_EOL); + foreach (glob(ROOT_DIR . "/$session/*ipc") as $file) { + info("removing: $file"); + unlink($file); + } + } } \ No newline at end of file From 4c942312af2db5c897909014511ea55bd5ae5f2c Mon Sep 17 00:00:00 2001 From: Alexander Pankratov Date: Sat, 23 Dec 2023 14:35:10 +0100 Subject: [PATCH 131/270] Serialize after changing eventHandlers --- src/MadelineProtoExtensions/ApiExtensions.php | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/src/MadelineProtoExtensions/ApiExtensions.php b/src/MadelineProtoExtensions/ApiExtensions.php index c022f6e..2283d3d 100644 --- a/src/MadelineProtoExtensions/ApiExtensions.php +++ b/src/MadelineProtoExtensions/ApiExtensions.php @@ -517,9 +517,11 @@ public function uploadMediaForm(): array public function setEventHandler(): void { Client::getWrapper($this->madelineProto)->getAPI()->setEventHandler(EventHandler::class); + Client::getWrapper($this->madelineProto)->serialize(); } - public function getUpdates(array $params): array { + public function getUpdates(array $params): array + { foreach ($params as $key => $value) { $params[$key] = match($key) { 'offset', 'limit' => (int) $value, @@ -531,6 +533,18 @@ public function getUpdates(array $params): array { return $this->madelineProto->getUpdates($params); } + public function setNoop(): void + { + $this->madelineProto->setNoop(); + Client::getWrapper($this->madelineProto)->serialize(); + } + + public function setWebhook(string $url): void + { + $this->madelineProto->setWebhook($url); + Client::getWrapper($this->madelineProto)->serialize(); + } + public function unsubscribeFromUpdates(?string $channel = null): array { $inputChannelId = null; if ($channel) { From f56c7273e60f99a34ecb8bb1bace008e83be71c9 Mon Sep 17 00:00:00 2001 From: Alexander Pankratov Date: Wed, 10 Jan 2024 20:13:39 +0100 Subject: [PATCH 132/270] Update madelineProto --- composer.lock | 126 +++++++++++++++++++++++++------------------------- 1 file changed, 63 insertions(+), 63 deletions(-) diff --git a/composer.lock b/composer.lock index 6455d63..038c852 100644 --- a/composer.lock +++ b/composer.lock @@ -317,16 +317,16 @@ }, { "name": "amphp/file", - "version": "v3.0.1", + "version": "v3.0.2", "source": { "type": "git", "url": "https://github.com/amphp/file.git", - "reference": "efeb737b1f19a7fcfe8a763c5ef2ad80dbac93dd" + "reference": "45d8d84c4496c695cf2ca2bf05f236a3e36c3558" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/amphp/file/zipball/efeb737b1f19a7fcfe8a763c5ef2ad80dbac93dd", - "reference": "efeb737b1f19a7fcfe8a763c5ef2ad80dbac93dd", + "url": "https://api.github.com/repos/amphp/file/zipball/45d8d84c4496c695cf2ca2bf05f236a3e36c3558", + "reference": "45d8d84c4496c695cf2ca2bf05f236a3e36c3558", "shasum": "" }, "require": { @@ -390,7 +390,7 @@ ], "support": { "issues": "https://github.com/amphp/file/issues", - "source": "https://github.com/amphp/file/tree/v3.0.1" + "source": "https://github.com/amphp/file/tree/v3.0.2" }, "funding": [ { @@ -398,7 +398,7 @@ "type": "github" } ], - "time": "2023-07-23T18:54:06+00:00" + "time": "2023-12-27T22:52:04+00:00" }, { "name": "amphp/hpack", @@ -712,16 +712,16 @@ }, { "name": "amphp/http-server", - "version": "v3.2.0", + "version": "v3.3.0", "source": { "type": "git", "url": "https://github.com/amphp/http-server.git", - "reference": "0f658ebb8dcc0d352b26f8021288ff101e3888b5" + "reference": "4b580fec9ecb7d24a080c8d3b47404cb76759fca" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/amphp/http-server/zipball/0f658ebb8dcc0d352b26f8021288ff101e3888b5", - "reference": "0f658ebb8dcc0d352b26f8021288ff101e3888b5", + "url": "https://api.github.com/repos/amphp/http-server/zipball/4b580fec9ecb7d24a080c8d3b47404cb76759fca", + "reference": "4b580fec9ecb7d24a080c8d3b47404cb76759fca", "shasum": "" }, "require": { @@ -797,7 +797,7 @@ ], "support": { "issues": "https://github.com/amphp/http-server/issues", - "source": "https://github.com/amphp/http-server/tree/v3.2.0" + "source": "https://github.com/amphp/http-server/tree/v3.3.0" }, "funding": [ { @@ -805,7 +805,7 @@ "type": "github" } ], - "time": "2023-08-24T23:40:38+00:00" + "time": "2023-12-28T23:14:52+00:00" }, { "name": "amphp/http-server-form-parser", @@ -1045,16 +1045,16 @@ }, { "name": "amphp/mysql", - "version": "v3.0.0-beta.8", + "version": "v3.0.0-beta.9", "source": { "type": "git", "url": "https://github.com/amphp/mysql.git", - "reference": "e95eee910fdab24e26d4d0e86d6120e790d88c9b" + "reference": "c0144febfe9c53f923454eb06a28272d70322e31" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/amphp/mysql/zipball/e95eee910fdab24e26d4d0e86d6120e790d88c9b", - "reference": "e95eee910fdab24e26d4d0e86d6120e790d88c9b", + "url": "https://api.github.com/repos/amphp/mysql/zipball/c0144febfe9c53f923454eb06a28272d70322e31", + "reference": "c0144febfe9c53f923454eb06a28272d70322e31", "shasum": "" }, "require": { @@ -1103,7 +1103,7 @@ "description": "Asynchronous MySQL client for PHP based on Amp.", "support": { "issues": "https://github.com/amphp/mysql/issues", - "source": "https://github.com/amphp/mysql/tree/v3.0.0-beta.8" + "source": "https://github.com/amphp/mysql/tree/v3.0.0-beta.9" }, "funding": [ { @@ -1111,20 +1111,20 @@ "type": "github" } ], - "time": "2023-12-17T16:54:19+00:00" + "time": "2023-12-30T18:35:57+00:00" }, { "name": "amphp/parallel", - "version": "v2.2.4", + "version": "v2.2.6", "source": { "type": "git", "url": "https://github.com/amphp/parallel.git", - "reference": "8b8f33a742c2ba63a8bfff664f5836c26f1996ed" + "reference": "5aeaad20297507cc754859236720501b54306eba" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/amphp/parallel/zipball/8b8f33a742c2ba63a8bfff664f5836c26f1996ed", - "reference": "8b8f33a742c2ba63a8bfff664f5836c26f1996ed", + "url": "https://api.github.com/repos/amphp/parallel/zipball/5aeaad20297507cc754859236720501b54306eba", + "reference": "5aeaad20297507cc754859236720501b54306eba", "shasum": "" }, "require": { @@ -1143,7 +1143,7 @@ "amphp/php-cs-fixer-config": "^2", "amphp/phpunit-util": "^3", "phpunit/phpunit": "^9", - "psalm/phar": "^5.4" + "psalm/phar": "^5.18" }, "type": "library", "autoload": { @@ -1186,7 +1186,7 @@ ], "support": { "issues": "https://github.com/amphp/parallel/issues", - "source": "https://github.com/amphp/parallel/tree/v2.2.4" + "source": "https://github.com/amphp/parallel/tree/v2.2.6" }, "funding": [ { @@ -1194,7 +1194,7 @@ "type": "github" } ], - "time": "2023-11-29T04:21:30+00:00" + "time": "2024-01-07T18:12:13+00:00" }, { "name": "amphp/parser", @@ -1606,16 +1606,16 @@ }, { "name": "amphp/socket", - "version": "v2.2.1", + "version": "v2.2.2", "source": { "type": "git", "url": "https://github.com/amphp/socket.git", - "reference": "88ca6d2cfec2f40b1c7beac7316a26cd916fd209" + "reference": "eb6c5e6baae5aebd9a209f50e81bff38c7efef97" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/amphp/socket/zipball/88ca6d2cfec2f40b1c7beac7316a26cd916fd209", - "reference": "88ca6d2cfec2f40b1c7beac7316a26cd916fd209", + "url": "https://api.github.com/repos/amphp/socket/zipball/eb6c5e6baae5aebd9a209f50e81bff38c7efef97", + "reference": "eb6c5e6baae5aebd9a209f50e81bff38c7efef97", "shasum": "" }, "require": { @@ -1678,7 +1678,7 @@ ], "support": { "issues": "https://github.com/amphp/socket/issues", - "source": "https://github.com/amphp/socket/tree/v2.2.1" + "source": "https://github.com/amphp/socket/tree/v2.2.2" }, "funding": [ { @@ -1686,7 +1686,7 @@ "type": "github" } ], - "time": "2023-12-16T00:08:33+00:00" + "time": "2023-12-31T18:12:01+00:00" }, { "name": "amphp/sql", @@ -1744,16 +1744,16 @@ }, { "name": "amphp/sql-common", - "version": "v2.0.0-beta.9", + "version": "v2.0.0-beta.10", "source": { "type": "git", "url": "https://github.com/amphp/sql-common.git", - "reference": "891749895e5de6fa7f38b1bc016f8d00a8dc8d3f" + "reference": "5d7dce71ba6618b46c23e2770b9d765f7fcc2653" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/amphp/sql-common/zipball/891749895e5de6fa7f38b1bc016f8d00a8dc8d3f", - "reference": "891749895e5de6fa7f38b1bc016f8d00a8dc8d3f", + "url": "https://api.github.com/repos/amphp/sql-common/zipball/5d7dce71ba6618b46c23e2770b9d765f7fcc2653", + "reference": "5d7dce71ba6618b46c23e2770b9d765f7fcc2653", "shasum": "" }, "require": { @@ -1788,7 +1788,7 @@ ], "support": { "issues": "https://github.com/amphp/sql-common/issues", - "source": "https://github.com/amphp/sql-common/tree/v2.0.0-beta.9" + "source": "https://github.com/amphp/sql-common/tree/v2.0.0-beta.10" }, "funding": [ { @@ -1796,7 +1796,7 @@ "type": "github" } ], - "time": "2023-12-17T16:24:08+00:00" + "time": "2023-12-30T17:18:49+00:00" }, { "name": "amphp/sync", @@ -1875,16 +1875,16 @@ }, { "name": "amphp/websocket", - "version": "v2.0.2", + "version": "v2.0.3", "source": { "type": "git", "url": "https://github.com/amphp/websocket.git", - "reference": "49e6e4349453e799f1db3a350d23bd0aae9725dd" + "reference": "1dc9d2c3b9b10965510d2762181254d825098419" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/amphp/websocket/zipball/49e6e4349453e799f1db3a350d23bd0aae9725dd", - "reference": "49e6e4349453e799f1db3a350d23bd0aae9725dd", + "url": "https://api.github.com/repos/amphp/websocket/zipball/1dc9d2c3b9b10965510d2762181254d825098419", + "reference": "1dc9d2c3b9b10965510d2762181254d825098419", "shasum": "" }, "require": { @@ -1900,7 +1900,7 @@ "amphp/php-cs-fixer-config": "^2", "amphp/phpunit-util": "^3", "phpunit/phpunit": "^9", - "psalm/phar": "^5.4" + "psalm/phar": "^5.18" }, "suggest": { "ext-zlib": "Required for compression" @@ -1944,7 +1944,7 @@ ], "support": { "issues": "https://github.com/amphp/websocket/issues", - "source": "https://github.com/amphp/websocket/tree/v2.0.2" + "source": "https://github.com/amphp/websocket/tree/v2.0.3" }, "funding": [ { @@ -1952,41 +1952,41 @@ "type": "github" } ], - "time": "2023-10-21T17:09:30+00:00" + "time": "2023-12-28T23:16:28+00:00" }, { "name": "amphp/websocket-client", - "version": "v2.0.0-beta.4", + "version": "v2.0.0", "source": { "type": "git", "url": "https://github.com/amphp/websocket-client.git", - "reference": "f6d27ccfffb7991d1c6927dfda7ccf81a6fdf069" + "reference": "87a5d324997421c79cafbacb9a0f870f95fd42e9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/amphp/websocket-client/zipball/f6d27ccfffb7991d1c6927dfda7ccf81a6fdf069", - "reference": "f6d27ccfffb7991d1c6927dfda7ccf81a6fdf069", + "url": "https://api.github.com/repos/amphp/websocket-client/zipball/87a5d324997421c79cafbacb9a0f870f95fd42e9", + "reference": "87a5d324997421c79cafbacb9a0f870f95fd42e9", "shasum": "" }, "require": { "amphp/amp": "^3", - "amphp/byte-stream": "^2", - "amphp/http": "^2", + "amphp/byte-stream": "^2.1", + "amphp/http": "^2.1", "amphp/http-client": "^5", - "amphp/socket": "^2", + "amphp/socket": "^2.2", "amphp/websocket": "^2", - "league/uri": "^6.8 | ^7.1", + "league/uri": "^6.8|^7.1", "php": ">=8.1", - "psr/http-message": "^1 | ^2", + "psr/http-message": "^1|^2", "revolt/event-loop": "^1" }, "require-dev": { "amphp/http-server": "^3", "amphp/php-cs-fixer-config": "^2", "amphp/phpunit-util": "^3", - "amphp/websocket-server": "^3", + "amphp/websocket-server": "^3|^4", "phpunit/phpunit": "^9", - "psalm/phar": "^5.4", + "psalm/phar": "^5.18", "psr/log": "^1" }, "type": "library", @@ -2028,7 +2028,7 @@ ], "support": { "issues": "https://github.com/amphp/websocket-client/issues", - "source": "https://github.com/amphp/websocket-client/tree/v2.0.0-beta.4" + "source": "https://github.com/amphp/websocket-client/tree/v2.0.0" }, "funding": [ { @@ -2036,7 +2036,7 @@ "type": "github" } ], - "time": "2023-10-20T03:01:02+00:00" + "time": "2023-12-28T01:48:55+00:00" }, { "name": "amphp/websocket-server", @@ -3563,16 +3563,16 @@ }, { "name": "phpseclib/phpseclib", - "version": "3.0.34", + "version": "3.0.35", "source": { "type": "git", "url": "https://github.com/phpseclib/phpseclib.git", - "reference": "56c79f16a6ae17e42089c06a2144467acc35348a" + "reference": "4b1827beabce71953ca479485c0ae9c51287f2fe" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpseclib/phpseclib/zipball/56c79f16a6ae17e42089c06a2144467acc35348a", - "reference": "56c79f16a6ae17e42089c06a2144467acc35348a", + "url": "https://api.github.com/repos/phpseclib/phpseclib/zipball/4b1827beabce71953ca479485c0ae9c51287f2fe", + "reference": "4b1827beabce71953ca479485c0ae9c51287f2fe", "shasum": "" }, "require": { @@ -3653,7 +3653,7 @@ ], "support": { "issues": "https://github.com/phpseclib/phpseclib/issues", - "source": "https://github.com/phpseclib/phpseclib/tree/3.0.34" + "source": "https://github.com/phpseclib/phpseclib/tree/3.0.35" }, "funding": [ { @@ -3669,7 +3669,7 @@ "type": "tidelift" } ], - "time": "2023-11-27T11:13:31+00:00" + "time": "2023-12-29T01:59:53+00:00" }, { "name": "psr/http-factory", From 3bae478e81b28851575b3538a71b7db08916202f Mon Sep 17 00:00:00 2001 From: Alexander Pankratov Date: Fri, 26 Jan 2024 19:59:49 +0100 Subject: [PATCH 133/270] Update madelineProto --- composer.lock | 32 +++++++++++++++++--------------- 1 file changed, 17 insertions(+), 15 deletions(-) diff --git a/composer.lock b/composer.lock index 038c852..88e517e 100644 --- a/composer.lock +++ b/composer.lock @@ -2516,12 +2516,12 @@ "source": { "type": "git", "url": "https://github.com/danog/MadelineProto.git", - "reference": "b8f796d361451b30f203f9f1424ce44a3fd0f1df" + "reference": "ab884bbfd3434cecaa4e3df9fd6b925ae6d31718" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/danog/MadelineProto/zipball/b8f796d361451b30f203f9f1424ce44a3fd0f1df", - "reference": "b8f796d361451b30f203f9f1424ce44a3fd0f1df", + "url": "https://api.github.com/repos/danog/MadelineProto/zipball/ab884bbfd3434cecaa4e3df9fd6b925ae6d31718", + "reference": "ab884bbfd3434cecaa4e3df9fd6b925ae6d31718", "shasum": "" }, "require": { @@ -2552,8 +2552,8 @@ "ext-xml": "*", "ext-zlib": "*", "league/uri": "^7", - "nikic/php-parser": "^4.16", - "php-64bit": ">=8.1", + "nikic/php-parser": "^5", + "php-64bit": ">=8.2.4", "phpseclib/phpseclib": "^3.0.22", "psr/http-factory": "^1.0", "psr/log": "^3", @@ -2638,7 +2638,7 @@ "type": "github" } ], - "time": "2023-12-23T12:18:08+00:00" + "time": "2024-01-10T19:12:54+00:00" }, { "name": "danog/primemodule", @@ -3315,25 +3315,27 @@ }, { "name": "nikic/php-parser", - "version": "v4.18.0", + "version": "v5.0.0", "source": { "type": "git", "url": "https://github.com/nikic/PHP-Parser.git", - "reference": "1bcbb2179f97633e98bbbc87044ee2611c7d7999" + "reference": "4a21235f7e56e713259a6f76bf4b5ea08502b9dc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/1bcbb2179f97633e98bbbc87044ee2611c7d7999", - "reference": "1bcbb2179f97633e98bbbc87044ee2611c7d7999", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/4a21235f7e56e713259a6f76bf4b5ea08502b9dc", + "reference": "4a21235f7e56e713259a6f76bf4b5ea08502b9dc", "shasum": "" }, "require": { + "ext-ctype": "*", + "ext-json": "*", "ext-tokenizer": "*", - "php": ">=7.0" + "php": ">=7.4" }, "require-dev": { "ircmaxell/php-yacc": "^0.0.7", - "phpunit/phpunit": "^6.5 || ^7.0 || ^8.0 || ^9.0" + "phpunit/phpunit": "^7.0 || ^8.0 || ^9.0" }, "bin": [ "bin/php-parse" @@ -3341,7 +3343,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "4.9-dev" + "dev-master": "5.0-dev" } }, "autoload": { @@ -3365,9 +3367,9 @@ ], "support": { "issues": "https://github.com/nikic/PHP-Parser/issues", - "source": "https://github.com/nikic/PHP-Parser/tree/v4.18.0" + "source": "https://github.com/nikic/PHP-Parser/tree/v5.0.0" }, - "time": "2023-12-10T21:03:43+00:00" + "time": "2024-01-07T17:17:35+00:00" }, { "name": "paragonie/constant_time_encoding", From eaed59ac9e58c4cbefaf60f0fcde0dc67512ae93 Mon Sep 17 00:00:00 2001 From: Alexander Pankratov Date: Fri, 26 Jan 2024 22:58:18 +0100 Subject: [PATCH 134/270] Update madelineProto --- composer.lock | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/composer.lock b/composer.lock index 88e517e..3e8c606 100644 --- a/composer.lock +++ b/composer.lock @@ -2516,12 +2516,12 @@ "source": { "type": "git", "url": "https://github.com/danog/MadelineProto.git", - "reference": "ab884bbfd3434cecaa4e3df9fd6b925ae6d31718" + "reference": "5f40155aee6afe29a01047a3303b57bae69b2a72" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/danog/MadelineProto/zipball/ab884bbfd3434cecaa4e3df9fd6b925ae6d31718", - "reference": "ab884bbfd3434cecaa4e3df9fd6b925ae6d31718", + "url": "https://api.github.com/repos/danog/MadelineProto/zipball/5f40155aee6afe29a01047a3303b57bae69b2a72", + "reference": "5f40155aee6afe29a01047a3303b57bae69b2a72", "shasum": "" }, "require": { @@ -2553,7 +2553,7 @@ "ext-zlib": "*", "league/uri": "^7", "nikic/php-parser": "^5", - "php-64bit": ">=8.2.4", + "php-64bit": ">=8.1", "phpseclib/phpseclib": "^3.0.22", "psr/http-factory": "^1.0", "psr/log": "^3", @@ -2638,7 +2638,7 @@ "type": "github" } ], - "time": "2024-01-10T19:12:54+00:00" + "time": "2024-01-26T21:57:33+00:00" }, { "name": "danog/primemodule", From 73f3e942763342be21c86047194906b9a8010a48 Mon Sep 17 00:00:00 2001 From: Alexander Pankratov Date: Tue, 5 Mar 2024 19:05:33 +0300 Subject: [PATCH 135/270] Update madelineProto --- composer.lock | 130 ++++++++++++++++++++++++-------------------------- 1 file changed, 62 insertions(+), 68 deletions(-) diff --git a/composer.lock b/composer.lock index 3e8c606..b74c6b4 100644 --- a/composer.lock +++ b/composer.lock @@ -89,16 +89,16 @@ }, { "name": "amphp/byte-stream", - "version": "v2.1.0", + "version": "v2.1.1", "source": { "type": "git", "url": "https://github.com/amphp/byte-stream.git", - "reference": "0a4b0e80dad92c75e6131f8ad253919211540338" + "reference": "daa00f2efdbd71565bf64ffefa89e37542addf93" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/amphp/byte-stream/zipball/0a4b0e80dad92c75e6131f8ad253919211540338", - "reference": "0a4b0e80dad92c75e6131f8ad253919211540338", + "url": "https://api.github.com/repos/amphp/byte-stream/zipball/daa00f2efdbd71565bf64ffefa89e37542addf93", + "reference": "daa00f2efdbd71565bf64ffefa89e37542addf93", "shasum": "" }, "require": { @@ -114,7 +114,7 @@ "amphp/php-cs-fixer-config": "^2", "amphp/phpunit-util": "^3", "phpunit/phpunit": "^9", - "psalm/phar": "^5.4" + "psalm/phar": "5.22.1" }, "type": "library", "autoload": { @@ -152,7 +152,7 @@ ], "support": { "issues": "https://github.com/amphp/byte-stream/issues", - "source": "https://github.com/amphp/byte-stream/tree/v2.1.0" + "source": "https://github.com/amphp/byte-stream/tree/v2.1.1" }, "funding": [ { @@ -160,7 +160,7 @@ "type": "github" } ], - "time": "2023-11-19T14:34:16+00:00" + "time": "2024-02-17T04:49:38+00:00" }, { "name": "amphp/cache", @@ -229,16 +229,16 @@ }, { "name": "amphp/dns", - "version": "v2.1.0", + "version": "v2.1.1", "source": { "type": "git", "url": "https://github.com/amphp/dns.git", - "reference": "c3b518f321f26e786554480de580f06b9f34d1cd" + "reference": "3e3f413fbbaacd9632b1612941b363fa26a72e52" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/amphp/dns/zipball/c3b518f321f26e786554480de580f06b9f34d1cd", - "reference": "c3b518f321f26e786554480de580f06b9f34d1cd", + "url": "https://api.github.com/repos/amphp/dns/zipball/3e3f413fbbaacd9632b1612941b363fa26a72e52", + "reference": "3e3f413fbbaacd9632b1612941b363fa26a72e52", "shasum": "" }, "require": { @@ -246,7 +246,7 @@ "amphp/byte-stream": "^2", "amphp/cache": "^2", "amphp/parser": "^1", - "amphp/windows-registry": "^1", + "amphp/windows-registry": "^1.0.1", "daverandom/libdns": "^2.0.2", "ext-filter": "*", "php": ">=8.1", @@ -256,7 +256,7 @@ "amphp/php-cs-fixer-config": "^2", "amphp/phpunit-util": "^3", "phpunit/phpunit": "^9", - "psalm/phar": "^5.4" + "psalm/phar": "5.20" }, "type": "library", "autoload": { @@ -305,7 +305,7 @@ ], "support": { "issues": "https://github.com/amphp/dns/issues", - "source": "https://github.com/amphp/dns/tree/v2.1.0" + "source": "https://github.com/amphp/dns/tree/v2.1.1" }, "funding": [ { @@ -313,7 +313,7 @@ "type": "github" } ], - "time": "2023-11-18T15:49:57+00:00" + "time": "2024-01-30T23:25:30+00:00" }, { "name": "amphp/file", @@ -1399,16 +1399,16 @@ }, { "name": "amphp/process", - "version": "v2.0.1", + "version": "v2.0.2", "source": { "type": "git", "url": "https://github.com/amphp/process.git", - "reference": "a65d3bc1f36ef12d44df42a68f0f0643183f1052" + "reference": "a79dc87100be857db2c4bbfd5369585a6d1e658c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/amphp/process/zipball/a65d3bc1f36ef12d44df42a68f0f0643183f1052", - "reference": "a65d3bc1f36ef12d44df42a68f0f0643183f1052", + "url": "https://api.github.com/repos/amphp/process/zipball/a79dc87100be857db2c4bbfd5369585a6d1e658c", + "reference": "a79dc87100be857db2c4bbfd5369585a6d1e658c", "shasum": "" }, "require": { @@ -1455,7 +1455,7 @@ "homepage": "https://amphp.org/process", "support": { "issues": "https://github.com/amphp/process/issues", - "source": "https://github.com/amphp/process/tree/v2.0.1" + "source": "https://github.com/amphp/process/tree/v2.0.2" }, "funding": [ { @@ -1463,7 +1463,7 @@ "type": "github" } ], - "time": "2023-01-15T16:00:57+00:00" + "time": "2024-02-13T20:38:21+00:00" }, { "name": "amphp/redis", @@ -1606,16 +1606,16 @@ }, { "name": "amphp/socket", - "version": "v2.2.2", + "version": "v2.2.4", "source": { "type": "git", "url": "https://github.com/amphp/socket.git", - "reference": "eb6c5e6baae5aebd9a209f50e81bff38c7efef97" + "reference": "4223324c627cc26d44800630411e64856d3344bc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/amphp/socket/zipball/eb6c5e6baae5aebd9a209f50e81bff38c7efef97", - "reference": "eb6c5e6baae5aebd9a209f50e81bff38c7efef97", + "url": "https://api.github.com/repos/amphp/socket/zipball/4223324c627cc26d44800630411e64856d3344bc", + "reference": "4223324c627cc26d44800630411e64856d3344bc", "shasum": "" }, "require": { @@ -1634,7 +1634,7 @@ "amphp/phpunit-util": "^3", "amphp/process": "^2", "phpunit/phpunit": "^9", - "psalm/phar": "^5.4" + "psalm/phar": "5.20" }, "type": "library", "autoload": { @@ -1678,7 +1678,7 @@ ], "support": { "issues": "https://github.com/amphp/socket/issues", - "source": "https://github.com/amphp/socket/tree/v2.2.2" + "source": "https://github.com/amphp/socket/tree/v2.2.4" }, "funding": [ { @@ -1686,7 +1686,7 @@ "type": "github" } ], - "time": "2023-12-31T18:12:01+00:00" + "time": "2024-02-28T15:56:06+00:00" }, { "name": "amphp/sql", @@ -2127,16 +2127,16 @@ }, { "name": "amphp/windows-registry", - "version": "v1.0.0", + "version": "v1.0.1", "source": { "type": "git", "url": "https://github.com/amphp/windows-registry.git", - "reference": "8248247a41af7f97b88e4716c0f8de39696ef111" + "reference": "0d569e8f256cca974e3842b6e78b4e434bf98306" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/amphp/windows-registry/zipball/8248247a41af7f97b88e4716c0f8de39696ef111", - "reference": "8248247a41af7f97b88e4716c0f8de39696ef111", + "url": "https://api.github.com/repos/amphp/windows-registry/zipball/0d569e8f256cca974e3842b6e78b4e434bf98306", + "reference": "0d569e8f256cca974e3842b6e78b4e434bf98306", "shasum": "" }, "require": { @@ -2167,7 +2167,7 @@ "description": "Windows Registry Reader.", "support": { "issues": "https://github.com/amphp/windows-registry/issues", - "source": "https://github.com/amphp/windows-registry/tree/v1.0.0" + "source": "https://github.com/amphp/windows-registry/tree/v1.0.1" }, "funding": [ { @@ -2175,7 +2175,7 @@ "type": "github" } ], - "time": "2023-01-09T22:29:20+00:00" + "time": "2024-01-30T23:01:51+00:00" }, { "name": "bacon/bacon-qr-code", @@ -2516,12 +2516,12 @@ "source": { "type": "git", "url": "https://github.com/danog/MadelineProto.git", - "reference": "5f40155aee6afe29a01047a3303b57bae69b2a72" + "reference": "207a3d5636fe35b4fe53541079546f9b807714d5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/danog/MadelineProto/zipball/5f40155aee6afe29a01047a3303b57bae69b2a72", - "reference": "5f40155aee6afe29a01047a3303b57bae69b2a72", + "url": "https://api.github.com/repos/danog/MadelineProto/zipball/207a3d5636fe35b4fe53541079546f9b807714d5", + "reference": "207a3d5636fe35b4fe53541079546f9b807714d5", "shasum": "" }, "require": { @@ -2638,7 +2638,7 @@ "type": "github" } ], - "time": "2024-01-26T21:57:33+00:00" + "time": "2024-03-05T16:04:06+00:00" }, { "name": "danog/primemodule", @@ -3315,16 +3315,16 @@ }, { "name": "nikic/php-parser", - "version": "v5.0.0", + "version": "v5.0.1", "source": { "type": "git", "url": "https://github.com/nikic/PHP-Parser.git", - "reference": "4a21235f7e56e713259a6f76bf4b5ea08502b9dc" + "reference": "2218c2252c874a4624ab2f613d86ac32d227bc69" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/4a21235f7e56e713259a6f76bf4b5ea08502b9dc", - "reference": "4a21235f7e56e713259a6f76bf4b5ea08502b9dc", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/2218c2252c874a4624ab2f613d86ac32d227bc69", + "reference": "2218c2252c874a4624ab2f613d86ac32d227bc69", "shasum": "" }, "require": { @@ -3367,9 +3367,9 @@ ], "support": { "issues": "https://github.com/nikic/PHP-Parser/issues", - "source": "https://github.com/nikic/PHP-Parser/tree/v5.0.0" + "source": "https://github.com/nikic/PHP-Parser/tree/v5.0.1" }, - "time": "2024-01-07T17:17:35+00:00" + "time": "2024-02-21T19:24:10+00:00" }, { "name": "paragonie/constant_time_encoding", @@ -3565,16 +3565,16 @@ }, { "name": "phpseclib/phpseclib", - "version": "3.0.35", + "version": "3.0.37", "source": { "type": "git", "url": "https://github.com/phpseclib/phpseclib.git", - "reference": "4b1827beabce71953ca479485c0ae9c51287f2fe" + "reference": "cfa2013d0f68c062055180dd4328cc8b9d1f30b8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpseclib/phpseclib/zipball/4b1827beabce71953ca479485c0ae9c51287f2fe", - "reference": "4b1827beabce71953ca479485c0ae9c51287f2fe", + "url": "https://api.github.com/repos/phpseclib/phpseclib/zipball/cfa2013d0f68c062055180dd4328cc8b9d1f30b8", + "reference": "cfa2013d0f68c062055180dd4328cc8b9d1f30b8", "shasum": "" }, "require": { @@ -3655,7 +3655,7 @@ ], "support": { "issues": "https://github.com/phpseclib/phpseclib/issues", - "source": "https://github.com/phpseclib/phpseclib/tree/3.0.35" + "source": "https://github.com/phpseclib/phpseclib/tree/3.0.37" }, "funding": [ { @@ -3671,7 +3671,7 @@ "type": "tidelift" } ], - "time": "2023-12-29T01:59:53+00:00" + "time": "2024-03-03T02:14:58+00:00" }, { "name": "psr/http-factory", @@ -3905,16 +3905,16 @@ }, { "name": "symfony/polyfill-ctype", - "version": "v1.28.0", + "version": "v1.29.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-ctype.git", - "reference": "ea208ce43cbb04af6867b4fdddb1bdbf84cc28cb" + "reference": "ef4d7e442ca910c4764bce785146269b30cb5fc4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/ea208ce43cbb04af6867b4fdddb1bdbf84cc28cb", - "reference": "ea208ce43cbb04af6867b4fdddb1bdbf84cc28cb", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/ef4d7e442ca910c4764bce785146269b30cb5fc4", + "reference": "ef4d7e442ca910c4764bce785146269b30cb5fc4", "shasum": "" }, "require": { @@ -3928,9 +3928,6 @@ }, "type": "library", "extra": { - "branch-alias": { - "dev-main": "1.28-dev" - }, "thanks": { "name": "symfony/polyfill", "url": "https://github.com/symfony/polyfill" @@ -3967,7 +3964,7 @@ "portable" ], "support": { - "source": "https://github.com/symfony/polyfill-ctype/tree/v1.28.0" + "source": "https://github.com/symfony/polyfill-ctype/tree/v1.29.0" }, "funding": [ { @@ -3983,20 +3980,20 @@ "type": "tidelift" } ], - "time": "2023-01-26T09:26:14+00:00" + "time": "2024-01-29T20:11:03+00:00" }, { "name": "symfony/polyfill-mbstring", - "version": "v1.28.0", + "version": "v1.29.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "42292d99c55abe617799667f454222c54c60e229" + "reference": "9773676c8a1bb1f8d4340a62efe641cf76eda7ec" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/42292d99c55abe617799667f454222c54c60e229", - "reference": "42292d99c55abe617799667f454222c54c60e229", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/9773676c8a1bb1f8d4340a62efe641cf76eda7ec", + "reference": "9773676c8a1bb1f8d4340a62efe641cf76eda7ec", "shasum": "" }, "require": { @@ -4010,9 +4007,6 @@ }, "type": "library", "extra": { - "branch-alias": { - "dev-main": "1.28-dev" - }, "thanks": { "name": "symfony/polyfill", "url": "https://github.com/symfony/polyfill" @@ -4050,7 +4044,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.28.0" + "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.29.0" }, "funding": [ { @@ -4066,7 +4060,7 @@ "type": "tidelift" } ], - "time": "2023-07-28T09:04:16+00:00" + "time": "2024-01-29T20:11:03+00:00" }, { "name": "vlucas/phpdotenv", From cfe8e0c3b3123f5e264a6e2f6f1926eef5fd460a Mon Sep 17 00:00:00 2001 From: Alexander Pankratov Date: Thu, 21 Mar 2024 11:26:10 +0100 Subject: [PATCH 136/270] Update madelineProto --- composer.lock | 142 +++++++++++++++++++++++++------------------------- 1 file changed, 72 insertions(+), 70 deletions(-) diff --git a/composer.lock b/composer.lock index b74c6b4..62468bd 100644 --- a/composer.lock +++ b/composer.lock @@ -1045,25 +1045,25 @@ }, { "name": "amphp/mysql", - "version": "v3.0.0-beta.9", + "version": "v3.0.0", "source": { "type": "git", "url": "https://github.com/amphp/mysql.git", - "reference": "c0144febfe9c53f923454eb06a28272d70322e31" + "reference": "0eb9d1df67c206c043b1a1c6ad7ba1bc2aa836bf" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/amphp/mysql/zipball/c0144febfe9c53f923454eb06a28272d70322e31", - "reference": "c0144febfe9c53f923454eb06a28272d70322e31", + "url": "https://api.github.com/repos/amphp/mysql/zipball/0eb9d1df67c206c043b1a1c6ad7ba1bc2aa836bf", + "reference": "0eb9d1df67c206c043b1a1c6ad7ba1bc2aa836bf", "shasum": "" }, "require": { "amphp/amp": "^3", "amphp/parser": "^1.1", "amphp/pipeline": "^1", - "amphp/socket": "^2", - "amphp/sql": "^2-beta.6", - "amphp/sql-common": "^2-beta.9", + "amphp/socket": "^2.2", + "amphp/sql": "^2", + "amphp/sql-common": "^2", "php": ">=8.1" }, "require-dev": { @@ -1075,7 +1075,7 @@ "ext-openssl": "*", "phpbench/phpbench": "^1.2.6", "phpunit/phpunit": "^9", - "psalm/phar": "^5.18" + "psalm/phar": "5.23" }, "type": "library", "autoload": { @@ -1103,7 +1103,7 @@ "description": "Asynchronous MySQL client for PHP based on Amp.", "support": { "issues": "https://github.com/amphp/mysql/issues", - "source": "https://github.com/amphp/mysql/tree/v3.0.0-beta.9" + "source": "https://github.com/amphp/mysql/tree/v3.0.0" }, "funding": [ { @@ -1111,25 +1111,26 @@ "type": "github" } ], - "time": "2023-12-30T18:35:57+00:00" + "time": "2024-03-10T17:33:58+00:00" }, { "name": "amphp/parallel", - "version": "v2.2.6", + "version": "v2.2.8", "source": { "type": "git", "url": "https://github.com/amphp/parallel.git", - "reference": "5aeaad20297507cc754859236720501b54306eba" + "reference": "efd71b342b64c2e46d904e4eb057ed5ab20f8e2d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/amphp/parallel/zipball/5aeaad20297507cc754859236720501b54306eba", - "reference": "5aeaad20297507cc754859236720501b54306eba", + "url": "https://api.github.com/repos/amphp/parallel/zipball/efd71b342b64c2e46d904e4eb057ed5ab20f8e2d", + "reference": "efd71b342b64c2e46d904e4eb057ed5ab20f8e2d", "shasum": "" }, "require": { "amphp/amp": "^3", "amphp/byte-stream": "^2", + "amphp/cache": "^2", "amphp/parser": "^1", "amphp/pipeline": "^1", "amphp/process": "^2", @@ -1186,7 +1187,7 @@ ], "support": { "issues": "https://github.com/amphp/parallel/issues", - "source": "https://github.com/amphp/parallel/tree/v2.2.6" + "source": "https://github.com/amphp/parallel/tree/v2.2.8" }, "funding": [ { @@ -1194,7 +1195,7 @@ "type": "github" } ], - "time": "2024-01-07T18:12:13+00:00" + "time": "2024-03-19T16:09:34+00:00" }, { "name": "amphp/parser", @@ -1260,16 +1261,16 @@ }, { "name": "amphp/pipeline", - "version": "v1.1.0", + "version": "v1.2.0", "source": { "type": "git", "url": "https://github.com/amphp/pipeline.git", - "reference": "8a0ecc281bb0932d6b4a786453aff18c55756e63" + "reference": "f1c2ce35d27ae86ead018adb803eccca7421dd9b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/amphp/pipeline/zipball/8a0ecc281bb0932d6b4a786453aff18c55756e63", - "reference": "8a0ecc281bb0932d6b4a786453aff18c55756e63", + "url": "https://api.github.com/repos/amphp/pipeline/zipball/f1c2ce35d27ae86ead018adb803eccca7421dd9b", + "reference": "f1c2ce35d27ae86ead018adb803eccca7421dd9b", "shasum": "" }, "require": { @@ -1315,7 +1316,7 @@ ], "support": { "issues": "https://github.com/amphp/pipeline/issues", - "source": "https://github.com/amphp/pipeline/tree/v1.1.0" + "source": "https://github.com/amphp/pipeline/tree/v1.2.0" }, "funding": [ { @@ -1323,27 +1324,27 @@ "type": "github" } ], - "time": "2023-12-23T04:34:28+00:00" + "time": "2024-03-10T14:48:16+00:00" }, { "name": "amphp/postgres", - "version": "v2.0.0-beta.6", + "version": "v2.0.0", "source": { "type": "git", "url": "https://github.com/amphp/postgres.git", - "reference": "81f2f192f8627794dc13a65d478f8ec517114d16" + "reference": "4fffbb2087e40ccaf779acdb27ca021d8718308d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/amphp/postgres/zipball/81f2f192f8627794dc13a65d478f8ec517114d16", - "reference": "81f2f192f8627794dc13a65d478f8ec517114d16", + "url": "https://api.github.com/repos/amphp/postgres/zipball/4fffbb2087e40ccaf779acdb27ca021d8718308d", + "reference": "4fffbb2087e40ccaf779acdb27ca021d8718308d", "shasum": "" }, "require": { "amphp/amp": "^3", "amphp/pipeline": "^1", - "amphp/sql": "^2-beta.6", - "amphp/sql-common": "^2-beta.9", + "amphp/sql": "^2", + "amphp/sql-common": "^2", "php": ">=8.1" }, "require-dev": { @@ -1352,7 +1353,7 @@ "ext-pgsql": "*", "ext-pq": "*", "phpunit/phpunit": "^9", - "psalm/phar": "^5.18" + "psalm/phar": "5.23" }, "type": "library", "autoload": { @@ -1387,7 +1388,7 @@ ], "support": { "issues": "https://github.com/amphp/postgres/issues", - "source": "https://github.com/amphp/postgres/tree/v2.0.0-beta.6" + "source": "https://github.com/amphp/postgres/tree/v2.0.0" }, "funding": [ { @@ -1395,7 +1396,7 @@ "type": "github" } ], - "time": "2023-12-17T16:39:43+00:00" + "time": "2024-03-10T17:02:44+00:00" }, { "name": "amphp/process", @@ -1606,16 +1607,16 @@ }, { "name": "amphp/socket", - "version": "v2.2.4", + "version": "v2.3.0", "source": { "type": "git", "url": "https://github.com/amphp/socket.git", - "reference": "4223324c627cc26d44800630411e64856d3344bc" + "reference": "acc0a2f65ab498025ba5641f7cce499c4b1ed4b5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/amphp/socket/zipball/4223324c627cc26d44800630411e64856d3344bc", - "reference": "4223324c627cc26d44800630411e64856d3344bc", + "url": "https://api.github.com/repos/amphp/socket/zipball/acc0a2f65ab498025ba5641f7cce499c4b1ed4b5", + "reference": "acc0a2f65ab498025ba5641f7cce499c4b1ed4b5", "shasum": "" }, "require": { @@ -1678,7 +1679,7 @@ ], "support": { "issues": "https://github.com/amphp/socket/issues", - "source": "https://github.com/amphp/socket/tree/v2.2.4" + "source": "https://github.com/amphp/socket/tree/v2.3.0" }, "funding": [ { @@ -1686,20 +1687,20 @@ "type": "github" } ], - "time": "2024-02-28T15:56:06+00:00" + "time": "2024-03-19T20:01:53+00:00" }, { "name": "amphp/sql", - "version": "v2.0.0-beta.6", + "version": "v2.0.0", "source": { "type": "git", "url": "https://github.com/amphp/sql.git", - "reference": "94798059de6953707fc6e517bba42483bb5e5bf7" + "reference": "4cf80b477b5d40089ba2c162373a604e06d57d7b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/amphp/sql/zipball/94798059de6953707fc6e517bba42483bb5e5bf7", - "reference": "94798059de6953707fc6e517bba42483bb5e5bf7", + "url": "https://api.github.com/repos/amphp/sql/zipball/4cf80b477b5d40089ba2c162373a604e06d57d7b", + "reference": "4cf80b477b5d40089ba2c162373a604e06d57d7b", "shasum": "" }, "require": { @@ -1709,7 +1710,7 @@ "require-dev": { "amphp/php-cs-fixer-config": "^2", "phpunit/phpunit": "^9", - "psalm/phar": "^5.4" + "psalm/phar": "5.23" }, "type": "library", "autoload": { @@ -1732,7 +1733,7 @@ ], "support": { "issues": "https://github.com/amphp/sql/issues", - "source": "https://github.com/amphp/sql/tree/v2.0.0-beta.6" + "source": "https://github.com/amphp/sql/tree/v2.0.0" }, "funding": [ { @@ -1740,32 +1741,32 @@ "type": "github" } ], - "time": "2023-12-08T23:57:41+00:00" + "time": "2024-03-10T15:03:32+00:00" }, { "name": "amphp/sql-common", - "version": "v2.0.0-beta.10", + "version": "v2.0.0", "source": { "type": "git", "url": "https://github.com/amphp/sql-common.git", - "reference": "5d7dce71ba6618b46c23e2770b9d765f7fcc2653" + "reference": "996b8ad67410a20f0df0e2315a174b4c58f21e1a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/amphp/sql-common/zipball/5d7dce71ba6618b46c23e2770b9d765f7fcc2653", - "reference": "5d7dce71ba6618b46c23e2770b9d765f7fcc2653", + "url": "https://api.github.com/repos/amphp/sql-common/zipball/996b8ad67410a20f0df0e2315a174b4c58f21e1a", + "reference": "996b8ad67410a20f0df0e2315a174b4c58f21e1a", "shasum": "" }, "require": { "amphp/amp": "^3", - "amphp/sql": "^2-beta.6", + "amphp/sql": "^2", "php": ">=8.1" }, "require-dev": { "amphp/php-cs-fixer-config": "^2", "amphp/phpunit-util": "^3", "phpunit/phpunit": "^9", - "psalm/phar": "^5.4" + "psalm/phar": "5.23" }, "type": "library", "autoload": { @@ -1788,7 +1789,7 @@ ], "support": { "issues": "https://github.com/amphp/sql-common/issues", - "source": "https://github.com/amphp/sql-common/tree/v2.0.0-beta.10" + "source": "https://github.com/amphp/sql-common/tree/v2.0.0" }, "funding": [ { @@ -1796,20 +1797,20 @@ "type": "github" } ], - "time": "2023-12-30T17:18:49+00:00" + "time": "2024-03-10T15:22:18+00:00" }, { "name": "amphp/sync", - "version": "v2.1.0", + "version": "v2.2.0", "source": { "type": "git", "url": "https://github.com/amphp/sync.git", - "reference": "50ddc7392cc8034b3e4798cef3cc90d3f4c0441c" + "reference": "375ef5b54a0d12c38e12728dde05a55e30f2fbec" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/amphp/sync/zipball/50ddc7392cc8034b3e4798cef3cc90d3f4c0441c", - "reference": "50ddc7392cc8034b3e4798cef3cc90d3f4c0441c", + "url": "https://api.github.com/repos/amphp/sync/zipball/375ef5b54a0d12c38e12728dde05a55e30f2fbec", + "reference": "375ef5b54a0d12c38e12728dde05a55e30f2fbec", "shasum": "" }, "require": { @@ -1823,7 +1824,7 @@ "amphp/php-cs-fixer-config": "^2", "amphp/phpunit-util": "^3", "phpunit/phpunit": "^9", - "psalm/phar": "^5.4" + "psalm/phar": "5.23" }, "type": "library", "autoload": { @@ -1863,7 +1864,7 @@ ], "support": { "issues": "https://github.com/amphp/sync/issues", - "source": "https://github.com/amphp/sync/tree/v2.1.0" + "source": "https://github.com/amphp/sync/tree/v2.2.0" }, "funding": [ { @@ -1871,7 +1872,7 @@ "type": "github" } ], - "time": "2023-08-19T13:53:40+00:00" + "time": "2024-03-12T01:00:01+00:00" }, { "name": "amphp/websocket", @@ -2516,12 +2517,12 @@ "source": { "type": "git", "url": "https://github.com/danog/MadelineProto.git", - "reference": "207a3d5636fe35b4fe53541079546f9b807714d5" + "reference": "73800b35ed0318cc72119a410cef353bc083c92d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/danog/MadelineProto/zipball/207a3d5636fe35b4fe53541079546f9b807714d5", - "reference": "207a3d5636fe35b4fe53541079546f9b807714d5", + "url": "https://api.github.com/repos/danog/MadelineProto/zipball/73800b35ed0318cc72119a410cef353bc083c92d", + "reference": "73800b35ed0318cc72119a410cef353bc083c92d", "shasum": "" }, "require": { @@ -2530,13 +2531,14 @@ "amphp/dns": "^2", "amphp/file": "^3.0.1", "amphp/http": "^2", - "amphp/http-client": "^5.0.0-beta.17", + "amphp/http-client": "^5", "amphp/http-client-cookies": "^2", "amphp/log": "^2", "amphp/mysql": "^3", "amphp/postgres": "^2", "amphp/redis": "^2", "amphp/socket": "^2", + "amphp/websocket-client": "^2", "bacon/bacon-qr-code": "^2.0", "danog/dns-over-https": "^1", "danog/ipc": "^1", @@ -2638,7 +2640,7 @@ "type": "github" } ], - "time": "2024-03-05T16:04:06+00:00" + "time": "2024-03-21T10:25:29+00:00" }, { "name": "danog/primemodule", @@ -3315,16 +3317,16 @@ }, { "name": "nikic/php-parser", - "version": "v5.0.1", + "version": "v5.0.2", "source": { "type": "git", "url": "https://github.com/nikic/PHP-Parser.git", - "reference": "2218c2252c874a4624ab2f613d86ac32d227bc69" + "reference": "139676794dc1e9231bf7bcd123cfc0c99182cb13" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/2218c2252c874a4624ab2f613d86ac32d227bc69", - "reference": "2218c2252c874a4624ab2f613d86ac32d227bc69", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/139676794dc1e9231bf7bcd123cfc0c99182cb13", + "reference": "139676794dc1e9231bf7bcd123cfc0c99182cb13", "shasum": "" }, "require": { @@ -3367,9 +3369,9 @@ ], "support": { "issues": "https://github.com/nikic/PHP-Parser/issues", - "source": "https://github.com/nikic/PHP-Parser/tree/v5.0.1" + "source": "https://github.com/nikic/PHP-Parser/tree/v5.0.2" }, - "time": "2024-02-21T19:24:10+00:00" + "time": "2024-03-05T20:51:40+00:00" }, { "name": "paragonie/constant_time_encoding", From 6a045fdfb1c59cfc0d065e30d40e3fbe4eb6fa75 Mon Sep 17 00:00:00 2001 From: Alexander Pankratov Date: Thu, 21 Mar 2024 11:26:10 +0100 Subject: [PATCH 137/270] Add serialize method --- src/MadelineProtoExtensions/ApiExtensions.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/MadelineProtoExtensions/ApiExtensions.php b/src/MadelineProtoExtensions/ApiExtensions.php index 2283d3d..d5250dc 100644 --- a/src/MadelineProtoExtensions/ApiExtensions.php +++ b/src/MadelineProtoExtensions/ApiExtensions.php @@ -520,6 +520,12 @@ public function setEventHandler(): void Client::getWrapper($this->madelineProto)->serialize(); } + public function serialize(): void + { + Client::getWrapper($this->madelineProto)->serialize(); + } + + public function getUpdates(array $params): array { foreach ($params as $key => $value) { From a2baf2de21084a7767eadad8a0d70992fb4eba66 Mon Sep 17 00:00:00 2001 From: Alexander Pankratov Date: Wed, 3 Apr 2024 14:47:09 +0200 Subject: [PATCH 138/270] Update madelineProto --- composer.lock | 80 +++++++++++++++++++++++++-------------------------- 1 file changed, 40 insertions(+), 40 deletions(-) diff --git a/composer.lock b/composer.lock index 62468bd..6c7e2b1 100644 --- a/composer.lock +++ b/composer.lock @@ -402,16 +402,16 @@ }, { "name": "amphp/hpack", - "version": "v3.2.0", + "version": "v3.2.1", "source": { "type": "git", "url": "https://github.com/amphp/hpack.git", - "reference": "95895d29ae577a3a5995b46d16def04e11e39947" + "reference": "4f293064b15682a2b178b1367ddf0b8b5feb0239" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/amphp/hpack/zipball/95895d29ae577a3a5995b46d16def04e11e39947", - "reference": "95895d29ae577a3a5995b46d16def04e11e39947", + "url": "https://api.github.com/repos/amphp/hpack/zipball/4f293064b15682a2b178b1367ddf0b8b5feb0239", + "reference": "4f293064b15682a2b178b1367ddf0b8b5feb0239", "shasum": "" }, "require": { @@ -464,7 +464,7 @@ ], "support": { "issues": "https://github.com/amphp/hpack/issues", - "source": "https://github.com/amphp/hpack/tree/v3.2.0" + "source": "https://github.com/amphp/hpack/tree/v3.2.1" }, "funding": [ { @@ -472,7 +472,7 @@ "type": "github" } ], - "time": "2023-09-05T19:59:20+00:00" + "time": "2024-03-21T19:00:16+00:00" }, { "name": "amphp/http", @@ -1115,16 +1115,16 @@ }, { "name": "amphp/parallel", - "version": "v2.2.8", + "version": "v2.2.9", "source": { "type": "git", "url": "https://github.com/amphp/parallel.git", - "reference": "efd71b342b64c2e46d904e4eb057ed5ab20f8e2d" + "reference": "73d293f1fc4df1bebc3c4fce1432e82dd7032238" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/amphp/parallel/zipball/efd71b342b64c2e46d904e4eb057ed5ab20f8e2d", - "reference": "efd71b342b64c2e46d904e4eb057ed5ab20f8e2d", + "url": "https://api.github.com/repos/amphp/parallel/zipball/73d293f1fc4df1bebc3c4fce1432e82dd7032238", + "reference": "73d293f1fc4df1bebc3c4fce1432e82dd7032238", "shasum": "" }, "require": { @@ -1187,7 +1187,7 @@ ], "support": { "issues": "https://github.com/amphp/parallel/issues", - "source": "https://github.com/amphp/parallel/tree/v2.2.8" + "source": "https://github.com/amphp/parallel/tree/v2.2.9" }, "funding": [ { @@ -1195,20 +1195,20 @@ "type": "github" } ], - "time": "2024-03-19T16:09:34+00:00" + "time": "2024-03-24T18:27:44+00:00" }, { "name": "amphp/parser", - "version": "v1.1.0", + "version": "v1.1.1", "source": { "type": "git", "url": "https://github.com/amphp/parser.git", - "reference": "ff1de4144726c5dad5fab97f66692ebe8de3e151" + "reference": "3cf1f8b32a0171d4b1bed93d25617637a77cded7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/amphp/parser/zipball/ff1de4144726c5dad5fab97f66692ebe8de3e151", - "reference": "ff1de4144726c5dad5fab97f66692ebe8de3e151", + "url": "https://api.github.com/repos/amphp/parser/zipball/3cf1f8b32a0171d4b1bed93d25617637a77cded7", + "reference": "3cf1f8b32a0171d4b1bed93d25617637a77cded7", "shasum": "" }, "require": { @@ -1249,7 +1249,7 @@ ], "support": { "issues": "https://github.com/amphp/parser/issues", - "source": "https://github.com/amphp/parser/tree/v1.1.0" + "source": "https://github.com/amphp/parser/tree/v1.1.1" }, "funding": [ { @@ -1257,7 +1257,7 @@ "type": "github" } ], - "time": "2022-12-30T18:08:47+00:00" + "time": "2024-03-21T19:16:53+00:00" }, { "name": "amphp/pipeline", @@ -2517,12 +2517,12 @@ "source": { "type": "git", "url": "https://github.com/danog/MadelineProto.git", - "reference": "73800b35ed0318cc72119a410cef353bc083c92d" + "reference": "e848475db4dae9dde0458328eb83c6bd25079bb9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/danog/MadelineProto/zipball/73800b35ed0318cc72119a410cef353bc083c92d", - "reference": "73800b35ed0318cc72119a410cef353bc083c92d", + "url": "https://api.github.com/repos/danog/MadelineProto/zipball/e848475db4dae9dde0458328eb83c6bd25079bb9", + "reference": "e848475db4dae9dde0458328eb83c6bd25079bb9", "shasum": "" }, "require": { @@ -2640,7 +2640,7 @@ "type": "github" } ], - "time": "2024-03-21T10:25:29+00:00" + "time": "2024-04-03T13:29:17+00:00" }, { "name": "danog/primemodule", @@ -2910,16 +2910,16 @@ }, { "name": "league/uri", - "version": "7.4.0", + "version": "7.4.1", "source": { "type": "git", "url": "https://github.com/thephpleague/uri.git", - "reference": "bf414ba956d902f5d98bf9385fcf63954f09dce5" + "reference": "bedb6e55eff0c933668addaa7efa1e1f2c417cc4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thephpleague/uri/zipball/bf414ba956d902f5d98bf9385fcf63954f09dce5", - "reference": "bf414ba956d902f5d98bf9385fcf63954f09dce5", + "url": "https://api.github.com/repos/thephpleague/uri/zipball/bedb6e55eff0c933668addaa7efa1e1f2c417cc4", + "reference": "bedb6e55eff0c933668addaa7efa1e1f2c417cc4", "shasum": "" }, "require": { @@ -2988,7 +2988,7 @@ "docs": "https://uri.thephpleague.com", "forum": "https://thephpleague.slack.com", "issues": "https://github.com/thephpleague/uri-src/issues", - "source": "https://github.com/thephpleague/uri/tree/7.4.0" + "source": "https://github.com/thephpleague/uri/tree/7.4.1" }, "funding": [ { @@ -2996,20 +2996,20 @@ "type": "github" } ], - "time": "2023-12-01T06:24:25+00:00" + "time": "2024-03-23T07:42:40+00:00" }, { "name": "league/uri-components", - "version": "7.4.0", + "version": "7.4.1", "source": { "type": "git", "url": "https://github.com/thephpleague/uri-components.git", - "reference": "9b710019639c1a37692c86159f134a8a6c11de0f" + "reference": "b94fe4097885f1b51c4c3fcb78025fbbabbb5d9d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thephpleague/uri-components/zipball/9b710019639c1a37692c86159f134a8a6c11de0f", - "reference": "9b710019639c1a37692c86159f134a8a6c11de0f", + "url": "https://api.github.com/repos/thephpleague/uri-components/zipball/b94fe4097885f1b51c4c3fcb78025fbbabbb5d9d", + "reference": "b94fe4097885f1b51c4c3fcb78025fbbabbb5d9d", "shasum": "" }, "require": { @@ -3070,7 +3070,7 @@ "docs": "https://uri.thephpleague.com", "forum": "https://thephpleague.slack.com", "issues": "https://github.com/thephpleague/uri-src/issues", - "source": "https://github.com/thephpleague/uri-components/tree/7.4.0" + "source": "https://github.com/thephpleague/uri-components/tree/7.4.1" }, "funding": [ { @@ -3078,20 +3078,20 @@ "type": "github" } ], - "time": "2023-12-01T06:24:25+00:00" + "time": "2024-03-23T07:42:40+00:00" }, { "name": "league/uri-interfaces", - "version": "7.4.0", + "version": "7.4.1", "source": { "type": "git", "url": "https://github.com/thephpleague/uri-interfaces.git", - "reference": "bd8c487ec236930f7bbc42b8d374fa882fbba0f3" + "reference": "8d43ef5c841032c87e2de015972c06f3865ef718" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thephpleague/uri-interfaces/zipball/bd8c487ec236930f7bbc42b8d374fa882fbba0f3", - "reference": "bd8c487ec236930f7bbc42b8d374fa882fbba0f3", + "url": "https://api.github.com/repos/thephpleague/uri-interfaces/zipball/8d43ef5c841032c87e2de015972c06f3865ef718", + "reference": "8d43ef5c841032c87e2de015972c06f3865ef718", "shasum": "" }, "require": { @@ -3154,7 +3154,7 @@ "docs": "https://uri.thephpleague.com", "forum": "https://thephpleague.slack.com", "issues": "https://github.com/thephpleague/uri-src/issues", - "source": "https://github.com/thephpleague/uri-interfaces/tree/7.4.0" + "source": "https://github.com/thephpleague/uri-interfaces/tree/7.4.1" }, "funding": [ { @@ -3162,7 +3162,7 @@ "type": "github" } ], - "time": "2023-11-24T15:40:42+00:00" + "time": "2024-03-23T07:42:40+00:00" }, { "name": "monolog/monolog", From 8e93934e75cef407f4a85666eab53f1608f95015 Mon Sep 17 00:00:00 2001 From: Alexander Pankratov Date: Mon, 15 Apr 2024 17:09:24 +0200 Subject: [PATCH 139/270] Add basic auth support --- .env.docker.example | 5 ++ .env.example | 4 ++ README.md | 104 +++++++++++++++++------------------ composer.lock | 12 ++-- config.php | 1 + src/Server/Authorization.php | 32 +++++++++-- 6 files changed, 91 insertions(+), 67 deletions(-) diff --git a/.env.docker.example b/.env.docker.example index 3662f9f..ae21059 100644 --- a/.env.docker.example +++ b/.env.docker.example @@ -2,6 +2,7 @@ # Check for outdated .env files VERSION=1 +# See "ports" in docker-compose.yml. SERVER_ADDRESS=0.0.0.0 SERVER_PORT=9503 @@ -21,6 +22,10 @@ REQUESTS_BULK_INTERVAL=0.5 # 2) recreate container `docker-compose up -d` IP_WHITELIST=127.0.0.1 +# Allow requests from any IP with given user and password +# Example: {"myusername": "mySuperStrongPassword", "otherName": "otherPassword"} +PASSWORDS={} + # TELEGRAM CLIENT TELEGRAM_API_ID= TELEGRAM_API_HASH= diff --git a/.env.example b/.env.example index cab1087..907a67d 100644 --- a/.env.example +++ b/.env.example @@ -20,6 +20,10 @@ REQUESTS_BULK_INTERVAL=0.5 # Leave blanc, to allow requests from all IP (THIS WILL MAKE API UNSECURE!) IP_WHITELIST=127.0.0.1 +# Allow requests from any IP with given user and password +# Example: {"myusername": "mySuperStrongPassword", "otherName": "otherPassword"} +PASSWORDS={} + # TELEGRAM CLIENT TELEGRAM_API_ID= TELEGRAM_API_HASH= diff --git a/README.md b/README.md index f6e4b6a..ab51377 100644 --- a/README.md +++ b/README.md @@ -58,64 +58,58 @@ docker compose pull docker compose up -d ``` +## Security +Please be careful with settings, otherwise you can expose your telegram session and lose control. +Default settings allow to access API only from localhost/127.0.0.1. + +.env settings: +- `IP_WHITELIST` - allow specific IP's to make requests without password. +- `PASSWORDS` - protect your api with basic auth. + Request with correct username and password overrides IP_WHITELIST. + If you specify password, then `IP_WHITELIST` is ignored + How to make requests with basic auth: + ```shell + curl --user 'username:password' "http://127.0.0.1:9503/getSelf" + curl "http://username:password@127.0.0.1:9503/getSelf" + ``` + +docker-compose.yml: +- `port` - port forwarding rules from host to docker container. + Remove 127.0.0.1 to listen all interfaces and forward all requests to container. + Make sure to use IP_WHITELIST and/or PASSWORDS settings to protect your account. + ## Usage -1. Run server/parser - ``` - usage: php server.php [--help] [-a=|--address=127.0.0.1] [-p=|--port=9503] [-s=|--session=] [-e=|--env=.env] [--docker] +Access Telegram API with simple GET/POST requests. +Regular and application/json POST supported. +It's recommended to use http_build_query, when using GET requests. - Options: - --help Show this message - - -a --address Server ip (optional) (default: 127.0.0.1) - To listen external connections use 0.0.0.0 and fill IP_WHITELIST in .env - - -p --port Server port (optional) (default: 9503) - - -s --session Name for session file (optional) - Multiple sessions can be specified: "--session=user --session=bot" - - Each session is stored in `sessions/{$session}.madeline`. - Nested folders supported. - See README for more examples. +**Rules:** +* All methods from MadelineProto supported: [Methods List](https://docs.madelineproto.xyz/API_docs/methods/) +* Url: `http://%address%:%port%/api[/%session%]/%class%.%method%/?%param%=%val%` +* Important: api available only from ip in whitelist. + By default it is: `127.0.0.1` + You can add a client IP in .env file to `IP_WHITELIST` (separate with a comma) - -e --env .env file name. (default: .env). - Helpful when need multiple instances with different settings - - --docker Apply some settings for docker: add docker network to whitelist. - - Also some options can be set in .env file (see .env.example) - ``` -1. Access Telegram API with simple GET/POST requests. - Regular and application/json POST supported. - It's recommended to use http_build_query, when using GET requests. - - **Rules:** - * All methods from MadelineProto supported: [Methods List](https://docs.madelineproto.xyz/API_docs/methods/) - * Url: `http://%address%:%port%/api[/%session%]/%class%.%method%/?%param%=%val%` - * Important: api available only from ip in whitelist. - By default it is: `127.0.0.1` - You can add a client IP in .env file to `IP_WHITELIST` (separate with a comma) - - In docker version by default api available only from localhost (127.0.0.1). - To allow connections from the internet, need to change ports in docker-compose.yml to `9503:9503` and recreate the container: `docker compose up -d`. - This is very insecure, because this will open TAS port to anyone from the internet. - Only protection is the `IP_WHITELIST`, and there are no warranties that it will secure your accounts. - * If method is inside class (messages, contacts and etc.) use '.' to separate class from method: - `http://127.0.0.1:9503/api/contacts.getContacts` - * If method requires array of values, use any name of array, for example 'data': - `?data[peer]=@xtrime&data[message]=Hello!`. Order of parameters does't matter in this case. - * If method requires one or multiple separate parameters (not inside array) then pass parameters with any names but **in strict order**: - `http://127.0.0.1:9503/api/getInfo/?id=@xtrime` or `http://127.0.0.1:9503/api/getInfo/?abcd=@xtrime` works the same - - **Examples:** - * get_info about channel/user: `http://127.0.0.1:9503/api/getInfo/?id=@xtrime` - * get_info about currect account: `http://127.0.0.1:9503/api/getSelf` - * repost: `http://127.0.0.1:9503/api/messages.forwardMessages/?data[from_peer]=@xtrime&data[to_peer]=@xtrime&data[id]=1234` - * get messages from channel/user: `http://127.0.0.1:9503/api/getHistory/?data[peer]=@breakingmash&data[limit]=10` - * get messages with text in HTML: `http://127.0.0.1:9503/api/getHistoryHtml/?data[peer]=@breakingmash&data[limit]=10` - * search: `http://127.0.0.1:9503/api/searchGlobal/?data[q]=Hello%20World&data[limit]=10` - * sendMessage: `http://127.0.0.1:9503/api/sendMessage/?data[peer]=@xtrime&data[message]=Hello!` - * copy message from one channel to another (not repost): `http://127.0.0.1:9503/api/copyMessages/?data[from_peer]=@xtrime&data[to_peer]=@xtrime&data[id][0]=1` + In docker version by default api available only from localhost (127.0.0.1). + To allow connections from the internet, need to change ports in docker-compose.yml to `9503:9503` and recreate the container: `docker compose up -d`. + This is very insecure, because this will open TAS port to anyone from the internet. + Only protection is the `IP_WHITELIST`, and there are no warranties that it will secure your accounts. +* If method is inside class (messages, contacts and etc.) use '.' to separate class from method: + `http://127.0.0.1:9503/api/contacts.getContacts` +* If method requires array of values, use any name of array, for example 'data': + `?data[peer]=@xtrime&data[message]=Hello!`. Order of parameters does't matter in this case. +* If method requires one or multiple separate parameters (not inside array) then pass parameters with any names but **in strict order**: + `http://127.0.0.1:9503/api/getInfo/?id=@xtrime` or `http://127.0.0.1:9503/api/getInfo/?abcd=@xtrime` works the same + +**Examples:** +* get_info about channel/user: `http://127.0.0.1:9503/api/getInfo/?id=@xtrime` +* get_info about currect account: `http://127.0.0.1:9503/api/getSelf` +* repost: `http://127.0.0.1:9503/api/messages.forwardMessages/?data[from_peer]=@xtrime&data[to_peer]=@xtrime&data[id]=1234` +* get messages from channel/user: `http://127.0.0.1:9503/api/getHistory/?data[peer]=@breakingmash&data[limit]=10` +* get messages with text in HTML: `http://127.0.0.1:9503/api/getHistoryHtml/?data[peer]=@breakingmash&data[limit]=10` +* search: `http://127.0.0.1:9503/api/searchGlobal/?data[q]=Hello%20World&data[limit]=10` +* sendMessage: `http://127.0.0.1:9503/api/sendMessage/?data[peer]=@xtrime&data[message]=Hello!` +* copy message from one channel to another (not repost): `http://127.0.0.1:9503/api/copyMessages/?data[from_peer]=@xtrime&data[to_peer]=@xtrime&data[id][0]=1` ## Advanced features ### Get events/updates diff --git a/composer.lock b/composer.lock index 6c7e2b1..a35deac 100644 --- a/composer.lock +++ b/composer.lock @@ -476,16 +476,16 @@ }, { "name": "amphp/http", - "version": "v2.1.0", + "version": "v2.1.1", "source": { "type": "git", "url": "https://github.com/amphp/http.git", - "reference": "9f3500bef4bb15cf41987f21136539c0a06555a3" + "reference": "fe6b4dd50c1e70caf823092398074b5082e1d6da" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/amphp/http/zipball/9f3500bef4bb15cf41987f21136539c0a06555a3", - "reference": "9f3500bef4bb15cf41987f21136539c0a06555a3", + "url": "https://api.github.com/repos/amphp/http/zipball/fe6b4dd50c1e70caf823092398074b5082e1d6da", + "reference": "fe6b4dd50c1e70caf823092398074b5082e1d6da", "shasum": "" }, "require": { @@ -528,7 +528,7 @@ "description": "Basic HTTP primitives which can be shared by servers and clients.", "support": { "issues": "https://github.com/amphp/http/issues", - "source": "https://github.com/amphp/http/tree/v2.1.0" + "source": "https://github.com/amphp/http/tree/v2.1.1" }, "funding": [ { @@ -536,7 +536,7 @@ "type": "github" } ], - "time": "2023-08-22T19:50:46+00:00" + "time": "2024-04-03T18:00:53+00:00" }, { "name": "amphp/http-client", diff --git a/config.php b/config.php index 5e3a45f..c3ea2b0 100644 --- a/config.php +++ b/config.php @@ -64,6 +64,7 @@ explode(',', (string)getenv('IP_WHITELIST')) ) ), + 'passwords' => (array)json_decode((string)getenv('PASSWORDS'), true), 'bulk_interval' => (float)getenv('REQUESTS_BULK_INTERVAL') ], 'health_check' => [ diff --git a/src/Server/Authorization.php b/src/Server/Authorization.php index bdd0be9..51203ff 100644 --- a/src/Server/Authorization.php +++ b/src/Server/Authorization.php @@ -13,23 +13,43 @@ class Authorization implements Middleware { private array $ipWhitelist; private int $selfIp; + /** + * @var array + */ + private array $passwords; public function __construct() { - $this->ipWhitelist = (array)Config::getInstance()->get('api.ip_whitelist', []); $this->selfIp = ip2long(getHostByName(php_uname('n'))); + $this->ipWhitelist = (array)Config::getInstance()->get('api.ip_whitelist', []); + $this->passwords = Config::getInstance()->get('api.passwords', []); + if (!$this->ipWhitelist && !$this->passwords) { + throw new \InvalidArgumentException('API is unprotected! Please specify IP_WHITELIST or PASSWORD in .env.docker'); + } } public function handleRequest(Request $request, RequestHandler $requestHandler): Response { - $host = explode(':', $request->getClient()->getRemoteAddress()->toString())[0]; + [$host] = explode(':', $request->getClient()->getRemoteAddress()->toString(), 2); + + if ($this->passwords) { + $header = (string)$request->getHeader('Authorization'); + if ($header) { + sscanf($header, "Basic %s", $encodedPassword); + [$username, $password] = explode(':', base64_decode($encodedPassword), 2); + if (array_key_exists($username, $this->passwords) && $this->passwords[$username] === $password) { + return $requestHandler->handleRequest($request); + } + } + + return ErrorResponses::get(HttpStatus::UNAUTHORIZED, 'Username or password is incorrect'); + } + if ($this->isIpAllowed($host)) { - $response = $requestHandler->handleRequest($request); - } else { - $response = ErrorResponses::get(HttpStatus::FORBIDDEN, 'Your host is not allowed: ' . $host); + return $requestHandler->handleRequest($request); } - return $response; + return ErrorResponses::get(HttpStatus::UNAUTHORIZED, 'Your host is not allowed: ' . $host); } private function isIpAllowed(string $host): bool From dd9803e079d27ba6c9ee767eddee9604fb3c81f7 Mon Sep 17 00:00:00 2001 From: Alexander Pankratov Date: Tue, 16 Apr 2024 19:17:27 +0200 Subject: [PATCH 140/270] Feat: simplify docker compose Feat: use docker healthcheck --- .env.docker.example | 11 +- .env.example | 11 +- README.md | 45 ++++-- config.php | 6 +- docker-compose.base.yml | 37 +++++ docker-compose.dev.yml | 14 +- docker-compose.yml | 35 +---- server.php | 17 --- .../SystemApiExtensions.php | 16 +++ src/Server/Authorization.php | 25 +++- src/Server/Fork.php | 21 --- src/Server/HealthCheck.php | 134 ------------------ src/Server/Server.php | 24 +++- 13 files changed, 150 insertions(+), 246 deletions(-) create mode 100644 docker-compose.base.yml delete mode 100644 src/Server/Fork.php delete mode 100644 src/Server/HealthCheck.php diff --git a/.env.docker.example b/.env.docker.example index ae21059..43c14cf 100644 --- a/.env.docker.example +++ b/.env.docker.example @@ -5,6 +5,8 @@ VERSION=1 # See "ports" in docker-compose.yml. SERVER_ADDRESS=0.0.0.0 SERVER_PORT=9503 +# If you use nginx, then provide here name of client header. for example x-real-ip or x-forwarded-for +REAL_IP_HEADER= MEMORY_LIMIT=256M TIMEZONE=UTC @@ -65,11 +67,4 @@ DB_SERIALIZER=serialize # Enable to add cache info about users to database. Disable if you only read data from channels. DB_ENABLE_MIN_DATABASE=0 # Enable file metadata cache -DB_ENABLE_FILE_REFERENCE_DATABASE=0 - -# HEALTHCHECK -# If server stops responding to requests it will be stoped -# Requests made each 30 seconds by default. -HEALTHCHECK_ENABLED=0 -HEALTHCHECK_INTERVAL=30 -HEALTHCHECK_REQUEST_TIMEOUT=10 \ No newline at end of file +DB_ENABLE_FILE_REFERENCE_DATABASE=0 \ No newline at end of file diff --git a/.env.example b/.env.example index 907a67d..2337688 100644 --- a/.env.example +++ b/.env.example @@ -6,6 +6,8 @@ VERSION=1 # To recieve requests from the Internet change to 0.0.0.0 and add rule to your firewall (THIS WILL MAKE API UNSECURE!) SERVER_ADDRESS=127.0.0.1 SERVER_PORT=9503 +# If you use nginx, then provide here name of client header. for example x-real-ip or x-forwarded-for +REAL_IP_HEADER= MEMORY_LIMIT=256M TIMEZONE=UTC @@ -63,11 +65,4 @@ DB_SERIALIZER=serialize # Enable to add cache info about users to database. Disable if you only read data from channels. DB_ENABLE_MIN_DATABASE=0 # Enable file metadata cache -DB_ENABLE_FILE_REFERENCE_DATABASE=0 - -# HEALTHCHECK -# If server stops responding to requests it will be stoped -# Requests made each 30 seconds by default. -HEALTHCHECK_ENABLED=0 -HEALTHCHECK_INTERVAL=30 -HEALTHCHECK_REQUEST_TIMEOUT=10 \ No newline at end of file +DB_ENABLE_FILE_REFERENCE_DATABASE=0 \ No newline at end of file diff --git a/README.md b/README.md index ab51377..8bc530e 100644 --- a/README.md +++ b/README.md @@ -115,11 +115,8 @@ It's recommended to use http_build_query, when using GET requests. ### Get events/updates Telegram is event driven platform. For example: every time your account receives a message you immediately get an update. There are multiple ways of [getting updates](https://docs.madelineproto.xyz/docs/UPDATES.html) in TelegramApiServer / MadelineProto: - 1. [Websocket](#eventhandler-updates-webhooks) - 2. Long Polling: - send request to getUpdates endpoint - `curl "127.0.0.1:9503/api/getUpdates?data[limit]=3&data[offset]=0&data[timeout]=10.0" -g` - 3. Webhook: + 1. [Websocket](#eventhandler-updates-webhooks) + 2. Webhook: Redirect all updates to your endpoint, just like bot api! `curl "127.0.0.1:9503/api/setWebhook?url=http%3A%2F%2Fexample.com%2Fsome_webhook" -g ` Example uses urlencoded url in query. @@ -199,9 +196,35 @@ curl --location --request POST '127.0.0.1:9503/api/downloadToResponse' \ Also see: https://docs.madelineproto.xyz/docs/FILES.html#downloading-files ### Multiple sessions support -**WARNING: running multiple sessions in one instance is unstable.** +Its recommended to run every session in separate container. + +To add more containers create `docker-compose.override.yml` file. +Docker will [automatically merge](https://docs.docker.com/compose/multiple-compose-files/merge/) it with default docker-compose file. + +Example of `docker-compose.override.yml` with two additional containers/sessions (3 in total): +```yaml +services: + api-2: + extends: + file: docker-compose.base.yml + service: base-api + ports: + - "127.0.0.1:9512:9503" + command: + - "-s=session-2" + api-3: + extends: + file: docker-compose.base.yml + service: base-api + ports: + - "127.0.0.1:9513:9503" + command: + - "-s=session-3" + +``` +### Multiple sessions in one container (deprecated) +**WARNING: running multiple sessions in one instance/container is unstable.** Crash/error in one session will crash all of them. -Correct way: override docker-compose.yml and add containers with different ports and session names for each session. When running multiple sessions, need to define which session to use for request. Each session stored in `sessions/{$session}.madeline`. Nested folders supported. @@ -259,10 +282,10 @@ Each session stored in `sessions/{$session}.madeline`. Nested folders supported. **Examples:** * Session list: `http://127.0.0.1:9503/system/getSessionList` * Adding session: `http://127.0.0.1:9503/system/addSession?session=users/xtrime` -* Removing session (session file will remain): `http://127.0.0.1:9503/system/removeSession?session=users/xtrime` - Due to madelineProto issue its instance still might be in memory and continue working even after the remove. -* Remove session file: `http://127.0.0.1:9503/system/unlinkSessionFile?session=users/xtrime` - Don`t forget to logout and call removeSession first! +* ~~Removing session (session file will remain): `http://127.0.0.1:9503/system/removeSession?session=users/xtrime` + Due to madelineProto issue its instance still might be in memory and continue working even after the remove.~~ +* ~~Remove session file: `http://127.0.0.1:9503/system/unlinkSessionFile?session=users/xtrime` + Don`t forget to logout and call removeSession first!~~ * Close TelegramApiServer (end process): `http://127.0.0.1:9503/system/exit` Full list of system methods available in [SystemApiExtensions class](https://github.com/xtrime-ru/TelegramApiServer/blob/master/src/MadelineProtoExtensions/SystemApiExtensions.php) diff --git a/config.php b/config.php index c3ea2b0..abeb04c 100644 --- a/config.php +++ b/config.php @@ -7,6 +7,7 @@ 'server' => [ 'address' => (string)getenv('SERVER_ADDRESS'), 'port' => (int)getenv('SERVER_PORT'), + 'real_ip_header' => (string)(getenv('REAL_IP_HEADER') ?? ''), ], 'telegram' => [ 'app_info' => [ // obtained in https://my.telegram.org @@ -67,11 +68,6 @@ 'passwords' => (array)json_decode((string)getenv('PASSWORDS'), true), 'bulk_interval' => (float)getenv('REQUESTS_BULK_INTERVAL') ], - 'health_check' => [ - 'enabled' => (bool)filter_var((string)getenv('HEALTHCHECK_ENABLED'), FILTER_VALIDATE_BOOL), - 'interval' => ((int)getenv('HEALTHCHECK_INTERVAL') ?: 30), - 'timeout' => ((int)getenv('HEALTHCHECK_REQUEST_TIMEOUT') ?: 60), - ] ]; if (empty($settings['telegram']['connection']['proxies']['\danog\MadelineProto\Stream\Proxy\SocksProxy'][0]['address'])) { diff --git a/docker-compose.base.yml b/docker-compose.base.yml new file mode 100644 index 0000000..e3450d7 --- /dev/null +++ b/docker-compose.base.yml @@ -0,0 +1,37 @@ +services: + base-api: + image: xtrime/telegram-api-server:latest + build: + context: . + dockerfile: Dockerfile + restart: unless-stopped + volumes: + - ./:/app-host-link + working_dir: /app-host-link + depends_on: + - mysql + environment: + WAIT_HOSTS: mysql:3306 + logging: + driver: "json-file" + options: + max-size: "1024k" + max-file: "2" + healthcheck: + test: curl -f http://localhost:9503/system/healthcheck || exit 1 + interval: 60s + timeout: 10s + retries: 2 + start_period: 60s + base-mysql: + image: mariadb:11.1 + restart: unless-stopped + volumes: + - ./.mysql:/var/lib/mysql + environment: + MARIADB_ALLOW_EMPTY_ROOT_PASSWORD: 'yes' + MARIADB_AUTO_UPGRADE: 'yes' + command: + - --skip-grant-tables + - --innodb-buffer-pool-size=128M + - --wait_timeout=65 \ No newline at end of file diff --git a/docker-compose.dev.yml b/docker-compose.dev.yml index 886e13f..abd3547 100644 --- a/docker-compose.dev.yml +++ b/docker-compose.dev.yml @@ -1,5 +1,8 @@ services: api: + extends: + file: docker-compose.base.yml + service: base-api image: xtrime/telegram-api-server:dev build: context: . @@ -8,4 +11,13 @@ services: - "127.0.0.1:9503:9503" - "9003" environment: - PHP_IDE_CONFIG: "serverName=Docker" \ No newline at end of file + PHP_IDE_CONFIG: "serverName=Docker" + mysql: + extends: + file: docker-compose.base.yml + service: base-mysql + ports: + - "127.0.0.1:9507:3306" +networks: + default: + name: telegram-api-server \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml index e4dd4ee..3352a94 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,41 +1,18 @@ services: api: - image: xtrime/telegram-api-server:latest - build: - context: . - dockerfile: Dockerfile - init: true - restart: unless-stopped + extends: + file: docker-compose.base.yml + service: base-api ports: - "127.0.0.1:9503:9503" - volumes: - - ./:/app-host-link - working_dir: /app-host-link - depends_on: - - mysql - environment: - WAIT_HOSTS: mysql:3306 - logging: - driver: "json-file" - options: - max-size: "1024k" - max-file: "2" command: - "-s=session" mysql: - image: mariadb:11.1 - restart: unless-stopped + extends: + file: docker-compose.base.yml + service: base-mysql ports: - "127.0.0.1:9507:3306" - volumes: - - ./.mysql:/var/lib/mysql - environment: - MARIADB_ALLOW_EMPTY_ROOT_PASSWORD: 'yes' - MARIADB_AUTO_UPGRADE: 'yes' - command: - - --skip-grant-tables - - --innodb-buffer-pool-size=128M - - --wait_timeout=65 networks: default: name: telegram-api-server \ No newline at end of file diff --git a/server.php b/server.php index 70ddd1c..3f20601 100644 --- a/server.php +++ b/server.php @@ -1,12 +1,7 @@ get('health_check.enabled')) { - if (!defined('SIGINT')) { - throw new RuntimeException('pcintl required for healthcheck. Use docker.'); - } - Fork::run(static function () use ($mainProcessPid) { - HealthCheck::start($mainProcessPid); - }); -} - $sessions = []; foreach ($options['session'] as $session) { $session = trim($session); diff --git a/src/MadelineProtoExtensions/SystemApiExtensions.php b/src/MadelineProtoExtensions/SystemApiExtensions.php index e806398..110229c 100644 --- a/src/MadelineProtoExtensions/SystemApiExtensions.php +++ b/src/MadelineProtoExtensions/SystemApiExtensions.php @@ -22,6 +22,22 @@ public function __construct(Client $client) $this->client = $client; } + /** + * @return array + */ + public function healthcheck(): array + { + $results = []; + ['sessions' => $sessions] = $this->getSessionList(); + foreach ($sessions as $sessionKey => $session) { + $instance = $this->client->instances[$sessionKey]; + if ($instance->getAuthorization() === API::LOGGED_IN) { + $results[$sessionKey] = $instance->fullGetSelf(); + } + } + return $results; + } + public function addSession(string $session, array $settings = []): array { if (!empty($settings['app_info']['api_id'])) { diff --git a/src/Server/Authorization.php b/src/Server/Authorization.php index 51203ff..08f0729 100644 --- a/src/Server/Authorization.php +++ b/src/Server/Authorization.php @@ -30,7 +30,11 @@ public function __construct() public function handleRequest(Request $request, RequestHandler $requestHandler): Response { - [$host] = explode(':', $request->getClient()->getRemoteAddress()->toString(), 2); + $host = Server::getClientIp($request); + + if ($this->isLocal($host)) { + return $requestHandler->handleRequest($request); + } if ($this->passwords) { $header = (string)$request->getHeader('Authorization'); @@ -54,6 +58,19 @@ public function handleRequest(Request $request, RequestHandler $requestHandler): private function isIpAllowed(string $host): bool { + + + if ($this->ipWhitelist && !in_array($host, $this->ipWhitelist, true)) { + return false; + } + return true; + } + + private function isLocal(string $host): bool { + if ($host === '127.0.0.1' || $host === 'localhost') { + return true; + } + global $options; if ($options['docker']) { $isSameNetwork = abs(ip2long($host) - $this->selfIp) < 256; @@ -61,10 +78,6 @@ private function isIpAllowed(string $host): bool return true; } } - - if ($this->ipWhitelist && !in_array($host, $this->ipWhitelist, true)) { - return false; - } - return true; + return false; } } \ No newline at end of file diff --git a/src/Server/Fork.php b/src/Server/Fork.php deleted file mode 100644 index 9b46da1..0000000 --- a/src/Server/Fork.php +++ /dev/null @@ -1,21 +0,0 @@ -get('server.address'); - if (static::$host === '0.0.0.0') { - static::$host = '127.0.0.1'; - } - static::$port = (int)Config::getInstance()->get('server.port'); - - static::$checkInterval = (int)Config::getInstance()->get('health_check.interval'); - static::$requestTimeout = (int)Config::getInstance()->get('health_check.timeout'); - - EventLoop::repeat(static::$checkInterval, static function () use ($parentPid) { - try { - Logger::getInstance()->info('Start health check'); - if (!self::isProcessAlive($parentPid)) { - throw new RuntimeException('Parent process died'); - } - $sessions = static::getSessionList(); - $sessionsForCheck = static::getLoggedInSessions($sessions); - $futures = []; - foreach ($sessionsForCheck as $session) { - $futures[] = static::checkSession($session); - } - awaitAll($futures); - - Logger::getInstance()->info('Health check ok. Sessions checked: ' . count($sessionsForCheck)); - } catch (Throwable $e) { - Logger::getInstance()->error($e->getMessage()); - Logger::getInstance()->critical('Health check failed'); - if (self::isProcessAlive($parentPid)) { - Logger::getInstance()->critical('Killing parent process'); - - exec("kill -2 $parentPid"); - if (self::isProcessAlive($parentPid)) { - exec("kill -9 $parentPid"); - } - } - exit(1); - } - }); - - trapSignal([SIGINT, SIGTERM]); - Logger::getInstance()->critical('Health check process exit'); - - } - - private static function getSessionList(): array - { - $url = sprintf("http://%s:%s/system/getSessionList", static::$host, static::$port); - - $response = static::sendRequest($url); - - if ($response === false) { - throw new UnexpectedValueException('No response from /system'); - } - - return json_decode($response, true, 10, JSON_THROW_ON_ERROR)['response']['sessions']; - } - - private static function getLoggedInSessions(array $sessions): array - { - $loggedInSessions = []; - foreach ($sessions as $sessionName => $session) { - if ($session['status'] === 'LOGGED_IN') { - $loggedInSessions[] = $sessionName; - } - } - - return $loggedInSessions; - } - - private static function checkSession(string $sessionName): Future - { - return async(function () use ($sessionName) { - $url = sprintf("http://%s:%s/api/%s/getSelf", static::$host, static::$port, $sessionName); - $response = static::sendRequest($url); - $response = json_decode($response, true, 10, JSON_THROW_ON_ERROR); - if (empty($response['response'])) { - Logger::getInstance()->error('Health check response: ', $response); - throw new RuntimeException("Failed health check: $url"); - } - return $response; - }); - } - - - private static function sendRequest(string $url): string - { - $client = (new HttpClientBuilder)::buildDefault(); - $request = new Request($url); - $request->setInactivityTimeout(static::$requestTimeout); - $request->setTransferTimeout(static::$requestTimeout); - - $response = $client->request($request); - return $response->getBody()->buffer(); - } - - private static function isProcessAlive(int $pid): bool - { - $result = exec("ps -p $pid | grep $pid"); - return !empty($result); - } -} \ No newline at end of file diff --git a/src/Server/Server.php b/src/Server/Server.php index 30ec555..718c9fd 100644 --- a/src/Server/Server.php +++ b/src/Server/Server.php @@ -92,13 +92,25 @@ private function getConfig(array $config = []): array public static function getClientIp(Request $request): string { - $remote = $request->getClient()->getRemoteAddress()->toString(); - $hostArray = explode(':', $remote); - if (count($hostArray) >= 2) { - $port = (int)array_pop($hostArray); - if ($port > 0 && $port <= 65353) { - $remote = implode(':', $hostArray); + $realIpHeader = Config::getInstance()->get('server.real_ip_header'); + if ($realIpHeader) { + $remote = $request->getHeader($realIpHeader); + if (!$remote) { + GOTO DIRECT; } + $tmp = explode(',', $remote); + $remote = trim(end($tmp)); + } else { + DIRECT: + $remote = $request->getClient()->getRemoteAddress()->toString(); + $hostArray = explode(':', $remote); + if (count($hostArray) >= 2) { + $port = (int)array_pop($hostArray); + if ($port > 0 && $port <= 65353) { + $remote = implode(':', $hostArray); + } + } + } return $remote; From 79251fa81a307dcbdff86f949f44c6a16c6b742f Mon Sep 17 00:00:00 2001 From: Alexander Pankratov Date: Fri, 19 Apr 2024 00:49:15 +0200 Subject: [PATCH 141/270] Ref: remove redundant alias methods --- README.md | 14 +- src/Exceptions/MediaTooBig.php | 8 - src/MadelineProtoExtensions/ApiExtensions.php | 147 +----------------- 3 files changed, 11 insertions(+), 158 deletions(-) delete mode 100644 src/Exceptions/MediaTooBig.php diff --git a/README.md b/README.md index 8bc530e..9b8fb17 100644 --- a/README.md +++ b/README.md @@ -115,11 +115,14 @@ It's recommended to use http_build_query, when using GET requests. ### Get events/updates Telegram is event driven platform. For example: every time your account receives a message you immediately get an update. There are multiple ways of [getting updates](https://docs.madelineproto.xyz/docs/UPDATES.html) in TelegramApiServer / MadelineProto: - 1. [Websocket](#eventhandler-updates-webhooks) - 2. Webhook: - Redirect all updates to your endpoint, just like bot api! - `curl "127.0.0.1:9503/api/setWebhook?url=http%3A%2F%2Fexample.com%2Fsome_webhook" -g ` - Example uses urlencoded url in query. +1. [Websocket](#eventhandler-updates-webhooks) +2. Long Polling: +send request to getUpdates endpoint +`curl "127.0.0.1:9503/api/getUpdates?data[limit]=3&data[offset]=0&data[timeout]=10.0" -g` +3. Webhook: +Redirect all updates to your endpoint, just like bot api! +`curl "127.0.0.1:9503/api/setWebhook?url=http%3A%2F%2Fexample.com%2Fsome_webhook" -g ` +Example uses urlencoded url in query. ### Uploading files. @@ -341,7 +344,6 @@ PHP websocket client example: [websocket-events.php](https://github.com/xtrime-r TelegramApiServer extends madelineProto with some handful methods. Full list of custom methods and their parameters available in [ApiExtensions class](https://github.com/xtrime-ru/TelegramApiServer/blob/master/src/MadelineProtoExtensions/ApiExtensions.php#L19) -* `getHistory` - same as messages.getHistory, but all params exept peer is optional. * `getHistoryHtml` - message entities converted to html * `formatMessage` - converts entities to html * `copyMessages` - copy message from one peer to onother. Like forwardMessages, but without the link to original. diff --git a/src/Exceptions/MediaTooBig.php b/src/Exceptions/MediaTooBig.php deleted file mode 100644 index eedeaa3..0000000 --- a/src/Exceptions/MediaTooBig.php +++ /dev/null @@ -1,8 +0,0 @@ -file = $file; } - /** - * Получает последние сообщения из указанных каналов - * - * @param array $data - *
-     * [
-     *     'peer' => '',
-     *     'offset_id' => 0, // (optional)
-     *     'offset_date' => 0, // (optional)
-     *     'add_offset' => 0, // (optional)
-     *     'limit' => 0, // (optional)
-     *     'max_id' => 0, // (optional)
-     *     'min_id' => 0, // (optional)
-     *     'hash' => 0, // (optional)
-     * ]
-     * 
- * - */ - public function getHistory(array $data) - { - $data = array_merge( - [ - 'peer' => '', - 'offset_id' => 0, - 'offset_date' => 0, - 'add_offset' => 0, - 'limit' => 0, - 'max_id' => 0, - 'min_id' => 0, - 'hash' => [], - ], - $data - ); - - return $this->madelineProto->messages->getHistory($data); - } - public function getHistoryHtml(array $data): array { - $response = $this->getHistory($data); + $response = $this->madelineProto->messages->getHistory(...$data); if (!empty($response['messages'])) { foreach ($response['messages'] as &$message) { $message['message'] = $this->formatMessage($message['message'] ?? null, $message['entities'] ?? []); @@ -208,9 +169,9 @@ public function copyMessages(array $data) ]; if (static::hasMedia($message, false)) { $messageData['media'] = $message; //MadelineProto сама достанет все media из сообщения. - $result[] = $this->sendMedia($messageData); + $result[] = $this->madelineProto->messages->sendMedia(...$messageData); } else { - $result[] = $this->sendMessage($messageData); + $result[] = $this->madelineProto->messages->sendMessage(...$messageData); } if ($key > 0) { delay(random_int(300, 2000) / 1000); @@ -220,98 +181,6 @@ public function copyMessages(array $data) return $result; } - /** - * @param array $data - *
-     * [
-     *  'peer' => '',
-     *  'message' => '',      // Текст сообщения,
-     *  'media' => [],      // MessageMedia, Update, Message or InputMedia
-     *  'reply_to_msg_id' => 0,       // (optional)
-     *  'parse_mode' => 'HTML',  // (optional)
-     * ]
-     * 
- * - */ - public function sendMedia(array $data): array - { - $data = array_merge( - [ - 'peer' => '', - 'message' => '', - 'media' => [], - 'reply_to_msg_id' => 0, - 'parse_mode' => 'HTML', - ], - $data - ); - - if (!empty($this->file)) { - $data = array_merge( - $data, - $this->uploadMediaForm() - ); - } - - return $this->madelineProto->messages->sendMedia(...$data); - } - - /** - * @param array $data - *
-     * [
-     *  'peer' => '',
-     *  'message' => '',      // Текст сообщения
-     *  'reply_to_msg_id' => 0,       // (optional)
-     *  'parse_mode' => 'HTML',  // (optional)
-     * ]
-     * 
- * - */ - public function sendMessage(array $data) - { - $data = array_merge( - [ - 'peer' => '', - 'message' => '', - 'reply_to_msg_id' => 0, - 'parse_mode' => 'HTML', - ], - $data - ); - - return $this->madelineProto->messages->sendMessage($data); - } - - /** - * @param array $data - *
-     * [
-     *  'folder_id' => 0, // Id папки (optional)
-     *  'q'  => '',  //Поисковый запрос
-     *  'offset_rate' => 0,   // (optional)
-     *  'offset_peer' => null, // (optional)
-     *  'offset_id' => 0,   // (optional)
-     *  'limit' => 10,  // (optional)
-     * ]
-     * 
- * - */ - public function searchGlobal(array $data): array - { - $data = array_merge( - [ - - 'q' => '', - 'offset_rate' => 0, - 'offset_id' => 0, - 'limit' => 10, - ], - $data - ); - return $this->madelineProto->messages->searchGlobal(...$data); - } - /** * Загружает медиафайл из указанного сообщения в поток * @@ -325,7 +194,6 @@ public function getMedia(array $data): Response 'peer' => '', 'id' => [0], 'message' => [], - 'size_limit' => 0, ], $data ); @@ -354,11 +222,6 @@ public function getMedia(array $data): Response } } - if ($data['size_limit'] && $info['size'] > $data['size_limit']) { - throw new MediaTooBig( - "Media exceeds size limit. Size: {$info['size']} bytes; limit: {$data['size_limit']} bytes" - ); - } return $this->downloadToResponse($info); } @@ -442,10 +305,6 @@ public function getMediaPreview(array $data): Response return $this->downloadToResponse($info); } - /** - * @param array $data - * - */ public function getMessages(array $data): array { $peerInfo = $this->madelineProto->getInfo($data['peer']); From 6e37877ca29dae7d4089f818d024c28103df3ae0 Mon Sep 17 00:00:00 2001 From: Alexander Pankratov Date: Fri, 19 Apr 2024 01:14:22 +0200 Subject: [PATCH 142/270] Fix: restart unhealthy container --- docker-compose.base.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docker-compose.base.yml b/docker-compose.base.yml index e3450d7..475d15a 100644 --- a/docker-compose.base.yml +++ b/docker-compose.base.yml @@ -1,6 +1,7 @@ services: base-api: image: xtrime/telegram-api-server:latest + init: true build: context: . dockerfile: Dockerfile @@ -18,11 +19,10 @@ services: max-size: "1024k" max-file: "2" healthcheck: - test: curl -f http://localhost:9503/system/healthcheck || exit 1 + test: timeout 15 curl -f http://localhost:9503/system/healthcheck || bash -c 'kill -INT -1 && (sleep 5; kill -s 9 -1)' interval: 60s - timeout: 10s - retries: 2 - start_period: 60s + timeout: 30s + retries: 1 base-mysql: image: mariadb:11.1 restart: unless-stopped From c324de5d21655f4a43133bf83477667920c4011a Mon Sep 17 00:00:00 2001 From: Alexander Pankratov Date: Wed, 24 Apr 2024 02:01:56 +0200 Subject: [PATCH 143/270] Allow to start without password --- src/MadelineProtoExtensions/SystemApiExtensions.php | 2 +- src/Server/Authorization.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/MadelineProtoExtensions/SystemApiExtensions.php b/src/MadelineProtoExtensions/SystemApiExtensions.php index 110229c..a78a223 100644 --- a/src/MadelineProtoExtensions/SystemApiExtensions.php +++ b/src/MadelineProtoExtensions/SystemApiExtensions.php @@ -32,7 +32,7 @@ public function healthcheck(): array foreach ($sessions as $sessionKey => $session) { $instance = $this->client->instances[$sessionKey]; if ($instance->getAuthorization() === API::LOGGED_IN) { - $results[$sessionKey] = $instance->fullGetSelf(); + $results[$sessionKey] = $instance->getSelf(); } } return $results; diff --git a/src/Server/Authorization.php b/src/Server/Authorization.php index 08f0729..b4db07e 100644 --- a/src/Server/Authorization.php +++ b/src/Server/Authorization.php @@ -24,7 +24,7 @@ public function __construct() $this->ipWhitelist = (array)Config::getInstance()->get('api.ip_whitelist', []); $this->passwords = Config::getInstance()->get('api.passwords', []); if (!$this->ipWhitelist && !$this->passwords) { - throw new \InvalidArgumentException('API is unprotected! Please specify IP_WHITELIST or PASSWORD in .env.docker'); + error('API is unprotected! Please specify IP_WHITELIST or PASSWORD in .env.docker'); } } From 7f52896a8d688074203b19a5f2b60a7ff42b1fb5 Mon Sep 17 00:00:00 2001 From: Alexander Pankratov Date: Tue, 14 May 2024 13:39:42 +0200 Subject: [PATCH 144/270] Use uv for eventloop --- Dockerfile | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index 2c778b0..ce762c3 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,12 +3,12 @@ FROM php:8.3-cli RUN apt-get update && apt-get upgrade -y RUN true \ # Install main extension - && apt-get install procps git zip vim libzip-dev libgmp-dev libevent-dev libssl-dev libnghttp2-dev libffi-dev libicu-dev libonig-dev libxml2-dev libpng-dev -y \ + && apt-get install procps git zip vim libzip-dev libgmp-dev libuv1-dev libssl-dev libnghttp2-dev libffi-dev libicu-dev libonig-dev libxml2-dev libpng-dev -y \ && docker-php-ext-install -j$(nproc) sockets bcmath mysqli pdo_mysql pcntl ffi intl gmp zip gd \ # Install additional extension && mkdir -p /usr/src/php/ext/ && cd /usr/src/php/ext/ \ - && pecl bundle ev-beta && pecl bundle eio-beta && pecl bundle igbinary \ - && docker-php-ext-install -j$(nproc) ev eio igbinary \ + && pecl bundle uv && pecl bundle igbinary \ + && docker-php-ext-install -j$(nproc) uv igbinary \ # Install PrimeModule for AuthKey generation speedup && git clone https://github.com/danog/PrimeModule-ext \ && cd PrimeModule-ext && make -j$(nproc) \ @@ -22,8 +22,7 @@ RUN true \ && apt-get autoremove --purge -y && apt-get autoclean -y && apt-get clean -y \ && rm -rf /usr/src -ADD https://github.com/ufoscout/docker-compose-wait/releases/download/2.9.0/wait /usr/local/bin/docker-compose-wait -RUN chmod +x /usr/local/bin/docker-compose-wait +COPY --from=ghcr.io/ufoscout/docker-compose-wait:latest /wait /usr/local/bin/docker-compose-wait ADD docker/php/conf.d/. "$PHP_INI_DIR/conf.d/" From 6c415400b308537cb41dc0af3188e08964ae15ea Mon Sep 17 00:00:00 2001 From: Alexander Pankratov Date: Tue, 14 May 2024 13:46:06 +0200 Subject: [PATCH 145/270] Update madelineProto --- composer.json | 5 + composer.lock | 630 +++++++++++++++++++++++++++++++++++++++----------- 2 files changed, 496 insertions(+), 139 deletions(-) diff --git a/composer.json b/composer.json index 97c67d8..0a398a7 100644 --- a/composer.json +++ b/composer.json @@ -45,5 +45,10 @@ "psr-4": { "TelegramApiServer\\": "src/" } + }, + "config": { + "allow-plugins": { + "symfony/thanks": false + } } } diff --git a/composer.lock b/composer.lock index a35deac..0bcfd32 100644 --- a/composer.lock +++ b/composer.lock @@ -8,16 +8,16 @@ "packages": [ { "name": "amphp/amp", - "version": "v3.0.0", + "version": "v3.0.2", "source": { "type": "git", "url": "https://github.com/amphp/amp.git", - "reference": "aaf0ec1d5a2c20b523258995a10e80c1fb765871" + "reference": "138801fb68cfc9c329da8a7b39d01ce7291ee4b0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/amphp/amp/zipball/aaf0ec1d5a2c20b523258995a10e80c1fb765871", - "reference": "aaf0ec1d5a2c20b523258995a10e80c1fb765871", + "url": "https://api.github.com/repos/amphp/amp/zipball/138801fb68cfc9c329da8a7b39d01ce7291ee4b0", + "reference": "138801fb68cfc9c329da8a7b39d01ce7291ee4b0", "shasum": "" }, "require": { @@ -27,7 +27,7 @@ "require-dev": { "amphp/php-cs-fixer-config": "^2", "phpunit/phpunit": "^9", - "psalm/phar": "^4.13" + "psalm/phar": "5.23.1" }, "type": "library", "autoload": { @@ -77,7 +77,7 @@ ], "support": { "issues": "https://github.com/amphp/amp/issues", - "source": "https://github.com/amphp/amp/tree/v3.0.0" + "source": "https://github.com/amphp/amp/tree/v3.0.2" }, "funding": [ { @@ -85,7 +85,7 @@ "type": "github" } ], - "time": "2022-12-18T16:52:44+00:00" + "time": "2024-05-10T21:37:46+00:00" }, { "name": "amphp/byte-stream", @@ -164,16 +164,16 @@ }, { "name": "amphp/cache", - "version": "v2.0.0", + "version": "v2.0.1", "source": { "type": "git", "url": "https://github.com/amphp/cache.git", - "reference": "218bb3888d380eb9dd926cd06f803573c84391d3" + "reference": "46912e387e6aa94933b61ea1ead9cf7540b7797c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/amphp/cache/zipball/218bb3888d380eb9dd926cd06f803573c84391d3", - "reference": "218bb3888d380eb9dd926cd06f803573c84391d3", + "url": "https://api.github.com/repos/amphp/cache/zipball/46912e387e6aa94933b61ea1ead9cf7540b7797c", + "reference": "46912e387e6aa94933b61ea1ead9cf7540b7797c", "shasum": "" }, "require": { @@ -217,7 +217,7 @@ "homepage": "https://amphp.org/cache", "support": { "issues": "https://github.com/amphp/cache/issues", - "source": "https://github.com/amphp/cache/tree/v2.0.0" + "source": "https://github.com/amphp/cache/tree/v2.0.1" }, "funding": [ { @@ -225,20 +225,20 @@ "type": "github" } ], - "time": "2023-01-09T21:04:12+00:00" + "time": "2024-04-19T03:38:06+00:00" }, { "name": "amphp/dns", - "version": "v2.1.1", + "version": "v2.1.2", "source": { "type": "git", "url": "https://github.com/amphp/dns.git", - "reference": "3e3f413fbbaacd9632b1612941b363fa26a72e52" + "reference": "04c88e67bef804203df934703bd422ea72f46b0e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/amphp/dns/zipball/3e3f413fbbaacd9632b1612941b363fa26a72e52", - "reference": "3e3f413fbbaacd9632b1612941b363fa26a72e52", + "url": "https://api.github.com/repos/amphp/dns/zipball/04c88e67bef804203df934703bd422ea72f46b0e", + "reference": "04c88e67bef804203df934703bd422ea72f46b0e", "shasum": "" }, "require": { @@ -305,7 +305,7 @@ ], "support": { "issues": "https://github.com/amphp/dns/issues", - "source": "https://github.com/amphp/dns/tree/v2.1.1" + "source": "https://github.com/amphp/dns/tree/v2.1.2" }, "funding": [ { @@ -313,20 +313,20 @@ "type": "github" } ], - "time": "2024-01-30T23:25:30+00:00" + "time": "2024-04-19T03:49:29+00:00" }, { "name": "amphp/file", - "version": "v3.0.2", + "version": "v3.1.0", "source": { "type": "git", "url": "https://github.com/amphp/file.git", - "reference": "45d8d84c4496c695cf2ca2bf05f236a3e36c3558" + "reference": "1d51235bd8cb4973c7908e645b62c638d8c081fe" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/amphp/file/zipball/45d8d84c4496c695cf2ca2bf05f236a3e36c3558", - "reference": "45d8d84c4496c695cf2ca2bf05f236a3e36c3558", + "url": "https://api.github.com/repos/amphp/file/zipball/1d51235bd8cb4973c7908e645b62c638d8c081fe", + "reference": "1d51235bd8cb4973c7908e645b62c638d8c081fe", "shasum": "" }, "require": { @@ -342,7 +342,7 @@ "amphp/php-cs-fixer-config": "^2", "amphp/phpunit-util": "^3", "phpunit/phpunit": "^9", - "psalm/phar": "^5.4" + "psalm/phar": "5.22.2" }, "suggest": { "ext-eio": "^2 || ^3", @@ -390,7 +390,7 @@ ], "support": { "issues": "https://github.com/amphp/file/issues", - "source": "https://github.com/amphp/file/tree/v3.0.2" + "source": "https://github.com/amphp/file/tree/v3.1.0" }, "funding": [ { @@ -398,7 +398,7 @@ "type": "github" } ], - "time": "2023-12-27T22:52:04+00:00" + "time": "2024-04-21T14:53:24+00:00" }, { "name": "amphp/hpack", @@ -540,16 +540,16 @@ }, { "name": "amphp/http-client", - "version": "v5.0.1", + "version": "v5.1.0", "source": { "type": "git", "url": "https://github.com/amphp/http-client.git", - "reference": "9b42ca1a5af9abd1dd8c3f9e45c2bb15957361b7" + "reference": "483df9a856625fe4406c7fb6a64d6787105bd184" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/amphp/http-client/zipball/9b42ca1a5af9abd1dd8c3f9e45c2bb15957361b7", - "reference": "9b42ca1a5af9abd1dd8c3f9e45c2bb15957361b7", + "url": "https://api.github.com/repos/amphp/http-client/zipball/483df9a856625fe4406c7fb6a64d6787105bd184", + "reference": "483df9a856625fe4406c7fb6a64d6787105bd184", "shasum": "" }, "require": { @@ -576,7 +576,7 @@ "kelunik/link-header-rfc5988": "^1", "laminas/laminas-diactoros": "^2.3", "phpunit/phpunit": "^9", - "psalm/phar": "^5.4" + "psalm/phar": "~5.23" }, "suggest": { "amphp/file": "Required for file request bodies and HTTP archive logging", @@ -623,7 +623,7 @@ ], "support": { "issues": "https://github.com/amphp/http-client/issues", - "source": "https://github.com/amphp/http-client/tree/v5.0.1" + "source": "https://github.com/amphp/http-client/tree/v5.1.0" }, "funding": [ { @@ -631,7 +631,7 @@ "type": "github" } ], - "time": "2023-12-11T03:48:12+00:00" + "time": "2024-04-21T16:40:36+00:00" }, { "name": "amphp/http-client-cookies", @@ -712,16 +712,16 @@ }, { "name": "amphp/http-server", - "version": "v3.3.0", + "version": "v3.3.1", "source": { "type": "git", "url": "https://github.com/amphp/http-server.git", - "reference": "4b580fec9ecb7d24a080c8d3b47404cb76759fca" + "reference": "26001b1ffac11db30c627ed4daba2088951b0ffa" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/amphp/http-server/zipball/4b580fec9ecb7d24a080c8d3b47404cb76759fca", - "reference": "4b580fec9ecb7d24a080c8d3b47404cb76759fca", + "url": "https://api.github.com/repos/amphp/http-server/zipball/26001b1ffac11db30c627ed4daba2088951b0ffa", + "reference": "26001b1ffac11db30c627ed4daba2088951b0ffa", "shasum": "" }, "require": { @@ -748,7 +748,7 @@ "league/uri-components": "^2.4.2 | ^7.1", "monolog/monolog": "^3", "phpunit/phpunit": "^9", - "psalm/phar": "^5.4" + "psalm/phar": "~5.23" }, "suggest": { "ext-zlib": "Allows GZip compression of response bodies" @@ -797,7 +797,7 @@ ], "support": { "issues": "https://github.com/amphp/http-server/issues", - "source": "https://github.com/amphp/http-server/tree/v3.3.0" + "source": "https://github.com/amphp/http-server/tree/v3.3.1" }, "funding": [ { @@ -805,7 +805,7 @@ "type": "github" } ], - "time": "2023-12-28T23:14:52+00:00" + "time": "2024-04-21T15:46:46+00:00" }, { "name": "amphp/http-server-form-parser", @@ -1400,16 +1400,16 @@ }, { "name": "amphp/process", - "version": "v2.0.2", + "version": "v2.0.3", "source": { "type": "git", "url": "https://github.com/amphp/process.git", - "reference": "a79dc87100be857db2c4bbfd5369585a6d1e658c" + "reference": "52e08c09dec7511d5fbc1fb00d3e4e79fc77d58d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/amphp/process/zipball/a79dc87100be857db2c4bbfd5369585a6d1e658c", - "reference": "a79dc87100be857db2c4bbfd5369585a6d1e658c", + "url": "https://api.github.com/repos/amphp/process/zipball/52e08c09dec7511d5fbc1fb00d3e4e79fc77d58d", + "reference": "52e08c09dec7511d5fbc1fb00d3e4e79fc77d58d", "shasum": "" }, "require": { @@ -1456,7 +1456,7 @@ "homepage": "https://amphp.org/process", "support": { "issues": "https://github.com/amphp/process/issues", - "source": "https://github.com/amphp/process/tree/v2.0.2" + "source": "https://github.com/amphp/process/tree/v2.0.3" }, "funding": [ { @@ -1464,7 +1464,7 @@ "type": "github" } ], - "time": "2024-02-13T20:38:21+00:00" + "time": "2024-04-19T03:13:44+00:00" }, { "name": "amphp/redis", @@ -1607,16 +1607,16 @@ }, { "name": "amphp/socket", - "version": "v2.3.0", + "version": "v2.3.1", "source": { "type": "git", "url": "https://github.com/amphp/socket.git", - "reference": "acc0a2f65ab498025ba5641f7cce499c4b1ed4b5" + "reference": "58e0422221825b79681b72c50c47a930be7bf1e1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/amphp/socket/zipball/acc0a2f65ab498025ba5641f7cce499c4b1ed4b5", - "reference": "acc0a2f65ab498025ba5641f7cce499c4b1ed4b5", + "url": "https://api.github.com/repos/amphp/socket/zipball/58e0422221825b79681b72c50c47a930be7bf1e1", + "reference": "58e0422221825b79681b72c50c47a930be7bf1e1", "shasum": "" }, "require": { @@ -1679,7 +1679,7 @@ ], "support": { "issues": "https://github.com/amphp/socket/issues", - "source": "https://github.com/amphp/socket/tree/v2.3.0" + "source": "https://github.com/amphp/socket/tree/v2.3.1" }, "funding": [ { @@ -1687,7 +1687,7 @@ "type": "github" } ], - "time": "2024-03-19T20:01:53+00:00" + "time": "2024-04-21T14:33:03+00:00" }, { "name": "amphp/sql", @@ -2180,28 +2180,28 @@ }, { "name": "bacon/bacon-qr-code", - "version": "2.0.8", + "version": "v3.0.0", "source": { "type": "git", "url": "https://github.com/Bacon/BaconQrCode.git", - "reference": "8674e51bb65af933a5ffaf1c308a660387c35c22" + "reference": "510de6eca6248d77d31b339d62437cc995e2fb41" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Bacon/BaconQrCode/zipball/8674e51bb65af933a5ffaf1c308a660387c35c22", - "reference": "8674e51bb65af933a5ffaf1c308a660387c35c22", + "url": "https://api.github.com/repos/Bacon/BaconQrCode/zipball/510de6eca6248d77d31b339d62437cc995e2fb41", + "reference": "510de6eca6248d77d31b339d62437cc995e2fb41", "shasum": "" }, "require": { "dasprid/enum": "^1.0.3", "ext-iconv": "*", - "php": "^7.1 || ^8.0" + "php": "^8.1" }, "require-dev": { - "phly/keep-a-changelog": "^2.1", - "phpunit/phpunit": "^7 | ^8 | ^9", - "spatie/phpunit-snapshot-assertions": "^4.2.9", - "squizlabs/php_codesniffer": "^3.4" + "phly/keep-a-changelog": "^2.12", + "phpunit/phpunit": "^10.5.11 || 11.0.4", + "spatie/phpunit-snapshot-assertions": "^5.1.5", + "squizlabs/php_codesniffer": "^3.9" }, "suggest": { "ext-imagick": "to generate QR code images" @@ -2228,9 +2228,125 @@ "homepage": "https://github.com/Bacon/BaconQrCode", "support": { "issues": "https://github.com/Bacon/BaconQrCode/issues", - "source": "https://github.com/Bacon/BaconQrCode/tree/2.0.8" + "source": "https://github.com/Bacon/BaconQrCode/tree/v3.0.0" + }, + "time": "2024-04-18T11:16:25+00:00" + }, + { + "name": "danog/async-orm", + "version": "1.0.2", + "source": { + "type": "git", + "url": "https://github.com/danog/AsyncOrm.git", + "reference": "8c1ea3e04ebdb3030ce0771ad3c1d922127a8e53" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/danog/AsyncOrm/zipball/8c1ea3e04ebdb3030ce0771ad3c1d922127a8e53", + "reference": "8c1ea3e04ebdb3030ce0771ad3c1d922127a8e53", + "shasum": "" + }, + "require": { + "amphp/mysql": "^3.0", + "amphp/postgres": "^2.0", + "amphp/redis": "^2.0", + "amphp/sync": "^2.2", + "php": ">=8.2.4", + "revolt/event-loop": "^1.0.6" + }, + "require-dev": { + "amphp/php-cs-fixer-config": "^2.0.1", + "amphp/process": "^2.0.2", + "danog/phpdoc": "^0.1.22", + "friendsofphp/php-cs-fixer": "^3.52.1", + "infection/infection": "^0.28.1", + "phpunit/phpunit": "^11.0.9", + "vimeo/psalm": "dev-master" + }, + "type": "library", + "autoload": { + "psr-4": { + "danog\\AsyncOrm\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "Apache-2.0" + ], + "authors": [ + { + "name": "Daniil Gentili", + "email": "daniil@daniil.it" + }, + { + "name": "Alexander Pankratov", + "email": "alexander@i-c-a.su" + } + ], + "description": "Async ORM based on AMPHP v3 and fibers.", + "support": { + "issues": "https://github.com/danog/AsyncOrm/issues", + "source": "https://github.com/danog/AsyncOrm/tree/1.0.2" + }, + "funding": [ + { + "url": "https://github.com/danog", + "type": "github" + } + ], + "time": "2024-04-07T18:25:49+00:00" + }, + { + "name": "danog/better-prometheus", + "version": "0.1.1", + "source": { + "type": "git", + "url": "https://github.com/danog/better-prometheus.git", + "reference": "74e19343be41905572290878ca9fd0ef08ba0c5e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/danog/better-prometheus/zipball/74e19343be41905572290878ca9fd0ef08ba0c5e", + "reference": "74e19343be41905572290878ca9fd0ef08ba0c5e", + "shasum": "" + }, + "require": { + "php": ">=8.1", + "promphp/prometheus_client_php": "^2.10" + }, + "require-dev": { + "amphp/php-cs-fixer-config": "^2", + "danog/phpdoc": "^0.1.24", + "psalm/phar": "dev-master" + }, + "type": "library", + "autoload": { + "psr-4": { + "danog\\BetterPrometheus\\": "lib/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "Apache-2.0" + ], + "authors": [ + { + "name": "Daniil Gentili", + "email": "daniil@daniil.it" + } + ], + "description": "A better Prometheus library for PHP applications", + "support": { + "issues": "https://github.com/danog/better-prometheus/issues", + "source": "https://github.com/danog/better-prometheus/tree/0.1.1" }, - "time": "2022-12-07T17:46:57+00:00" + "funding": [ + { + "url": "https://github.com/danog", + "type": "github" + } + ], + "time": "2024-05-09T19:10:54+00:00" }, { "name": "danog/dns-over-https", @@ -2517,50 +2633,54 @@ "source": { "type": "git", "url": "https://github.com/danog/MadelineProto.git", - "reference": "e848475db4dae9dde0458328eb83c6bd25079bb9" + "reference": "cbeb581f5b495328bcd2846393c3f976774618af" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/danog/MadelineProto/zipball/e848475db4dae9dde0458328eb83c6bd25079bb9", - "reference": "e848475db4dae9dde0458328eb83c6bd25079bb9", + "url": "https://api.github.com/repos/danog/MadelineProto/zipball/cbeb581f5b495328bcd2846393c3f976774618af", + "reference": "cbeb581f5b495328bcd2846393c3f976774618af", "shasum": "" }, "require": { - "amphp/amp": "^3", - "amphp/byte-stream": "^2", - "amphp/dns": "^2", - "amphp/file": "^3.0.1", - "amphp/http": "^2", - "amphp/http-client": "^5", + "amphp/amp": "^3.0.2", + "amphp/byte-stream": "^2.1.1", + "amphp/dns": "^2.1.2", + "amphp/file": "^3.1.0", + "amphp/http": "^2.1.1", + "amphp/http-client": "^5.1.0", "amphp/http-client-cookies": "^2", "amphp/log": "^2", "amphp/mysql": "^3", "amphp/postgres": "^2", "amphp/redis": "^2", - "amphp/socket": "^2", + "amphp/socket": "^2.3.1", "amphp/websocket-client": "^2", - "bacon/bacon-qr-code": "^2.0", + "bacon/bacon-qr-code": "^3", + "danog/async-orm": "^1.0.2", + "danog/better-prometheus": "^0.1.1", "danog/dns-over-https": "^1", "danog/ipc": "^1", - "danog/loop": "^1.1.0", - "danog/primemodule": "^1", - "danog/tg-file-decoder": "^0.1", + "danog/loop": "^1.1.1", + "danog/primemodule": "^1.0.13", + "danog/telegram-entities": "^1.0.4", + "danog/tg-dialog-id": "^1.0.1", + "danog/tg-file-decoder": "^1.0.1", "ext-dom": "*", "ext-fileinfo": "*", "ext-filter": "*", "ext-hash": "*", "ext-json": "*", - "ext-mbstring": "*", "ext-xml": "*", "ext-zlib": "*", - "league/uri": "^7", - "nikic/php-parser": "^5", - "php-64bit": ">=8.1", - "phpseclib/phpseclib": "^3.0.22", - "psr/http-factory": "^1.0", + "league/uri": "^7.4.1", + "nikic/php-parser": "^5.0.2", + "php-64bit": ">=8.2", + "phpseclib/phpseclib": "^3.0.37", + "psr/http-factory": "^1.1.0", "psr/log": "^3", - "revolt/event-loop": "^1.0.5", + "revolt/event-loop": "^1.0.6", "symfony/polyfill-mbstring": "*", + "symfony/thanks": "^1.3", "webmozart/assert": "^1.11" }, "conflict": { @@ -2568,18 +2688,17 @@ "krakjoe/pthreads-polyfill": "*" }, "require-dev": { - "amphp/http-server": "^3", + "amphp/http-server": "^3.3.1", "amphp/phpunit-util": "^3", "bamarni/composer-bin-plugin": "1.8.2", - "brianium/paratest": "^6.11", - "danog/phpdoc": "^0.1.7", + "brianium/paratest": "^6.11.1", + "danog/phpdoc": "^0.1.24", "dg/bypass-finals": "dev-master", "ext-ctype": "*", - "phpdocumentor/reflection-docblock": "dev-master", - "phpdocumentor/type-resolver": "1.x-dev@dev", - "phpunit/phpunit": "^9", - "revolt/event-loop-adapter-react": "^1", - "symfony/yaml": "^6.0" + "phpunit/phpunit": "^9.6.19", + "revolt/event-loop-adapter-react": "^1.1.1", + "symfony/yaml": "^6.4.7", + "vimeo/psalm": "dev-master" }, "suggest": { "ext-bcmath": "Install the bcmath extension to speed up authorization", @@ -2590,12 +2709,7 @@ "ext-primemodule": "Install the primemodule and FFI extensions to speed up MadelineProto (https://prime.madelineproto.xyz)", "ext-uv": "Install the uv extension to greatly speed up MadelineProto!" }, - "type": "project", - "extra": { - "phabel": { - "revision": 0 - } - }, + "type": "library", "autoload": { "files": [ "src/polyfill.php" @@ -2614,7 +2728,7 @@ "email": "daniil@daniil.it" } ], - "description": "PHP implementation of telegram's MTProto protocol.", + "description": "Async PHP client API for the telegram MTProto protocol.", "homepage": "https://docs.madelineproto.xyz", "keywords": [ "GB", @@ -2640,7 +2754,7 @@ "type": "github" } ], - "time": "2024-04-03T13:29:17+00:00" + "time": "2024-05-14T11:38:51+00:00" }, { "name": "danog/primemodule", @@ -2693,32 +2807,142 @@ }, "time": "2023-05-27T14:41:40+00:00" }, + { + "name": "danog/telegram-entities", + "version": "1.0.4", + "source": { + "type": "git", + "url": "https://github.com/danog/telegram-entities.git", + "reference": "5202723d6d19471504f7d51130069c45fec952c2" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/danog/telegram-entities/zipball/5202723d6d19471504f7d51130069c45fec952c2", + "reference": "5202723d6d19471504f7d51130069c45fec952c2", + "shasum": "" + }, + "require": { + "php-64bit": ">=8.2.4", + "symfony/polyfill-mbstring": "*", + "webmozart/assert": "^1.11" + }, + "require-dev": { + "amphp/http-client": "^5.0", + "amphp/php-cs-fixer-config": "^2.0.1", + "danog/phpdoc": "^0.1.22", + "friendsofphp/php-cs-fixer": "^3.52.1", + "infection/infection": "^0.28.1", + "phpunit/phpunit": "^11.0.9", + "vimeo/psalm": "dev-master" + }, + "type": "library", + "autoload": { + "psr-4": { + "danog\\TelegramEntities\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "Apache-2.0" + ], + "authors": [ + { + "name": "Daniil Gentili", + "email": "daniil@daniil.it" + } + ], + "description": "A library to work with Telegram UTF-16 styled text entities.", + "support": { + "issues": "https://github.com/danog/telegram-entities/issues", + "source": "https://github.com/danog/telegram-entities/tree/1.0.4" + }, + "funding": [ + { + "url": "https://github.com/danog", + "type": "github" + } + ], + "time": "2024-05-09T18:33:35+00:00" + }, + { + "name": "danog/tg-dialog-id", + "version": "1.0.1", + "source": { + "type": "git", + "url": "https://github.com/danog/tg-dialog-id.git", + "reference": "1bc37a5e599347d3b3c5f078d231b4edc161ae80" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/danog/tg-dialog-id/zipball/1bc37a5e599347d3b3c5f078d231b4edc161ae80", + "reference": "1bc37a5e599347d3b3c5f078d231b4edc161ae80", + "shasum": "" + }, + "require": { + "php-64bit": ">=8.1" + }, + "require-dev": { + "amphp/file": "^3.1", + "amphp/php-cs-fixer-config": "^2.0.1", + "danog/phpdoc": "^0.1.22", + "infection/infection": "^0.28.1", + "phpunit/phpunit": "^11.0.9|^10", + "vimeo/psalm": "dev-master" + }, + "type": "library", + "autoload": { + "psr-4": { + "danog\\DialogId\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "Apache-2.0" + ], + "authors": [ + { + "name": "Daniil Gentili", + "email": "daniil@daniil.it" + } + ], + "description": "A library to work with Telegram bot API dialog IDs", + "support": { + "issues": "https://github.com/danog/tg-dialog-id/issues", + "source": "https://github.com/danog/tg-dialog-id/tree/1.0.1" + }, + "funding": [ + { + "url": "https://github.com/danog", + "type": "github" + } + ], + "time": "2024-05-10T12:25:19+00:00" + }, { "name": "danog/tg-file-decoder", - "version": "0.1.13", + "version": "1.0.1", "source": { "type": "git", "url": "https://github.com/danog/tg-file-decoder.git", - "reference": "5cdb05816aad20583592635eddd90e9c6aae8930" + "reference": "5b1b69369e13a16b7a4905bf034a8ed997e5eaf8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/danog/tg-file-decoder/zipball/5cdb05816aad20583592635eddd90e9c6aae8930", - "reference": "5cdb05816aad20583592635eddd90e9c6aae8930", + "url": "https://api.github.com/repos/danog/tg-file-decoder/zipball/5b1b69369e13a16b7a4905bf034a8ed997e5eaf8", + "reference": "5b1b69369e13a16b7a4905bf034a8ed997e5eaf8", "shasum": "" }, "require": { - "php": ">=8.1" + "php-64bit": ">=8.2" }, "require-dev": { - "amphp/php-cs-fixer-config": "dev-master", - "phpunit/phpunit": "^9" + "amphp/php-cs-fixer-config": "^2", + "danog/phpdoc": "^0.1.22", + "phpunit/phpunit": "^11", + "vimeo/psalm": "dev-master" }, "type": "project", "autoload": { - "files": [ - "src/type.php" - ], "psr-4": { "danog\\Decoder\\": "src/" } @@ -2746,7 +2970,7 @@ ], "support": { "issues": "https://github.com/danog/tg-file-decoder/issues", - "source": "https://github.com/danog/tg-file-decoder/tree/0.1.13" + "source": "https://github.com/danog/tg-file-decoder/tree/1.0.1" }, "funding": [ { @@ -2754,7 +2978,7 @@ "type": "github" } ], - "time": "2023-08-05T21:04:20+00:00" + "time": "2024-04-19T21:31:39+00:00" }, { "name": "dasprid/enum", @@ -2808,21 +3032,21 @@ }, { "name": "daverandom/libdns", - "version": "v2.0.3", + "version": "v2.1.0", "source": { "type": "git", "url": "https://github.com/DaveRandom/LibDNS.git", - "reference": "42c2d700d1178c9f9e78664793463f7f1aea248c" + "reference": "b84c94e8fe6b7ee4aecfe121bfe3b6177d303c8a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/DaveRandom/LibDNS/zipball/42c2d700d1178c9f9e78664793463f7f1aea248c", - "reference": "42c2d700d1178c9f9e78664793463f7f1aea248c", + "url": "https://api.github.com/repos/DaveRandom/LibDNS/zipball/b84c94e8fe6b7ee4aecfe121bfe3b6177d303c8a", + "reference": "b84c94e8fe6b7ee4aecfe121bfe3b6177d303c8a", "shasum": "" }, "require": { "ext-ctype": "*", - "php": ">=7.0" + "php": ">=7.1" }, "suggest": { "ext-intl": "Required for IDN support" @@ -2846,9 +3070,9 @@ ], "support": { "issues": "https://github.com/DaveRandom/LibDNS/issues", - "source": "https://github.com/DaveRandom/LibDNS/tree/v2.0.3" + "source": "https://github.com/DaveRandom/LibDNS/tree/v2.1.0" }, - "time": "2022-09-20T18:15:38+00:00" + "time": "2024-04-12T12:12:48+00:00" }, { "name": "kelunik/certificate", @@ -3166,16 +3390,16 @@ }, { "name": "monolog/monolog", - "version": "3.5.0", + "version": "3.6.0", "source": { "type": "git", "url": "https://github.com/Seldaek/monolog.git", - "reference": "c915e2634718dbc8a4a15c61b0e62e7a44e14448" + "reference": "4b18b21a5527a3d5ffdac2fd35d3ab25a9597654" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Seldaek/monolog/zipball/c915e2634718dbc8a4a15c61b0e62e7a44e14448", - "reference": "c915e2634718dbc8a4a15c61b0e62e7a44e14448", + "url": "https://api.github.com/repos/Seldaek/monolog/zipball/4b18b21a5527a3d5ffdac2fd35d3ab25a9597654", + "reference": "4b18b21a5527a3d5ffdac2fd35d3ab25a9597654", "shasum": "" }, "require": { @@ -3198,7 +3422,7 @@ "phpstan/phpstan": "^1.9", "phpstan/phpstan-deprecation-rules": "^1.0", "phpstan/phpstan-strict-rules": "^1.4", - "phpunit/phpunit": "^10.1", + "phpunit/phpunit": "^10.5.17", "predis/predis": "^1.1 || ^2", "ruflin/elastica": "^7", "symfony/mailer": "^5.4 || ^6", @@ -3251,7 +3475,7 @@ ], "support": { "issues": "https://github.com/Seldaek/monolog/issues", - "source": "https://github.com/Seldaek/monolog/tree/3.5.0" + "source": "https://github.com/Seldaek/monolog/tree/3.6.0" }, "funding": [ { @@ -3263,7 +3487,7 @@ "type": "tidelift" } ], - "time": "2023-10-27T15:32:31+00:00" + "time": "2024-04-12T21:02:21+00:00" }, { "name": "nikic/fast-route", @@ -3375,16 +3599,16 @@ }, { "name": "paragonie/constant_time_encoding", - "version": "v2.6.3", + "version": "v2.7.0", "source": { "type": "git", "url": "https://github.com/paragonie/constant_time_encoding.git", - "reference": "58c3f47f650c94ec05a151692652a868995d2938" + "reference": "52a0d99e69f56b9ec27ace92ba56897fe6993105" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/paragonie/constant_time_encoding/zipball/58c3f47f650c94ec05a151692652a868995d2938", - "reference": "58c3f47f650c94ec05a151692652a868995d2938", + "url": "https://api.github.com/repos/paragonie/constant_time_encoding/zipball/52a0d99e69f56b9ec27ace92ba56897fe6993105", + "reference": "52a0d99e69f56b9ec27ace92ba56897fe6993105", "shasum": "" }, "require": { @@ -3438,7 +3662,7 @@ "issues": "https://github.com/paragonie/constant_time_encoding/issues", "source": "https://github.com/paragonie/constant_time_encoding" }, - "time": "2022-06-14T06:56:20+00:00" + "time": "2024-05-08T12:18:48+00:00" }, { "name": "paragonie/random_compat", @@ -3675,22 +3899,89 @@ ], "time": "2024-03-03T02:14:58+00:00" }, + { + "name": "promphp/prometheus_client_php", + "version": "v2.10.0", + "source": { + "type": "git", + "url": "https://github.com/PromPHP/prometheus_client_php.git", + "reference": "a09ea80ec1ec26dd1d4853e9af2a811e898dbfeb" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/PromPHP/prometheus_client_php/zipball/a09ea80ec1ec26dd1d4853e9af2a811e898dbfeb", + "reference": "a09ea80ec1ec26dd1d4853e9af2a811e898dbfeb", + "shasum": "" + }, + "require": { + "ext-json": "*", + "php": "^7.2|^8.0" + }, + "replace": { + "endclothing/prometheus_client_php": "*", + "jimdo/prometheus_client_php": "*", + "lkaemmerling/prometheus_client_php": "*" + }, + "require-dev": { + "guzzlehttp/guzzle": "^6.3|^7.0", + "phpstan/extension-installer": "^1.0", + "phpstan/phpstan": "^1.5.4", + "phpstan/phpstan-phpunit": "^1.1.0", + "phpstan/phpstan-strict-rules": "^1.1.0", + "phpunit/phpunit": "^9.4", + "squizlabs/php_codesniffer": "^3.6", + "symfony/polyfill-apcu": "^1.6" + }, + "suggest": { + "ext-apc": "Required if using APCu.", + "ext-redis": "Required if using Redis.", + "promphp/prometheus_push_gateway_php": "An easy client for using Prometheus PushGateway.", + "symfony/polyfill-apcu": "Required if you use APCu on PHP8.0+" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + } + }, + "autoload": { + "psr-4": { + "Prometheus\\": "src/Prometheus/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "Apache-2.0" + ], + "authors": [ + { + "name": "Lukas Kämmerling", + "email": "kontakt@lukas-kaemmerling.de" + } + ], + "description": "Prometheus instrumentation library for PHP applications.", + "support": { + "issues": "https://github.com/PromPHP/prometheus_client_php/issues", + "source": "https://github.com/PromPHP/prometheus_client_php/tree/v2.10.0" + }, + "time": "2024-02-01T13:28:34+00:00" + }, { "name": "psr/http-factory", - "version": "1.0.2", + "version": "1.1.0", "source": { "type": "git", "url": "https://github.com/php-fig/http-factory.git", - "reference": "e616d01114759c4c489f93b099585439f795fe35" + "reference": "2b4765fddfe3b508ac62f829e852b1501d3f6e8a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/http-factory/zipball/e616d01114759c4c489f93b099585439f795fe35", - "reference": "e616d01114759c4c489f93b099585439f795fe35", + "url": "https://api.github.com/repos/php-fig/http-factory/zipball/2b4765fddfe3b508ac62f829e852b1501d3f6e8a", + "reference": "2b4765fddfe3b508ac62f829e852b1501d3f6e8a", "shasum": "" }, "require": { - "php": ">=7.0.0", + "php": ">=7.1", "psr/http-message": "^1.0 || ^2.0" }, "type": "library", @@ -3714,7 +4005,7 @@ "homepage": "https://www.php-fig.org/" } ], - "description": "Common interfaces for PSR-7 HTTP message factories", + "description": "PSR-17: Common interfaces for PSR-7 HTTP message factories", "keywords": [ "factory", "http", @@ -3726,9 +4017,9 @@ "response" ], "support": { - "source": "https://github.com/php-fig/http-factory/tree/1.0.2" + "source": "https://github.com/php-fig/http-factory" }, - "time": "2023-04-10T20:10:41+00:00" + "time": "2024-04-15T12:06:14+00:00" }, { "name": "psr/http-message", @@ -4064,6 +4355,67 @@ ], "time": "2024-01-29T20:11:03+00:00" }, + { + "name": "symfony/thanks", + "version": "v1.3.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/thanks.git", + "reference": "5c569ce4ab014d5b9baa50d2650a1168aedf0a21" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/thanks/zipball/5c569ce4ab014d5b9baa50d2650a1168aedf0a21", + "reference": "5c569ce4ab014d5b9baa50d2650a1168aedf0a21", + "shasum": "" + }, + "require": { + "composer-plugin-api": "^1.0|^2.0", + "php": ">=7.1" + }, + "type": "composer-plugin", + "extra": { + "branch-alias": { + "dev-main": "1.3-dev" + }, + "class": "Symfony\\Thanks\\Thanks" + }, + "autoload": { + "psr-4": { + "Symfony\\Thanks\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + } + ], + "description": "Encourages sending ⭐ and 💵 to fellow PHP package maintainers (not limited to Symfony components)!", + "support": { + "issues": "https://github.com/symfony/thanks/issues", + "source": "https://github.com/symfony/thanks/tree/v1.3.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2024-03-19T12:38:11+00:00" + }, { "name": "vlucas/phpdotenv", "version": "v4.3.0", From d99fbe9c227d64753b66643167a570910cacf053 Mon Sep 17 00:00:00 2001 From: Alexander Pankratov Date: Tue, 14 May 2024 18:18:12 +0200 Subject: [PATCH 146/270] Fix: docker 26 dns issue --- composer.json | 9 ++++++++- composer.lock | 52 ++++++++++++++++++++++++++++++++------------------- 2 files changed, 41 insertions(+), 20 deletions(-) diff --git a/composer.json b/composer.json index 0a398a7..3a6da8b 100644 --- a/composer.json +++ b/composer.json @@ -17,6 +17,12 @@ "micro-service", "madelineproto" ], + "repositories": [ + { + "type": "github", + "url": "https://github.com/xtrime-ru/dns" + } + ], "require": { "php": "^8.1", "ext-json": "*", @@ -28,7 +34,8 @@ "amphp/websocket-server": "^v3", "amphp/websocket-client": "^v2", "vlucas/phpdotenv": "^4", - "danog/madelineproto": "dev-v8_fix_cleanup" + "danog/madelineproto": "dev-v8_fix_cleanup", + "amphp/dns": "2.x-dev" }, "suggest": { "ext-pcntl": "Install pcintl for propper signal handling and healthcheck (enabled in .env)" diff --git a/composer.lock b/composer.lock index 0bcfd32..03905a1 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "7999d0b15d74aafe194545856812c5d7", + "content-hash": "fa0829731f1399d1872730a90911afc8", "packages": [ { "name": "amphp/amp", @@ -229,16 +229,16 @@ }, { "name": "amphp/dns", - "version": "v2.1.2", + "version": "2.x-dev", "source": { "type": "git", - "url": "https://github.com/amphp/dns.git", - "reference": "04c88e67bef804203df934703bd422ea72f46b0e" + "url": "https://github.com/xtrime-ru/dns.git", + "reference": "2a70849cdcf5eb961574fee3b33915e2bebb4b70" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/amphp/dns/zipball/04c88e67bef804203df934703bd422ea72f46b0e", - "reference": "04c88e67bef804203df934703bd422ea72f46b0e", + "url": "https://api.github.com/repos/xtrime-ru/dns/zipball/2a70849cdcf5eb961574fee3b33915e2bebb4b70", + "reference": "2a70849cdcf5eb961574fee3b33915e2bebb4b70", "shasum": "" }, "require": { @@ -258,16 +258,36 @@ "phpunit/phpunit": "^9", "psalm/phar": "5.20" }, + "default-branch": true, "type": "library", "autoload": { + "psr-4": { + "Amp\\Dns\\": "src" + }, "files": [ "src/functions.php" - ], + ] + }, + "autoload-dev": { "psr-4": { - "Amp\\Dns\\": "src" + "Amp\\Dns\\Test\\": "test" } }, - "notification-url": "https://packagist.org/downloads/", + "scripts": { + "check": [ + "@cs", + "@test" + ], + "cs": [ + "PHP_CS_FIXER_IGNORE_ENV=1 php-cs-fixer fix -v --diff --dry-run" + ], + "cs-fix": [ + "PHP_CS_FIXER_IGNORE_ENV=1 php-cs-fixer fix -v --diff" + ], + "test": [ + "@php -dzend.assertions=1 -dassert.exception=1 ./vendor/bin/phpunit --coverage-text" + ] + }, "license": [ "MIT" ], @@ -304,16 +324,9 @@ "resolve" ], "support": { - "issues": "https://github.com/amphp/dns/issues", - "source": "https://github.com/amphp/dns/tree/v2.1.2" + "source": "https://github.com/xtrime-ru/dns/tree/2.x" }, - "funding": [ - { - "url": "https://github.com/amphp", - "type": "github" - } - ], - "time": "2024-04-19T03:49:29+00:00" + "time": "2024-05-14T16:13:20+00:00" }, { "name": "amphp/file", @@ -4561,7 +4574,8 @@ "aliases": [], "minimum-stability": "dev", "stability-flags": { - "danog/madelineproto": 20 + "danog/madelineproto": 20, + "amphp/dns": 20 }, "prefer-stable": true, "prefer-lowest": false, From 62ca596bfa783a31f740d7158ecfe25e1ec776d4 Mon Sep 17 00:00:00 2001 From: Alexander Pankratov Date: Tue, 14 May 2024 22:16:27 +0200 Subject: [PATCH 147/270] Fix: event handler --- src/EventObservers/EventHandler.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/EventObservers/EventHandler.php b/src/EventObservers/EventHandler.php index 10c2fd8..7a045d9 100644 --- a/src/EventObservers/EventHandler.php +++ b/src/EventObservers/EventHandler.php @@ -1,4 +1,4 @@ - Date: Tue, 14 May 2024 21:10:03 +0200 Subject: [PATCH 148/270] Fix: username caching in latest madeline --- composer.lock | 18 +++++++++--------- docker-compose.dev.yml | 2 ++ 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/composer.lock b/composer.lock index 03905a1..299d1d9 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "fa0829731f1399d1872730a90911afc8", + "content-hash": "09b26d1017fd85d16a9cb71fc6048cdf", "packages": [ { "name": "amphp/amp", @@ -233,12 +233,12 @@ "source": { "type": "git", "url": "https://github.com/xtrime-ru/dns.git", - "reference": "2a70849cdcf5eb961574fee3b33915e2bebb4b70" + "reference": "037b762d95f7d9e855b9c6736c0ccc4adcb8921e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/xtrime-ru/dns/zipball/2a70849cdcf5eb961574fee3b33915e2bebb4b70", - "reference": "2a70849cdcf5eb961574fee3b33915e2bebb4b70", + "url": "https://api.github.com/repos/xtrime-ru/dns/zipball/037b762d95f7d9e855b9c6736c0ccc4adcb8921e", + "reference": "037b762d95f7d9e855b9c6736c0ccc4adcb8921e", "shasum": "" }, "require": { @@ -326,7 +326,7 @@ "support": { "source": "https://github.com/xtrime-ru/dns/tree/2.x" }, - "time": "2024-05-14T16:13:20+00:00" + "time": "2024-05-14T18:13:22+00:00" }, { "name": "amphp/file", @@ -2646,12 +2646,12 @@ "source": { "type": "git", "url": "https://github.com/danog/MadelineProto.git", - "reference": "cbeb581f5b495328bcd2846393c3f976774618af" + "reference": "7db1850e379ddd432b471cf544319896b448bd97" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/danog/MadelineProto/zipball/cbeb581f5b495328bcd2846393c3f976774618af", - "reference": "cbeb581f5b495328bcd2846393c3f976774618af", + "url": "https://api.github.com/repos/danog/MadelineProto/zipball/7db1850e379ddd432b471cf544319896b448bd97", + "reference": "7db1850e379ddd432b471cf544319896b448bd97", "shasum": "" }, "require": { @@ -2767,7 +2767,7 @@ "type": "github" } ], - "time": "2024-05-14T11:38:51+00:00" + "time": "2024-05-14T20:03:12+00:00" }, { "name": "danog/primemodule", diff --git a/docker-compose.dev.yml b/docker-compose.dev.yml index abd3547..d9ea4ef 100644 --- a/docker-compose.dev.yml +++ b/docker-compose.dev.yml @@ -12,6 +12,8 @@ services: - "9003" environment: PHP_IDE_CONFIG: "serverName=Docker" + command: + - "-s=session" mysql: extends: file: docker-compose.base.yml From 1e5d09c7d962fd81d4365a719fd118af95dd807d Mon Sep 17 00:00:00 2001 From: Alexander Pankratov Date: Sat, 18 May 2024 18:36:19 +0200 Subject: [PATCH 149/270] Fix: media download --- composer.lock | 8 ++++---- config.php | 3 ++- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/composer.lock b/composer.lock index 299d1d9..8db5d21 100644 --- a/composer.lock +++ b/composer.lock @@ -2646,12 +2646,12 @@ "source": { "type": "git", "url": "https://github.com/danog/MadelineProto.git", - "reference": "7db1850e379ddd432b471cf544319896b448bd97" + "reference": "da935c43c3551824ae6032ca8f1e78c5f5af7170" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/danog/MadelineProto/zipball/7db1850e379ddd432b471cf544319896b448bd97", - "reference": "7db1850e379ddd432b471cf544319896b448bd97", + "url": "https://api.github.com/repos/danog/MadelineProto/zipball/da935c43c3551824ae6032ca8f1e78c5f5af7170", + "reference": "da935c43c3551824ae6032ca8f1e78c5f5af7170", "shasum": "" }, "require": { @@ -2767,7 +2767,7 @@ "type": "github" } ], - "time": "2024-05-14T20:03:12+00:00" + "time": "2024-05-18T19:20:47+00:00" }, { "name": "danog/primemodule", diff --git a/config.php b/config.php index abeb04c..19e886c 100644 --- a/config.php +++ b/config.php @@ -21,7 +21,7 @@ ], 'rpc' => [ 'flood_timeout' => 5, - 'rpc_drop_timeout' => 11, + 'rpc_drop_timeout' => 20, ], 'connection' => [ 'max_media_socket_count' => 10, @@ -56,6 +56,7 @@ ], 'files' => [ 'report_broken_media' => false, + 'download_parallel_chunks' => 20, ], ], 'api' => [ From 60c88b226e2bdd51e5d4b5eb9cf43e05569d28a0 Mon Sep 17 00:00:00 2001 From: Alexander Pankratov Date: Thu, 23 May 2024 17:35:03 +0200 Subject: [PATCH 150/270] Fix: fatal if media download ends with timeout --- composer.lock | 72 ++++----------------------------------------------- 1 file changed, 5 insertions(+), 67 deletions(-) diff --git a/composer.lock b/composer.lock index 8db5d21..2b07d24 100644 --- a/composer.lock +++ b/composer.lock @@ -2646,12 +2646,12 @@ "source": { "type": "git", "url": "https://github.com/danog/MadelineProto.git", - "reference": "da935c43c3551824ae6032ca8f1e78c5f5af7170" + "reference": "050d934015299689b11f1b14cd0055b07aa03694" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/danog/MadelineProto/zipball/da935c43c3551824ae6032ca8f1e78c5f5af7170", - "reference": "da935c43c3551824ae6032ca8f1e78c5f5af7170", + "url": "https://api.github.com/repos/danog/MadelineProto/zipball/050d934015299689b11f1b14cd0055b07aa03694", + "reference": "050d934015299689b11f1b14cd0055b07aa03694", "shasum": "" }, "require": { @@ -2662,6 +2662,7 @@ "amphp/http": "^2.1.1", "amphp/http-client": "^5.1.0", "amphp/http-client-cookies": "^2", + "amphp/http-server": "^3.3.1", "amphp/log": "^2", "amphp/mysql": "^3", "amphp/postgres": "^2", @@ -2693,7 +2694,6 @@ "psr/log": "^3", "revolt/event-loop": "^1.0.6", "symfony/polyfill-mbstring": "*", - "symfony/thanks": "^1.3", "webmozart/assert": "^1.11" }, "conflict": { @@ -2701,7 +2701,6 @@ "krakjoe/pthreads-polyfill": "*" }, "require-dev": { - "amphp/http-server": "^3.3.1", "amphp/phpunit-util": "^3", "bamarni/composer-bin-plugin": "1.8.2", "brianium/paratest": "^6.11.1", @@ -2767,7 +2766,7 @@ "type": "github" } ], - "time": "2024-05-18T19:20:47+00:00" + "time": "2024-05-23T15:33:19+00:00" }, { "name": "danog/primemodule", @@ -4368,67 +4367,6 @@ ], "time": "2024-01-29T20:11:03+00:00" }, - { - "name": "symfony/thanks", - "version": "v1.3.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/thanks.git", - "reference": "5c569ce4ab014d5b9baa50d2650a1168aedf0a21" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/thanks/zipball/5c569ce4ab014d5b9baa50d2650a1168aedf0a21", - "reference": "5c569ce4ab014d5b9baa50d2650a1168aedf0a21", - "shasum": "" - }, - "require": { - "composer-plugin-api": "^1.0|^2.0", - "php": ">=7.1" - }, - "type": "composer-plugin", - "extra": { - "branch-alias": { - "dev-main": "1.3-dev" - }, - "class": "Symfony\\Thanks\\Thanks" - }, - "autoload": { - "psr-4": { - "Symfony\\Thanks\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - } - ], - "description": "Encourages sending ⭐ and 💵 to fellow PHP package maintainers (not limited to Symfony components)!", - "support": { - "issues": "https://github.com/symfony/thanks/issues", - "source": "https://github.com/symfony/thanks/tree/v1.3.0" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2024-03-19T12:38:11+00:00" - }, { "name": "vlucas/phpdotenv", "version": "v4.3.0", From de3b029534e1f735171da933bda5e94cfb6ff9b8 Mon Sep 17 00:00:00 2001 From: Alexander Pankratov Date: Fri, 31 May 2024 14:58:07 +0200 Subject: [PATCH 151/270] Fix: allow json serializable object in response --- src/Controllers/AbstractApiController.php | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/Controllers/AbstractApiController.php b/src/Controllers/AbstractApiController.php index ba98cc0..b2eda2a 100644 --- a/src/Controllers/AbstractApiController.php +++ b/src/Controllers/AbstractApiController.php @@ -221,10 +221,6 @@ private function getResponse(): string|Response return $this->page['response']; } - if (!is_array($this->page['response']) && !is_scalar($this->page['response'])) { - $this->page['response'] = null; - } - $data = [ 'success' => $this->page['success'], 'errors' => $this->page['errors'], From ee98c71109aac16d9f632b309b0aa6b99d509191 Mon Sep 17 00:00:00 2001 From: Alexander Pankratov Date: Fri, 31 May 2024 15:00:10 +0200 Subject: [PATCH 152/270] Update madelineProto --- composer.lock | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/composer.lock b/composer.lock index 2b07d24..dea059b 100644 --- a/composer.lock +++ b/composer.lock @@ -2646,12 +2646,12 @@ "source": { "type": "git", "url": "https://github.com/danog/MadelineProto.git", - "reference": "050d934015299689b11f1b14cd0055b07aa03694" + "reference": "550d9dac8776ca711b7cae3b16176fa6cf98bb69" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/danog/MadelineProto/zipball/050d934015299689b11f1b14cd0055b07aa03694", - "reference": "050d934015299689b11f1b14cd0055b07aa03694", + "url": "https://api.github.com/repos/danog/MadelineProto/zipball/550d9dac8776ca711b7cae3b16176fa6cf98bb69", + "reference": "550d9dac8776ca711b7cae3b16176fa6cf98bb69", "shasum": "" }, "require": { @@ -2766,7 +2766,7 @@ "type": "github" } ], - "time": "2024-05-23T15:33:19+00:00" + "time": "2024-05-31T12:59:29+00:00" }, { "name": "danog/primemodule", From 774615b05860f535349897997d2d0177ab850f29 Mon Sep 17 00:00:00 2001 From: Alexander Pankratov Date: Sun, 2 Jun 2024 21:28:34 +0200 Subject: [PATCH 153/270] Update madelineProto --- composer.lock | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/composer.lock b/composer.lock index dea059b..d4176c1 100644 --- a/composer.lock +++ b/composer.lock @@ -2646,12 +2646,12 @@ "source": { "type": "git", "url": "https://github.com/danog/MadelineProto.git", - "reference": "550d9dac8776ca711b7cae3b16176fa6cf98bb69" + "reference": "1b75b55756feba5137681a54b48a8bb711c5f0e1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/danog/MadelineProto/zipball/550d9dac8776ca711b7cae3b16176fa6cf98bb69", - "reference": "550d9dac8776ca711b7cae3b16176fa6cf98bb69", + "url": "https://api.github.com/repos/danog/MadelineProto/zipball/1b75b55756feba5137681a54b48a8bb711c5f0e1", + "reference": "1b75b55756feba5137681a54b48a8bb711c5f0e1", "shasum": "" }, "require": { @@ -2766,7 +2766,7 @@ "type": "github" } ], - "time": "2024-05-31T12:59:29+00:00" + "time": "2024-06-02T19:27:59+00:00" }, { "name": "danog/primemodule", From 3d6a97d4cf3254dcf001c05bf1cb71bc186194d3 Mon Sep 17 00:00:00 2001 From: Alexander Pankratov Date: Thu, 13 Jun 2024 17:23:19 +0200 Subject: [PATCH 154/270] Fix getPwrChat --- composer.lock | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/composer.lock b/composer.lock index d4176c1..db43222 100644 --- a/composer.lock +++ b/composer.lock @@ -2646,12 +2646,12 @@ "source": { "type": "git", "url": "https://github.com/danog/MadelineProto.git", - "reference": "1b75b55756feba5137681a54b48a8bb711c5f0e1" + "reference": "d5c1634ecfac473ce91f681c905a812a6ee7b303" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/danog/MadelineProto/zipball/1b75b55756feba5137681a54b48a8bb711c5f0e1", - "reference": "1b75b55756feba5137681a54b48a8bb711c5f0e1", + "url": "https://api.github.com/repos/danog/MadelineProto/zipball/d5c1634ecfac473ce91f681c905a812a6ee7b303", + "reference": "d5c1634ecfac473ce91f681c905a812a6ee7b303", "shasum": "" }, "require": { @@ -2766,7 +2766,7 @@ "type": "github" } ], - "time": "2024-06-02T19:27:59+00:00" + "time": "2024-06-13T15:22:29+00:00" }, { "name": "danog/primemodule", From d543b629a2a7df15c91722ba173265505128c9d2 Mon Sep 17 00:00:00 2001 From: Alexander Pankratov Date: Sun, 14 Jul 2024 20:42:33 +0200 Subject: [PATCH 155/270] Feat: uncaught errors notification --- .env.docker.example | 11 ++++++-- .env.example | 11 ++++++-- composer.json | 1 + config.php | 13 +++++++++ src/Client.php | 69 +++++++++++++++++++++++++++++++++++++++++++-- src/Logger.php | 2 +- 6 files changed, 100 insertions(+), 7 deletions(-) diff --git a/.env.docker.example b/.env.docker.example index 43c14cf..fbc6723 100644 --- a/.env.docker.example +++ b/.env.docker.example @@ -15,7 +15,7 @@ TIMEZONE=UTC # VALUE IN SECOND # DECREASE TO REDUCE LATENCY, INCREASE TO REDUCE LOAD ON SERVER. # SET to 0 to DISABLE -REQUESTS_BULK_INTERVAL=0.5 +REQUESTS_BULK_INTERVAL=0.0 # List of allowed clients. Separate with comma. # Leave blanc, to allow requests from all IP (THIS WILL MAKE API UNSECURE!) @@ -67,4 +67,11 @@ DB_SERIALIZER=serialize # Enable to add cache info about users to database. Disable if you only read data from channels. DB_ENABLE_MIN_DATABASE=0 # Enable file metadata cache -DB_ENABLE_FILE_REFERENCE_DATABASE=0 \ No newline at end of file +DB_ENABLE_FILE_REFERENCE_DATABASE=0 + +ERROR_NOTIFICATION_BOT_TOKEN= +#User id or Chat id or username of the target channel to send error messages. Comma separated +#Example: 123456,@sometestchannel +ERROR_NOTIFICATION_PEERS= +# Program will continue to work after fatal error (not recommended) +RESUME_ON_ERROR=0 \ No newline at end of file diff --git a/.env.example b/.env.example index 2337688..ed6b620 100644 --- a/.env.example +++ b/.env.example @@ -16,7 +16,7 @@ TIMEZONE=UTC # VALUE IN SECOND # DECREASE TO REDUCE LATENCY, INCREASE TO REDUCE LOAD ON SERVER. # SET to 0 to DISABLE -REQUESTS_BULK_INTERVAL=0.5 +REQUESTS_BULK_INTERVAL=0.0 # List of allowed clients. Separate with comma. # Leave blanc, to allow requests from all IP (THIS WILL MAKE API UNSECURE!) @@ -65,4 +65,11 @@ DB_SERIALIZER=serialize # Enable to add cache info about users to database. Disable if you only read data from channels. DB_ENABLE_MIN_DATABASE=0 # Enable file metadata cache -DB_ENABLE_FILE_REFERENCE_DATABASE=0 \ No newline at end of file +DB_ENABLE_FILE_REFERENCE_DATABASE=0 + +ERROR_NOTIFICATION_BOT_TOKEN= +#User id or Chat id or username of the target channel to send error messages. Comma separated +#Example: 123456,@sometestchannel +ERROR_NOTIFICATION_PEERS= +# Program will continue to work after fatal error (not recommended) +RESUME_ON_ERROR=0 \ No newline at end of file diff --git a/composer.json b/composer.json index 3a6da8b..56ca06b 100644 --- a/composer.json +++ b/composer.json @@ -27,6 +27,7 @@ "php": "^8.1", "ext-json": "*", "ext-mbstring": "*", + "ext-curl": "*", "amphp/http-server": "^v3", "amphp/http": "^v2", "amphp/http-server-router": "^2", diff --git a/config.php b/config.php index 19e886c..501cc72 100644 --- a/config.php +++ b/config.php @@ -9,6 +9,19 @@ 'port' => (int)getenv('SERVER_PORT'), 'real_ip_header' => (string)(getenv('REAL_IP_HEADER') ?? ''), ], + 'error' => [ + 'bot_token' => (string)getenv('ERROR_NOTIFICATION_BOT_TOKEN'), + 'peers' => array_filter( + array_map( + static function(string $peer): string|int { + $peer = trim($peer); + return is_numeric($peer) ? (int)$peer : $peer; + }, + explode(',', (string)getenv('ERROR_NOTIFICATION_PEERS')) + ), + ), + 'resume_on_error' => ((bool)getenv('RESUME_ON_ERROR')) + ], 'telegram' => [ 'app_info' => [ // obtained in https://my.telegram.org 'api_id' => (int)getenv('TELEGRAM_API_ID'), diff --git a/src/Client.php b/src/Client.php index bc6c2a3..68e538b 100644 --- a/src/Client.php +++ b/src/Client.php @@ -10,9 +10,11 @@ use InvalidArgumentException; use Psr\Log\LogLevel; use ReflectionProperty; +use Revolt\EventLoop; use RuntimeException; -use TelegramApiServer\EventObservers\EventHandler; use TelegramApiServer\EventObservers\EventObserver; +use function Amp\async; +use function Amp\delay; class Client { @@ -32,6 +34,8 @@ public function connect(array $sessionFiles) { warning(PHP_EOL . 'Starting MadelineProto...' . PHP_EOL); + $this->setFatalErrorHandler(); + foreach ($sessionFiles as $file) { $sessionName = Files::getSessionName($file); $this->addSession($sessionName); @@ -160,7 +164,8 @@ public static function getWrapper(API $madelineProto): APIWrapper return $wrapper; } - private static function getSettingsFromArray(string $session, array $settings, SettingsAbstract $settingsObject = new Settings()): SettingsAbstract { + private static function getSettingsFromArray(string $session, array $settings, SettingsAbstract $settingsObject = new Settings()): SettingsAbstract + { foreach ($settings as $key => $value) { if (is_array($value) && $key !== 'proxies') { if ($key === 'db' && isset($value['type'])) { @@ -198,5 +203,65 @@ private static function getSettingsFromArray(string $session, array $settings, S return $settingsObject; } + private function setFatalErrorHandler(): void + { + + $token = Config::getInstance()->get('error.bot_token'); + $peers = Config::getInstance()->get('error.peers'); + $resume = Config::getInstance()->get('error.resume_on_error'); + + $currentHandler = EventLoop::getErrorHandler(); + EventLoop::setErrorHandler(static fn(\Throwable $e) => self::errorHandler($e, $currentHandler, $token, $peers, $resume)); + } + + private static function errorHandler(\Throwable $e, ?callable $currentHandler, string $token, array $peers, bool $resume): void { + if ($currentHandler) { + $currentHandler($e); + } + if ($e->getPrevious()) { + self::errorHandler($e->getPrevious(), $currentHandler, $token, $peers, true); + } + if ($peers && $token) { + try { + $ch = curl_init("https://api.telegram.org/bot$token/sendMessage"); + curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'POST'); + curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: application/json')); + curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); + + curl_setopt($ch, CURLOPT_CONNECTTIMEOUT,1); + curl_setopt($ch, CURLOPT_TIMEOUT, 5); + + foreach ($peers as $peer) { + $exceptionArray = Logger::getExceptionAsArray($e); + unset($exceptionArray['previous_exception']); + + curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode([ + 'chat_id' => $peer, + 'text' => "```json\n" . + json_encode($exceptionArray, JSON_UNESCAPED_SLASHES|JSON_UNESCAPED_UNICODE|JSON_PRETTY_PRINT) . + "\n```" + , + 'parse_mode' => 'MarkdownV2', + ])); + + $response = curl_exec($ch); + if (curl_getinfo($ch, CURLINFO_HTTP_CODE) !== 200) { + Logger::getInstance()->error('Error notification bot response', [ + 'response' => $response, + 'error_code' => curl_errno($ch), + 'error' => curl_error($ch), + ]); + } + + } + } catch (\Throwable $curlException) { + Logger::getInstance()->error($curlException); + } + } + + if (!$resume) { + throw $e; + } + } } diff --git a/src/Logger.php b/src/Logger.php index bd0bf58..07701de 100644 --- a/src/Logger.php +++ b/src/Logger.php @@ -168,7 +168,7 @@ public static function getExceptionAsArray(Throwable $exception) 'line' => $exception->getLine(), 'code' => $exception->getCode(), 'backtrace' => array_slice($exception->getTrace(), 0, 3), - 'previous exception' => $exception->getPrevious(), + 'previous_exception' => $exception->getPrevious(), ]; } } \ No newline at end of file From 6ef7a898abfee08f76bef5c8bb8ab383fe79683d Mon Sep 17 00:00:00 2001 From: Daniil Gentili Date: Sun, 14 Jul 2024 20:53:30 +0200 Subject: [PATCH 156/270] Upstream docker image (#161) Switch to upstream MadelineProto image --- Dockerfile | 30 +- Dockerfile-dev | 14 +- bootstrap.php | 17 + composer.json | 12 +- composer.lock | 2475 ++++++++++++++++- config.php | 8 +- {docker/php/conf.d => dev}/xdebug.ini | 5 +- docker-compose.base.yml | 2 +- docker-compose.yml | 3 +- docker/php/conf.d/common.ini | 1 - docker/php/conf.d/opcache.ini | 11 - entrypoint.sh | 14 +- examples/websocket-events.php | 7 +- server.php | 3 - src/Client.php | 43 +- src/Config.php | 22 +- src/Controllers/AbstractApiController.php | 48 +- src/Controllers/ApiController.php | 53 +- src/Controllers/EventsController.php | 12 +- src/Controllers/LogController.php | 10 +- src/Controllers/SystemController.php | 12 +- src/EventObservers/EventHandler.php | 10 +- src/EventObservers/EventObserver.php | 35 +- src/EventObservers/LogObserver.php | 18 +- src/EventObservers/ObserverTrait.php | 13 +- src/Exceptions/NoMediaException.php | 6 +- src/Exceptions/NoticeException.php | 4 +- src/Files.php | 53 +- src/Logger.php | 106 +- src/MadelineProtoExtensions/ApiExtensions.php | 71 +- .../SystemApiExtensions.php | 24 +- src/Migrations/StartUpFixes.php | 20 +- src/Server/AccessLoggerMiddleware.php | 8 +- src/Server/Authorization.php | 26 +- src/Server/ErrorResponses.php | 10 +- src/Server/Router.php | 9 +- src/Server/Server.php | 37 +- 37 files changed, 2792 insertions(+), 460 deletions(-) rename {docker/php/conf.d => dev}/xdebug.ini (62%) delete mode 100644 docker/php/conf.d/common.ini delete mode 100644 docker/php/conf.d/opcache.ini diff --git a/Dockerfile b/Dockerfile index ce762c3..0c8b88e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,31 +1,13 @@ -FROM php:8.3-cli +FROM danog/madelineproto:latest -RUN apt-get update && apt-get upgrade -y -RUN true \ - # Install main extension - && apt-get install procps git zip vim libzip-dev libgmp-dev libuv1-dev libssl-dev libnghttp2-dev libffi-dev libicu-dev libonig-dev libxml2-dev libpng-dev -y \ - && docker-php-ext-install -j$(nproc) sockets bcmath mysqli pdo_mysql pcntl ffi intl gmp zip gd \ - # Install additional extension - && mkdir -p /usr/src/php/ext/ && cd /usr/src/php/ext/ \ - && pecl bundle uv && pecl bundle igbinary \ - && docker-php-ext-install -j$(nproc) uv igbinary \ - # Install PrimeModule for AuthKey generation speedup - && git clone https://github.com/danog/PrimeModule-ext \ - && cd PrimeModule-ext && make -j$(nproc) \ - && make install \ - && cd ../ \ - && rm -rf PrimeModule-ext/ \ - # Install composer - && curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer \ - # Cleanup - && docker-php-source delete \ - && apt-get autoremove --purge -y && apt-get autoclean -y && apt-get clean -y \ - && rm -rf /usr/src +RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer COPY --from=ghcr.io/ufoscout/docker-compose-wait:latest /wait /usr/local/bin/docker-compose-wait -ADD docker/php/conf.d/. "$PHP_INI_DIR/conf.d/" +RUN echo 1.0.0 > /tas_version EXPOSE 9503 -ENTRYPOINT ["./entrypoint.sh"] \ No newline at end of file +ENV UV_USE_IO_URING=0 + +ENTRYPOINT ["./entrypoint.sh"] diff --git a/Dockerfile-dev b/Dockerfile-dev index edad447..5e129db 100644 --- a/Dockerfile-dev +++ b/Dockerfile-dev @@ -1,12 +1,16 @@ FROM xtrime/telegram-api-server:latest -ADD docker/php/conf.d/. "$PHP_INI_DIR/conf.d/" +ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/ -RUN pecl install xdebug \ - && echo "" >> "$PHP_INI_DIR/conf.d/xdebug.ini" \ - && echo "zend_extension=xdebug.so" >> "$PHP_INI_DIR/conf.d/xdebug.ini" +RUN echo "opcache.jit=disable" >> "$PHP_INI_DIR/conf.d/xdebug.ini" + +RUN chmod +x /usr/local/bin/install-php-extensions && \ + install-php-extensions xdebug && \ + rm /usr/local/bin/install-php-extensions + +ADD dev/. "$PHP_INI_DIR/conf.d/" EXPOSE 9503 EXPOSE 9003 -ENTRYPOINT ["./entrypoint.sh"] \ No newline at end of file +ENTRYPOINT ["./entrypoint.sh"] diff --git a/bootstrap.php b/bootstrap.php index 0705a7d..e9837cc 100644 --- a/bootstrap.php +++ b/bootstrap.php @@ -1,5 +1,9 @@ emergency($message, $context); } } + +EventLoop::setErrorHandler(function (\Throwable $e) { + if ($e instanceof UnhandledFutureError) { + $e = $e->getPrevious(); + } + if ($e instanceof SecurityException || $e instanceof SignalException || $e instanceof SqlException) { + throw $e; + } + if (str_starts_with($e->getMessage(), 'Could not connect to DC ')) { + throw $e; + } + emergency((string) $e); +}); \ No newline at end of file diff --git a/composer.json b/composer.json index 56ca06b..4bd5ef2 100644 --- a/composer.json +++ b/composer.json @@ -24,7 +24,7 @@ } ], "require": { - "php": "^8.1", + "php": "^8.2", "ext-json": "*", "ext-mbstring": "*", "ext-curl": "*", @@ -32,12 +32,15 @@ "amphp/http": "^v2", "amphp/http-server-router": "^2", "amphp/http-server-form-parser": "^v2", - "amphp/websocket-server": "^v3", + "amphp/websocket-server": "^3.0.1", "amphp/websocket-client": "^v2", - "vlucas/phpdotenv": "^4", + "vlucas/phpdotenv": "^4.3", "danog/madelineproto": "dev-v8_fix_cleanup", "amphp/dns": "2.x-dev" }, + "require-dev": { + "amphp/php-cs-fixer-config": "^2.0.1" + }, "suggest": { "ext-pcntl": "Install pcintl for propper signal handling and healthcheck (enabled in .env)" }, @@ -58,5 +61,8 @@ "allow-plugins": { "symfony/thanks": false } + }, + "scripts": { + "cs-fix": "PHP_CS_FIXER_IGNORE_ENV=1 php -d pcre.jit=0 vendor/bin/php-cs-fixer fix -v" } } diff --git a/composer.lock b/composer.lock index db43222..cc80baa 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "09b26d1017fd85d16a9cb71fc6048cdf", + "content-hash": "b9e9ba3184bce93fe3654528621101f4", "packages": [ { "name": "amphp/amp", @@ -1274,16 +1274,16 @@ }, { "name": "amphp/pipeline", - "version": "v1.2.0", + "version": "v1.2.1", "source": { "type": "git", "url": "https://github.com/amphp/pipeline.git", - "reference": "f1c2ce35d27ae86ead018adb803eccca7421dd9b" + "reference": "66c095673aa5b6e689e63b52d19e577459129ab3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/amphp/pipeline/zipball/f1c2ce35d27ae86ead018adb803eccca7421dd9b", - "reference": "f1c2ce35d27ae86ead018adb803eccca7421dd9b", + "url": "https://api.github.com/repos/amphp/pipeline/zipball/66c095673aa5b6e689e63b52d19e577459129ab3", + "reference": "66c095673aa5b6e689e63b52d19e577459129ab3", "shasum": "" }, "require": { @@ -1329,7 +1329,7 @@ ], "support": { "issues": "https://github.com/amphp/pipeline/issues", - "source": "https://github.com/amphp/pipeline/tree/v1.2.0" + "source": "https://github.com/amphp/pipeline/tree/v1.2.1" }, "funding": [ { @@ -1337,7 +1337,7 @@ "type": "github" } ], - "time": "2024-03-10T14:48:16+00:00" + "time": "2024-07-04T00:56:47+00:00" }, { "name": "amphp/postgres", @@ -2646,12 +2646,12 @@ "source": { "type": "git", "url": "https://github.com/danog/MadelineProto.git", - "reference": "d5c1634ecfac473ce91f681c905a812a6ee7b303" + "reference": "ddb2bb5a2358cc62cb8d0f847710e2cccb106390" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/danog/MadelineProto/zipball/d5c1634ecfac473ce91f681c905a812a6ee7b303", - "reference": "d5c1634ecfac473ce91f681c905a812a6ee7b303", + "url": "https://api.github.com/repos/danog/MadelineProto/zipball/ddb2bb5a2358cc62cb8d0f847710e2cccb106390", + "reference": "ddb2bb5a2358cc62cb8d0f847710e2cccb106390", "shasum": "" }, "require": { @@ -2766,7 +2766,7 @@ "type": "github" } ], - "time": "2024-06-13T15:22:29+00:00" + "time": "2024-07-10T14:36:36+00:00" }, { "name": "danog/primemodule", @@ -3402,16 +3402,16 @@ }, { "name": "monolog/monolog", - "version": "3.6.0", + "version": "3.7.0", "source": { "type": "git", "url": "https://github.com/Seldaek/monolog.git", - "reference": "4b18b21a5527a3d5ffdac2fd35d3ab25a9597654" + "reference": "f4393b648b78a5408747de94fca38beb5f7e9ef8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Seldaek/monolog/zipball/4b18b21a5527a3d5ffdac2fd35d3ab25a9597654", - "reference": "4b18b21a5527a3d5ffdac2fd35d3ab25a9597654", + "url": "https://api.github.com/repos/Seldaek/monolog/zipball/f4393b648b78a5408747de94fca38beb5f7e9ef8", + "reference": "f4393b648b78a5408747de94fca38beb5f7e9ef8", "shasum": "" }, "require": { @@ -3487,7 +3487,7 @@ ], "support": { "issues": "https://github.com/Seldaek/monolog/issues", - "source": "https://github.com/Seldaek/monolog/tree/3.6.0" + "source": "https://github.com/Seldaek/monolog/tree/3.7.0" }, "funding": [ { @@ -3499,7 +3499,7 @@ "type": "tidelift" } ], - "time": "2024-04-12T21:02:21+00:00" + "time": "2024-06-28T09:40:51+00:00" }, { "name": "nikic/fast-route", @@ -3553,16 +3553,16 @@ }, { "name": "nikic/php-parser", - "version": "v5.0.2", + "version": "v5.1.0", "source": { "type": "git", "url": "https://github.com/nikic/PHP-Parser.git", - "reference": "139676794dc1e9231bf7bcd123cfc0c99182cb13" + "reference": "683130c2ff8c2739f4822ff7ac5c873ec529abd1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/139676794dc1e9231bf7bcd123cfc0c99182cb13", - "reference": "139676794dc1e9231bf7bcd123cfc0c99182cb13", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/683130c2ff8c2739f4822ff7ac5c873ec529abd1", + "reference": "683130c2ff8c2739f4822ff7ac5c873ec529abd1", "shasum": "" }, "require": { @@ -3573,7 +3573,7 @@ }, "require-dev": { "ircmaxell/php-yacc": "^0.0.7", - "phpunit/phpunit": "^7.0 || ^8.0 || ^9.0" + "phpunit/phpunit": "^9.0" }, "bin": [ "bin/php-parse" @@ -3605,30 +3605,30 @@ ], "support": { "issues": "https://github.com/nikic/PHP-Parser/issues", - "source": "https://github.com/nikic/PHP-Parser/tree/v5.0.2" + "source": "https://github.com/nikic/PHP-Parser/tree/v5.1.0" }, - "time": "2024-03-05T20:51:40+00:00" + "time": "2024-07-01T20:03:41+00:00" }, { "name": "paragonie/constant_time_encoding", - "version": "v2.7.0", + "version": "v3.0.0", "source": { "type": "git", "url": "https://github.com/paragonie/constant_time_encoding.git", - "reference": "52a0d99e69f56b9ec27ace92ba56897fe6993105" + "reference": "df1e7fde177501eee2037dd159cf04f5f301a512" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/paragonie/constant_time_encoding/zipball/52a0d99e69f56b9ec27ace92ba56897fe6993105", - "reference": "52a0d99e69f56b9ec27ace92ba56897fe6993105", + "url": "https://api.github.com/repos/paragonie/constant_time_encoding/zipball/df1e7fde177501eee2037dd159cf04f5f301a512", + "reference": "df1e7fde177501eee2037dd159cf04f5f301a512", "shasum": "" }, "require": { - "php": "^7|^8" + "php": "^8" }, "require-dev": { - "phpunit/phpunit": "^6|^7|^8|^9", - "vimeo/psalm": "^1|^2|^3|^4" + "phpunit/phpunit": "^9", + "vimeo/psalm": "^4|^5" }, "type": "library", "autoload": { @@ -3674,7 +3674,7 @@ "issues": "https://github.com/paragonie/constant_time_encoding/issues", "source": "https://github.com/paragonie/constant_time_encoding" }, - "time": "2024-05-08T12:18:48+00:00" + "time": "2024-05-08T12:36:18+00:00" }, { "name": "paragonie/random_compat", @@ -3803,20 +3803,20 @@ }, { "name": "phpseclib/phpseclib", - "version": "3.0.37", + "version": "3.0.39", "source": { "type": "git", "url": "https://github.com/phpseclib/phpseclib.git", - "reference": "cfa2013d0f68c062055180dd4328cc8b9d1f30b8" + "reference": "211ebc399c6e73c225a018435fe5ae209d1d1485" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpseclib/phpseclib/zipball/cfa2013d0f68c062055180dd4328cc8b9d1f30b8", - "reference": "cfa2013d0f68c062055180dd4328cc8b9d1f30b8", + "url": "https://api.github.com/repos/phpseclib/phpseclib/zipball/211ebc399c6e73c225a018435fe5ae209d1d1485", + "reference": "211ebc399c6e73c225a018435fe5ae209d1d1485", "shasum": "" }, "require": { - "paragonie/constant_time_encoding": "^1|^2", + "paragonie/constant_time_encoding": "^1|^2|^3", "paragonie/random_compat": "^1.4|^2.0|^9.99.99", "php": ">=5.6.1" }, @@ -3893,7 +3893,7 @@ ], "support": { "issues": "https://github.com/phpseclib/phpseclib/issues", - "source": "https://github.com/phpseclib/phpseclib/tree/3.0.37" + "source": "https://github.com/phpseclib/phpseclib/tree/3.0.39" }, "funding": [ { @@ -3909,7 +3909,7 @@ "type": "tidelift" } ], - "time": "2024-03-03T02:14:58+00:00" + "time": "2024-06-24T06:27:33+00:00" }, { "name": "promphp/prometheus_client_php", @@ -4210,16 +4210,16 @@ }, { "name": "symfony/polyfill-ctype", - "version": "v1.29.0", + "version": "v1.30.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-ctype.git", - "reference": "ef4d7e442ca910c4764bce785146269b30cb5fc4" + "reference": "0424dff1c58f028c451efff2045f5d92410bd540" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/ef4d7e442ca910c4764bce785146269b30cb5fc4", - "reference": "ef4d7e442ca910c4764bce785146269b30cb5fc4", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/0424dff1c58f028c451efff2045f5d92410bd540", + "reference": "0424dff1c58f028c451efff2045f5d92410bd540", "shasum": "" }, "require": { @@ -4269,7 +4269,7 @@ "portable" ], "support": { - "source": "https://github.com/symfony/polyfill-ctype/tree/v1.29.0" + "source": "https://github.com/symfony/polyfill-ctype/tree/v1.30.0" }, "funding": [ { @@ -4285,20 +4285,20 @@ "type": "tidelift" } ], - "time": "2024-01-29T20:11:03+00:00" + "time": "2024-05-31T15:07:36+00:00" }, { "name": "symfony/polyfill-mbstring", - "version": "v1.29.0", + "version": "v1.30.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "9773676c8a1bb1f8d4340a62efe641cf76eda7ec" + "reference": "fd22ab50000ef01661e2a31d850ebaa297f8e03c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/9773676c8a1bb1f8d4340a62efe641cf76eda7ec", - "reference": "9773676c8a1bb1f8d4340a62efe641cf76eda7ec", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/fd22ab50000ef01661e2a31d850ebaa297f8e03c", + "reference": "fd22ab50000ef01661e2a31d850ebaa297f8e03c", "shasum": "" }, "require": { @@ -4349,7 +4349,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.29.0" + "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.30.0" }, "funding": [ { @@ -4365,7 +4365,7 @@ "type": "tidelift" } ], - "time": "2024-01-29T20:11:03+00:00" + "time": "2024-06-19T12:30:46+00:00" }, { "name": "vlucas/phpdotenv", @@ -4508,7 +4508,2376 @@ "time": "2022-06-03T18:03:27+00:00" } ], - "packages-dev": [], + "packages-dev": [ + { + "name": "amphp/php-cs-fixer-config", + "version": "v2.1.0", + "source": { + "type": "git", + "url": "https://github.com/amphp/php-cs-fixer-config.git", + "reference": "0fad9ec6a10a0a58fbf8cb77f41da34f80c031d6" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/amphp/php-cs-fixer-config/zipball/0fad9ec6a10a0a58fbf8cb77f41da34f80c031d6", + "reference": "0fad9ec6a10a0a58fbf8cb77f41da34f80c031d6", + "shasum": "" + }, + "require": { + "friendsofphp/php-cs-fixer": "^3.5", + "php": ">=7.4" + }, + "require-dev": { + "phpunit/phpunit": "^9.5" + }, + "type": "library", + "autoload": { + "psr-4": { + "Amp\\CodeStyle\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Niklas Keller", + "email": "me@kelunik.com" + }, + { + "name": "Sascha-Oliver Prolic", + "email": "saschaprolic@googlemail.com" + } + ], + "description": "Code style config for AMPHP.", + "support": { + "issues": "https://github.com/amphp/php-cs-fixer-config/issues", + "source": "https://github.com/amphp/php-cs-fixer-config/tree/v2.1.0" + }, + "funding": [ + { + "url": "https://github.com/amphp", + "type": "github" + } + ], + "time": "2024-04-19T02:16:09+00:00" + }, + { + "name": "clue/ndjson-react", + "version": "v1.3.0", + "source": { + "type": "git", + "url": "https://github.com/clue/reactphp-ndjson.git", + "reference": "392dc165fce93b5bb5c637b67e59619223c931b0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/clue/reactphp-ndjson/zipball/392dc165fce93b5bb5c637b67e59619223c931b0", + "reference": "392dc165fce93b5bb5c637b67e59619223c931b0", + "shasum": "" + }, + "require": { + "php": ">=5.3", + "react/stream": "^1.2" + }, + "require-dev": { + "phpunit/phpunit": "^9.5 || ^5.7 || ^4.8.35", + "react/event-loop": "^1.2" + }, + "type": "library", + "autoload": { + "psr-4": { + "Clue\\React\\NDJson\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Christian Lück", + "email": "christian@clue.engineering" + } + ], + "description": "Streaming newline-delimited JSON (NDJSON) parser and encoder for ReactPHP.", + "homepage": "https://github.com/clue/reactphp-ndjson", + "keywords": [ + "NDJSON", + "json", + "jsonlines", + "newline", + "reactphp", + "streaming" + ], + "support": { + "issues": "https://github.com/clue/reactphp-ndjson/issues", + "source": "https://github.com/clue/reactphp-ndjson/tree/v1.3.0" + }, + "funding": [ + { + "url": "https://clue.engineering/support", + "type": "custom" + }, + { + "url": "https://github.com/clue", + "type": "github" + } + ], + "time": "2022-12-23T10:58:28+00:00" + }, + { + "name": "composer/pcre", + "version": "3.1.4", + "source": { + "type": "git", + "url": "https://github.com/composer/pcre.git", + "reference": "04229f163664973f68f38f6f73d917799168ef24" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/composer/pcre/zipball/04229f163664973f68f38f6f73d917799168ef24", + "reference": "04229f163664973f68f38f6f73d917799168ef24", + "shasum": "" + }, + "require": { + "php": "^7.4 || ^8.0" + }, + "require-dev": { + "phpstan/phpstan": "^1.3", + "phpstan/phpstan-strict-rules": "^1.1", + "symfony/phpunit-bridge": "^5" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "3.x-dev" + } + }, + "autoload": { + "psr-4": { + "Composer\\Pcre\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jordi Boggiano", + "email": "j.boggiano@seld.be", + "homepage": "http://seld.be" + } + ], + "description": "PCRE wrapping library that offers type-safe preg_* replacements.", + "keywords": [ + "PCRE", + "preg", + "regex", + "regular expression" + ], + "support": { + "issues": "https://github.com/composer/pcre/issues", + "source": "https://github.com/composer/pcre/tree/3.1.4" + }, + "funding": [ + { + "url": "https://packagist.com", + "type": "custom" + }, + { + "url": "https://github.com/composer", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/composer/composer", + "type": "tidelift" + } + ], + "time": "2024-05-27T13:40:54+00:00" + }, + { + "name": "composer/semver", + "version": "3.4.2", + "source": { + "type": "git", + "url": "https://github.com/composer/semver.git", + "reference": "c51258e759afdb17f1fd1fe83bc12baaef6309d6" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/composer/semver/zipball/c51258e759afdb17f1fd1fe83bc12baaef6309d6", + "reference": "c51258e759afdb17f1fd1fe83bc12baaef6309d6", + "shasum": "" + }, + "require": { + "php": "^5.3.2 || ^7.0 || ^8.0" + }, + "require-dev": { + "phpstan/phpstan": "^1.4", + "symfony/phpunit-bridge": "^4.2 || ^5" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "3.x-dev" + } + }, + "autoload": { + "psr-4": { + "Composer\\Semver\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nils Adermann", + "email": "naderman@naderman.de", + "homepage": "http://www.naderman.de" + }, + { + "name": "Jordi Boggiano", + "email": "j.boggiano@seld.be", + "homepage": "http://seld.be" + }, + { + "name": "Rob Bast", + "email": "rob.bast@gmail.com", + "homepage": "http://robbast.nl" + } + ], + "description": "Semver library that offers utilities, version constraint parsing and validation.", + "keywords": [ + "semantic", + "semver", + "validation", + "versioning" + ], + "support": { + "irc": "ircs://irc.libera.chat:6697/composer", + "issues": "https://github.com/composer/semver/issues", + "source": "https://github.com/composer/semver/tree/3.4.2" + }, + "funding": [ + { + "url": "https://packagist.com", + "type": "custom" + }, + { + "url": "https://github.com/composer", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/composer/composer", + "type": "tidelift" + } + ], + "time": "2024-07-12T11:35:52+00:00" + }, + { + "name": "composer/xdebug-handler", + "version": "3.0.5", + "source": { + "type": "git", + "url": "https://github.com/composer/xdebug-handler.git", + "reference": "6c1925561632e83d60a44492e0b344cf48ab85ef" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/composer/xdebug-handler/zipball/6c1925561632e83d60a44492e0b344cf48ab85ef", + "reference": "6c1925561632e83d60a44492e0b344cf48ab85ef", + "shasum": "" + }, + "require": { + "composer/pcre": "^1 || ^2 || ^3", + "php": "^7.2.5 || ^8.0", + "psr/log": "^1 || ^2 || ^3" + }, + "require-dev": { + "phpstan/phpstan": "^1.0", + "phpstan/phpstan-strict-rules": "^1.1", + "phpunit/phpunit": "^8.5 || ^9.6 || ^10.5" + }, + "type": "library", + "autoload": { + "psr-4": { + "Composer\\XdebugHandler\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "John Stevenson", + "email": "john-stevenson@blueyonder.co.uk" + } + ], + "description": "Restarts a process without Xdebug.", + "keywords": [ + "Xdebug", + "performance" + ], + "support": { + "irc": "ircs://irc.libera.chat:6697/composer", + "issues": "https://github.com/composer/xdebug-handler/issues", + "source": "https://github.com/composer/xdebug-handler/tree/3.0.5" + }, + "funding": [ + { + "url": "https://packagist.com", + "type": "custom" + }, + { + "url": "https://github.com/composer", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/composer/composer", + "type": "tidelift" + } + ], + "time": "2024-05-06T16:37:16+00:00" + }, + { + "name": "evenement/evenement", + "version": "v3.0.2", + "source": { + "type": "git", + "url": "https://github.com/igorw/evenement.git", + "reference": "0a16b0d71ab13284339abb99d9d2bd813640efbc" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/igorw/evenement/zipball/0a16b0d71ab13284339abb99d9d2bd813640efbc", + "reference": "0a16b0d71ab13284339abb99d9d2bd813640efbc", + "shasum": "" + }, + "require": { + "php": ">=7.0" + }, + "require-dev": { + "phpunit/phpunit": "^9 || ^6" + }, + "type": "library", + "autoload": { + "psr-4": { + "Evenement\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Igor Wiedler", + "email": "igor@wiedler.ch" + } + ], + "description": "Événement is a very simple event dispatching library for PHP", + "keywords": [ + "event-dispatcher", + "event-emitter" + ], + "support": { + "issues": "https://github.com/igorw/evenement/issues", + "source": "https://github.com/igorw/evenement/tree/v3.0.2" + }, + "time": "2023-08-08T05:53:35+00:00" + }, + { + "name": "fidry/cpu-core-counter", + "version": "1.1.0", + "source": { + "type": "git", + "url": "https://github.com/theofidry/cpu-core-counter.git", + "reference": "f92996c4d5c1a696a6a970e20f7c4216200fcc42" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/theofidry/cpu-core-counter/zipball/f92996c4d5c1a696a6a970e20f7c4216200fcc42", + "reference": "f92996c4d5c1a696a6a970e20f7c4216200fcc42", + "shasum": "" + }, + "require": { + "php": "^7.2 || ^8.0" + }, + "require-dev": { + "fidry/makefile": "^0.2.0", + "fidry/php-cs-fixer-config": "^1.1.2", + "phpstan/extension-installer": "^1.2.0", + "phpstan/phpstan": "^1.9.2", + "phpstan/phpstan-deprecation-rules": "^1.0.0", + "phpstan/phpstan-phpunit": "^1.2.2", + "phpstan/phpstan-strict-rules": "^1.4.4", + "phpunit/phpunit": "^8.5.31 || ^9.5.26", + "webmozarts/strict-phpunit": "^7.5" + }, + "type": "library", + "autoload": { + "psr-4": { + "Fidry\\CpuCoreCounter\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Théo FIDRY", + "email": "theo.fidry@gmail.com" + } + ], + "description": "Tiny utility to get the number of CPU cores.", + "keywords": [ + "CPU", + "core" + ], + "support": { + "issues": "https://github.com/theofidry/cpu-core-counter/issues", + "source": "https://github.com/theofidry/cpu-core-counter/tree/1.1.0" + }, + "funding": [ + { + "url": "https://github.com/theofidry", + "type": "github" + } + ], + "time": "2024-02-07T09:43:46+00:00" + }, + { + "name": "friendsofphp/php-cs-fixer", + "version": "v3.59.3", + "source": { + "type": "git", + "url": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer.git", + "reference": "30ba9ecc2b0e5205e578fe29973c15653d9bfd29" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/PHP-CS-Fixer/PHP-CS-Fixer/zipball/30ba9ecc2b0e5205e578fe29973c15653d9bfd29", + "reference": "30ba9ecc2b0e5205e578fe29973c15653d9bfd29", + "shasum": "" + }, + "require": { + "clue/ndjson-react": "^1.0", + "composer/semver": "^3.4", + "composer/xdebug-handler": "^3.0.3", + "ext-filter": "*", + "ext-json": "*", + "ext-tokenizer": "*", + "fidry/cpu-core-counter": "^1.0", + "php": "^7.4 || ^8.0", + "react/child-process": "^0.6.5", + "react/event-loop": "^1.0", + "react/promise": "^2.0 || ^3.0", + "react/socket": "^1.0", + "react/stream": "^1.0", + "sebastian/diff": "^4.0 || ^5.0 || ^6.0", + "symfony/console": "^5.4 || ^6.0 || ^7.0", + "symfony/event-dispatcher": "^5.4 || ^6.0 || ^7.0", + "symfony/filesystem": "^5.4 || ^6.0 || ^7.0", + "symfony/finder": "^5.4 || ^6.0 || ^7.0", + "symfony/options-resolver": "^5.4 || ^6.0 || ^7.0", + "symfony/polyfill-mbstring": "^1.28", + "symfony/polyfill-php80": "^1.28", + "symfony/polyfill-php81": "^1.28", + "symfony/process": "^5.4 || ^6.0 || ^7.0", + "symfony/stopwatch": "^5.4 || ^6.0 || ^7.0" + }, + "require-dev": { + "facile-it/paraunit": "^1.3 || ^2.3", + "infection/infection": "^0.29.5", + "justinrainbow/json-schema": "^5.2", + "keradus/cli-executor": "^2.1", + "mikey179/vfsstream": "^1.6.11", + "php-coveralls/php-coveralls": "^2.7", + "php-cs-fixer/accessible-object": "^1.1", + "php-cs-fixer/phpunit-constraint-isidenticalstring": "^1.5", + "php-cs-fixer/phpunit-constraint-xmlmatchesxsd": "^1.5", + "phpunit/phpunit": "^9.6.19 || ^10.5.21 || ^11.2", + "symfony/var-dumper": "^5.4 || ^6.0 || ^7.0", + "symfony/yaml": "^5.4 || ^6.0 || ^7.0" + }, + "suggest": { + "ext-dom": "For handling output formats in XML", + "ext-mbstring": "For handling non-UTF8 characters." + }, + "bin": [ + "php-cs-fixer" + ], + "type": "application", + "autoload": { + "psr-4": { + "PhpCsFixer\\": "src/" + }, + "exclude-from-classmap": [ + "src/Fixer/Internal/*" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Dariusz Rumiński", + "email": "dariusz.ruminski@gmail.com" + } + ], + "description": "A tool to automatically fix PHP code style", + "keywords": [ + "Static code analysis", + "fixer", + "standards", + "static analysis" + ], + "support": { + "issues": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/issues", + "source": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/tree/v3.59.3" + }, + "funding": [ + { + "url": "https://github.com/keradus", + "type": "github" + } + ], + "time": "2024-06-16T14:17:03+00:00" + }, + { + "name": "psr/container", + "version": "2.0.2", + "source": { + "type": "git", + "url": "https://github.com/php-fig/container.git", + "reference": "c71ecc56dfe541dbd90c5360474fbc405f8d5963" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/container/zipball/c71ecc56dfe541dbd90c5360474fbc405f8d5963", + "reference": "c71ecc56dfe541dbd90c5360474fbc405f8d5963", + "shasum": "" + }, + "require": { + "php": ">=7.4.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Container\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "https://www.php-fig.org/" + } + ], + "description": "Common Container Interface (PHP FIG PSR-11)", + "homepage": "https://github.com/php-fig/container", + "keywords": [ + "PSR-11", + "container", + "container-interface", + "container-interop", + "psr" + ], + "support": { + "issues": "https://github.com/php-fig/container/issues", + "source": "https://github.com/php-fig/container/tree/2.0.2" + }, + "time": "2021-11-05T16:47:00+00:00" + }, + { + "name": "psr/event-dispatcher", + "version": "1.0.0", + "source": { + "type": "git", + "url": "https://github.com/php-fig/event-dispatcher.git", + "reference": "dbefd12671e8a14ec7f180cab83036ed26714bb0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/event-dispatcher/zipball/dbefd12671e8a14ec7f180cab83036ed26714bb0", + "reference": "dbefd12671e8a14ec7f180cab83036ed26714bb0", + "shasum": "" + }, + "require": { + "php": ">=7.2.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\EventDispatcher\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "description": "Standard interfaces for event handling.", + "keywords": [ + "events", + "psr", + "psr-14" + ], + "support": { + "issues": "https://github.com/php-fig/event-dispatcher/issues", + "source": "https://github.com/php-fig/event-dispatcher/tree/1.0.0" + }, + "time": "2019-01-08T18:20:26+00:00" + }, + { + "name": "react/cache", + "version": "v1.2.0", + "source": { + "type": "git", + "url": "https://github.com/reactphp/cache.git", + "reference": "d47c472b64aa5608225f47965a484b75c7817d5b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/reactphp/cache/zipball/d47c472b64aa5608225f47965a484b75c7817d5b", + "reference": "d47c472b64aa5608225f47965a484b75c7817d5b", + "shasum": "" + }, + "require": { + "php": ">=5.3.0", + "react/promise": "^3.0 || ^2.0 || ^1.1" + }, + "require-dev": { + "phpunit/phpunit": "^9.5 || ^5.7 || ^4.8.35" + }, + "type": "library", + "autoload": { + "psr-4": { + "React\\Cache\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Christian Lück", + "email": "christian@clue.engineering", + "homepage": "https://clue.engineering/" + }, + { + "name": "Cees-Jan Kiewiet", + "email": "reactphp@ceesjankiewiet.nl", + "homepage": "https://wyrihaximus.net/" + }, + { + "name": "Jan Sorgalla", + "email": "jsorgalla@gmail.com", + "homepage": "https://sorgalla.com/" + }, + { + "name": "Chris Boden", + "email": "cboden@gmail.com", + "homepage": "https://cboden.dev/" + } + ], + "description": "Async, Promise-based cache interface for ReactPHP", + "keywords": [ + "cache", + "caching", + "promise", + "reactphp" + ], + "support": { + "issues": "https://github.com/reactphp/cache/issues", + "source": "https://github.com/reactphp/cache/tree/v1.2.0" + }, + "funding": [ + { + "url": "https://opencollective.com/reactphp", + "type": "open_collective" + } + ], + "time": "2022-11-30T15:59:55+00:00" + }, + { + "name": "react/child-process", + "version": "v0.6.5", + "source": { + "type": "git", + "url": "https://github.com/reactphp/child-process.git", + "reference": "e71eb1aa55f057c7a4a0d08d06b0b0a484bead43" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/reactphp/child-process/zipball/e71eb1aa55f057c7a4a0d08d06b0b0a484bead43", + "reference": "e71eb1aa55f057c7a4a0d08d06b0b0a484bead43", + "shasum": "" + }, + "require": { + "evenement/evenement": "^3.0 || ^2.0 || ^1.0", + "php": ">=5.3.0", + "react/event-loop": "^1.2", + "react/stream": "^1.2" + }, + "require-dev": { + "phpunit/phpunit": "^9.3 || ^5.7 || ^4.8.35", + "react/socket": "^1.8", + "sebastian/environment": "^5.0 || ^3.0 || ^2.0 || ^1.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "React\\ChildProcess\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Christian Lück", + "email": "christian@clue.engineering", + "homepage": "https://clue.engineering/" + }, + { + "name": "Cees-Jan Kiewiet", + "email": "reactphp@ceesjankiewiet.nl", + "homepage": "https://wyrihaximus.net/" + }, + { + "name": "Jan Sorgalla", + "email": "jsorgalla@gmail.com", + "homepage": "https://sorgalla.com/" + }, + { + "name": "Chris Boden", + "email": "cboden@gmail.com", + "homepage": "https://cboden.dev/" + } + ], + "description": "Event-driven library for executing child processes with ReactPHP.", + "keywords": [ + "event-driven", + "process", + "reactphp" + ], + "support": { + "issues": "https://github.com/reactphp/child-process/issues", + "source": "https://github.com/reactphp/child-process/tree/v0.6.5" + }, + "funding": [ + { + "url": "https://github.com/WyriHaximus", + "type": "github" + }, + { + "url": "https://github.com/clue", + "type": "github" + } + ], + "time": "2022-09-16T13:41:56+00:00" + }, + { + "name": "react/dns", + "version": "v1.13.0", + "source": { + "type": "git", + "url": "https://github.com/reactphp/dns.git", + "reference": "eb8ae001b5a455665c89c1df97f6fb682f8fb0f5" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/reactphp/dns/zipball/eb8ae001b5a455665c89c1df97f6fb682f8fb0f5", + "reference": "eb8ae001b5a455665c89c1df97f6fb682f8fb0f5", + "shasum": "" + }, + "require": { + "php": ">=5.3.0", + "react/cache": "^1.0 || ^0.6 || ^0.5", + "react/event-loop": "^1.2", + "react/promise": "^3.2 || ^2.7 || ^1.2.1" + }, + "require-dev": { + "phpunit/phpunit": "^9.6 || ^5.7 || ^4.8.36", + "react/async": "^4.3 || ^3 || ^2", + "react/promise-timer": "^1.11" + }, + "type": "library", + "autoload": { + "psr-4": { + "React\\Dns\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Christian Lück", + "email": "christian@clue.engineering", + "homepage": "https://clue.engineering/" + }, + { + "name": "Cees-Jan Kiewiet", + "email": "reactphp@ceesjankiewiet.nl", + "homepage": "https://wyrihaximus.net/" + }, + { + "name": "Jan Sorgalla", + "email": "jsorgalla@gmail.com", + "homepage": "https://sorgalla.com/" + }, + { + "name": "Chris Boden", + "email": "cboden@gmail.com", + "homepage": "https://cboden.dev/" + } + ], + "description": "Async DNS resolver for ReactPHP", + "keywords": [ + "async", + "dns", + "dns-resolver", + "reactphp" + ], + "support": { + "issues": "https://github.com/reactphp/dns/issues", + "source": "https://github.com/reactphp/dns/tree/v1.13.0" + }, + "funding": [ + { + "url": "https://opencollective.com/reactphp", + "type": "open_collective" + } + ], + "time": "2024-06-13T14:18:03+00:00" + }, + { + "name": "react/event-loop", + "version": "v1.5.0", + "source": { + "type": "git", + "url": "https://github.com/reactphp/event-loop.git", + "reference": "bbe0bd8c51ffc05ee43f1729087ed3bdf7d53354" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/reactphp/event-loop/zipball/bbe0bd8c51ffc05ee43f1729087ed3bdf7d53354", + "reference": "bbe0bd8c51ffc05ee43f1729087ed3bdf7d53354", + "shasum": "" + }, + "require": { + "php": ">=5.3.0" + }, + "require-dev": { + "phpunit/phpunit": "^9.6 || ^5.7 || ^4.8.36" + }, + "suggest": { + "ext-pcntl": "For signal handling support when using the StreamSelectLoop" + }, + "type": "library", + "autoload": { + "psr-4": { + "React\\EventLoop\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Christian Lück", + "email": "christian@clue.engineering", + "homepage": "https://clue.engineering/" + }, + { + "name": "Cees-Jan Kiewiet", + "email": "reactphp@ceesjankiewiet.nl", + "homepage": "https://wyrihaximus.net/" + }, + { + "name": "Jan Sorgalla", + "email": "jsorgalla@gmail.com", + "homepage": "https://sorgalla.com/" + }, + { + "name": "Chris Boden", + "email": "cboden@gmail.com", + "homepage": "https://cboden.dev/" + } + ], + "description": "ReactPHP's core reactor event loop that libraries can use for evented I/O.", + "keywords": [ + "asynchronous", + "event-loop" + ], + "support": { + "issues": "https://github.com/reactphp/event-loop/issues", + "source": "https://github.com/reactphp/event-loop/tree/v1.5.0" + }, + "funding": [ + { + "url": "https://opencollective.com/reactphp", + "type": "open_collective" + } + ], + "time": "2023-11-13T13:48:05+00:00" + }, + { + "name": "react/promise", + "version": "v3.2.0", + "source": { + "type": "git", + "url": "https://github.com/reactphp/promise.git", + "reference": "8a164643313c71354582dc850b42b33fa12a4b63" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/reactphp/promise/zipball/8a164643313c71354582dc850b42b33fa12a4b63", + "reference": "8a164643313c71354582dc850b42b33fa12a4b63", + "shasum": "" + }, + "require": { + "php": ">=7.1.0" + }, + "require-dev": { + "phpstan/phpstan": "1.10.39 || 1.4.10", + "phpunit/phpunit": "^9.6 || ^7.5" + }, + "type": "library", + "autoload": { + "files": [ + "src/functions_include.php" + ], + "psr-4": { + "React\\Promise\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jan Sorgalla", + "email": "jsorgalla@gmail.com", + "homepage": "https://sorgalla.com/" + }, + { + "name": "Christian Lück", + "email": "christian@clue.engineering", + "homepage": "https://clue.engineering/" + }, + { + "name": "Cees-Jan Kiewiet", + "email": "reactphp@ceesjankiewiet.nl", + "homepage": "https://wyrihaximus.net/" + }, + { + "name": "Chris Boden", + "email": "cboden@gmail.com", + "homepage": "https://cboden.dev/" + } + ], + "description": "A lightweight implementation of CommonJS Promises/A for PHP", + "keywords": [ + "promise", + "promises" + ], + "support": { + "issues": "https://github.com/reactphp/promise/issues", + "source": "https://github.com/reactphp/promise/tree/v3.2.0" + }, + "funding": [ + { + "url": "https://opencollective.com/reactphp", + "type": "open_collective" + } + ], + "time": "2024-05-24T10:39:05+00:00" + }, + { + "name": "react/socket", + "version": "v1.15.0", + "source": { + "type": "git", + "url": "https://github.com/reactphp/socket.git", + "reference": "216d3aec0b87f04a40ca04f481e6af01bdd1d038" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/reactphp/socket/zipball/216d3aec0b87f04a40ca04f481e6af01bdd1d038", + "reference": "216d3aec0b87f04a40ca04f481e6af01bdd1d038", + "shasum": "" + }, + "require": { + "evenement/evenement": "^3.0 || ^2.0 || ^1.0", + "php": ">=5.3.0", + "react/dns": "^1.11", + "react/event-loop": "^1.2", + "react/promise": "^3 || ^2.6 || ^1.2.1", + "react/stream": "^1.2" + }, + "require-dev": { + "phpunit/phpunit": "^9.6 || ^5.7 || ^4.8.36", + "react/async": "^4 || ^3 || ^2", + "react/promise-stream": "^1.4", + "react/promise-timer": "^1.10" + }, + "type": "library", + "autoload": { + "psr-4": { + "React\\Socket\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Christian Lück", + "email": "christian@clue.engineering", + "homepage": "https://clue.engineering/" + }, + { + "name": "Cees-Jan Kiewiet", + "email": "reactphp@ceesjankiewiet.nl", + "homepage": "https://wyrihaximus.net/" + }, + { + "name": "Jan Sorgalla", + "email": "jsorgalla@gmail.com", + "homepage": "https://sorgalla.com/" + }, + { + "name": "Chris Boden", + "email": "cboden@gmail.com", + "homepage": "https://cboden.dev/" + } + ], + "description": "Async, streaming plaintext TCP/IP and secure TLS socket server and client connections for ReactPHP", + "keywords": [ + "Connection", + "Socket", + "async", + "reactphp", + "stream" + ], + "support": { + "issues": "https://github.com/reactphp/socket/issues", + "source": "https://github.com/reactphp/socket/tree/v1.15.0" + }, + "funding": [ + { + "url": "https://opencollective.com/reactphp", + "type": "open_collective" + } + ], + "time": "2023-12-15T11:02:10+00:00" + }, + { + "name": "react/stream", + "version": "v1.4.0", + "source": { + "type": "git", + "url": "https://github.com/reactphp/stream.git", + "reference": "1e5b0acb8fe55143b5b426817155190eb6f5b18d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/reactphp/stream/zipball/1e5b0acb8fe55143b5b426817155190eb6f5b18d", + "reference": "1e5b0acb8fe55143b5b426817155190eb6f5b18d", + "shasum": "" + }, + "require": { + "evenement/evenement": "^3.0 || ^2.0 || ^1.0", + "php": ">=5.3.8", + "react/event-loop": "^1.2" + }, + "require-dev": { + "clue/stream-filter": "~1.2", + "phpunit/phpunit": "^9.6 || ^5.7 || ^4.8.36" + }, + "type": "library", + "autoload": { + "psr-4": { + "React\\Stream\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Christian Lück", + "email": "christian@clue.engineering", + "homepage": "https://clue.engineering/" + }, + { + "name": "Cees-Jan Kiewiet", + "email": "reactphp@ceesjankiewiet.nl", + "homepage": "https://wyrihaximus.net/" + }, + { + "name": "Jan Sorgalla", + "email": "jsorgalla@gmail.com", + "homepage": "https://sorgalla.com/" + }, + { + "name": "Chris Boden", + "email": "cboden@gmail.com", + "homepage": "https://cboden.dev/" + } + ], + "description": "Event-driven readable and writable streams for non-blocking I/O in ReactPHP", + "keywords": [ + "event-driven", + "io", + "non-blocking", + "pipe", + "reactphp", + "readable", + "stream", + "writable" + ], + "support": { + "issues": "https://github.com/reactphp/stream/issues", + "source": "https://github.com/reactphp/stream/tree/v1.4.0" + }, + "funding": [ + { + "url": "https://opencollective.com/reactphp", + "type": "open_collective" + } + ], + "time": "2024-06-11T12:45:25+00:00" + }, + { + "name": "sebastian/diff", + "version": "6.0.2", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/diff.git", + "reference": "b4ccd857127db5d41a5b676f24b51371d76d8544" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/b4ccd857127db5d41a5b676f24b51371d76d8544", + "reference": "b4ccd857127db5d41a5b676f24b51371d76d8544", + "shasum": "" + }, + "require": { + "php": ">=8.2" + }, + "require-dev": { + "phpunit/phpunit": "^11.0", + "symfony/process": "^4.2 || ^5" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "6.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, + { + "name": "Kore Nordmann", + "email": "mail@kore-nordmann.de" + } + ], + "description": "Diff implementation", + "homepage": "https://github.com/sebastianbergmann/diff", + "keywords": [ + "diff", + "udiff", + "unidiff", + "unified diff" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/diff/issues", + "security": "https://github.com/sebastianbergmann/diff/security/policy", + "source": "https://github.com/sebastianbergmann/diff/tree/6.0.2" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2024-07-03T04:53:05+00:00" + }, + { + "name": "symfony/console", + "version": "v7.1.2", + "source": { + "type": "git", + "url": "https://github.com/symfony/console.git", + "reference": "0aa29ca177f432ab68533432db0de059f39c92ae" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/console/zipball/0aa29ca177f432ab68533432db0de059f39c92ae", + "reference": "0aa29ca177f432ab68533432db0de059f39c92ae", + "shasum": "" + }, + "require": { + "php": ">=8.2", + "symfony/polyfill-mbstring": "~1.0", + "symfony/service-contracts": "^2.5|^3", + "symfony/string": "^6.4|^7.0" + }, + "conflict": { + "symfony/dependency-injection": "<6.4", + "symfony/dotenv": "<6.4", + "symfony/event-dispatcher": "<6.4", + "symfony/lock": "<6.4", + "symfony/process": "<6.4" + }, + "provide": { + "psr/log-implementation": "1.0|2.0|3.0" + }, + "require-dev": { + "psr/log": "^1|^2|^3", + "symfony/config": "^6.4|^7.0", + "symfony/dependency-injection": "^6.4|^7.0", + "symfony/event-dispatcher": "^6.4|^7.0", + "symfony/http-foundation": "^6.4|^7.0", + "symfony/http-kernel": "^6.4|^7.0", + "symfony/lock": "^6.4|^7.0", + "symfony/messenger": "^6.4|^7.0", + "symfony/process": "^6.4|^7.0", + "symfony/stopwatch": "^6.4|^7.0", + "symfony/var-dumper": "^6.4|^7.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\Console\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Eases the creation of beautiful and testable command line interfaces", + "homepage": "https://symfony.com", + "keywords": [ + "cli", + "command-line", + "console", + "terminal" + ], + "support": { + "source": "https://github.com/symfony/console/tree/v7.1.2" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2024-06-28T10:03:55+00:00" + }, + { + "name": "symfony/deprecation-contracts", + "version": "v3.5.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/deprecation-contracts.git", + "reference": "0e0d29ce1f20deffb4ab1b016a7257c4f1e789a1" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/0e0d29ce1f20deffb4ab1b016a7257c4f1e789a1", + "reference": "0e0d29ce1f20deffb4ab1b016a7257c4f1e789a1", + "shasum": "" + }, + "require": { + "php": ">=8.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "3.5-dev" + }, + "thanks": { + "name": "symfony/contracts", + "url": "https://github.com/symfony/contracts" + } + }, + "autoload": { + "files": [ + "function.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "A generic function and convention to trigger deprecation notices", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/deprecation-contracts/tree/v3.5.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2024-04-18T09:32:20+00:00" + }, + { + "name": "symfony/event-dispatcher", + "version": "v7.1.1", + "source": { + "type": "git", + "url": "https://github.com/symfony/event-dispatcher.git", + "reference": "9fa7f7a21beb22a39a8f3f28618b29e50d7a55a7" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/9fa7f7a21beb22a39a8f3f28618b29e50d7a55a7", + "reference": "9fa7f7a21beb22a39a8f3f28618b29e50d7a55a7", + "shasum": "" + }, + "require": { + "php": ">=8.2", + "symfony/event-dispatcher-contracts": "^2.5|^3" + }, + "conflict": { + "symfony/dependency-injection": "<6.4", + "symfony/service-contracts": "<2.5" + }, + "provide": { + "psr/event-dispatcher-implementation": "1.0", + "symfony/event-dispatcher-implementation": "2.0|3.0" + }, + "require-dev": { + "psr/log": "^1|^2|^3", + "symfony/config": "^6.4|^7.0", + "symfony/dependency-injection": "^6.4|^7.0", + "symfony/error-handler": "^6.4|^7.0", + "symfony/expression-language": "^6.4|^7.0", + "symfony/http-foundation": "^6.4|^7.0", + "symfony/service-contracts": "^2.5|^3", + "symfony/stopwatch": "^6.4|^7.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\EventDispatcher\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Provides tools that allow your application components to communicate with each other by dispatching events and listening to them", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/event-dispatcher/tree/v7.1.1" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2024-05-31T14:57:53+00:00" + }, + { + "name": "symfony/event-dispatcher-contracts", + "version": "v3.5.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/event-dispatcher-contracts.git", + "reference": "8f93aec25d41b72493c6ddff14e916177c9efc50" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/event-dispatcher-contracts/zipball/8f93aec25d41b72493c6ddff14e916177c9efc50", + "reference": "8f93aec25d41b72493c6ddff14e916177c9efc50", + "shasum": "" + }, + "require": { + "php": ">=8.1", + "psr/event-dispatcher": "^1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "3.5-dev" + }, + "thanks": { + "name": "symfony/contracts", + "url": "https://github.com/symfony/contracts" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Contracts\\EventDispatcher\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Generic abstractions related to dispatching event", + "homepage": "https://symfony.com", + "keywords": [ + "abstractions", + "contracts", + "decoupling", + "interfaces", + "interoperability", + "standards" + ], + "support": { + "source": "https://github.com/symfony/event-dispatcher-contracts/tree/v3.5.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2024-04-18T09:32:20+00:00" + }, + { + "name": "symfony/filesystem", + "version": "v7.1.2", + "source": { + "type": "git", + "url": "https://github.com/symfony/filesystem.git", + "reference": "92a91985250c251de9b947a14bb2c9390b1a562c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/filesystem/zipball/92a91985250c251de9b947a14bb2c9390b1a562c", + "reference": "92a91985250c251de9b947a14bb2c9390b1a562c", + "shasum": "" + }, + "require": { + "php": ">=8.2", + "symfony/polyfill-ctype": "~1.8", + "symfony/polyfill-mbstring": "~1.8" + }, + "require-dev": { + "symfony/process": "^6.4|^7.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\Filesystem\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Provides basic utilities for the filesystem", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/filesystem/tree/v7.1.2" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2024-06-28T10:03:55+00:00" + }, + { + "name": "symfony/finder", + "version": "v7.1.1", + "source": { + "type": "git", + "url": "https://github.com/symfony/finder.git", + "reference": "fbb0ba67688b780efbc886c1a0a0948dcf7205d6" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/finder/zipball/fbb0ba67688b780efbc886c1a0a0948dcf7205d6", + "reference": "fbb0ba67688b780efbc886c1a0a0948dcf7205d6", + "shasum": "" + }, + "require": { + "php": ">=8.2" + }, + "require-dev": { + "symfony/filesystem": "^6.4|^7.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\Finder\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Finds files and directories via an intuitive fluent interface", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/finder/tree/v7.1.1" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2024-05-31T14:57:53+00:00" + }, + { + "name": "symfony/options-resolver", + "version": "v7.1.1", + "source": { + "type": "git", + "url": "https://github.com/symfony/options-resolver.git", + "reference": "47aa818121ed3950acd2b58d1d37d08a94f9bf55" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/options-resolver/zipball/47aa818121ed3950acd2b58d1d37d08a94f9bf55", + "reference": "47aa818121ed3950acd2b58d1d37d08a94f9bf55", + "shasum": "" + }, + "require": { + "php": ">=8.2", + "symfony/deprecation-contracts": "^2.5|^3" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\OptionsResolver\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Provides an improved replacement for the array_replace PHP function", + "homepage": "https://symfony.com", + "keywords": [ + "config", + "configuration", + "options" + ], + "support": { + "source": "https://github.com/symfony/options-resolver/tree/v7.1.1" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2024-05-31T14:57:53+00:00" + }, + { + "name": "symfony/polyfill-intl-grapheme", + "version": "v1.30.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-intl-grapheme.git", + "reference": "64647a7c30b2283f5d49b874d84a18fc22054b7a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/64647a7c30b2283f5d49b874d84a18fc22054b7a", + "reference": "64647a7c30b2283f5d49b874d84a18fc22054b7a", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "suggest": { + "ext-intl": "For best performance" + }, + "type": "library", + "extra": { + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Intl\\Grapheme\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill for intl's grapheme_* functions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "grapheme", + "intl", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.30.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2024-05-31T15:07:36+00:00" + }, + { + "name": "symfony/polyfill-intl-normalizer", + "version": "v1.30.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-intl-normalizer.git", + "reference": "a95281b0be0d9ab48050ebd988b967875cdb9fdb" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/a95281b0be0d9ab48050ebd988b967875cdb9fdb", + "reference": "a95281b0be0d9ab48050ebd988b967875cdb9fdb", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "suggest": { + "ext-intl": "For best performance" + }, + "type": "library", + "extra": { + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Intl\\Normalizer\\": "" + }, + "classmap": [ + "Resources/stubs" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill for intl's Normalizer class and related functions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "intl", + "normalizer", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.30.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2024-05-31T15:07:36+00:00" + }, + { + "name": "symfony/polyfill-php80", + "version": "v1.30.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-php80.git", + "reference": "77fa7995ac1b21ab60769b7323d600a991a90433" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/77fa7995ac1b21ab60769b7323d600a991a90433", + "reference": "77fa7995ac1b21ab60769b7323d600a991a90433", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "type": "library", + "extra": { + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Php80\\": "" + }, + "classmap": [ + "Resources/stubs" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Ion Bazan", + "email": "ion.bazan@gmail.com" + }, + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill backporting some PHP 8.0+ features to lower PHP versions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-php80/tree/v1.30.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2024-05-31T15:07:36+00:00" + }, + { + "name": "symfony/polyfill-php81", + "version": "v1.30.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-php81.git", + "reference": "3fb075789fb91f9ad9af537c4012d523085bd5af" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-php81/zipball/3fb075789fb91f9ad9af537c4012d523085bd5af", + "reference": "3fb075789fb91f9ad9af537c4012d523085bd5af", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "type": "library", + "extra": { + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Php81\\": "" + }, + "classmap": [ + "Resources/stubs" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill backporting some PHP 8.1+ features to lower PHP versions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-php81/tree/v1.30.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2024-06-19T12:30:46+00:00" + }, + { + "name": "symfony/process", + "version": "v7.1.1", + "source": { + "type": "git", + "url": "https://github.com/symfony/process.git", + "reference": "febf90124323a093c7ee06fdb30e765ca3c20028" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/process/zipball/febf90124323a093c7ee06fdb30e765ca3c20028", + "reference": "febf90124323a093c7ee06fdb30e765ca3c20028", + "shasum": "" + }, + "require": { + "php": ">=8.2" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\Process\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Executes commands in sub-processes", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/process/tree/v7.1.1" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2024-05-31T14:57:53+00:00" + }, + { + "name": "symfony/service-contracts", + "version": "v3.5.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/service-contracts.git", + "reference": "bd1d9e59a81d8fa4acdcea3f617c581f7475a80f" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/service-contracts/zipball/bd1d9e59a81d8fa4acdcea3f617c581f7475a80f", + "reference": "bd1d9e59a81d8fa4acdcea3f617c581f7475a80f", + "shasum": "" + }, + "require": { + "php": ">=8.1", + "psr/container": "^1.1|^2.0", + "symfony/deprecation-contracts": "^2.5|^3" + }, + "conflict": { + "ext-psr": "<1.1|>=2" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "3.5-dev" + }, + "thanks": { + "name": "symfony/contracts", + "url": "https://github.com/symfony/contracts" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Contracts\\Service\\": "" + }, + "exclude-from-classmap": [ + "/Test/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Generic abstractions related to writing services", + "homepage": "https://symfony.com", + "keywords": [ + "abstractions", + "contracts", + "decoupling", + "interfaces", + "interoperability", + "standards" + ], + "support": { + "source": "https://github.com/symfony/service-contracts/tree/v3.5.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2024-04-18T09:32:20+00:00" + }, + { + "name": "symfony/stopwatch", + "version": "v7.1.1", + "source": { + "type": "git", + "url": "https://github.com/symfony/stopwatch.git", + "reference": "5b75bb1ac2ba1b9d05c47fc4b3046a625377d23d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/stopwatch/zipball/5b75bb1ac2ba1b9d05c47fc4b3046a625377d23d", + "reference": "5b75bb1ac2ba1b9d05c47fc4b3046a625377d23d", + "shasum": "" + }, + "require": { + "php": ">=8.2", + "symfony/service-contracts": "^2.5|^3" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\Stopwatch\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Provides a way to profile code", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/stopwatch/tree/v7.1.1" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2024-05-31T14:57:53+00:00" + }, + { + "name": "symfony/string", + "version": "v7.1.2", + "source": { + "type": "git", + "url": "https://github.com/symfony/string.git", + "reference": "14221089ac66cf82e3cf3d1c1da65de305587ff8" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/string/zipball/14221089ac66cf82e3cf3d1c1da65de305587ff8", + "reference": "14221089ac66cf82e3cf3d1c1da65de305587ff8", + "shasum": "" + }, + "require": { + "php": ">=8.2", + "symfony/polyfill-ctype": "~1.8", + "symfony/polyfill-intl-grapheme": "~1.0", + "symfony/polyfill-intl-normalizer": "~1.0", + "symfony/polyfill-mbstring": "~1.0" + }, + "conflict": { + "symfony/translation-contracts": "<2.5" + }, + "require-dev": { + "symfony/emoji": "^7.1", + "symfony/error-handler": "^6.4|^7.0", + "symfony/http-client": "^6.4|^7.0", + "symfony/intl": "^6.4|^7.0", + "symfony/translation-contracts": "^2.5|^3.0", + "symfony/var-exporter": "^6.4|^7.0" + }, + "type": "library", + "autoload": { + "files": [ + "Resources/functions.php" + ], + "psr-4": { + "Symfony\\Component\\String\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Provides an object-oriented API to strings and deals with bytes, UTF-8 code points and grapheme clusters in a unified way", + "homepage": "https://symfony.com", + "keywords": [ + "grapheme", + "i18n", + "string", + "unicode", + "utf-8", + "utf8" + ], + "support": { + "source": "https://github.com/symfony/string/tree/v7.1.2" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2024-06-28T09:27:18+00:00" + } + ], "aliases": [], "minimum-stability": "dev", "stability-flags": { @@ -4518,7 +6887,7 @@ "prefer-stable": true, "prefer-lowest": false, "platform": { - "php": "^8.1", + "php": "^8.2", "ext-json": "*", "ext-mbstring": "*" }, diff --git a/config.php b/config.php index 501cc72..8cff30a 100644 --- a/config.php +++ b/config.php @@ -3,6 +3,8 @@ use danog\MadelineProto\Logger; use TelegramApiServer\EventObservers\LogObserver; +use function Amp\Socket\SocketAddress\fromString; + $settings = [ 'server' => [ 'address' => (string)getenv('SERVER_ADDRESS'), @@ -71,6 +73,10 @@ static function(string $peer): string|int { 'report_broken_media' => false, 'download_parallel_chunks' => 20, ], + 'metrics' => [ + 'enable_prometheus_collection' => true, //(bool)getenv("PROMETHEUS_BIND_TO"), + 'metrics_bind_to' => fromString("0.0.0.0:12345") + ] ], 'api' => [ 'ip_whitelist' => array_filter( @@ -92,4 +98,4 @@ static function(string $peer): string|int { throw new InvalidArgumentException('Need to fill TELEGRAM_API_ID in .env.docker or .env'); } -return $settings; \ No newline at end of file +return $settings; diff --git a/docker/php/conf.d/xdebug.ini b/dev/xdebug.ini similarity index 62% rename from docker/php/conf.d/xdebug.ini rename to dev/xdebug.ini index 4d11575..2ed9594 100644 --- a/docker/php/conf.d/xdebug.ini +++ b/dev/xdebug.ini @@ -1,5 +1,8 @@ +opcache.jit=disable +zend_extension=xdebug.so + xdebug.max_nesting_level=512 xdebug.mode=debug xdebug.start_with_request=yes xdebug.client_host=host.docker.internal -xdebug.client_port=9003 \ No newline at end of file +xdebug.client_port=9003 diff --git a/docker-compose.base.yml b/docker-compose.base.yml index 475d15a..6de8e6d 100644 --- a/docker-compose.base.yml +++ b/docker-compose.base.yml @@ -19,7 +19,7 @@ services: max-size: "1024k" max-file: "2" healthcheck: - test: timeout 15 curl -f http://localhost:9503/system/healthcheck || bash -c 'kill -INT -1 && (sleep 5; kill -s 9 -1)' + test: timeout 15 curl -f http://localhost:9503/system/healthcheck || sh -c 'kill -INT -1 && (sleep 5; kill -s 9 -1)' interval: 60s timeout: 30s retries: 1 diff --git a/docker-compose.yml b/docker-compose.yml index 3352a94..74eb406 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -5,6 +5,7 @@ services: service: base-api ports: - "127.0.0.1:9503:9503" + - "12345:12345" command: - "-s=session" mysql: @@ -15,4 +16,4 @@ services: - "127.0.0.1:9507:3306" networks: default: - name: telegram-api-server \ No newline at end of file + name: telegram-api-server diff --git a/docker/php/conf.d/common.ini b/docker/php/conf.d/common.ini deleted file mode 100644 index 7fc1f83..0000000 --- a/docker/php/conf.d/common.ini +++ /dev/null @@ -1 +0,0 @@ -zend.assertions=-1 \ No newline at end of file diff --git a/docker/php/conf.d/opcache.ini b/docker/php/conf.d/opcache.ini deleted file mode 100644 index 14ef174..0000000 --- a/docker/php/conf.d/opcache.ini +++ /dev/null @@ -1,11 +0,0 @@ -; Extended PHP.ini file to enable JIT. -; ==================================== -; Place this file under /usr/local/etc/php/conf.d/ -zend_extension=opcache.so -opcache.enable=1 -opcache.enable_cli=1 -opcache.validate_timestamps=1 -opcache.revalidate_freq=0 -opcache.huge_code_pages=1 -opcache.jit_buffer_size=100M -opcache.jit=function \ No newline at end of file diff --git a/entrypoint.sh b/entrypoint.sh index 60fc295..e985466 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -1,4 +1,14 @@ -#!/usr/bin/env bash +#!/usr/bin/env sh + +VERSION=1.0.0 +CURRENT_VERSION=$(cat /tas_version) + +if [ "$VERSION" != "$CURRENT_VERSION" ]; then + echo "Wrong docker image version, expected $VERSION, got $CURRENT_VERSION, please run docker compose pull!" + exit 1 +fi + +composer install docker-compose-wait \ -&& nice -n 20 php server.php -e=.env.docker --docker "$@" \ No newline at end of file +&& nice -n 20 php server.php -e=.env.docker --docker "$@" diff --git a/examples/websocket-events.php b/examples/websocket-events.php index 9682bad..2b54b13 100644 --- a/examples/websocket-events.php +++ b/examples/websocket-events.php @@ -1,7 +1,7 @@ -startNotLoggedInSessions(); - $sessionsCount = count($sessionFiles); + $sessionsCount = \count($sessionFiles); warning( "\nTelegramApiServer ready." . "\nNumber of sessions: {$sessionsCount}." ); } + private static LocalKeyedMutex $mutex; + public function addSession(string $session, array $settings = []): API { + self::$mutex ??= new LocalKeyedMutex; + $lock = self::$mutex->acquire($session); if (isset($this->instances[$session])) { throw new InvalidArgumentException('Session already exists'); } @@ -62,8 +67,8 @@ public function addSession(string $session, array $settings = []): API if ($settings) { Files::saveSessionSettings($session, $settings); } - $settings = array_replace_recursive( - (array)Config::getInstance()->get('telegram'), + $settings = \array_replace_recursive( + (array) Config::getInstance()->get('telegram'), Files::getSessionSettings($session), ); @@ -91,14 +96,9 @@ public function removeSession(string $session): void $instance->unsetEventHandler(); } unset($instance); - gc_collect_cycles(); + \gc_collect_cycles(); } - /** - * @param string|null $session - * - * @return API - */ public function getSession(?string $session = null): API { if (!$this->instances) { @@ -108,8 +108,8 @@ public function getSession(?string $session = null): API } if (!$session) { - if (count($this->instances) === 1) { - $session = (string)array_key_first($this->instances); + if (\count($this->instances) === 1) { + $session = (string) \array_key_first($this->instances); } else { throw new InvalidArgumentException( 'Multiple sessions detected. Specify which session to use. See README for examples.' @@ -167,7 +167,7 @@ public static function getWrapper(API $madelineProto): APIWrapper private static function getSettingsFromArray(string $session, array $settings, SettingsAbstract $settingsObject = new Settings()): SettingsAbstract { foreach ($settings as $key => $value) { - if (is_array($value) && $key !== 'proxies') { + if (\is_array($value) && $key !== 'proxies') { if ($key === 'db' && isset($value['type'])) { $type = match ($value['type']) { 'memory' => new Settings\Database\Memory(), @@ -185,18 +185,18 @@ private static function getSettingsFromArray(string $session, array $settings, S } unset($value[$value['type']], $value['type'],); - if (count($value) === 0) { + if (\count($value) === 0) { continue; } } - $method = 'get' . ucfirst(str_replace('_', '', ucwords($key, '_'))); + $method = 'get' . \ucfirst(\str_replace('_', '', \ucwords($key, '_'))); self::getSettingsFromArray($session, $value, $settingsObject->$method()); } else { - if ($key === 'serializer' && is_string($value)) { + if ($key === 'serializer' && \is_string($value)) { $value = SerializerType::from($value); } - $method = 'set' . ucfirst(str_replace('_', '', ucwords($key, '_'))); + $method = 'set' . \ucfirst(\str_replace('_', '', \ucwords($key, '_'))); $settingsObject->$method($value); } } @@ -263,5 +263,4 @@ private static function errorHandler(\Throwable $e, ?callable $currentHandler, s throw $e; } } - } diff --git a/src/Config.php b/src/Config.php index 27d2ad7..36b53b3 100644 --- a/src/Config.php +++ b/src/Config.php @@ -1,26 +1,24 @@ -config; foreach ($path as $pathKey) { - if (!is_array($value) || !array_key_exists($pathKey, $value)) { + if (!\is_array($value) || !\array_key_exists($pathKey, $value)) { return null; } $value = &$value[$pathKey]; @@ -53,4 +51,4 @@ private function findByKey($key) return $value; } -} \ No newline at end of file +} diff --git a/src/Controllers/AbstractApiController.php b/src/Controllers/AbstractApiController.php index b2eda2a..e7a40f2 100644 --- a/src/Controllers/AbstractApiController.php +++ b/src/Controllers/AbstractApiController.php @@ -1,4 +1,4 @@ - self::JSON_HEADER, 'success' => false, @@ -83,19 +80,19 @@ public function process() } /** - * Получаем параметры из GET и POST + * Получаем параметры из GET и POST. * */ private function resolveRequest(): void { $query = $this->request->getUri()->getQuery(); - $contentType = (string)$this->request->getHeader('Content-Type'); + $contentType = (string) $this->request->getHeader('Content-Type'); - parse_str($query, $get); + \parse_str($query, $get); switch (true) { case $contentType === 'application/x-www-form-urlencoded': - case mb_strpos($contentType, 'multipart/form-data') !== false: + case \str_contains($contentType, 'multipart/form-data'): $form = (new StreamingFormParser())->parseForm($this->request); $post = []; @@ -107,27 +104,27 @@ private function resolveRequest(): void //We need to break loop without getting file //All other post field will be omitted, hope we dont need them :) break; - } else { - $post[$field->getName()] = $field->buffer(); } + $post[$field->getName()] = $field->buffer(); + } break; case $contentType === 'application/json': $body = $this->request->getBody()->buffer(); - $post = json_decode($body, 1); + $post = \json_decode($body, true); break; default: $body = $this->request->getBody()->buffer(); - parse_str($body, $post); + \parse_str($body, $post); } - $this->parameters = array_merge((array)$post, $get); - $this->parameters = array_values($this->parameters); + $this->parameters = \array_merge((array) $post, $get); + $this->parameters = \array_values($this->parameters); } /** - * Получает посты для формирования ответа + * Получает посты для формирования ответа. * */ private function generateResponse(): void @@ -159,16 +156,16 @@ private function generateResponse(): void protected function callApiCommon(API $madelineProto) { - $pathCount = count($this->api); - if ($pathCount === 1 && method_exists($this->extensionClass, $this->api[0])) { + $pathCount = \count($this->api); + if ($pathCount === 1 && \method_exists($this->extensionClass, $this->api[0])) { /** @var ApiExtensions|SystemApiExtensions $madelineProtoExtensions */ $madelineProtoExtensions = new $this->extensionClass($madelineProto, $this->request, $this->file); $result = $madelineProtoExtensions->{$this->api[0]}(...$this->parameters); } else { if ($this->api[0] === 'API') { $madelineProto = Client::getWrapper($madelineProto)->getAPI(); - array_shift($this->api); - $pathCount = count($this->api); + \array_shift($this->api); + $pathCount = \count($this->api); } //Проверяем нет ли в MadilineProto такого метода. switch ($pathCount) { @@ -190,9 +187,7 @@ protected function callApiCommon(API $madelineProto) } /** - * @param Throwable $e * - * @return AbstractApiController * @throws Throwable */ private function setError(Throwable $e): self @@ -210,9 +205,8 @@ private function setError(Throwable $e): self } /** - * Кодирует ответ в нужный формат: json + * Кодирует ответ в нужный формат: json. * - * @return Response|string * @throws JsonException */ private function getResponse(): string|Response @@ -230,7 +224,7 @@ private function getResponse(): string|Response $data['success'] = true; } - $result = json_encode( + $result = \json_encode( $data, JSON_THROW_ON_ERROR | JSON_INVALID_UTF8_SUBSTITUTE | @@ -244,15 +238,13 @@ private function getResponse(): string|Response } /** - * Устанавливает http код ответа (200, 400, 404 и тд.) + * Устанавливает http код ответа (200, 400, 404 и тд.). * - * @param int $code * - * @return AbstractApiController */ private function setPageCode(int $code): self { $this->page['code'] = $this->page['code'] === 200 ? $code : $this->page['code']; return $this; } -} \ No newline at end of file +} diff --git a/src/Controllers/ApiController.php b/src/Controllers/ApiController.php index 8bd7969..39f75a9 100644 --- a/src/Controllers/ApiController.php +++ b/src/Controllers/ApiController.php @@ -1,35 +1,25 @@ -session = $path['session'] ?? null; - $this->api = explode('.', $path['method'] ?? ''); + $this->api = \explode('.', $path['method'] ?? ''); } /** @@ -44,37 +34,6 @@ protected function callApi(): mixed return $this->callApiCommon($madelineProto); } - //GROUP REQUESTS IN BULKS - static $futures = []; - - $futures[] = $future = async($this->callApiCommon(...), $madelineProto); - delay($this->waitNextTick()); - - if ($futures) { - awaitAll($futures); - Logger::getInstance()->notice("Executed bulk requests:" . count($futures)); - $futures = []; - } - - return $future->await(); + return $this->callApiCommon($madelineProto); } - - /** - * Sync threads execution via time ticks - * Need to enable madelineProto futures bulk execution - * @param float $tick interval of execution in seconds. - */ - protected function waitNextTick(float $tick = 0.5): float { - $tickMs = $tick * 1000; - $now = (int)(microtime(true) * 1000); - $currentTick = intdiv((int)(microtime(true) * 1000), $tickMs); - $nextTick = ($currentTick + 1); - $nextTickTime = $nextTick * $tickMs; - $wait = round(($nextTickTime - $now)/1000, 3); - - Logger::getInstance()->notice("Waiting $wait seconds before tick"); - - return $wait; - } - -} \ No newline at end of file +} diff --git a/src/Controllers/EventsController.php b/src/Controllers/EventsController.php index 9d35878..f8110cf 100644 --- a/src/Controllers/EventsController.php +++ b/src/Controllers/EventsController.php @@ -1,11 +1,11 @@ - $client->ping()); + $pingLoop = EventLoop::repeat(self::PING_INTERVAL_MS, static fn () => $client->ping()); $client->onClose(static function () use ($clientId, $requestedSession, $pingLoop) { EventLoop::cancel($pingLoop); @@ -104,7 +104,7 @@ private function subscribeForUpdates(WebsocketClient $client, ?string $requested ]; $this->gateway->multicastText( - json_encode( + \json_encode( $update, JSON_THROW_ON_ERROR | JSON_INVALID_UTF8_SUBSTITUTE | @@ -115,4 +115,4 @@ private function subscribeForUpdates(WebsocketClient $client, ?string $requested ); }); } -} \ No newline at end of file +} diff --git a/src/Controllers/LogController.php b/src/Controllers/LogController.php index 0f4bb14..f856ef9 100644 --- a/src/Controllers/LogController.php +++ b/src/Controllers/LogController.php @@ -1,4 +1,4 @@ -getId(); - $pingLoop = EventLoop::repeat(self::PING_INTERVAL_MS, static fn() => $client->ping()); + $pingLoop = EventLoop::repeat(self::PING_INTERVAL_MS, static fn () => $client->ping()); $client->onClose(static function () use ($clientId, $pingLoop) { EventLoop::cancel($pingLoop); @@ -90,7 +90,7 @@ private function subscribeForUpdates(WebsocketClient $client, string $requestedL ]; $this->gateway->multicastText( - json_encode( + \json_encode( $update, JSON_THROW_ON_ERROR | JSON_INVALID_UTF8_SUBSTITUTE | @@ -101,4 +101,4 @@ private function subscribeForUpdates(WebsocketClient $client, string $requestedL ); }); } -} \ No newline at end of file +} diff --git a/src/Controllers/SystemController.php b/src/Controllers/SystemController.php index 1159b4c..23bc3e6 100644 --- a/src/Controllers/SystemController.php +++ b/src/Controllers/SystemController.php @@ -1,25 +1,23 @@ -api = explode('.', $path['method'] ?? ''); + $this->api = \explode('.', $path['method'] ?? ''); } /** - * @return mixed * @throws Exception */ protected function callApi() @@ -29,4 +27,4 @@ protected function callApi() return $result; } -} \ No newline at end of file +} diff --git a/src/EventObservers/EventHandler.php b/src/EventObservers/EventHandler.php index 7a045d9..4442de9 100644 --- a/src/EventObservers/EventHandler.php +++ b/src/EventObservers/EventHandler.php @@ -4,7 +4,7 @@ use TelegramApiServer\Files; -class EventHandler extends \danog\MadelineProto\EventHandler +final class EventHandler extends \danog\MadelineProto\EventHandler { public static array $instances = []; private string $sessionName; @@ -12,8 +12,8 @@ class EventHandler extends \danog\MadelineProto\EventHandler public function onStart() { $this->sessionName = Files::getSessionName($this->wrapper->getSession()->getSessionPath()); - if (empty(static::$instances[$this->sessionName])) { - static::$instances[$this->sessionName] = true; + if (empty(self::$instances[$this->sessionName])) { + self::$instances[$this->sessionName] = true; warning("Event observer CONSTRUCTED: {$this->sessionName}"); } } @@ -23,7 +23,7 @@ public function __destruct() if (empty($this->sessionName)) { return; } - unset(static::$instances[$this->sessionName]); + unset(self::$instances[$this->sessionName]); warning("Event observer DESTRUCTED: {$this->sessionName}"); } @@ -32,4 +32,4 @@ public function onAny($update) info("Received update from session: {$this->sessionName}"); EventObserver::notify($update, $this->sessionName); } -} \ No newline at end of file +} diff --git a/src/EventObservers/EventObserver.php b/src/EventObservers/EventObserver.php index 47b42bc..aa242d9 100644 --- a/src/EventObservers/EventObserver.php +++ b/src/EventObservers/EventObserver.php @@ -1,15 +1,14 @@ - $callback) { + foreach (self::$subscribers as $clientId => $callback) { notice("Pass update to callback. ClientId: {$clientId}"); $callback($update, $sessionName); } @@ -26,16 +25,16 @@ public static function notify(array $update, string $sessionName) private static function addSessionClient(string $session): void { - if (empty(static::$sessionClients[$session])) { - static::$sessionClients[$session] = 0; + if (empty(self::$sessionClients[$session])) { + self::$sessionClients[$session] = 0; } - ++static::$sessionClients[$session]; + ++self::$sessionClients[$session]; } private static function removeSessionClient(string $session): void { - if (!empty(static::$sessionClients[$session])) { - --static::$sessionClients[$session]; + if (!empty(self::$sessionClients[$session])) { + --self::$sessionClients[$session]; } } @@ -43,14 +42,14 @@ public static function startEventHandler(?string $requestedSession = null): void { $sessions = []; if ($requestedSession === null) { - $sessions = array_keys(Client::getInstance()->instances); + $sessions = \array_keys(Client::getInstance()->instances); } else { $sessions[] = $requestedSession; } foreach ($sessions as $session) { - static::addSessionClient($session); - if (static::$sessionClients[$session] === 1) { + self::addSessionClient($session); + if (self::$sessionClients[$session] === 1) { warning("Start EventHandler: {$session}"); try { $instance = Client::getInstance()->getSession($session); @@ -60,7 +59,7 @@ public static function startEventHandler(?string $requestedSession = null): void EventHandler::cachePlugins(EventHandler::class); $wrapper->getAPI()->setEventHandler(EventHandler::class); } catch (Throwable $e) { - static::removeSessionClient($session); + self::removeSessionClient($session); error('Cant set EventHandler', [ 'session' => $session, 'exception' => Logger::getExceptionAsArray($e), @@ -74,19 +73,19 @@ public static function stopEventHandler(?string $requestedSession = null, bool $ { $sessions = []; if ($requestedSession === null) { - $sessions = array_keys(Client::getInstance()->instances); + $sessions = \array_keys(Client::getInstance()->instances); } else { $sessions[] = $requestedSession; } foreach ($sessions as $session) { - static::removeSessionClient($session); - if (empty(static::$sessionClients[$session]) || $force) { + self::removeSessionClient($session); + if (empty(self::$sessionClients[$session]) || $force) { warning("Stopping EventHandler: {$session}"); Client::getInstance()->instances[$session]->unsetEventHandler(); - unset(EventHandler::$instances[$session], static::$sessionClients[$session]); + unset(EventHandler::$instances[$session], self::$sessionClients[$session]); } } } -} \ No newline at end of file +} diff --git a/src/EventObservers/LogObserver.php b/src/EventObservers/LogObserver.php index e6b08f3..cdbfa9f 100644 --- a/src/EventObservers/LogObserver.php +++ b/src/EventObservers/LogObserver.php @@ -1,39 +1,39 @@ - $callback) { + foreach (self::$subscribers as $clientId => $callback) { $callback($level, $message, $context); } } /** * @param mixed|array|string $message - * @param int $level */ public static function log($message, int $level) { - if (is_scalar($message)) { - Logger::getInstance()->log(Logger::$madelineLevels[$level], (string)$message); + if (\is_scalar($message)) { + Logger::getInstance()->log(Logger::$madelineLevels[$level], (string) $message); } else { if ($message instanceof Throwable) { $message = Logger::getExceptionAsArray($message); } - if (is_array($message)) { + if (\is_array($message)) { Logger::getInstance()->log(Logger::$madelineLevels[$level], '', $message); } else { Logger::getInstance()->log( Logger::$madelineLevels[$level], - json_encode($message, + \json_encode( + $message, JSON_UNESCAPED_UNICODE | JSON_PRETTY_PRINT | JSON_INVALID_UTF8_SUBSTITUTE | @@ -43,4 +43,4 @@ public static function log($message, int $level) } } } -} \ No newline at end of file +} diff --git a/src/EventObservers/ObserverTrait.php b/src/EventObservers/ObserverTrait.php index b02b3c5..463b148 100644 --- a/src/EventObservers/ObserverTrait.php +++ b/src/EventObservers/ObserverTrait.php @@ -1,8 +1,7 @@ - */ -class Logger extends AbstractLogger +final class Logger extends AbstractLogger { private static ?Logger $instanse = null; @@ -54,13 +57,19 @@ class Logger extends AbstractLogger private static string $dateTimeFormat = 'Y-m-d H:i:s'; public int $minLevelIndex; - private array $formatter; + private \Closure $formatter; + + private WritableStream $stdout; + /** + * @var array + */ + private static array $closePromises = []; - protected function __construct(string $minLevel = LogLevel::WARNING, callable $formatter = null) + protected function __construct(string $minLevel = LogLevel::WARNING, ?\Closure $formatter = null) { if (null === $minLevel) { if (isset($_ENV['SHELL_VERBOSITY']) || isset($_SERVER['SHELL_VERBOSITY'])) { - switch ((int)(isset($_ENV['SHELL_VERBOSITY']) ? $_ENV['SHELL_VERBOSITY'] : + switch ((int) (isset($_ENV['SHELL_VERBOSITY']) ? $_ENV['SHELL_VERBOSITY'] : $_SERVER['SHELL_VERBOSITY'])) { case -1: $minLevel = LogLevel::ERROR; @@ -79,23 +88,34 @@ protected function __construct(string $minLevel = LogLevel::WARNING, callable $f } if (!isset(self::$levels[$minLevel])) { - throw new InvalidArgumentException(sprintf('The log level "%s" does not exist.', $minLevel)); + throw new InvalidArgumentException(\sprintf('The log level "%s" does not exist.', $minLevel)); } - $this->minLevelIndex = self::$levels[$minLevel]; - $this->formatter = $formatter ?: [$this, 'format']; + $this->minLevelIndex = \min(self::$levels[$minLevel], self::$levels[self::$madelineLevels[MadelineProto\Logger::VERBOSE]]); + $this->formatter = $formatter ?: $this->format(...); + $pipe = new Pipe(PHP_INT_MAX); + $this->stdout = $pipe->getSink(); + $source = $pipe->getSource(); + $promise = async(static function () use ($source, &$promise): void { + try { + pipe($source, getStdout()); + } finally { + unset(self::$closePromises[\spl_object_id($promise)]); + } + }); + self::$closePromises[\spl_object_id($promise)] = [$this->stdout, $promise]; } public static function getInstance(): Logger { - if (!static::$instanse) { + if (!self::$instanse) { $settings = Config::getInstance()->get('telegram'); - $loggerLevel = static::$madelineLevels[$settings['logger']['level']]; - static::$instanse = new static($loggerLevel); + $loggerLevel = self::$madelineLevels[$settings['logger']['level']]; + self::$instanse = new static($loggerLevel); } - return static::$instanse; + return self::$instanse; } /** @@ -104,7 +124,7 @@ public static function getInstance(): Logger public function log($level, $message, array $context = []): void { if (!isset(self::$levels[$level])) { - throw new InvalidArgumentException(sprintf('The log level "%s" does not exist.', $level)); + throw new InvalidArgumentException(\sprintf('The log level "%s" does not exist.', $level)); } LogObserver::notify($level, $message, $context); @@ -114,55 +134,71 @@ public function log($level, $message, array $context = []): void } $formatter = $this->formatter; - /** @see Logger::format */ - echo $formatter($level, $message, $context); + $data = $formatter($level, $message, $context); + ; + try { + $this->stdout->write($data); + } catch (\Throwable) { + echo $data; + } + } + + /** + * @internal Internal function used to flush the log buffer on shutdown. + */ + public static function finalize(): void + { + foreach (self::$closePromises as [$stdout, $promise]) { + $stdout->close(); + $promise->await(); + } } private function format(string $level, string $message, array $context): string { - if (false !== strpos($message, '{')) { + if (false !== \strpos($message, '{')) { $replacements = []; foreach ($context as $key => $val) { if ($val instanceof Throwable) { $context[$key] = self::getExceptionAsArray($val); } - if (null === $val || is_scalar($val) || (is_object($val) && method_exists($val, '__toString'))) { + if (null === $val || \is_scalar($val) || (\is_object($val) && \method_exists($val, '__toString'))) { $replacements["{{$key}}"] = $val; } else { if ($val instanceof DateTimeInterface) { - $replacements["{{$key}}"] = $val->format(static::$dateTimeFormat); + $replacements["{{$key}}"] = $val->format(self::$dateTimeFormat); } else { - if (is_object($val)) { - $replacements["{{$key}}"] = '[object ' . get_class($val) . ']'; + if (\is_object($val)) { + $replacements["{{$key}}"] = '[object ' . \get_class($val) . ']'; } else { - $replacements["{{$key}}"] = '[' . gettype($val) . ']'; + $replacements["{{$key}}"] = '[' . \gettype($val) . ']'; } } } } - $message = strtr($message, $replacements); + $message = \strtr($message, $replacements); } - return sprintf( - '[%s] [%s] %s %s', - date(static::$dateTimeFormat), - $level, - $message, - $context ? + return \sprintf( + '[%s] [%s] %s %s', + \date(self::$dateTimeFormat), + $level, + $message, + $context ? "\n" . - json_encode( + \json_encode( $context, JSON_UNESCAPED_UNICODE | JSON_INVALID_UTF8_SUBSTITUTE | JSON_PRETTY_PRINT | JSON_UNESCAPED_LINE_TERMINATORS | JSON_UNESCAPED_SLASHES ) : '' - ) . PHP_EOL; + ) . PHP_EOL; } public static function getExceptionAsArray(Throwable $exception) { return [ - 'exception' => get_class($exception), + 'exception' => \get_class($exception), 'message' => $exception->getMessage(), 'file' => $exception->getFile(), 'line' => $exception->getLine(), @@ -171,4 +207,4 @@ public static function getExceptionAsArray(Throwable $exception) 'previous_exception' => $exception->getPrevious(), ]; } -} \ No newline at end of file +} diff --git a/src/MadelineProtoExtensions/ApiExtensions.php b/src/MadelineProtoExtensions/ApiExtensions.php index c0c8b73..19480c6 100644 --- a/src/MadelineProtoExtensions/ApiExtensions.php +++ b/src/MadelineProtoExtensions/ApiExtensions.php @@ -1,9 +1,7 @@ - &$nextEntity) { @@ -105,7 +100,7 @@ public function formatMessage(?string $message = null, array $entities = []): ?s } if ($nextEntity['offset'] < ($entity['offset'] + $entity['length'])) { $nextEntity['offset'] += StrTools::mbStrlen( - preg_replace('~(\>).*<\/.*$~', '$1', $textFormated) + \preg_replace('~(\>).*<\/.*$~', '$1', $textFormated) ); } else { $nextEntity['offset'] += StrTools::mbStrlen($textFormated) - StrTools::mbStrlen($text); @@ -115,7 +110,7 @@ public function formatMessage(?string $message = null, array $entities = []): ?s } } unset($entity); - $message = nl2br($message); + $message = \nl2br($message); return $message; } @@ -127,7 +122,7 @@ private static function substringReplace(string $original, string $replacement, } /** - * Пересылает сообщения без ссылки на оригинал + * Пересылает сообщения без ссылки на оригинал. * * @param array $data *
@@ -141,7 +136,7 @@ private static function substringReplace(string $original, string $replacement,
      */
     public function copyMessages(array $data)
     {
-        $data = array_merge(
+        $data = \array_merge(
             [
                 'from_peer' => '',
                 'to_peer' => '',
@@ -157,7 +152,7 @@ public function copyMessages(array $data)
             ]
         );
         $result = [];
-        if (!$response || !is_array($response) || !array_key_exists('messages', $response)) {
+        if (!$response || !\is_array($response) || !\array_key_exists('messages', $response)) {
             return $result;
         }
 
@@ -167,14 +162,14 @@ public function copyMessages(array $data)
                 'peer' => $data['to_peer'],
                 'entities' => $message['entities'] ?? [],
             ];
-            if (static::hasMedia($message, false)) {
+            if (self::hasMedia($message, false)) {
                 $messageData['media'] = $message; //MadelineProto сама достанет все media из сообщения.
                 $result[] = $this->madelineProto->messages->sendMedia(...$messageData);
             } else {
                 $result[] = $this->madelineProto->messages->sendMessage(...$messageData);
             }
             if ($key > 0) {
-                delay(random_int(300, 2000) / 1000);
+                delay(\random_int(300, 2000) / 1000);
             }
         }
 
@@ -182,14 +177,13 @@ public function copyMessages(array $data)
     }
 
     /**
-     * Загружает медиафайл из указанного сообщения в поток
+     * Загружает медиафайл из указанного сообщения в поток.
      *
-     * @param array $data
      *
      */
     public function getMedia(array $data): Response
     {
-        $data = array_merge(
+        $data = \array_merge(
             [
                 'peer' => '',
                 'id' => [0],
@@ -203,7 +197,7 @@ public function getMedia(array $data): Response
             throw new NoMediaException('Empty message');
         }
 
-        if (!static::hasMedia($message, true)) {
+        if (!self::hasMedia($message, true)) {
             throw new NoMediaException('Message has no media');
         }
 
@@ -222,17 +216,16 @@ public function getMedia(array $data): Response
             }
         }
 
-
         return $this->downloadToResponse($info);
     }
 
     /**
-     * Загружает превью медиафайла из указанного сообщения в поток
+     * Загружает превью медиафайла из указанного сообщения в поток.
      *
      */
     public function getMediaPreview(array $data): Response
     {
-        $data = array_merge(
+        $data = \array_merge(
             [
                 'peer' => '',
                 'id' => [0],
@@ -246,11 +239,11 @@ public function getMediaPreview(array $data): Response
             throw new NoMediaException('Empty message');
         }
 
-        if (!static::hasMedia($message, true)) {
+        if (!self::hasMedia($message, true)) {
             throw new NoMediaException('Message has no media');
         }
 
-        $media = $message['media'][array_key_last($message['media'])];
+        $media = $message['media'][\array_key_last($message['media'])];
         $thumb = null;
         switch (true) {
             case isset($media['sizes']):
@@ -308,15 +301,15 @@ public function getMediaPreview(array $data): Response
     public function getMessages(array $data): array
     {
         $peerInfo = $this->madelineProto->getInfo($data['peer']);
-        if (in_array($peerInfo['type'], ['channel', 'supergroup'])) {
+        if (\in_array($peerInfo['type'], ['channel', 'supergroup'])) {
             $response = $this->madelineProto->channels->getMessages(
                 [
                     'channel' => $data['peer'],
-                    'id' => (array)$data['id'],
+                    'id' => (array) $data['id'],
                 ]
             );
         } else {
-            $response = $this->madelineProto->messages->getMessages(['id' => (array)$data['id']]);
+            $response = $this->madelineProto->messages->getMessages(['id' => (array) $data['id']]);
         }
 
         return $response;
@@ -328,7 +321,6 @@ public function getMessages(array $data): array
      * @param array $info
      *      Any downloadable array: message, media etc...
      *
-     * @return Response
      */
     public function downloadToResponse(array $info): Response
     {
@@ -336,7 +328,7 @@ public function downloadToResponse(array $info): Response
     }
 
     /**
-     * Адаптер для стандартного метода
+     * Адаптер для стандартного метода.
      *
      */
     public function downloadToBrowser(array $info): Response
@@ -361,7 +353,7 @@ public function uploadMediaForm(): array
             $this->file->getMimeType(),
             $this->file->getFilename()
         );
-        $inputFile['id'] = unpack('P', $inputFile['id'])['1'];
+        $inputFile['id'] = \unpack('P', $inputFile['id'])['1'];
         return [
             'media' => [
                 '_' => 'inputMediaUploadedDocument',
@@ -384,7 +376,6 @@ public function serialize(): void
         Client::getWrapper($this->madelineProto)->serialize();
     }
 
-
     public function getUpdates(array $params): array
     {
         foreach ($params as $key => $value) {
@@ -410,12 +401,13 @@ public function setWebhook(string $url): void
         Client::getWrapper($this->madelineProto)->serialize();
     }
 
-    public function unsubscribeFromUpdates(?string $channel = null): array {
+    public function unsubscribeFromUpdates(?string $channel = null): array
+    {
         $inputChannelId = null;
         if ($channel) {
             $id = (string) $this->madelineProto->getId($channel);
 
-            $inputChannelId = (int)str_replace(['-100', '-'], '', $id);
+            $inputChannelId = (int) \str_replace(['-100', '-'], '', $id);
             if (!$inputChannelId) {
                 throw new InvalidArgumentException('Invalid id');
             }
@@ -438,11 +430,10 @@ public function unsubscribeFromUpdates(?string $channel = null): array {
             $counter++;
         }
 
-
         return [
             'disabled_update_loops' => $counter,
-            'current_update_loops' => count(Client::getWrapper($this->madelineProto)->getAPI()->feeders),
+            'current_update_loops' => \count(Client::getWrapper($this->madelineProto)->getAPI()->feeders),
         ];
     }
 
-}
\ No newline at end of file
+}
diff --git a/src/MadelineProtoExtensions/SystemApiExtensions.php b/src/MadelineProtoExtensions/SystemApiExtensions.php
index a78a223..73c0aa4 100644
--- a/src/MadelineProtoExtensions/SystemApiExtensions.php
+++ b/src/MadelineProtoExtensions/SystemApiExtensions.php
@@ -1,4 +1,4 @@
-client->addSession($session, $settings);
@@ -75,7 +75,7 @@ public function getSessionList(): array
         foreach ($this->client->instances as $session => $instance) {
             $authorized = $instance->getAuthorization();
             switch ($authorized) {
-                case API::NOT_LOGGED_IN;
+                case API::NOT_LOGGED_IN:
                     $status = 'NOT_LOGGED_IN';
                     break;
                 case API::WAITING_CODE:
@@ -107,7 +107,7 @@ public function getSessionList(): array
 
         return [
             'sessions' => $sessions,
-            'memory' => $this->bytesToHuman(memory_get_usage(true)),
+            'memory' => $this->bytesToHuman(\memory_get_usage(true)),
         ];
     }
 
@@ -115,10 +115,10 @@ public function unlinkSessionFile($session): string
     {
         $file = Files::getSessionFile($session);
 
-        if (is_file($file)) {
+        if (\is_file($file)) {
             $futures = [];
-            foreach (glob("$file*") as $file) {
-                $futures[] = async(fn() => deleteFile($file));
+            foreach (\glob("$file*") as $file) {
+                $futures[] = async(fn () => deleteFile($file));
             }
             awaitAll($futures);
         } else {
@@ -140,7 +140,7 @@ public function saveSessionSettings(string $session, array $settings = [])
     public function unlinkSessionSettings($session): string
     {
         $settings = Files::getSessionFile($session, Files::SETTINGS_EXTENSION);
-        if (is_file($settings)) {
+        if (\is_file($settings)) {
             deleteFile($settings);
         }
 
@@ -149,7 +149,7 @@ public function unlinkSessionSettings($session): string
 
     public function exit(): string
     {
-        EventLoop::defer(static fn() => exit());
+        EventLoop::defer(static fn () => exit());
         return 'ok';
     }
 
@@ -159,6 +159,6 @@ private function bytesToHuman($bytes): string
         for ($i = 0; $bytes > 1024; $i++) {
             $bytes /= 1024;
         }
-        return round($bytes, 2) . ' ' . $units[$i];
+        return \round($bytes, 2) . ' ' . $units[$i];
     }
-}
\ No newline at end of file
+}
diff --git a/src/Migrations/StartUpFixes.php b/src/Migrations/StartUpFixes.php
index 8b93fa8..6ac2b14 100644
--- a/src/Migrations/StartUpFixes.php
+++ b/src/Migrations/StartUpFixes.php
@@ -1,20 +1,14 @@
-getMethod();
-        $uri = (string)$request->getUri();
+        $uri = (string) $request->getUri();
         $protocolVersion = $request->getProtocolVersion();
         $remote = Server::getClientIp($request);
 
@@ -58,7 +58,7 @@ public function handleRequest(Request $request, RequestHandler $requestHandler):
             ],
         ];
 
-        $level = $status < 400 ? LogLevel::INFO : LogLevel::NOTICE;
+        $level = $status < 400 ? LogLevel::DEBUG : LogLevel::INFO;
 
         $this->logger->log(
             $level,
diff --git a/src/Server/Authorization.php b/src/Server/Authorization.php
index b4db07e..47258ad 100644
--- a/src/Server/Authorization.php
+++ b/src/Server/Authorization.php
@@ -1,4 +1,4 @@
-selfIp = ip2long(getHostByName(php_uname('n')));
-        $this->ipWhitelist = (array)Config::getInstance()->get('api.ip_whitelist', []);
+        $this->selfIp = \ip2long(\getHostByName(\php_uname('n')));
+        $this->ipWhitelist = (array) Config::getInstance()->get('api.ip_whitelist', []);
         $this->passwords = Config::getInstance()->get('api.passwords', []);
         if (!$this->ipWhitelist && !$this->passwords) {
             error('API is unprotected! Please specify IP_WHITELIST or PASSWORD in .env.docker');
@@ -37,11 +37,11 @@ public function handleRequest(Request $request, RequestHandler $requestHandler):
         }
 
         if ($this->passwords) {
-            $header = (string)$request->getHeader('Authorization');
+            $header = (string) $request->getHeader('Authorization');
             if ($header) {
-                sscanf($header, "Basic %s", $encodedPassword);
-                [$username, $password] = explode(':', base64_decode($encodedPassword), 2);
-                if (array_key_exists($username, $this->passwords) && $this->passwords[$username] === $password) {
+                \sscanf($header, "Basic %s", $encodedPassword);
+                [$username, $password] = \explode(':', \base64_decode($encodedPassword), 2);
+                if (\array_key_exists($username, $this->passwords) && $this->passwords[$username] === $password) {
                     return $requestHandler->handleRequest($request);
                 }
             }
@@ -59,25 +59,25 @@ public function handleRequest(Request $request, RequestHandler $requestHandler):
     private function isIpAllowed(string $host): bool
     {
 
-
-        if ($this->ipWhitelist && !in_array($host, $this->ipWhitelist, true)) {
+        if ($this->ipWhitelist && !\in_array($host, $this->ipWhitelist, true)) {
             return false;
         }
         return true;
     }
 
-    private function isLocal(string $host): bool {
+    private function isLocal(string $host): bool
+    {
         if ($host === '127.0.0.1' || $host === 'localhost') {
             return true;
         }
 
         global $options;
         if ($options['docker']) {
-            $isSameNetwork = abs(ip2long($host) - $this->selfIp) < 256;
+            $isSameNetwork = \abs(\ip2long($host) - $this->selfIp) < 256;
             if ($isSameNetwork) {
                 return true;
             }
         }
         return false;
     }
-}
\ No newline at end of file
+}
diff --git a/src/Server/ErrorResponses.php b/src/Server/ErrorResponses.php
index ba5307d..736ef81 100644
--- a/src/Server/ErrorResponses.php
+++ b/src/Server/ErrorResponses.php
@@ -1,24 +1,22 @@
- false,
                     'errors' => [
@@ -33,4 +31,4 @@ public static function get(int $status, $message): Response
         );
     }
 
-}
\ No newline at end of file
+}
diff --git a/src/Server/Router.php b/src/Server/Router.php
index 7e96fb1..f3faa43 100644
--- a/src/Server/Router.php
+++ b/src/Server/Router.php
@@ -1,12 +1,12 @@
-router->addRoute('GET', '/log/{level:.*?[^/]}[/]', $logHandler);
     }
 
-
-}
\ No newline at end of file
+}
diff --git a/src/Server/Server.php b/src/Server/Server.php
index 718c9fd..4d8a0be 100644
--- a/src/Server/Server.php
+++ b/src/Server/Server.php
@@ -1,4 +1,4 @@
-stop();
         } else {
             EventLoop::run();
             info("Stopping http server");
             $server->stop();
         }
+        Logger::finalize();
     }
 
     /**
-     * Установить конфигурацию для http-сервера
+     * Установить конфигурацию для http-сервера.
      *
-     * @param array $config
-     * @return array
      */
     private function getConfig(array $config = []): array
     {
-        $config = array_filter($config);
+        $config = \array_filter($config);
 
-        $config = array_merge(
+        $config = \array_merge(
             Config::getInstance()->get('server', []),
             $config
         );
@@ -96,18 +91,18 @@ public static function getClientIp(Request $request): string
         if ($realIpHeader) {
             $remote = $request->getHeader($realIpHeader);
             if (!$remote) {
-                GOTO DIRECT;
+                goto DIRECT;
             }
-            $tmp = explode(',', $remote);
-            $remote = trim(end($tmp));
+            $tmp = \explode(',', $remote);
+            $remote = \trim(\end($tmp));
         } else {
             DIRECT:
             $remote = $request->getClient()->getRemoteAddress()->toString();
-            $hostArray = explode(':', $remote);
-            if (count($hostArray) >= 2) {
-                $port = (int)array_pop($hostArray);
+            $hostArray = \explode(':', $remote);
+            if (\count($hostArray) >= 2) {
+                $port = (int) \array_pop($hostArray);
                 if ($port > 0 && $port <= 65353) {
-                    $remote = implode(':', $hostArray);
+                    $remote = \implode(':', $hostArray);
                 }
             }
 
@@ -116,4 +111,4 @@ public static function getClientIp(Request $request): string
         return $remote;
     }
 
-}
\ No newline at end of file
+}

From 0ad5d07d94f4588ab9d96844a2161b1fff4ba043 Mon Sep 17 00:00:00 2001
From: Alexander Pankratov 
Date: Sun, 14 Jul 2024 21:00:58 +0200
Subject: [PATCH 157/270] Revert bulk aggreagation

---
 composer.lock                     | 12 +++++------
 src/Controllers/ApiController.php | 36 ++++++++++++++++++++++++++++++-
 2 files changed, 40 insertions(+), 8 deletions(-)

diff --git a/composer.lock b/composer.lock
index cc80baa..1d46ddd 100644
--- a/composer.lock
+++ b/composer.lock
@@ -4,7 +4,7 @@
         "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
         "This file is @generated automatically"
     ],
-    "content-hash": "b9e9ba3184bce93fe3654528621101f4",
+    "content-hash": "dc5798d52e4ed25349fd1c90bf88660d",
     "packages": [
         {
             "name": "amphp/amp",
@@ -232,7 +232,7 @@
             "version": "2.x-dev",
             "source": {
                 "type": "git",
-                "url": "https://github.com/xtrime-ru/dns.git",
+                "url": "git@github.com:xtrime-ru/dns.git",
                 "reference": "037b762d95f7d9e855b9c6736c0ccc4adcb8921e"
             },
             "dist": {
@@ -323,10 +323,7 @@
                 "dns",
                 "resolve"
             ],
-            "support": {
-                "source": "https://github.com/xtrime-ru/dns/tree/2.x"
-            },
-            "time": "2024-05-14T18:13:22+00:00"
+            "time": "2024-05-14T16:09:55+00:00"
         },
         {
             "name": "amphp/file",
@@ -6889,7 +6886,8 @@
     "platform": {
         "php": "^8.2",
         "ext-json": "*",
-        "ext-mbstring": "*"
+        "ext-mbstring": "*",
+        "ext-curl": "*"
     },
     "platform-dev": [],
     "plugin-api-version": "2.6.0"
diff --git a/src/Controllers/ApiController.php b/src/Controllers/ApiController.php
index 39f75a9..ac40364 100644
--- a/src/Controllers/ApiController.php
+++ b/src/Controllers/ApiController.php
@@ -5,6 +5,10 @@
 use Exception;
 use TelegramApiServer\Client;
 use TelegramApiServer\Config;
+use TelegramApiServer\Logger;
+use function Amp\async;
+use function Amp\delay;
+use function Amp\Future\awaitAll;
 
 final class ApiController extends AbstractApiController
 {
@@ -34,6 +38,36 @@ protected function callApi(): mixed
             return $this->callApiCommon($madelineProto);
         }
 
-        return $this->callApiCommon($madelineProto);
+        //GROUP REQUESTS IN BULKS
+        static $futures = [];
+
+        $futures[] = $future = async($this->callApiCommon(...), $madelineProto);
+        delay($this->waitNextTick());
+
+        if ($futures) {
+            awaitAll($futures);
+            Logger::getInstance()->notice("Executed bulk requests:" . count($futures));
+            $futures = [];
+        }
+
+        return $future->await();
+    }
+
+    /**
+     * Sync threads execution via time ticks
+     * Need to enable madelineProto futures bulk execution
+     * @param float $tick interval of execution in seconds.
+     */
+    protected function waitNextTick(float $tick = 0.5): float {
+        $tickMs = (int)($tick * 1000);
+        $now = (int)(microtime(true) * 1000);
+        $currentTick = intdiv((int)(microtime(true) * 1000), $tickMs);
+        $nextTick = ($currentTick + 1);
+        $nextTickTime = $nextTick * $tickMs;
+        $wait = round(($nextTickTime - $now)/1000, 3);
+
+        Logger::getInstance()->notice("Waiting $wait seconds before tick");
+
+        return $wait;
     }
 }

From 2374b64e90156f2d46be7fb39eec21071e855cee Mon Sep 17 00:00:00 2001
From: Alexander Pankratov 
Date: Sun, 14 Jul 2024 21:33:50 +0200
Subject: [PATCH 158/270] Fix logger level

---
 src/Logger.php | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/Logger.php b/src/Logger.php
index 1b7d9f9..087a81a 100644
--- a/src/Logger.php
+++ b/src/Logger.php
@@ -91,7 +91,7 @@ protected function __construct(string $minLevel = LogLevel::WARNING, ?\Closure $
             throw new InvalidArgumentException(\sprintf('The log level "%s" does not exist.', $minLevel));
         }
 
-        $this->minLevelIndex = \min(self::$levels[$minLevel], self::$levels[self::$madelineLevels[MadelineProto\Logger::VERBOSE]]);
+        $this->minLevelIndex = self::$levels[$minLevel];
         $this->formatter = $formatter ?: $this->format(...);
         $pipe = new Pipe(PHP_INT_MAX);
         $this->stdout = $pipe->getSink();

From 4c637fee7f254b2ada9d53095d67e494c6e2e124 Mon Sep 17 00:00:00 2001
From: Alexander Pankratov 
Date: Sun, 14 Jul 2024 21:53:10 +0200
Subject: [PATCH 159/270] Feat: new group for requests

---
 src/Controllers/ApiController.php | 24 +++++++++++++++---------
 1 file changed, 15 insertions(+), 9 deletions(-)

diff --git a/src/Controllers/ApiController.php b/src/Controllers/ApiController.php
index ac40364..7ae7f61 100644
--- a/src/Controllers/ApiController.php
+++ b/src/Controllers/ApiController.php
@@ -2,12 +2,14 @@
 
 namespace TelegramApiServer\Controllers;
 
+use Amp\DeferredFuture;
 use Exception;
 use TelegramApiServer\Client;
 use TelegramApiServer\Config;
 use TelegramApiServer\Logger;
 use function Amp\async;
 use function Amp\delay;
+use function Amp\Future\await;
 use function Amp\Future\awaitAll;
 
 final class ApiController extends AbstractApiController
@@ -39,18 +41,22 @@ protected function callApi(): mixed
         }
 
         //GROUP REQUESTS IN BULKS
-        static $futures = [];
+        /** @var ?DeferredFuture $lock */
+        static $lock = null;
 
-        $futures[] = $future = async($this->callApiCommon(...), $madelineProto);
-        delay($this->waitNextTick());
-
-        if ($futures) {
-            awaitAll($futures);
-            Logger::getInstance()->notice("Executed bulk requests:" . count($futures));
-            $futures = [];
+        if (!$lock) {
+            try {
+                $lock = new DeferredFuture();
+                delay($this->waitNextTick());
+                $lock->complete();
+            } finally {
+                $lock = null;
+            }
+        } else {
+            $lock->getFuture()->await();
         }
 
-        return $future->await();
+        return $this->callApiCommon($madelineProto);
     }
 
     /**

From 6f5b045c2eed9dbe048e810a08c8f907aa36b6f7 Mon Sep 17 00:00:00 2001
From: Alexander Pankratov 
Date: Sun, 14 Jul 2024 22:12:35 +0200
Subject: [PATCH 160/270] Fix: signal propagation

---
 entrypoint.sh | 10 ----------
 1 file changed, 10 deletions(-)

diff --git a/entrypoint.sh b/entrypoint.sh
index e985466..2621c1a 100755
--- a/entrypoint.sh
+++ b/entrypoint.sh
@@ -1,14 +1,4 @@
 #!/usr/bin/env sh
 
-VERSION=1.0.0
-CURRENT_VERSION=$(cat /tas_version)
-
-if [ "$VERSION" != "$CURRENT_VERSION" ]; then
-    echo "Wrong docker image version, expected $VERSION, got $CURRENT_VERSION, please run docker compose pull!"
-    exit 1
-fi
-
-composer install
-
 docker-compose-wait \
 && nice -n 20 php server.php -e=.env.docker --docker "$@"

From 43b85140fca83b8e240fea6e2cb27366ec51c077 Mon Sep 17 00:00:00 2001
From: Daniil Gentili 
Date: Mon, 15 Jul 2024 12:30:53 +0200
Subject: [PATCH 161/270] Misc fixes (#162)

* Revert "Fix: signal propagation"
* Proper bulking
---
 entrypoint.sh                     | 10 +++++++
 src/Client.php                    | 34 +++++++++++-----------
 src/Controllers/ApiController.php | 48 +++++++------------------------
 src/Logger.php                    |  2 +-
 4 files changed, 38 insertions(+), 56 deletions(-)

diff --git a/entrypoint.sh b/entrypoint.sh
index 2621c1a..e985466 100755
--- a/entrypoint.sh
+++ b/entrypoint.sh
@@ -1,4 +1,14 @@
 #!/usr/bin/env sh
 
+VERSION=1.0.0
+CURRENT_VERSION=$(cat /tas_version)
+
+if [ "$VERSION" != "$CURRENT_VERSION" ]; then
+    echo "Wrong docker image version, expected $VERSION, got $CURRENT_VERSION, please run docker compose pull!"
+    exit 1
+fi
+
+composer install
+
 docker-compose-wait \
 && nice -n 20 php server.php -e=.env.docker --docker "$@"
diff --git a/src/Client.php b/src/Client.php
index af7af4c..61a86e5 100644
--- a/src/Client.php
+++ b/src/Client.php
@@ -14,8 +14,6 @@
 use Revolt\EventLoop;
 use RuntimeException;
 use TelegramApiServer\EventObservers\EventObserver;
-use function Amp\async;
-use function Amp\delay;
 
 final class Client
 {
@@ -211,10 +209,11 @@ private function setFatalErrorHandler(): void
         $resume = Config::getInstance()->get('error.resume_on_error');
 
         $currentHandler = EventLoop::getErrorHandler();
-        EventLoop::setErrorHandler(static fn(\Throwable $e) => self::errorHandler($e, $currentHandler, $token, $peers, $resume));
+        EventLoop::setErrorHandler(static fn (\Throwable $e) => self::errorHandler($e, $currentHandler, $token, $peers, $resume));
     }
 
-    private static function errorHandler(\Throwable $e, ?callable $currentHandler, string $token, array $peers, bool $resume): void {
+    private static function errorHandler(\Throwable $e, ?callable $currentHandler, string $token, array $peers, bool $resume): void
+    {
         if ($currentHandler) {
             $currentHandler($e);
         }
@@ -223,33 +222,32 @@ private static function errorHandler(\Throwable $e, ?callable $currentHandler, s
         }
         if ($peers && $token) {
             try {
-                $ch = curl_init("https://api.telegram.org/bot$token/sendMessage");
-                curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'POST');
-                curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: application/json'));
-                curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
+                $ch = \curl_init("https://api.telegram.org/bot$token/sendMessage");
+                \curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'POST');
+                \curl_setopt($ch, CURLOPT_HTTPHEADER, ['Content-Type: application/json']);
+                \curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
 
-                curl_setopt($ch, CURLOPT_CONNECTTIMEOUT,1);
-                curl_setopt($ch, CURLOPT_TIMEOUT, 5);
+                \curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 1);
+                \curl_setopt($ch, CURLOPT_TIMEOUT, 5);
 
                 foreach ($peers as $peer) {
                     $exceptionArray = Logger::getExceptionAsArray($e);
                     unset($exceptionArray['previous_exception']);
 
-                    curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode([
+                    \curl_setopt($ch, CURLOPT_POSTFIELDS, \json_encode([
                         'chat_id' => $peer,
                         'text' => "```json\n" .
-                            json_encode($exceptionArray, JSON_UNESCAPED_SLASHES|JSON_UNESCAPED_UNICODE|JSON_PRETTY_PRINT) .
-                            "\n```"
-                        ,
+                            \json_encode($exceptionArray, JSON_UNESCAPED_SLASHES|JSON_UNESCAPED_UNICODE|JSON_PRETTY_PRINT) .
+                            "\n```",
                         'parse_mode' => 'MarkdownV2',
                     ]));
 
-                    $response = curl_exec($ch);
-                    if (curl_getinfo($ch, CURLINFO_HTTP_CODE) !== 200) {
+                    $response = \curl_exec($ch);
+                    if (\curl_getinfo($ch, CURLINFO_HTTP_CODE) !== 200) {
                         Logger::getInstance()->error('Error notification bot response', [
                             'response' => $response,
-                            'error_code' => curl_errno($ch),
-                            'error' => curl_error($ch),
+                            'error_code' => \curl_errno($ch),
+                            'error' => \curl_error($ch),
                         ]);
                     }
 
diff --git a/src/Controllers/ApiController.php b/src/Controllers/ApiController.php
index 7ae7f61..c0b2c76 100644
--- a/src/Controllers/ApiController.php
+++ b/src/Controllers/ApiController.php
@@ -3,14 +3,11 @@
 namespace TelegramApiServer\Controllers;
 
 use Amp\DeferredFuture;
+use Amp\Future;
 use Exception;
+use Revolt\EventLoop;
 use TelegramApiServer\Client;
 use TelegramApiServer\Config;
-use TelegramApiServer\Logger;
-use function Amp\async;
-use function Amp\delay;
-use function Amp\Future\await;
-use function Amp\Future\awaitAll;
 
 final class ApiController extends AbstractApiController
 {
@@ -28,6 +25,7 @@ protected function resolvePath(array $path): void
         $this->api = \explode('.', $path['method'] ?? '');
     }
 
+    private static ?Future $w = null;
     /**
      * @throws Exception
      */
@@ -40,40 +38,16 @@ protected function callApi(): mixed
             return $this->callApiCommon($madelineProto);
         }
 
-        //GROUP REQUESTS IN BULKS
-        /** @var ?DeferredFuture $lock */
-        static $lock = null;
-
-        if (!$lock) {
-            try {
-                $lock = new DeferredFuture();
-                delay($this->waitNextTick());
-                $lock->complete();
-            } finally {
-                $lock = null;
-            }
-        } else {
-            $lock->getFuture()->await();
+        if (!self::$w) {
+            $f = new DeferredFuture;
+            self::$w = $f->getFuture();
+            EventLoop::delay($tick, static function () use ($f): void {
+                $f->complete();
+                self::$w = null;
+            });
         }
+        self::$w->await();
 
         return $this->callApiCommon($madelineProto);
     }
-
-    /**
-     * Sync threads execution via time ticks
-     * Need to enable madelineProto futures bulk execution
-     * @param float $tick interval of execution in seconds.
-     */
-    protected function waitNextTick(float $tick = 0.5): float {
-        $tickMs = (int)($tick * 1000);
-        $now = (int)(microtime(true) * 1000);
-        $currentTick = intdiv((int)(microtime(true) * 1000), $tickMs);
-        $nextTick = ($currentTick + 1);
-        $nextTickTime = $nextTick * $tickMs;
-        $wait = round(($nextTickTime - $now)/1000, 3);
-
-        Logger::getInstance()->notice("Waiting $wait seconds before tick");
-
-        return $wait;
-    }
 }
diff --git a/src/Logger.php b/src/Logger.php
index 087a81a..7477859 100644
--- a/src/Logger.php
+++ b/src/Logger.php
@@ -203,7 +203,7 @@ public static function getExceptionAsArray(Throwable $exception)
             'file' => $exception->getFile(),
             'line' => $exception->getLine(),
             'code' => $exception->getCode(),
-            'backtrace' => array_slice($exception->getTrace(), 0, 3),
+            'backtrace' => \array_slice($exception->getTrace(), 0, 3),
             'previous_exception' => $exception->getPrevious(),
         ];
     }

From a01f3051559288836f0885ce8a60a2624020766d Mon Sep 17 00:00:00 2001
From: Alexander Pankratov 
Date: Mon, 15 Jul 2024 12:38:49 +0200
Subject: [PATCH 162/270] Fix: shutdown in apline containers

---
 src/Server/Server.php | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/Server/Server.php b/src/Server/Server.php
index 4d8a0be..48ff7b3 100644
--- a/src/Server/Server.php
+++ b/src/Server/Server.php
@@ -15,6 +15,7 @@
 use TelegramApiServer\Config;
 use TelegramApiServer\Logger;
 use const SIGINT;
+use const SIGQUIT;
 use const SIGTERM;
 
 final class Server
@@ -58,7 +59,7 @@ private static function registerShutdown(SocketHttpServer $server)
     {
         if (\defined('SIGINT')) {
             // Await SIGINT or SIGTERM to be received.
-            $signal = Amp\trapSignal([SIGINT, SIGTERM]);
+            $signal = Amp\trapSignal([SIGINT, SIGTERM, SIGQUIT]);
             info(\sprintf("Received signal %d, stopping HTTP server", $signal));
             $server->stop();
         } else {

From b4f45d3179d3df985679159e87353f0b648a0ef4 Mon Sep 17 00:00:00 2001
From: Alexander Pankratov 
Date: Mon, 15 Jul 2024 13:10:32 +0200
Subject: [PATCH 163/270] Update madelineProto

---
 composer.lock | 15 +++++++++------
 1 file changed, 9 insertions(+), 6 deletions(-)

diff --git a/composer.lock b/composer.lock
index 1d46ddd..80c97ce 100644
--- a/composer.lock
+++ b/composer.lock
@@ -232,7 +232,7 @@
             "version": "2.x-dev",
             "source": {
                 "type": "git",
-                "url": "git@github.com:xtrime-ru/dns.git",
+                "url": "https://github.com/xtrime-ru/dns.git",
                 "reference": "037b762d95f7d9e855b9c6736c0ccc4adcb8921e"
             },
             "dist": {
@@ -323,7 +323,10 @@
                 "dns",
                 "resolve"
             ],
-            "time": "2024-05-14T16:09:55+00:00"
+            "support": {
+                "source": "https://github.com/xtrime-ru/dns/tree/2.x"
+            },
+            "time": "2024-05-14T18:13:22+00:00"
         },
         {
             "name": "amphp/file",
@@ -2643,12 +2646,12 @@
             "source": {
                 "type": "git",
                 "url": "https://github.com/danog/MadelineProto.git",
-                "reference": "ddb2bb5a2358cc62cb8d0f847710e2cccb106390"
+                "reference": "0f6247971e31d16ff1172723787deb96a3364f40"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/danog/MadelineProto/zipball/ddb2bb5a2358cc62cb8d0f847710e2cccb106390",
-                "reference": "ddb2bb5a2358cc62cb8d0f847710e2cccb106390",
+                "url": "https://api.github.com/repos/danog/MadelineProto/zipball/0f6247971e31d16ff1172723787deb96a3364f40",
+                "reference": "0f6247971e31d16ff1172723787deb96a3364f40",
                 "shasum": ""
             },
             "require": {
@@ -2763,7 +2766,7 @@
                     "type": "github"
                 }
             ],
-            "time": "2024-07-10T14:36:36+00:00"
+            "time": "2024-07-15T11:29:33+00:00"
         },
         {
             "name": "danog/primemodule",

From c0ce3b81ccb3d7aa0637877d0f1a7272f6e00c17 Mon Sep 17 00:00:00 2001
From: Alexander Pankratov 
Date: Mon, 15 Jul 2024 13:33:12 +0200
Subject: [PATCH 164/270] Fix: docker restart

---
 Dockerfile | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Dockerfile b/Dockerfile
index 0c8b88e..b97a32f 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -9,5 +9,6 @@ RUN echo 1.0.0 > /tas_version
 EXPOSE 9503
 
 ENV UV_USE_IO_URING=0
+STOPSIGNAL SIGTERM
 
 ENTRYPOINT ["./entrypoint.sh"]

From 88d48f1cd8bb7afc760b6d8f239c37fdf3e5a2a4 Mon Sep 17 00:00:00 2001
From: Alexander Pankratov 
Date: Tue, 16 Jul 2024 15:02:20 +0200
Subject: [PATCH 165/270] Fix: missing logs from errorHandler

---
 src/Logger.php | 57 ++------------------------------------------------
 1 file changed, 2 insertions(+), 55 deletions(-)

diff --git a/src/Logger.php b/src/Logger.php
index 7477859..dd513c0 100644
--- a/src/Logger.php
+++ b/src/Logger.php
@@ -1,18 +1,7 @@
 
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
 namespace TelegramApiServer;
 
-use Amp\ByteStream\Pipe;
-use Amp\ByteStream\WritableStream;
 use danog\MadelineProto;
 use DateTimeInterface;
 use Psr\Log\AbstractLogger;
@@ -22,15 +11,7 @@
 use Throwable;
 
 use const PHP_EOL;
-use function Amp\async;
-use function Amp\ByteStream\getStdout;
-use function Amp\ByteStream\pipe;
-
-/**
- * Minimalist PSR-3 logger designed to write in stderr or any other stream.
- *
- * @author Kévin Dunglas 
- */
+
 final class Logger extends AbstractLogger
 {
     private static ?Logger $instanse = null;
@@ -59,12 +40,6 @@ final class Logger extends AbstractLogger
     public int $minLevelIndex;
     private \Closure $formatter;
 
-    private WritableStream $stdout;
-    /**
-     * @var array
-     */
-    private static array $closePromises = [];
-
     protected function __construct(string $minLevel = LogLevel::WARNING, ?\Closure $formatter = null)
     {
         if (null === $minLevel) {
@@ -93,17 +68,6 @@ protected function __construct(string $minLevel = LogLevel::WARNING, ?\Closure $
 
         $this->minLevelIndex = self::$levels[$minLevel];
         $this->formatter = $formatter ?: $this->format(...);
-        $pipe = new Pipe(PHP_INT_MAX);
-        $this->stdout = $pipe->getSink();
-        $source = $pipe->getSource();
-        $promise = async(static function () use ($source, &$promise): void {
-            try {
-                pipe($source, getStdout());
-            } finally {
-                unset(self::$closePromises[\spl_object_id($promise)]);
-            }
-        });
-        self::$closePromises[\spl_object_id($promise)] = [$this->stdout, $promise];
     }
 
     public static function getInstance(): Logger
@@ -134,24 +98,7 @@ public function log($level, $message, array $context = []): void
         }
 
         $formatter = $this->formatter;
-        $data = $formatter($level, $message, $context);
-        ;
-        try {
-            $this->stdout->write($data);
-        } catch (\Throwable) {
-            echo $data;
-        }
-    }
-
-    /**
-     * @internal Internal function used to flush the log buffer on shutdown.
-     */
-    public static function finalize(): void
-    {
-        foreach (self::$closePromises as [$stdout, $promise]) {
-            $stdout->close();
-            $promise->await();
-        }
+        echo $formatter($level, $message, $context);
     }
 
     private function format(string $level, string $message, array $context): string

From 27031507fd5f3427057fc126b88b0f1139112203 Mon Sep 17 00:00:00 2001
From: Alexander Pankratov 
Date: Tue, 16 Jul 2024 15:05:44 +0200
Subject: [PATCH 166/270] Feat: add prefix for error notifications

---
 .env.docker.example |  5 ++++
 .env.example        |  5 ++++
 bootstrap.php       | 20 +---------------
 config.php          |  1 +
 src/Client.php      | 56 ++++++++++++++++++++++++++++++++++++---------
 5 files changed, 57 insertions(+), 30 deletions(-)

diff --git a/.env.docker.example b/.env.docker.example
index fbc6723..7c7c81b 100644
--- a/.env.docker.example
+++ b/.env.docker.example
@@ -69,9 +69,14 @@ DB_ENABLE_MIN_DATABASE=0
 # Enable file metadata cache
 DB_ENABLE_FILE_REFERENCE_DATABASE=0
 
+PROMETHEUS_BIND_TO=0.0.0.0:12345
+
 ERROR_NOTIFICATION_BOT_TOKEN=
 #User id or Chat id or username of the target channel to send error messages. Comma separated
 #Example: 123456,@sometestchannel
 ERROR_NOTIFICATION_PEERS=
+#Prepend backtrace with custom text to distinct messages from different instances in your bot
+#Use html formatting style: https://core.telegram.org/bots/api#formatting-options
+ERROR_NOTIFICATION_PREFIX="TelegramApiServer fatal error"
 # Program will continue to work after fatal error (not recommended)
 RESUME_ON_ERROR=0
\ No newline at end of file
diff --git a/.env.example b/.env.example
index ed6b620..836312e 100644
--- a/.env.example
+++ b/.env.example
@@ -67,9 +67,14 @@ DB_ENABLE_MIN_DATABASE=0
 # Enable file metadata cache
 DB_ENABLE_FILE_REFERENCE_DATABASE=0
 
+PROMETHEUS_BIND_TO=0.0.0.0:12345
+
 ERROR_NOTIFICATION_BOT_TOKEN=
 #User id or Chat id or username of the target channel to send error messages. Comma separated
 #Example: 123456,@sometestchannel
 ERROR_NOTIFICATION_PEERS=
+#Prepend backtrace with custom text to distinct messages from different instances in your bot
+#Use html formatting style: https://core.telegram.org/bots/api#formatting-options
+ERROR_NOTIFICATION_PREFIX="TelegramApiServer fatal error"
 # Program will continue to work after fatal error (not recommended)
 RESUME_ON_ERROR=0
\ No newline at end of file
diff --git a/bootstrap.php b/bootstrap.php
index e9837cc..8780bfd 100644
--- a/bootstrap.php
+++ b/bootstrap.php
@@ -1,12 +1,7 @@
 emergency($message, $context);
     }
-}
-
-EventLoop::setErrorHandler(function (\Throwable $e) {
-    if ($e instanceof UnhandledFutureError) {
-        $e = $e->getPrevious();
-    }
-    if ($e instanceof SecurityException || $e instanceof SignalException || $e instanceof SqlException) {
-        throw $e;
-    }
-    if (str_starts_with($e->getMessage(), 'Could not connect to DC ')) {
-        throw $e;
-    }
-    emergency((string) $e);
-});
\ No newline at end of file
+}
\ No newline at end of file
diff --git a/config.php b/config.php
index 8cff30a..2b271ea 100644
--- a/config.php
+++ b/config.php
@@ -22,6 +22,7 @@ static function(string $peer): string|int {
                 explode(',', (string)getenv('ERROR_NOTIFICATION_PEERS'))
             ),
         ),
+        'prefix' => (string)getenv('ERROR_NOTIFICATION_PREFIX'),
         'resume_on_error' => ((bool)getenv('RESUME_ON_ERROR'))
     ],
     'telegram' => [
diff --git a/src/Client.php b/src/Client.php
index 61a86e5..917e416 100644
--- a/src/Client.php
+++ b/src/Client.php
@@ -2,12 +2,17 @@
 
 namespace TelegramApiServer;
 
+use Amp\Future\UnhandledFutureError;
+use Amp\SignalException;
+use Amp\Sql\SqlException;
 use Amp\Sync\LocalKeyedMutex;
 use danog\MadelineProto\API;
 use danog\MadelineProto\APIWrapper;
+use danog\MadelineProto\SecurityException;
 use danog\MadelineProto\Settings;
 use danog\MadelineProto\Settings\Database\SerializerType;
 use danog\MadelineProto\SettingsAbstract;
+use Exception;
 use InvalidArgumentException;
 use Psr\Log\LogLevel;
 use ReflectionProperty;
@@ -206,19 +211,24 @@ private function setFatalErrorHandler(): void
 
         $token = Config::getInstance()->get('error.bot_token');
         $peers = Config::getInstance()->get('error.peers');
+        $prefix = Config::getInstance()->get('error.prefix');
         $resume = Config::getInstance()->get('error.resume_on_error');
 
         $currentHandler = EventLoop::getErrorHandler();
-        EventLoop::setErrorHandler(static fn (\Throwable $e) => self::errorHandler($e, $currentHandler, $token, $peers, $resume));
+        EventLoop::setErrorHandler(static fn (\Throwable $e) => self::errorHandler($e, $currentHandler, $token, $peers, $prefix, $resume));
     }
 
-    private static function errorHandler(\Throwable $e, ?callable $currentHandler, string $token, array $peers, bool $resume): void
+    private static function errorHandler(\Throwable $e, ?callable $currentHandler, string $token, array $peers, string $prefix, bool $resume): void
     {
+        if ($e instanceof UnhandledFutureError) {
+            $e = $e->getPrevious();
+        }
+
         if ($currentHandler) {
             $currentHandler($e);
         }
         if ($e->getPrevious()) {
-            self::errorHandler($e->getPrevious(), $currentHandler, $token, $peers, true);
+            self::errorHandler($e->getPrevious(), $currentHandler, $token, $peers, $prefix, true);
         }
         if ($peers && $token) {
             try {
@@ -230,24 +240,41 @@ private static function errorHandler(\Throwable $e, ?callable $currentHandler, s
                 \curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 1);
                 \curl_setopt($ch, CURLOPT_TIMEOUT, 5);
 
+                $encoded = function(string $input): string {
+                    return str_replace(['<', '>', '&'], ['<', '>', '&'], $input);
+                };
+
                 foreach ($peers as $peer) {
                     $exceptionArray = Logger::getExceptionAsArray($e);
                     unset($exceptionArray['previous_exception']);
 
+                    $text = <<getMessage())}
+                        
+                        
+                            
+                            {$encoded(\json_encode($exceptionArray, JSON_UNESCAPED_SLASHES|JSON_UNESCAPED_UNICODE|JSON_PRETTY_PRINT))}
+                            
+                        
+ HTML + ; \curl_setopt($ch, CURLOPT_POSTFIELDS, \json_encode([ 'chat_id' => $peer, - 'text' => "```json\n" . - \json_encode($exceptionArray, JSON_UNESCAPED_SLASHES|JSON_UNESCAPED_UNICODE|JSON_PRETTY_PRINT) . - "\n```", - 'parse_mode' => 'MarkdownV2', + 'text' => trim($text), + 'parse_mode' => 'html', ])); $response = \curl_exec($ch); - if (\curl_getinfo($ch, CURLINFO_HTTP_CODE) !== 200) { + $responseJson = \json_decode($response, true); + if (\curl_getinfo($ch, CURLINFO_HTTP_CODE) !== 200 || $responseJson['ok'] !== true) { Logger::getInstance()->error('Error notification bot response', [ - 'response' => $response, - 'error_code' => \curl_errno($ch), - 'error' => \curl_error($ch), + 'status' => \curl_getinfo($ch, CURLINFO_HTTP_CODE), + 'response' => $responseJson ?: $response, + 'curl_error' => [ + 'code' => \curl_errno($ch), + 'message' => \curl_error($ch), + ], ]); } @@ -259,6 +286,13 @@ private static function errorHandler(\Throwable $e, ?callable $currentHandler, s if (!$resume) { throw $e; + } else { + if ($e instanceof SecurityException || $e instanceof SignalException || $e instanceof SqlException) { + throw $e; + } + if (str_starts_with($e->getMessage(), 'Could not connect to DC ')) { + throw $e; + } } } } From 589fe8ccd21bdb7286b33a566ac76f91bf048409 Mon Sep 17 00:00:00 2001 From: Alexander Pankratov Date: Tue, 16 Jul 2024 16:02:28 +0200 Subject: [PATCH 167/270] Fix: dev container --- Dockerfile-dev | 7 ++++--- docker-compose.dev.yml | 2 ++ 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/Dockerfile-dev b/Dockerfile-dev index 5e129db..dff93a0 100644 --- a/Dockerfile-dev +++ b/Dockerfile-dev @@ -2,13 +2,14 @@ FROM xtrime/telegram-api-server:latest ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/ -RUN echo "opcache.jit=disable" >> "$PHP_INI_DIR/conf.d/xdebug.ini" +RUN echo "opcache.jit=disable" > "$PHP_INI_DIR/conf.d/tmp.ini" RUN chmod +x /usr/local/bin/install-php-extensions && \ install-php-extensions xdebug && \ - rm /usr/local/bin/install-php-extensions + rm /usr/local/bin/install-php-extensions && \ + rm $PHP_INI_DIR/conf.d/docker-php-ext-xdebug.ini && \ + rm $PHP_INI_DIR/conf.d/tmp.ini -ADD dev/. "$PHP_INI_DIR/conf.d/" EXPOSE 9503 EXPOSE 9003 diff --git a/docker-compose.dev.yml b/docker-compose.dev.yml index d9ea4ef..4e3cbb8 100644 --- a/docker-compose.dev.yml +++ b/docker-compose.dev.yml @@ -7,6 +7,8 @@ services: build: context: . dockerfile: Dockerfile-dev + volumes: + - ./dev/xdebug.ini:/usr/local/etc/php/conf.d/xdebug.ini ports: - "127.0.0.1:9503:9503" - "9003" From 0b964bd617aac8e49ed5fd603ac5fddbe8e545ce Mon Sep 17 00:00:00 2001 From: Alexander Pankratov Date: Tue, 16 Jul 2024 16:42:47 +0200 Subject: [PATCH 168/270] Feat: async logger --- src/Logger.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Logger.php b/src/Logger.php index dd513c0..e9bf3f4 100644 --- a/src/Logger.php +++ b/src/Logger.php @@ -7,9 +7,11 @@ use Psr\Log\AbstractLogger; use Psr\Log\InvalidArgumentException; use Psr\Log\LogLevel; +use Revolt\EventLoop; use TelegramApiServer\EventObservers\LogObserver; use Throwable; +use function Amp\ByteStream\getStderr; use const PHP_EOL; final class Logger extends AbstractLogger @@ -97,8 +99,7 @@ public function log($level, $message, array $context = []): void return; } - $formatter = $this->formatter; - echo $formatter($level, $message, $context); + getStderr()->write(($this->formatter)($level, $message, $context)); } private function format(string $level, string $message, array $context): string From ed013089fb8dd25ba957632a0dc561721b100add Mon Sep 17 00:00:00 2001 From: Alexander Pankratov Date: Wed, 17 Jul 2024 17:22:27 +0200 Subject: [PATCH 169/270] Fix: remove declare strict = 1 --- bootstrap.php | 30 ++++++++++++------- composer.json | 2 +- config.php | 8 ++--- examples/websocket-events.php | 3 +- server.php | 2 +- src/Client.php | 8 ++--- src/Config.php | 2 +- src/Controllers/AbstractApiController.php | 2 +- src/Controllers/ApiController.php | 5 ++-- src/Controllers/EventsController.php | 2 +- src/Controllers/LogController.php | 2 +- src/Controllers/SystemController.php | 2 +- src/EventObservers/EventHandler.php | 2 +- src/EventObservers/EventObserver.php | 2 +- src/EventObservers/LogObserver.php | 2 +- src/EventObservers/ObserverTrait.php | 2 +- src/Exceptions/NoMediaException.php | 3 +- src/Exceptions/NoticeException.php | 3 +- src/Files.php | 3 +- src/Logger.php | 3 +- src/MadelineProtoExtensions/ApiExtensions.php | 8 ++--- .../SystemApiExtensions.php | 3 +- src/Migrations/StartUpFixes.php | 2 +- src/Server/AccessLoggerMiddleware.php | 2 +- src/Server/Authorization.php | 2 +- src/Server/ErrorResponses.php | 2 +- src/Server/Router.php | 3 +- src/Server/Server.php | 4 +-- 28 files changed, 61 insertions(+), 53 deletions(-) diff --git a/bootstrap.php b/bootstrap.php index 8780bfd..0717e49 100644 --- a/bootstrap.php +++ b/bootstrap.php @@ -4,7 +4,7 @@ use TelegramApiServer\Logger; $root = __DIR__; -const ENV_VERSION='1'; +const ENV_VERSION = '1'; //Composer init { @@ -60,7 +60,7 @@ } } -$setMemLimit = function() { +$setMemLimit = static function (): void { if ($memoryLimit = getenv('MEMORY_LIMIT')) { ini_set('memory_limit', $memoryLimit); } @@ -73,42 +73,50 @@ } if (!function_exists('debug')) { - function debug(string $message, array $context) { + function debug(string $message, array $context) + { Logger::getInstance()->debug($message, $context); } } if (!function_exists('info')) { - function info(string $message, array $context = []) { + function info(string $message, array $context = []) + { Logger::getInstance()->info($message, $context); } } if (!function_exists('notice')) { - function notice($message, array $context = []) { + function notice($message, array $context = []) + { Logger::getInstance()->notice($message, $context); } } if (!function_exists('warning')) { - function warning(string $message, array $context = []) { + function warning(string $message, array $context = []) + { Logger::getInstance()->warning($message, $context); } } if (!function_exists('error')) { - function error(string $message, array $context = []) { + function error(string $message, array $context = []) + { Logger::getInstance()->error($message, $context); } } if (!function_exists('critical')) { - function critical(string $message, array $context = []) { + function critical(string $message, array $context = []) + { Logger::getInstance()->critical($message, $context); } } if (!function_exists('alert')) { - function alert(string $message, array $context = []) { + function alert(string $message, array $context = []) + { Logger::getInstance()->alert($message, $context); } } if (!function_exists('emergency')) { - function emergency(string $message, array $context = []) { + function emergency(string $message, array $context = []) + { Logger::getInstance()->emergency($message, $context); } -} \ No newline at end of file +} diff --git a/composer.json b/composer.json index 4bd5ef2..d6a3b53 100644 --- a/composer.json +++ b/composer.json @@ -63,6 +63,6 @@ } }, "scripts": { - "cs-fix": "PHP_CS_FIXER_IGNORE_ENV=1 php -d pcre.jit=0 vendor/bin/php-cs-fixer fix -v" + "cs-fix": "PHP_CS_FIXER_IGNORE_ENV=1 php -d pcre.jit=0 vendor/bin/php-cs-fixer fix -v --rules='{\"@PSR12\": true, \"declare_strict_types\": false}' ." } } diff --git a/config.php b/config.php index 2b271ea..1ed69e6 100644 --- a/config.php +++ b/config.php @@ -15,7 +15,7 @@ 'bot_token' => (string)getenv('ERROR_NOTIFICATION_BOT_TOKEN'), 'peers' => array_filter( array_map( - static function(string $peer): string|int { + static function (string $peer): string|int { $peer = trim($peer); return is_numeric($peer) ? (int)$peer : $peer; }, @@ -45,9 +45,9 @@ static function(string $peer): string|int { '\danog\MadelineProto\Stream\Proxy\SocksProxy' => [ [ "address" => (string)getenv('TELEGRAM_PROXY_ADDRESS'), - "port"=> (int)getenv('TELEGRAM_PROXY_PORT'), - "username"=> (string)getenv('TELEGRAM_PROXY_USERNAME'), - "password"=> (string)getenv('TELEGRAM_PROXY_PASSWORD'), + "port" => (int)getenv('TELEGRAM_PROXY_PORT'), + "username" => (string)getenv('TELEGRAM_PROXY_USERNAME'), + "password" => (string)getenv('TELEGRAM_PROXY_PASSWORD'), ], ] ] diff --git a/examples/websocket-events.php b/examples/websocket-events.php index 2b54b13..8bd30f0 100644 --- a/examples/websocket-events.php +++ b/examples/websocket-events.php @@ -1,4 +1,4 @@ -acquire($session); if (isset($this->instances[$session])) { throw new InvalidArgumentException('Session already exists'); @@ -240,7 +240,7 @@ private static function errorHandler(\Throwable $e, ?callable $currentHandler, s \curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 1); \curl_setopt($ch, CURLOPT_TIMEOUT, 5); - $encoded = function(string $input): string { + $encoded = function (string $input): string { return str_replace(['<', '>', '&'], ['<', '>', '&'], $input); }; @@ -254,7 +254,7 @@ private static function errorHandler(\Throwable $e, ?callable $currentHandler, s
                             
-                            {$encoded(\json_encode($exceptionArray, JSON_UNESCAPED_SLASHES|JSON_UNESCAPED_UNICODE|JSON_PRETTY_PRINT))}
+                            {$encoded(\json_encode($exceptionArray, JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE | JSON_PRETTY_PRINT))}
                             
                         
HTML diff --git a/src/Config.php b/src/Config.php index 36b53b3..f8fb623 100644 --- a/src/Config.php +++ b/src/Config.php @@ -1,4 +1,4 @@ -getFuture(); EventLoop::delay($tick, static function () use ($f): void { $f->complete(); diff --git a/src/Controllers/EventsController.php b/src/Controllers/EventsController.php index f8110cf..b5519c8 100644 --- a/src/Controllers/EventsController.php +++ b/src/Controllers/EventsController.php @@ -1,4 +1,4 @@ - (int) $value, 'timeout' => (float) $value, - default => throw new \InvalidArgumentException("Unknown parameter: {$key}"), + default => throw new InvalidArgumentException("Unknown parameter: {$key}"), }; } diff --git a/src/MadelineProtoExtensions/SystemApiExtensions.php b/src/MadelineProtoExtensions/SystemApiExtensions.php index 73c0aa4..fe4ddb0 100644 --- a/src/MadelineProtoExtensions/SystemApiExtensions.php +++ b/src/MadelineProtoExtensions/SystemApiExtensions.php @@ -1,4 +1,4 @@ -stop(); } - Logger::finalize(); } /** From 5e30ec7374dfe22a8185d78aa190b66c32214f98 Mon Sep 17 00:00:00 2001 From: Alexander Pankratov Date: Wed, 17 Jul 2024 17:46:50 +0200 Subject: [PATCH 170/270] Fix: nice --- entrypoint.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/entrypoint.sh b/entrypoint.sh index e985466..31ed46a 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -11,4 +11,4 @@ fi composer install docker-compose-wait \ -&& nice -n 20 php server.php -e=.env.docker --docker "$@" +&& nice -n 19 php server.php -e=.env.docker --docker "$@" From 7d5562877236f875428708b72e42fc1b67c3b302 Mon Sep 17 00:00:00 2001 From: Alexander Pankratov Date: Tue, 23 Jul 2024 17:02:07 +0200 Subject: [PATCH 171/270] Fix: eventHandler and logs --- composer.lock | 16 ++++++++-------- src/Client.php | 1 - src/EventObservers/EventHandler.php | 2 +- src/EventObservers/EventObserver.php | 7 ++----- src/Logger.php | 7 +++++-- 5 files changed, 16 insertions(+), 17 deletions(-) diff --git a/composer.lock b/composer.lock index 80c97ce..6f2082a 100644 --- a/composer.lock +++ b/composer.lock @@ -3728,16 +3728,16 @@ }, { "name": "phpoption/phpoption", - "version": "1.9.2", + "version": "1.9.3", "source": { "type": "git", "url": "https://github.com/schmittjoh/php-option.git", - "reference": "80735db690fe4fc5c76dfa7f9b770634285fa820" + "reference": "e3fac8b24f56113f7cb96af14958c0dd16330f54" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/schmittjoh/php-option/zipball/80735db690fe4fc5c76dfa7f9b770634285fa820", - "reference": "80735db690fe4fc5c76dfa7f9b770634285fa820", + "url": "https://api.github.com/repos/schmittjoh/php-option/zipball/e3fac8b24f56113f7cb96af14958c0dd16330f54", + "reference": "e3fac8b24f56113f7cb96af14958c0dd16330f54", "shasum": "" }, "require": { @@ -3745,13 +3745,13 @@ }, "require-dev": { "bamarni/composer-bin-plugin": "^1.8.2", - "phpunit/phpunit": "^8.5.34 || ^9.6.13 || ^10.4.2" + "phpunit/phpunit": "^8.5.39 || ^9.6.20 || ^10.5.28" }, "type": "library", "extra": { "bamarni-bin": { "bin-links": true, - "forward-command": true + "forward-command": false }, "branch-alias": { "dev-master": "1.9-dev" @@ -3787,7 +3787,7 @@ ], "support": { "issues": "https://github.com/schmittjoh/php-option/issues", - "source": "https://github.com/schmittjoh/php-option/tree/1.9.2" + "source": "https://github.com/schmittjoh/php-option/tree/1.9.3" }, "funding": [ { @@ -3799,7 +3799,7 @@ "type": "tidelift" } ], - "time": "2023-11-12T21:59:55+00:00" + "time": "2024-07-20T21:41:07+00:00" }, { "name": "phpseclib/phpseclib", diff --git a/src/Client.php b/src/Client.php index a8ae07b..9161e73 100644 --- a/src/Client.php +++ b/src/Client.php @@ -12,7 +12,6 @@ use danog\MadelineProto\Settings; use danog\MadelineProto\Settings\Database\SerializerType; use danog\MadelineProto\SettingsAbstract; -use Exception; use InvalidArgumentException; use Psr\Log\LogLevel; use ReflectionProperty; diff --git a/src/EventObservers/EventHandler.php b/src/EventObservers/EventHandler.php index 69db8af..490746b 100644 --- a/src/EventObservers/EventHandler.php +++ b/src/EventObservers/EventHandler.php @@ -1,4 +1,4 @@ -getSession($session); - $property = new ReflectionProperty($instance, "wrapper"); - /** @var APIWrapper $wrapper */ - $wrapper = $property->getValue($instance); EventHandler::cachePlugins(EventHandler::class); - $wrapper->getAPI()->setEventHandler(EventHandler::class); + $instance = Client::getInstance()->getSession($session); + Client::getWrapper($instance)->getAPI()->setEventHandler(EventHandler::class); } catch (Throwable $e) { self::removeSessionClient($session); error('Cant set EventHandler', [ diff --git a/src/Logger.php b/src/Logger.php index 53ecae8..ddff1dc 100644 --- a/src/Logger.php +++ b/src/Logger.php @@ -99,8 +99,11 @@ public function log($level, $message, array $context = []): void if (self::$levels[$level] < $this->minLevelIndex) { return; } - - getStderr()->write(($this->formatter)($level, $message, $context)); + try { + getStderr()->write(($this->formatter)($level, $message, $context)); + } catch (\Throwable) { + echo ($this->formatter)($level, $message, $context) . PHP_EOL; + } } private function format(string $level, string $message, array $context): string From a6c625478a0e385c629e01a9cbb86f218ba87d1b Mon Sep 17 00:00:00 2001 From: Alexander Pankratov Date: Thu, 25 Jul 2024 23:21:49 +0200 Subject: [PATCH 172/270] Update madelineProto --- composer.lock | 44 ++++++++++++++++++++++++++------------------ 1 file changed, 26 insertions(+), 18 deletions(-) diff --git a/composer.lock b/composer.lock index 6f2082a..5b9d954 100644 --- a/composer.lock +++ b/composer.lock @@ -2646,12 +2646,12 @@ "source": { "type": "git", "url": "https://github.com/danog/MadelineProto.git", - "reference": "0f6247971e31d16ff1172723787deb96a3364f40" + "reference": "7d32a610c1abdc837c18a87a391af5e1d701e01d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/danog/MadelineProto/zipball/0f6247971e31d16ff1172723787deb96a3364f40", - "reference": "0f6247971e31d16ff1172723787deb96a3364f40", + "url": "https://api.github.com/repos/danog/MadelineProto/zipball/7d32a610c1abdc837c18a87a391af5e1d701e01d", + "reference": "7d32a610c1abdc837c18a87a391af5e1d701e01d", "shasum": "" }, "require": { @@ -2766,7 +2766,7 @@ "type": "github" } ], - "time": "2024-07-15T11:29:33+00:00" + "time": "2024-07-25T21:20:34+00:00" }, { "name": "danog/primemodule", @@ -4629,30 +4629,38 @@ }, { "name": "composer/pcre", - "version": "3.1.4", + "version": "3.2.0", "source": { "type": "git", "url": "https://github.com/composer/pcre.git", - "reference": "04229f163664973f68f38f6f73d917799168ef24" + "reference": "ea4ab6f9580a4fd221e0418f2c357cdd39102a90" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/pcre/zipball/04229f163664973f68f38f6f73d917799168ef24", - "reference": "04229f163664973f68f38f6f73d917799168ef24", + "url": "https://api.github.com/repos/composer/pcre/zipball/ea4ab6f9580a4fd221e0418f2c357cdd39102a90", + "reference": "ea4ab6f9580a4fd221e0418f2c357cdd39102a90", "shasum": "" }, "require": { "php": "^7.4 || ^8.0" }, + "conflict": { + "phpstan/phpstan": "<1.11.8" + }, "require-dev": { - "phpstan/phpstan": "^1.3", + "phpstan/phpstan": "^1.11.8", "phpstan/phpstan-strict-rules": "^1.1", - "symfony/phpunit-bridge": "^5" + "phpunit/phpunit": "^8 || ^9" }, "type": "library", "extra": { "branch-alias": { "dev-main": "3.x-dev" + }, + "phpstan": { + "includes": [ + "extension.neon" + ] } }, "autoload": { @@ -4680,7 +4688,7 @@ ], "support": { "issues": "https://github.com/composer/pcre/issues", - "source": "https://github.com/composer/pcre/tree/3.1.4" + "source": "https://github.com/composer/pcre/tree/3.2.0" }, "funding": [ { @@ -4696,7 +4704,7 @@ "type": "tidelift" } ], - "time": "2024-05-27T13:40:54+00:00" + "time": "2024-07-25T09:36:02+00:00" }, { "name": "composer/semver", @@ -4955,16 +4963,16 @@ }, { "name": "friendsofphp/php-cs-fixer", - "version": "v3.59.3", + "version": "v3.60.0", "source": { "type": "git", "url": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer.git", - "reference": "30ba9ecc2b0e5205e578fe29973c15653d9bfd29" + "reference": "e595e4e070d17c5d42ed8c4206f630fcc5f401a4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/PHP-CS-Fixer/PHP-CS-Fixer/zipball/30ba9ecc2b0e5205e578fe29973c15653d9bfd29", - "reference": "30ba9ecc2b0e5205e578fe29973c15653d9bfd29", + "url": "https://api.github.com/repos/PHP-CS-Fixer/PHP-CS-Fixer/zipball/e595e4e070d17c5d42ed8c4206f630fcc5f401a4", + "reference": "e595e4e070d17c5d42ed8c4206f630fcc5f401a4", "shasum": "" }, "require": { @@ -5046,7 +5054,7 @@ ], "support": { "issues": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/issues", - "source": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/tree/v3.59.3" + "source": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/tree/v3.60.0" }, "funding": [ { @@ -5054,7 +5062,7 @@ "type": "github" } ], - "time": "2024-06-16T14:17:03+00:00" + "time": "2024-07-25T09:26:51+00:00" }, { "name": "psr/container", From 8ef0e81190a145608754213dd84a67e8a76c52bf Mon Sep 17 00:00:00 2001 From: Alexander Pankratov Date: Sun, 11 Aug 2024 19:29:36 +0200 Subject: [PATCH 173/270] Update madelineProto to TL 185 --- composer.lock | 155 +++++++++++++++++++++++++------------------------- 1 file changed, 78 insertions(+), 77 deletions(-) diff --git a/composer.lock b/composer.lock index 5b9d954..f351b3c 100644 --- a/composer.lock +++ b/composer.lock @@ -1481,16 +1481,16 @@ }, { "name": "amphp/redis", - "version": "v2.0.0", + "version": "v2.0.1", "source": { "type": "git", "url": "https://github.com/amphp/redis.git", - "reference": "5c14a57549140f053bef42ee1388b713fb200b36" + "reference": "679350556def8f8b412a15a4b82651c4a5caa597" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/amphp/redis/zipball/5c14a57549140f053bef42ee1388b713fb200b36", - "reference": "5c14a57549140f053bef42ee1388b713fb200b36", + "url": "https://api.github.com/repos/amphp/redis/zipball/679350556def8f8b412a15a4b82651c4a5caa597", + "reference": "679350556def8f8b412a15a4b82651c4a5caa597", "shasum": "" }, "require": { @@ -1512,7 +1512,7 @@ "amphp/phpunit-util": "^3", "amphp/process": "^2", "phpunit/phpunit": "^9", - "psalm/phar": "^5.4" + "psalm/phar": "5.22" }, "type": "library", "autoload": { @@ -1550,7 +1550,7 @@ ], "support": { "issues": "https://github.com/amphp/redis/issues", - "source": "https://github.com/amphp/redis/tree/v2.0.0" + "source": "https://github.com/amphp/redis/tree/v2.0.1" }, "funding": [ { @@ -1558,7 +1558,7 @@ "type": "github" } ], - "time": "2023-08-20T16:35:39+00:00" + "time": "2024-08-03T18:48:06+00:00" }, { "name": "amphp/serialization", @@ -1814,16 +1814,16 @@ }, { "name": "amphp/sync", - "version": "v2.2.0", + "version": "v2.3.0", "source": { "type": "git", "url": "https://github.com/amphp/sync.git", - "reference": "375ef5b54a0d12c38e12728dde05a55e30f2fbec" + "reference": "217097b785130d77cfcc58ff583cf26cd1770bf1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/amphp/sync/zipball/375ef5b54a0d12c38e12728dde05a55e30f2fbec", - "reference": "375ef5b54a0d12c38e12728dde05a55e30f2fbec", + "url": "https://api.github.com/repos/amphp/sync/zipball/217097b785130d77cfcc58ff583cf26cd1770bf1", + "reference": "217097b785130d77cfcc58ff583cf26cd1770bf1", "shasum": "" }, "require": { @@ -1877,7 +1877,7 @@ ], "support": { "issues": "https://github.com/amphp/sync/issues", - "source": "https://github.com/amphp/sync/tree/v2.2.0" + "source": "https://github.com/amphp/sync/tree/v2.3.0" }, "funding": [ { @@ -1885,7 +1885,7 @@ "type": "github" } ], - "time": "2024-03-12T01:00:01+00:00" + "time": "2024-08-03T19:31:26+00:00" }, { "name": "amphp/websocket", @@ -2646,12 +2646,12 @@ "source": { "type": "git", "url": "https://github.com/danog/MadelineProto.git", - "reference": "7d32a610c1abdc837c18a87a391af5e1d701e01d" + "reference": "d07a17a4430dc71b2d413eedd41c799912d82554" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/danog/MadelineProto/zipball/7d32a610c1abdc837c18a87a391af5e1d701e01d", - "reference": "7d32a610c1abdc837c18a87a391af5e1d701e01d", + "url": "https://api.github.com/repos/danog/MadelineProto/zipball/d07a17a4430dc71b2d413eedd41c799912d82554", + "reference": "d07a17a4430dc71b2d413eedd41c799912d82554", "shasum": "" }, "require": { @@ -2766,7 +2766,7 @@ "type": "github" } ], - "time": "2024-07-25T21:20:34+00:00" + "time": "2024-08-11T17:21:30+00:00" }, { "name": "danog/primemodule", @@ -2994,23 +2994,23 @@ }, { "name": "dasprid/enum", - "version": "1.0.5", + "version": "1.0.6", "source": { "type": "git", "url": "https://github.com/DASPRiD/Enum.git", - "reference": "6faf451159fb8ba4126b925ed2d78acfce0dc016" + "reference": "8dfd07c6d2cf31c8da90c53b83c026c7696dda90" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/DASPRiD/Enum/zipball/6faf451159fb8ba4126b925ed2d78acfce0dc016", - "reference": "6faf451159fb8ba4126b925ed2d78acfce0dc016", + "url": "https://api.github.com/repos/DASPRiD/Enum/zipball/8dfd07c6d2cf31c8da90c53b83c026c7696dda90", + "reference": "8dfd07c6d2cf31c8da90c53b83c026c7696dda90", "shasum": "" }, "require": { "php": ">=7.1 <9.0" }, "require-dev": { - "phpunit/phpunit": "^7 | ^8 | ^9", + "phpunit/phpunit": "^7 || ^8 || ^9 || ^10 || ^11", "squizlabs/php_codesniffer": "*" }, "type": "library", @@ -3038,9 +3038,9 @@ ], "support": { "issues": "https://github.com/DASPRiD/Enum/issues", - "source": "https://github.com/DASPRiD/Enum/tree/1.0.5" + "source": "https://github.com/DASPRiD/Enum/tree/1.0.6" }, - "time": "2023-08-25T16:18:39+00:00" + "time": "2024-08-09T14:30:48+00:00" }, { "name": "daverandom/libdns", @@ -3803,16 +3803,16 @@ }, { "name": "phpseclib/phpseclib", - "version": "3.0.39", + "version": "3.0.40", "source": { "type": "git", "url": "https://github.com/phpseclib/phpseclib.git", - "reference": "211ebc399c6e73c225a018435fe5ae209d1d1485" + "reference": "3dd2561d14ed48c03fc30322df1ad46dbac85ea6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpseclib/phpseclib/zipball/211ebc399c6e73c225a018435fe5ae209d1d1485", - "reference": "211ebc399c6e73c225a018435fe5ae209d1d1485", + "url": "https://api.github.com/repos/phpseclib/phpseclib/zipball/3dd2561d14ed48c03fc30322df1ad46dbac85ea6", + "reference": "3dd2561d14ed48c03fc30322df1ad46dbac85ea6", "shasum": "" }, "require": { @@ -3893,7 +3893,7 @@ ], "support": { "issues": "https://github.com/phpseclib/phpseclib/issues", - "source": "https://github.com/phpseclib/phpseclib/tree/3.0.39" + "source": "https://github.com/phpseclib/phpseclib/tree/3.0.40" }, "funding": [ { @@ -3909,20 +3909,20 @@ "type": "tidelift" } ], - "time": "2024-06-24T06:27:33+00:00" + "time": "2024-08-11T16:34:00+00:00" }, { "name": "promphp/prometheus_client_php", - "version": "v2.10.0", + "version": "v2.11.0", "source": { "type": "git", "url": "https://github.com/PromPHP/prometheus_client_php.git", - "reference": "a09ea80ec1ec26dd1d4853e9af2a811e898dbfeb" + "reference": "35d5a68628ea18209938bc1b8796646015ab93cf" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/PromPHP/prometheus_client_php/zipball/a09ea80ec1ec26dd1d4853e9af2a811e898dbfeb", - "reference": "a09ea80ec1ec26dd1d4853e9af2a811e898dbfeb", + "url": "https://api.github.com/repos/PromPHP/prometheus_client_php/zipball/35d5a68628ea18209938bc1b8796646015ab93cf", + "reference": "35d5a68628ea18209938bc1b8796646015ab93cf", "shasum": "" }, "require": { @@ -3946,6 +3946,7 @@ }, "suggest": { "ext-apc": "Required if using APCu.", + "ext-pdo": "Required if using PDO.", "ext-redis": "Required if using Redis.", "promphp/prometheus_push_gateway_php": "An easy client for using Prometheus PushGateway.", "symfony/polyfill-apcu": "Required if you use APCu on PHP8.0+" @@ -3974,9 +3975,9 @@ "description": "Prometheus instrumentation library for PHP applications.", "support": { "issues": "https://github.com/PromPHP/prometheus_client_php/issues", - "source": "https://github.com/PromPHP/prometheus_client_php/tree/v2.10.0" + "source": "https://github.com/PromPHP/prometheus_client_php/tree/v2.11.0" }, - "time": "2024-02-01T13:28:34+00:00" + "time": "2024-08-05T07:58:08+00:00" }, { "name": "psr/http-factory", @@ -4963,16 +4964,16 @@ }, { "name": "friendsofphp/php-cs-fixer", - "version": "v3.60.0", + "version": "v3.62.0", "source": { "type": "git", "url": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer.git", - "reference": "e595e4e070d17c5d42ed8c4206f630fcc5f401a4" + "reference": "627692f794d35c43483f34b01d94740df2a73507" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/PHP-CS-Fixer/PHP-CS-Fixer/zipball/e595e4e070d17c5d42ed8c4206f630fcc5f401a4", - "reference": "e595e4e070d17c5d42ed8c4206f630fcc5f401a4", + "url": "https://api.github.com/repos/PHP-CS-Fixer/PHP-CS-Fixer/zipball/627692f794d35c43483f34b01d94740df2a73507", + "reference": "627692f794d35c43483f34b01d94740df2a73507", "shasum": "" }, "require": { @@ -5054,7 +5055,7 @@ ], "support": { "issues": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/issues", - "source": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/tree/v3.60.0" + "source": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/tree/v3.62.0" }, "funding": [ { @@ -5062,7 +5063,7 @@ "type": "github" } ], - "time": "2024-07-25T09:26:51+00:00" + "time": "2024-08-07T17:03:09+00:00" }, { "name": "psr/container", @@ -5541,31 +5542,31 @@ }, { "name": "react/socket", - "version": "v1.15.0", + "version": "v1.16.0", "source": { "type": "git", "url": "https://github.com/reactphp/socket.git", - "reference": "216d3aec0b87f04a40ca04f481e6af01bdd1d038" + "reference": "23e4ff33ea3e160d2d1f59a0e6050e4b0fb0eac1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/reactphp/socket/zipball/216d3aec0b87f04a40ca04f481e6af01bdd1d038", - "reference": "216d3aec0b87f04a40ca04f481e6af01bdd1d038", + "url": "https://api.github.com/repos/reactphp/socket/zipball/23e4ff33ea3e160d2d1f59a0e6050e4b0fb0eac1", + "reference": "23e4ff33ea3e160d2d1f59a0e6050e4b0fb0eac1", "shasum": "" }, "require": { "evenement/evenement": "^3.0 || ^2.0 || ^1.0", "php": ">=5.3.0", - "react/dns": "^1.11", + "react/dns": "^1.13", "react/event-loop": "^1.2", - "react/promise": "^3 || ^2.6 || ^1.2.1", - "react/stream": "^1.2" + "react/promise": "^3.2 || ^2.6 || ^1.2.1", + "react/stream": "^1.4" }, "require-dev": { "phpunit/phpunit": "^9.6 || ^5.7 || ^4.8.36", - "react/async": "^4 || ^3 || ^2", + "react/async": "^4.3 || ^3.3 || ^2", "react/promise-stream": "^1.4", - "react/promise-timer": "^1.10" + "react/promise-timer": "^1.11" }, "type": "library", "autoload": { @@ -5609,7 +5610,7 @@ ], "support": { "issues": "https://github.com/reactphp/socket/issues", - "source": "https://github.com/reactphp/socket/tree/v1.15.0" + "source": "https://github.com/reactphp/socket/tree/v1.16.0" }, "funding": [ { @@ -5617,7 +5618,7 @@ "type": "open_collective" } ], - "time": "2023-12-15T11:02:10+00:00" + "time": "2024-07-26T10:38:09+00:00" }, { "name": "react/stream", @@ -5766,16 +5767,16 @@ }, { "name": "symfony/console", - "version": "v7.1.2", + "version": "v7.1.3", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "0aa29ca177f432ab68533432db0de059f39c92ae" + "reference": "cb1dcb30ebc7005c29864ee78adb47b5fb7c3cd9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/0aa29ca177f432ab68533432db0de059f39c92ae", - "reference": "0aa29ca177f432ab68533432db0de059f39c92ae", + "url": "https://api.github.com/repos/symfony/console/zipball/cb1dcb30ebc7005c29864ee78adb47b5fb7c3cd9", + "reference": "cb1dcb30ebc7005c29864ee78adb47b5fb7c3cd9", "shasum": "" }, "require": { @@ -5839,7 +5840,7 @@ "terminal" ], "support": { - "source": "https://github.com/symfony/console/tree/v7.1.2" + "source": "https://github.com/symfony/console/tree/v7.1.3" }, "funding": [ { @@ -5855,7 +5856,7 @@ "type": "tidelift" } ], - "time": "2024-06-28T10:03:55+00:00" + "time": "2024-07-26T12:41:01+00:00" }, { "name": "symfony/deprecation-contracts", @@ -6148,16 +6149,16 @@ }, { "name": "symfony/finder", - "version": "v7.1.1", + "version": "v7.1.3", "source": { "type": "git", "url": "https://github.com/symfony/finder.git", - "reference": "fbb0ba67688b780efbc886c1a0a0948dcf7205d6" + "reference": "717c6329886f32dc65e27461f80f2a465412fdca" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/finder/zipball/fbb0ba67688b780efbc886c1a0a0948dcf7205d6", - "reference": "fbb0ba67688b780efbc886c1a0a0948dcf7205d6", + "url": "https://api.github.com/repos/symfony/finder/zipball/717c6329886f32dc65e27461f80f2a465412fdca", + "reference": "717c6329886f32dc65e27461f80f2a465412fdca", "shasum": "" }, "require": { @@ -6192,7 +6193,7 @@ "description": "Finds files and directories via an intuitive fluent interface", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/finder/tree/v7.1.1" + "source": "https://github.com/symfony/finder/tree/v7.1.3" }, "funding": [ { @@ -6208,7 +6209,7 @@ "type": "tidelift" } ], - "time": "2024-05-31T14:57:53+00:00" + "time": "2024-07-24T07:08:44+00:00" }, { "name": "symfony/options-resolver", @@ -6594,16 +6595,16 @@ }, { "name": "symfony/process", - "version": "v7.1.1", + "version": "v7.1.3", "source": { "type": "git", "url": "https://github.com/symfony/process.git", - "reference": "febf90124323a093c7ee06fdb30e765ca3c20028" + "reference": "7f2f542c668ad6c313dc4a5e9c3321f733197eca" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/febf90124323a093c7ee06fdb30e765ca3c20028", - "reference": "febf90124323a093c7ee06fdb30e765ca3c20028", + "url": "https://api.github.com/repos/symfony/process/zipball/7f2f542c668ad6c313dc4a5e9c3321f733197eca", + "reference": "7f2f542c668ad6c313dc4a5e9c3321f733197eca", "shasum": "" }, "require": { @@ -6635,7 +6636,7 @@ "description": "Executes commands in sub-processes", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/process/tree/v7.1.1" + "source": "https://github.com/symfony/process/tree/v7.1.3" }, "funding": [ { @@ -6651,7 +6652,7 @@ "type": "tidelift" } ], - "time": "2024-05-31T14:57:53+00:00" + "time": "2024-07-26T12:44:47+00:00" }, { "name": "symfony/service-contracts", @@ -6800,16 +6801,16 @@ }, { "name": "symfony/string", - "version": "v7.1.2", + "version": "v7.1.3", "source": { "type": "git", "url": "https://github.com/symfony/string.git", - "reference": "14221089ac66cf82e3cf3d1c1da65de305587ff8" + "reference": "ea272a882be7f20cad58d5d78c215001617b7f07" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/string/zipball/14221089ac66cf82e3cf3d1c1da65de305587ff8", - "reference": "14221089ac66cf82e3cf3d1c1da65de305587ff8", + "url": "https://api.github.com/repos/symfony/string/zipball/ea272a882be7f20cad58d5d78c215001617b7f07", + "reference": "ea272a882be7f20cad58d5d78c215001617b7f07", "shasum": "" }, "require": { @@ -6867,7 +6868,7 @@ "utf8" ], "support": { - "source": "https://github.com/symfony/string/tree/v7.1.2" + "source": "https://github.com/symfony/string/tree/v7.1.3" }, "funding": [ { @@ -6883,7 +6884,7 @@ "type": "tidelift" } ], - "time": "2024-06-28T09:27:18+00:00" + "time": "2024-07-22T10:25:37+00:00" } ], "aliases": [], From 3bcc8150c0b4d066baa57dc5838b7358172906f9 Mon Sep 17 00:00:00 2001 From: Alexander Pankratov <34161928+xtrime-ru@users.noreply.github.com> Date: Fri, 16 Aug 2024 13:05:41 +0200 Subject: [PATCH 174/270] Fix method names in readme --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 9b8fb17..7b73a51 100644 --- a/README.md +++ b/README.md @@ -105,10 +105,10 @@ It's recommended to use http_build_query, when using GET requests. * get_info about channel/user: `http://127.0.0.1:9503/api/getInfo/?id=@xtrime` * get_info about currect account: `http://127.0.0.1:9503/api/getSelf` * repost: `http://127.0.0.1:9503/api/messages.forwardMessages/?data[from_peer]=@xtrime&data[to_peer]=@xtrime&data[id]=1234` -* get messages from channel/user: `http://127.0.0.1:9503/api/getHistory/?data[peer]=@breakingmash&data[limit]=10` +* get messages from channel/user: `http://127.0.0.1:9503/api/messages.getHistory/?data[peer]=@breakingmash&data[limit]=10` * get messages with text in HTML: `http://127.0.0.1:9503/api/getHistoryHtml/?data[peer]=@breakingmash&data[limit]=10` * search: `http://127.0.0.1:9503/api/searchGlobal/?data[q]=Hello%20World&data[limit]=10` -* sendMessage: `http://127.0.0.1:9503/api/sendMessage/?data[peer]=@xtrime&data[message]=Hello!` +* sendMessage: `http://127.0.0.1:9503/api/messages.sendMessage/?data[peer]=@xtrime&data[message]=Hello!` * copy message from one channel to another (not repost): `http://127.0.0.1:9503/api/copyMessages/?data[from_peer]=@xtrime&data[to_peer]=@xtrime&data[id][0]=1` ## Advanced features @@ -129,7 +129,7 @@ Example uses urlencoded url in query. There are few options to upload and send media files: - Custom method `sendMedia` supports upload from form: ```shell script - curl "http://127.0.0.1:9503/api/sendMedia?data[peer]=xtrime&data[message]=Hello" -g \ + curl "http://127.0.0.1:9503/api/messages.sendMedia?data[peer]=xtrime&data[message]=Hello" -g \ -F "file=@/Users/xtrime/Downloads/test.txt" ``` - use custom `uploadMediaForm` method and then pass result to `messages.sendMedia`: From 0e3dd47819908a043995aaa6f718289ef472b101 Mon Sep 17 00:00:00 2001 From: Alexander Pankratov Date: Sat, 17 Aug 2024 15:36:50 +0200 Subject: [PATCH 175/270] Fix: prometheus config --- .env.docker.example | 1 + .env.example | 1 + config.php | 4 ++-- docker-compose.base.yml | 2 +- 4 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.env.docker.example b/.env.docker.example index 7c7c81b..31e67c6 100644 --- a/.env.docker.example +++ b/.env.docker.example @@ -69,6 +69,7 @@ DB_ENABLE_MIN_DATABASE=0 # Enable file metadata cache DB_ENABLE_FILE_REFERENCE_DATABASE=0 +PROMETHEUS_ENABLE=false PROMETHEUS_BIND_TO=0.0.0.0:12345 ERROR_NOTIFICATION_BOT_TOKEN= diff --git a/.env.example b/.env.example index 836312e..bb21a3a 100644 --- a/.env.example +++ b/.env.example @@ -67,6 +67,7 @@ DB_ENABLE_MIN_DATABASE=0 # Enable file metadata cache DB_ENABLE_FILE_REFERENCE_DATABASE=0 +PROMETHEUS_ENABLE=0 PROMETHEUS_BIND_TO=0.0.0.0:12345 ERROR_NOTIFICATION_BOT_TOKEN= diff --git a/config.php b/config.php index 1ed69e6..bf9b416 100644 --- a/config.php +++ b/config.php @@ -75,8 +75,8 @@ static function (string $peer): string|int { 'download_parallel_chunks' => 20, ], 'metrics' => [ - 'enable_prometheus_collection' => true, //(bool)getenv("PROMETHEUS_BIND_TO"), - 'metrics_bind_to' => fromString("0.0.0.0:12345") + 'enable_prometheus_collection' => (bool)getenv("PROMETHEUS_ENABLE"), + 'metrics_bind_to' => fromString((string)getenv("PROMETHEUS_BIND_TO")), ] ], 'api' => [ diff --git a/docker-compose.base.yml b/docker-compose.base.yml index 6de8e6d..bf68a13 100644 --- a/docker-compose.base.yml +++ b/docker-compose.base.yml @@ -24,7 +24,7 @@ services: timeout: 30s retries: 1 base-mysql: - image: mariadb:11.1 + image: mariadb:11.4 restart: unless-stopped volumes: - ./.mysql:/var/lib/mysql From ce6f8a0a04cd9f36b64aa0a72b545104ef47d8e8 Mon Sep 17 00:00:00 2001 From: Alexander Pankratov Date: Sun, 18 Aug 2024 17:30:03 +0200 Subject: [PATCH 176/270] Feat: upgrade madelineProto --- composer.json | 2 +- composer.lock | 66 +++++++++++++++++++++++++------------------------- src/Client.php | 7 ++---- 3 files changed, 36 insertions(+), 39 deletions(-) diff --git a/composer.json b/composer.json index d6a3b53..243206a 100644 --- a/composer.json +++ b/composer.json @@ -35,7 +35,7 @@ "amphp/websocket-server": "^3.0.1", "amphp/websocket-client": "^v2", "vlucas/phpdotenv": "^4.3", - "danog/madelineproto": "dev-v8_fix_cleanup", + "danog/madelineproto": "dev-v8-tas", "amphp/dns": "2.x-dev" }, "require-dev": { diff --git a/composer.lock b/composer.lock index f351b3c..580a88c 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "dc5798d52e4ed25349fd1c90bf88660d", + "content-hash": "c4f466ac2e8d88035f620e533f7fac12", "packages": [ { "name": "amphp/amp", @@ -330,16 +330,16 @@ }, { "name": "amphp/file", - "version": "v3.1.0", + "version": "v3.1.1", "source": { "type": "git", "url": "https://github.com/amphp/file.git", - "reference": "1d51235bd8cb4973c7908e645b62c638d8c081fe" + "reference": "58c8efefb8808d25456ef3ef4a628645442578a2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/amphp/file/zipball/1d51235bd8cb4973c7908e645b62c638d8c081fe", - "reference": "1d51235bd8cb4973c7908e645b62c638d8c081fe", + "url": "https://api.github.com/repos/amphp/file/zipball/58c8efefb8808d25456ef3ef4a628645442578a2", + "reference": "58c8efefb8808d25456ef3ef4a628645442578a2", "shasum": "" }, "require": { @@ -403,7 +403,7 @@ ], "support": { "issues": "https://github.com/amphp/file/issues", - "source": "https://github.com/amphp/file/tree/v3.1.0" + "source": "https://github.com/amphp/file/tree/v3.1.1" }, "funding": [ { @@ -411,7 +411,7 @@ "type": "github" } ], - "time": "2024-04-21T14:53:24+00:00" + "time": "2024-08-15T15:04:06+00:00" }, { "name": "amphp/hpack", @@ -2642,23 +2642,23 @@ }, { "name": "danog/madelineproto", - "version": "dev-v8_fix_cleanup", + "version": "dev-v8-tas", "source": { "type": "git", "url": "https://github.com/danog/MadelineProto.git", - "reference": "d07a17a4430dc71b2d413eedd41c799912d82554" + "reference": "c0615445857ce41a56ac153b7eb97119796b93bf" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/danog/MadelineProto/zipball/d07a17a4430dc71b2d413eedd41c799912d82554", - "reference": "d07a17a4430dc71b2d413eedd41c799912d82554", + "url": "https://api.github.com/repos/danog/MadelineProto/zipball/c0615445857ce41a56ac153b7eb97119796b93bf", + "reference": "c0615445857ce41a56ac153b7eb97119796b93bf", "shasum": "" }, "require": { "amphp/amp": "^3.0.2", "amphp/byte-stream": "^2.1.1", - "amphp/dns": "^2.1.2", - "amphp/file": "^3.1.0", + "amphp/dns": "^2.2.0", + "amphp/file": "^3.1.1", "amphp/http": "^2.1.1", "amphp/http-client": "^5.1.0", "amphp/http-client-cookies": "^2", @@ -2666,7 +2666,7 @@ "amphp/log": "^2", "amphp/mysql": "^3", "amphp/postgres": "^2", - "amphp/redis": "^2", + "amphp/redis": "^2.0.1", "amphp/socket": "^2.3.1", "amphp/websocket-client": "^2", "bacon/bacon-qr-code": "^3", @@ -2677,7 +2677,7 @@ "danog/loop": "^1.1.1", "danog/primemodule": "^1.0.13", "danog/telegram-entities": "^1.0.4", - "danog/tg-dialog-id": "^1.0.1", + "danog/tg-dialog-id": "^1.1.0", "danog/tg-file-decoder": "^1.0.1", "ext-dom": "*", "ext-fileinfo": "*", @@ -2687,9 +2687,9 @@ "ext-xml": "*", "ext-zlib": "*", "league/uri": "^7.4.1", - "nikic/php-parser": "^5.0.2", + "nikic/php-parser": "^5.1.0", "php-64bit": ">=8.2", - "phpseclib/phpseclib": "^3.0.37", + "phpseclib/phpseclib": "^3.0.41", "psr/http-factory": "^1.1.0", "psr/log": "^3", "revolt/event-loop": "^1.0.6", @@ -2707,9 +2707,9 @@ "danog/phpdoc": "^0.1.24", "dg/bypass-finals": "dev-master", "ext-ctype": "*", - "phpunit/phpunit": "^9.6.19", + "phpunit/phpunit": "^9.6.20", "revolt/event-loop-adapter-react": "^1.1.1", - "symfony/yaml": "^6.4.7", + "symfony/yaml": "^6.4.8", "vimeo/psalm": "dev-master" }, "suggest": { @@ -2758,7 +2758,7 @@ ], "support": { "issues": "https://github.com/danog/MadelineProto/issues", - "source": "https://github.com/danog/MadelineProto/tree/v8_fix_cleanup" + "source": "https://github.com/danog/MadelineProto/tree/v8-tas" }, "funding": [ { @@ -2766,7 +2766,7 @@ "type": "github" } ], - "time": "2024-08-11T17:21:30+00:00" + "time": "2024-08-18T15:25:17+00:00" }, { "name": "danog/primemodule", @@ -2878,16 +2878,16 @@ }, { "name": "danog/tg-dialog-id", - "version": "1.0.1", + "version": "1.1.0", "source": { "type": "git", "url": "https://github.com/danog/tg-dialog-id.git", - "reference": "1bc37a5e599347d3b3c5f078d231b4edc161ae80" + "reference": "6118fe5ad17b068237a43262d459664869affcc0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/danog/tg-dialog-id/zipball/1bc37a5e599347d3b3c5f078d231b4edc161ae80", - "reference": "1bc37a5e599347d3b3c5f078d231b4edc161ae80", + "url": "https://api.github.com/repos/danog/tg-dialog-id/zipball/6118fe5ad17b068237a43262d459664869affcc0", + "reference": "6118fe5ad17b068237a43262d459664869affcc0", "shasum": "" }, "require": { @@ -2920,7 +2920,7 @@ "description": "A library to work with Telegram bot API dialog IDs", "support": { "issues": "https://github.com/danog/tg-dialog-id/issues", - "source": "https://github.com/danog/tg-dialog-id/tree/1.0.1" + "source": "https://github.com/danog/tg-dialog-id/tree/1.1.0" }, "funding": [ { @@ -2928,7 +2928,7 @@ "type": "github" } ], - "time": "2024-05-10T12:25:19+00:00" + "time": "2024-08-16T12:08:16+00:00" }, { "name": "danog/tg-file-decoder", @@ -3803,16 +3803,16 @@ }, { "name": "phpseclib/phpseclib", - "version": "3.0.40", + "version": "3.0.41", "source": { "type": "git", "url": "https://github.com/phpseclib/phpseclib.git", - "reference": "3dd2561d14ed48c03fc30322df1ad46dbac85ea6" + "reference": "621c73f7dcb310b61de34d1da4c4204e8ace6ceb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpseclib/phpseclib/zipball/3dd2561d14ed48c03fc30322df1ad46dbac85ea6", - "reference": "3dd2561d14ed48c03fc30322df1ad46dbac85ea6", + "url": "https://api.github.com/repos/phpseclib/phpseclib/zipball/621c73f7dcb310b61de34d1da4c4204e8ace6ceb", + "reference": "621c73f7dcb310b61de34d1da4c4204e8ace6ceb", "shasum": "" }, "require": { @@ -3893,7 +3893,7 @@ ], "support": { "issues": "https://github.com/phpseclib/phpseclib/issues", - "source": "https://github.com/phpseclib/phpseclib/tree/3.0.40" + "source": "https://github.com/phpseclib/phpseclib/tree/3.0.41" }, "funding": [ { @@ -3909,7 +3909,7 @@ "type": "tidelift" } ], - "time": "2024-08-11T16:34:00+00:00" + "time": "2024-08-12T00:13:54+00:00" }, { "name": "promphp/prometheus_client_php", diff --git a/src/Client.php b/src/Client.php index 9161e73..99d6c80 100644 --- a/src/Client.php +++ b/src/Client.php @@ -17,6 +17,7 @@ use ReflectionProperty; use Revolt\EventLoop; use RuntimeException; +use TelegramApiServer\EventObservers\EventHandler; use TelegramApiServer\EventObservers\EventObserver; final class Client @@ -148,11 +149,7 @@ private function startNotLoggedInSessions(): void public function startLoggedInSession(string $sessionName): void { if ($this->instances[$sessionName]->getAuthorization() === API::LOGGED_IN) { - if ( - $this->instances[$sessionName]->getEventHandler() instanceof \__PHP_Incomplete_Class - ) { - $this->instances[$sessionName]->unsetEventHandler(); - } + EventHandler::cachePlugins(EventHandler::class); $this->instances[$sessionName]->start(); $this->instances[$sessionName]->echo("Started session: {$sessionName}\n"); } From 6f56a74889be72315ca13179fcc9a1827f2e2779 Mon Sep 17 00:00:00 2001 From: Alexander Pankratov Date: Fri, 27 Sep 2024 20:51:55 +0200 Subject: [PATCH 177/270] Feat: upgrade madelineProto --- composer.lock | 256 +++++++++++++++++++++++++------------------------- 1 file changed, 128 insertions(+), 128 deletions(-) diff --git a/composer.lock b/composer.lock index 580a88c..ff0cbf5 100644 --- a/composer.lock +++ b/composer.lock @@ -2247,16 +2247,16 @@ }, { "name": "danog/async-orm", - "version": "1.0.2", + "version": "1.1.0", "source": { "type": "git", "url": "https://github.com/danog/AsyncOrm.git", - "reference": "8c1ea3e04ebdb3030ce0771ad3c1d922127a8e53" + "reference": "1a5129adeab04a4949b74289b4acfbc8a773bdc0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/danog/AsyncOrm/zipball/8c1ea3e04ebdb3030ce0771ad3c1d922127a8e53", - "reference": "8c1ea3e04ebdb3030ce0771ad3c1d922127a8e53", + "url": "https://api.github.com/repos/danog/AsyncOrm/zipball/1a5129adeab04a4949b74289b4acfbc8a773bdc0", + "reference": "1a5129adeab04a4949b74289b4acfbc8a773bdc0", "shasum": "" }, "require": { @@ -2299,7 +2299,7 @@ "description": "Async ORM based on AMPHP v3 and fibers.", "support": { "issues": "https://github.com/danog/AsyncOrm/issues", - "source": "https://github.com/danog/AsyncOrm/tree/1.0.2" + "source": "https://github.com/danog/AsyncOrm/tree/1.1.0" }, "funding": [ { @@ -2307,7 +2307,7 @@ "type": "github" } ], - "time": "2024-04-07T18:25:49+00:00" + "time": "2024-09-24T16:49:13+00:00" }, { "name": "danog/better-prometheus", @@ -2646,12 +2646,12 @@ "source": { "type": "git", "url": "https://github.com/danog/MadelineProto.git", - "reference": "c0615445857ce41a56ac153b7eb97119796b93bf" + "reference": "5939f0dcd3133fc4ec00f4e3f4a4bbbddbfd243e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/danog/MadelineProto/zipball/c0615445857ce41a56ac153b7eb97119796b93bf", - "reference": "c0615445857ce41a56ac153b7eb97119796b93bf", + "url": "https://api.github.com/repos/danog/MadelineProto/zipball/5939f0dcd3133fc4ec00f4e3f4a4bbbddbfd243e", + "reference": "5939f0dcd3133fc4ec00f4e3f4a4bbbddbfd243e", "shasum": "" }, "require": { @@ -2766,7 +2766,7 @@ "type": "github" } ], - "time": "2024-08-18T15:25:17+00:00" + "time": "2024-09-27T18:50:22+00:00" }, { "name": "danog/primemodule", @@ -3553,16 +3553,16 @@ }, { "name": "nikic/php-parser", - "version": "v5.1.0", + "version": "v5.2.0", "source": { "type": "git", "url": "https://github.com/nikic/PHP-Parser.git", - "reference": "683130c2ff8c2739f4822ff7ac5c873ec529abd1" + "reference": "23c79fbbfb725fb92af9bcf41065c8e9a0d49ddb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/683130c2ff8c2739f4822ff7ac5c873ec529abd1", - "reference": "683130c2ff8c2739f4822ff7ac5c873ec529abd1", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/23c79fbbfb725fb92af9bcf41065c8e9a0d49ddb", + "reference": "23c79fbbfb725fb92af9bcf41065c8e9a0d49ddb", "shasum": "" }, "require": { @@ -3605,9 +3605,9 @@ ], "support": { "issues": "https://github.com/nikic/PHP-Parser/issues", - "source": "https://github.com/nikic/PHP-Parser/tree/v5.1.0" + "source": "https://github.com/nikic/PHP-Parser/tree/v5.2.0" }, - "time": "2024-07-01T20:03:41+00:00" + "time": "2024-09-15T16:40:33+00:00" }, { "name": "paragonie/constant_time_encoding", @@ -3803,16 +3803,16 @@ }, { "name": "phpseclib/phpseclib", - "version": "3.0.41", + "version": "3.0.42", "source": { "type": "git", "url": "https://github.com/phpseclib/phpseclib.git", - "reference": "621c73f7dcb310b61de34d1da4c4204e8ace6ceb" + "reference": "db92f1b1987b12b13f248fe76c3a52cadb67bb98" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpseclib/phpseclib/zipball/621c73f7dcb310b61de34d1da4c4204e8ace6ceb", - "reference": "621c73f7dcb310b61de34d1da4c4204e8ace6ceb", + "url": "https://api.github.com/repos/phpseclib/phpseclib/zipball/db92f1b1987b12b13f248fe76c3a52cadb67bb98", + "reference": "db92f1b1987b12b13f248fe76c3a52cadb67bb98", "shasum": "" }, "require": { @@ -3893,7 +3893,7 @@ ], "support": { "issues": "https://github.com/phpseclib/phpseclib/issues", - "source": "https://github.com/phpseclib/phpseclib/tree/3.0.41" + "source": "https://github.com/phpseclib/phpseclib/tree/3.0.42" }, "funding": [ { @@ -3909,7 +3909,7 @@ "type": "tidelift" } ], - "time": "2024-08-12T00:13:54+00:00" + "time": "2024-09-16T03:06:04+00:00" }, { "name": "promphp/prometheus_client_php", @@ -4089,16 +4089,16 @@ }, { "name": "psr/log", - "version": "3.0.0", + "version": "3.0.2", "source": { "type": "git", "url": "https://github.com/php-fig/log.git", - "reference": "fe5ea303b0887d5caefd3d431c3e61ad47037001" + "reference": "f16e1d5863e37f8d8c2a01719f5b34baa2b714d3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/log/zipball/fe5ea303b0887d5caefd3d431c3e61ad47037001", - "reference": "fe5ea303b0887d5caefd3d431c3e61ad47037001", + "url": "https://api.github.com/repos/php-fig/log/zipball/f16e1d5863e37f8d8c2a01719f5b34baa2b714d3", + "reference": "f16e1d5863e37f8d8c2a01719f5b34baa2b714d3", "shasum": "" }, "require": { @@ -4133,9 +4133,9 @@ "psr-3" ], "support": { - "source": "https://github.com/php-fig/log/tree/3.0.0" + "source": "https://github.com/php-fig/log/tree/3.0.2" }, - "time": "2021-07-14T16:46:02+00:00" + "time": "2024-09-11T13:17:53+00:00" }, { "name": "revolt/event-loop", @@ -4211,20 +4211,20 @@ }, { "name": "symfony/polyfill-ctype", - "version": "v1.30.0", + "version": "v1.31.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-ctype.git", - "reference": "0424dff1c58f028c451efff2045f5d92410bd540" + "reference": "a3cc8b044a6ea513310cbd48ef7333b384945638" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/0424dff1c58f028c451efff2045f5d92410bd540", - "reference": "0424dff1c58f028c451efff2045f5d92410bd540", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/a3cc8b044a6ea513310cbd48ef7333b384945638", + "reference": "a3cc8b044a6ea513310cbd48ef7333b384945638", "shasum": "" }, "require": { - "php": ">=7.1" + "php": ">=7.2" }, "provide": { "ext-ctype": "*" @@ -4270,7 +4270,7 @@ "portable" ], "support": { - "source": "https://github.com/symfony/polyfill-ctype/tree/v1.30.0" + "source": "https://github.com/symfony/polyfill-ctype/tree/v1.31.0" }, "funding": [ { @@ -4286,24 +4286,24 @@ "type": "tidelift" } ], - "time": "2024-05-31T15:07:36+00:00" + "time": "2024-09-09T11:45:10+00:00" }, { "name": "symfony/polyfill-mbstring", - "version": "v1.30.0", + "version": "v1.31.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "fd22ab50000ef01661e2a31d850ebaa297f8e03c" + "reference": "85181ba99b2345b0ef10ce42ecac37612d9fd341" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/fd22ab50000ef01661e2a31d850ebaa297f8e03c", - "reference": "fd22ab50000ef01661e2a31d850ebaa297f8e03c", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/85181ba99b2345b0ef10ce42ecac37612d9fd341", + "reference": "85181ba99b2345b0ef10ce42ecac37612d9fd341", "shasum": "" }, "require": { - "php": ">=7.1" + "php": ">=7.2" }, "provide": { "ext-mbstring": "*" @@ -4350,7 +4350,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.30.0" + "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.31.0" }, "funding": [ { @@ -4366,7 +4366,7 @@ "type": "tidelift" } ], - "time": "2024-06-19T12:30:46+00:00" + "time": "2024-09-09T11:45:10+00:00" }, { "name": "vlucas/phpdotenv", @@ -4630,26 +4630,26 @@ }, { "name": "composer/pcre", - "version": "3.2.0", + "version": "3.3.1", "source": { "type": "git", "url": "https://github.com/composer/pcre.git", - "reference": "ea4ab6f9580a4fd221e0418f2c357cdd39102a90" + "reference": "63aaeac21d7e775ff9bc9d45021e1745c97521c4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/pcre/zipball/ea4ab6f9580a4fd221e0418f2c357cdd39102a90", - "reference": "ea4ab6f9580a4fd221e0418f2c357cdd39102a90", + "url": "https://api.github.com/repos/composer/pcre/zipball/63aaeac21d7e775ff9bc9d45021e1745c97521c4", + "reference": "63aaeac21d7e775ff9bc9d45021e1745c97521c4", "shasum": "" }, "require": { "php": "^7.4 || ^8.0" }, "conflict": { - "phpstan/phpstan": "<1.11.8" + "phpstan/phpstan": "<1.11.10" }, "require-dev": { - "phpstan/phpstan": "^1.11.8", + "phpstan/phpstan": "^1.11.10", "phpstan/phpstan-strict-rules": "^1.1", "phpunit/phpunit": "^8 || ^9" }, @@ -4689,7 +4689,7 @@ ], "support": { "issues": "https://github.com/composer/pcre/issues", - "source": "https://github.com/composer/pcre/tree/3.2.0" + "source": "https://github.com/composer/pcre/tree/3.3.1" }, "funding": [ { @@ -4705,28 +4705,28 @@ "type": "tidelift" } ], - "time": "2024-07-25T09:36:02+00:00" + "time": "2024-08-27T18:44:43+00:00" }, { "name": "composer/semver", - "version": "3.4.2", + "version": "3.4.3", "source": { "type": "git", "url": "https://github.com/composer/semver.git", - "reference": "c51258e759afdb17f1fd1fe83bc12baaef6309d6" + "reference": "4313d26ada5e0c4edfbd1dc481a92ff7bff91f12" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/semver/zipball/c51258e759afdb17f1fd1fe83bc12baaef6309d6", - "reference": "c51258e759afdb17f1fd1fe83bc12baaef6309d6", + "url": "https://api.github.com/repos/composer/semver/zipball/4313d26ada5e0c4edfbd1dc481a92ff7bff91f12", + "reference": "4313d26ada5e0c4edfbd1dc481a92ff7bff91f12", "shasum": "" }, "require": { "php": "^5.3.2 || ^7.0 || ^8.0" }, "require-dev": { - "phpstan/phpstan": "^1.4", - "symfony/phpunit-bridge": "^4.2 || ^5" + "phpstan/phpstan": "^1.11", + "symfony/phpunit-bridge": "^3 || ^7" }, "type": "library", "extra": { @@ -4770,7 +4770,7 @@ "support": { "irc": "ircs://irc.libera.chat:6697/composer", "issues": "https://github.com/composer/semver/issues", - "source": "https://github.com/composer/semver/tree/3.4.2" + "source": "https://github.com/composer/semver/tree/3.4.3" }, "funding": [ { @@ -4786,7 +4786,7 @@ "type": "tidelift" } ], - "time": "2024-07-12T11:35:52+00:00" + "time": "2024-09-19T14:15:21+00:00" }, { "name": "composer/xdebug-handler", @@ -4903,16 +4903,16 @@ }, { "name": "fidry/cpu-core-counter", - "version": "1.1.0", + "version": "1.2.0", "source": { "type": "git", "url": "https://github.com/theofidry/cpu-core-counter.git", - "reference": "f92996c4d5c1a696a6a970e20f7c4216200fcc42" + "reference": "8520451a140d3f46ac33042715115e290cf5785f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/theofidry/cpu-core-counter/zipball/f92996c4d5c1a696a6a970e20f7c4216200fcc42", - "reference": "f92996c4d5c1a696a6a970e20f7c4216200fcc42", + "url": "https://api.github.com/repos/theofidry/cpu-core-counter/zipball/8520451a140d3f46ac33042715115e290cf5785f", + "reference": "8520451a140d3f46ac33042715115e290cf5785f", "shasum": "" }, "require": { @@ -4952,7 +4952,7 @@ ], "support": { "issues": "https://github.com/theofidry/cpu-core-counter/issues", - "source": "https://github.com/theofidry/cpu-core-counter/tree/1.1.0" + "source": "https://github.com/theofidry/cpu-core-counter/tree/1.2.0" }, "funding": [ { @@ -4960,20 +4960,20 @@ "type": "github" } ], - "time": "2024-02-07T09:43:46+00:00" + "time": "2024-08-06T10:04:20+00:00" }, { "name": "friendsofphp/php-cs-fixer", - "version": "v3.62.0", + "version": "v3.64.0", "source": { "type": "git", "url": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer.git", - "reference": "627692f794d35c43483f34b01d94740df2a73507" + "reference": "58dd9c931c785a79739310aef5178928305ffa67" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/PHP-CS-Fixer/PHP-CS-Fixer/zipball/627692f794d35c43483f34b01d94740df2a73507", - "reference": "627692f794d35c43483f34b01d94740df2a73507", + "url": "https://api.github.com/repos/PHP-CS-Fixer/PHP-CS-Fixer/zipball/58dd9c931c785a79739310aef5178928305ffa67", + "reference": "58dd9c931c785a79739310aef5178928305ffa67", "shasum": "" }, "require": { @@ -5055,7 +5055,7 @@ ], "support": { "issues": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/issues", - "source": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/tree/v3.62.0" + "source": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/tree/v3.64.0" }, "funding": [ { @@ -5063,7 +5063,7 @@ "type": "github" } ], - "time": "2024-08-07T17:03:09+00:00" + "time": "2024-08-30T23:09:38+00:00" }, { "name": "psr/container", @@ -5767,16 +5767,16 @@ }, { "name": "symfony/console", - "version": "v7.1.3", + "version": "v7.1.5", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "cb1dcb30ebc7005c29864ee78adb47b5fb7c3cd9" + "reference": "0fa539d12b3ccf068a722bbbffa07ca7079af9ee" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/cb1dcb30ebc7005c29864ee78adb47b5fb7c3cd9", - "reference": "cb1dcb30ebc7005c29864ee78adb47b5fb7c3cd9", + "url": "https://api.github.com/repos/symfony/console/zipball/0fa539d12b3ccf068a722bbbffa07ca7079af9ee", + "reference": "0fa539d12b3ccf068a722bbbffa07ca7079af9ee", "shasum": "" }, "require": { @@ -5840,7 +5840,7 @@ "terminal" ], "support": { - "source": "https://github.com/symfony/console/tree/v7.1.3" + "source": "https://github.com/symfony/console/tree/v7.1.5" }, "funding": [ { @@ -5856,7 +5856,7 @@ "type": "tidelift" } ], - "time": "2024-07-26T12:41:01+00:00" + "time": "2024-09-20T08:28:38+00:00" }, { "name": "symfony/deprecation-contracts", @@ -6083,16 +6083,16 @@ }, { "name": "symfony/filesystem", - "version": "v7.1.2", + "version": "v7.1.5", "source": { "type": "git", "url": "https://github.com/symfony/filesystem.git", - "reference": "92a91985250c251de9b947a14bb2c9390b1a562c" + "reference": "61fe0566189bf32e8cfee78335d8776f64a66f5a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/filesystem/zipball/92a91985250c251de9b947a14bb2c9390b1a562c", - "reference": "92a91985250c251de9b947a14bb2c9390b1a562c", + "url": "https://api.github.com/repos/symfony/filesystem/zipball/61fe0566189bf32e8cfee78335d8776f64a66f5a", + "reference": "61fe0566189bf32e8cfee78335d8776f64a66f5a", "shasum": "" }, "require": { @@ -6129,7 +6129,7 @@ "description": "Provides basic utilities for the filesystem", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/filesystem/tree/v7.1.2" + "source": "https://github.com/symfony/filesystem/tree/v7.1.5" }, "funding": [ { @@ -6145,20 +6145,20 @@ "type": "tidelift" } ], - "time": "2024-06-28T10:03:55+00:00" + "time": "2024-09-17T09:16:35+00:00" }, { "name": "symfony/finder", - "version": "v7.1.3", + "version": "v7.1.4", "source": { "type": "git", "url": "https://github.com/symfony/finder.git", - "reference": "717c6329886f32dc65e27461f80f2a465412fdca" + "reference": "d95bbf319f7d052082fb7af147e0f835a695e823" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/finder/zipball/717c6329886f32dc65e27461f80f2a465412fdca", - "reference": "717c6329886f32dc65e27461f80f2a465412fdca", + "url": "https://api.github.com/repos/symfony/finder/zipball/d95bbf319f7d052082fb7af147e0f835a695e823", + "reference": "d95bbf319f7d052082fb7af147e0f835a695e823", "shasum": "" }, "require": { @@ -6193,7 +6193,7 @@ "description": "Finds files and directories via an intuitive fluent interface", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/finder/tree/v7.1.3" + "source": "https://github.com/symfony/finder/tree/v7.1.4" }, "funding": [ { @@ -6209,7 +6209,7 @@ "type": "tidelift" } ], - "time": "2024-07-24T07:08:44+00:00" + "time": "2024-08-13T14:28:19+00:00" }, { "name": "symfony/options-resolver", @@ -6280,20 +6280,20 @@ }, { "name": "symfony/polyfill-intl-grapheme", - "version": "v1.30.0", + "version": "v1.31.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-grapheme.git", - "reference": "64647a7c30b2283f5d49b874d84a18fc22054b7a" + "reference": "b9123926e3b7bc2f98c02ad54f6a4b02b91a8abe" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/64647a7c30b2283f5d49b874d84a18fc22054b7a", - "reference": "64647a7c30b2283f5d49b874d84a18fc22054b7a", + "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/b9123926e3b7bc2f98c02ad54f6a4b02b91a8abe", + "reference": "b9123926e3b7bc2f98c02ad54f6a4b02b91a8abe", "shasum": "" }, "require": { - "php": ">=7.1" + "php": ">=7.2" }, "suggest": { "ext-intl": "For best performance" @@ -6338,7 +6338,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.30.0" + "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.31.0" }, "funding": [ { @@ -6354,24 +6354,24 @@ "type": "tidelift" } ], - "time": "2024-05-31T15:07:36+00:00" + "time": "2024-09-09T11:45:10+00:00" }, { "name": "symfony/polyfill-intl-normalizer", - "version": "v1.30.0", + "version": "v1.31.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-normalizer.git", - "reference": "a95281b0be0d9ab48050ebd988b967875cdb9fdb" + "reference": "3833d7255cc303546435cb650316bff708a1c75c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/a95281b0be0d9ab48050ebd988b967875cdb9fdb", - "reference": "a95281b0be0d9ab48050ebd988b967875cdb9fdb", + "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/3833d7255cc303546435cb650316bff708a1c75c", + "reference": "3833d7255cc303546435cb650316bff708a1c75c", "shasum": "" }, "require": { - "php": ">=7.1" + "php": ">=7.2" }, "suggest": { "ext-intl": "For best performance" @@ -6419,7 +6419,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.30.0" + "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.31.0" }, "funding": [ { @@ -6435,24 +6435,24 @@ "type": "tidelift" } ], - "time": "2024-05-31T15:07:36+00:00" + "time": "2024-09-09T11:45:10+00:00" }, { "name": "symfony/polyfill-php80", - "version": "v1.30.0", + "version": "v1.31.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php80.git", - "reference": "77fa7995ac1b21ab60769b7323d600a991a90433" + "reference": "60328e362d4c2c802a54fcbf04f9d3fb892b4cf8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/77fa7995ac1b21ab60769b7323d600a991a90433", - "reference": "77fa7995ac1b21ab60769b7323d600a991a90433", + "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/60328e362d4c2c802a54fcbf04f9d3fb892b4cf8", + "reference": "60328e362d4c2c802a54fcbf04f9d3fb892b4cf8", "shasum": "" }, "require": { - "php": ">=7.1" + "php": ">=7.2" }, "type": "library", "extra": { @@ -6499,7 +6499,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php80/tree/v1.30.0" + "source": "https://github.com/symfony/polyfill-php80/tree/v1.31.0" }, "funding": [ { @@ -6515,24 +6515,24 @@ "type": "tidelift" } ], - "time": "2024-05-31T15:07:36+00:00" + "time": "2024-09-09T11:45:10+00:00" }, { "name": "symfony/polyfill-php81", - "version": "v1.30.0", + "version": "v1.31.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php81.git", - "reference": "3fb075789fb91f9ad9af537c4012d523085bd5af" + "reference": "4a4cfc2d253c21a5ad0e53071df248ed48c6ce5c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php81/zipball/3fb075789fb91f9ad9af537c4012d523085bd5af", - "reference": "3fb075789fb91f9ad9af537c4012d523085bd5af", + "url": "https://api.github.com/repos/symfony/polyfill-php81/zipball/4a4cfc2d253c21a5ad0e53071df248ed48c6ce5c", + "reference": "4a4cfc2d253c21a5ad0e53071df248ed48c6ce5c", "shasum": "" }, "require": { - "php": ">=7.1" + "php": ">=7.2" }, "type": "library", "extra": { @@ -6575,7 +6575,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php81/tree/v1.30.0" + "source": "https://github.com/symfony/polyfill-php81/tree/v1.31.0" }, "funding": [ { @@ -6591,20 +6591,20 @@ "type": "tidelift" } ], - "time": "2024-06-19T12:30:46+00:00" + "time": "2024-09-09T11:45:10+00:00" }, { "name": "symfony/process", - "version": "v7.1.3", + "version": "v7.1.5", "source": { "type": "git", "url": "https://github.com/symfony/process.git", - "reference": "7f2f542c668ad6c313dc4a5e9c3321f733197eca" + "reference": "5c03ee6369281177f07f7c68252a280beccba847" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/7f2f542c668ad6c313dc4a5e9c3321f733197eca", - "reference": "7f2f542c668ad6c313dc4a5e9c3321f733197eca", + "url": "https://api.github.com/repos/symfony/process/zipball/5c03ee6369281177f07f7c68252a280beccba847", + "reference": "5c03ee6369281177f07f7c68252a280beccba847", "shasum": "" }, "require": { @@ -6636,7 +6636,7 @@ "description": "Executes commands in sub-processes", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/process/tree/v7.1.3" + "source": "https://github.com/symfony/process/tree/v7.1.5" }, "funding": [ { @@ -6652,7 +6652,7 @@ "type": "tidelift" } ], - "time": "2024-07-26T12:44:47+00:00" + "time": "2024-09-19T21:48:23+00:00" }, { "name": "symfony/service-contracts", @@ -6801,16 +6801,16 @@ }, { "name": "symfony/string", - "version": "v7.1.3", + "version": "v7.1.5", "source": { "type": "git", "url": "https://github.com/symfony/string.git", - "reference": "ea272a882be7f20cad58d5d78c215001617b7f07" + "reference": "d66f9c343fa894ec2037cc928381df90a7ad4306" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/string/zipball/ea272a882be7f20cad58d5d78c215001617b7f07", - "reference": "ea272a882be7f20cad58d5d78c215001617b7f07", + "url": "https://api.github.com/repos/symfony/string/zipball/d66f9c343fa894ec2037cc928381df90a7ad4306", + "reference": "d66f9c343fa894ec2037cc928381df90a7ad4306", "shasum": "" }, "require": { @@ -6868,7 +6868,7 @@ "utf8" ], "support": { - "source": "https://github.com/symfony/string/tree/v7.1.3" + "source": "https://github.com/symfony/string/tree/v7.1.5" }, "funding": [ { @@ -6884,7 +6884,7 @@ "type": "tidelift" } ], - "time": "2024-07-22T10:25:37+00:00" + "time": "2024-09-20T08:28:38+00:00" } ], "aliases": [], From 2f049f026b39e6d1e6a0d8c9aae1bede9b7a7880 Mon Sep 17 00:00:00 2001 From: Alexander Pankratov Date: Thu, 3 Oct 2024 17:33:26 +0200 Subject: [PATCH 178/270] Feat: upgrade madelineProto and fix start up --- composer.lock | 56 ++++++++++++++++----------------- server.php | 4 ++- src/Migrations/StartUpFixes.php | 9 ++++++ 3 files changed, 40 insertions(+), 29 deletions(-) diff --git a/composer.lock b/composer.lock index ff0cbf5..069e12d 100644 --- a/composer.lock +++ b/composer.lock @@ -1758,16 +1758,16 @@ }, { "name": "amphp/sql-common", - "version": "v2.0.0", + "version": "v2.0.1", "source": { "type": "git", "url": "https://github.com/amphp/sql-common.git", - "reference": "996b8ad67410a20f0df0e2315a174b4c58f21e1a" + "reference": "85449d526f33e1b24a17ae0f1b729536707b165b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/amphp/sql-common/zipball/996b8ad67410a20f0df0e2315a174b4c58f21e1a", - "reference": "996b8ad67410a20f0df0e2315a174b4c58f21e1a", + "url": "https://api.github.com/repos/amphp/sql-common/zipball/85449d526f33e1b24a17ae0f1b729536707b165b", + "reference": "85449d526f33e1b24a17ae0f1b729536707b165b", "shasum": "" }, "require": { @@ -1802,7 +1802,7 @@ ], "support": { "issues": "https://github.com/amphp/sql-common/issues", - "source": "https://github.com/amphp/sql-common/tree/v2.0.0" + "source": "https://github.com/amphp/sql-common/tree/v2.0.1" }, "funding": [ { @@ -1810,7 +1810,7 @@ "type": "github" } ], - "time": "2024-03-10T15:22:18+00:00" + "time": "2024-10-02T20:30:11+00:00" }, { "name": "amphp/sync", @@ -2193,16 +2193,16 @@ }, { "name": "bacon/bacon-qr-code", - "version": "v3.0.0", + "version": "v3.0.1", "source": { "type": "git", "url": "https://github.com/Bacon/BaconQrCode.git", - "reference": "510de6eca6248d77d31b339d62437cc995e2fb41" + "reference": "f9cc1f52b5a463062251d666761178dbdb6b544f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Bacon/BaconQrCode/zipball/510de6eca6248d77d31b339d62437cc995e2fb41", - "reference": "510de6eca6248d77d31b339d62437cc995e2fb41", + "url": "https://api.github.com/repos/Bacon/BaconQrCode/zipball/f9cc1f52b5a463062251d666761178dbdb6b544f", + "reference": "f9cc1f52b5a463062251d666761178dbdb6b544f", "shasum": "" }, "require": { @@ -2241,9 +2241,9 @@ "homepage": "https://github.com/Bacon/BaconQrCode", "support": { "issues": "https://github.com/Bacon/BaconQrCode/issues", - "source": "https://github.com/Bacon/BaconQrCode/tree/v3.0.0" + "source": "https://github.com/Bacon/BaconQrCode/tree/v3.0.1" }, - "time": "2024-04-18T11:16:25+00:00" + "time": "2024-10-01T13:55:55+00:00" }, { "name": "danog/async-orm", @@ -2646,12 +2646,12 @@ "source": { "type": "git", "url": "https://github.com/danog/MadelineProto.git", - "reference": "5939f0dcd3133fc4ec00f4e3f4a4bbbddbfd243e" + "reference": "2a3188f343ce5558eeb99076af0cd3239ca7072d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/danog/MadelineProto/zipball/5939f0dcd3133fc4ec00f4e3f4a4bbbddbfd243e", - "reference": "5939f0dcd3133fc4ec00f4e3f4a4bbbddbfd243e", + "url": "https://api.github.com/repos/danog/MadelineProto/zipball/2a3188f343ce5558eeb99076af0cd3239ca7072d", + "reference": "2a3188f343ce5558eeb99076af0cd3239ca7072d", "shasum": "" }, "require": { @@ -2670,7 +2670,7 @@ "amphp/socket": "^2.3.1", "amphp/websocket-client": "^2", "bacon/bacon-qr-code": "^3", - "danog/async-orm": "^1.0.2", + "danog/async-orm": "^1.1.0", "danog/better-prometheus": "^0.1.1", "danog/dns-over-https": "^1", "danog/ipc": "^1", @@ -2687,11 +2687,11 @@ "ext-xml": "*", "ext-zlib": "*", "league/uri": "^7.4.1", - "nikic/php-parser": "^5.1.0", + "nikic/php-parser": "^5.2.0", "php-64bit": ">=8.2", - "phpseclib/phpseclib": "^3.0.41", + "phpseclib/phpseclib": "^3.0.42", "psr/http-factory": "^1.1.0", - "psr/log": "^3", + "psr/log": "^3.0.2", "revolt/event-loop": "^1.0.6", "symfony/polyfill-mbstring": "*", "webmozart/assert": "^1.11" @@ -2707,9 +2707,9 @@ "danog/phpdoc": "^0.1.24", "dg/bypass-finals": "dev-master", "ext-ctype": "*", - "phpunit/phpunit": "^9.6.20", + "phpunit/phpunit": "^9.6.21", "revolt/event-loop-adapter-react": "^1.1.1", - "symfony/yaml": "^6.4.8", + "symfony/yaml": "^6.4.12", "vimeo/psalm": "dev-master" }, "suggest": { @@ -2766,7 +2766,7 @@ "type": "github" } ], - "time": "2024-09-27T18:50:22+00:00" + "time": "2024-09-28T07:35:08+00:00" }, { "name": "danog/primemodule", @@ -3553,16 +3553,16 @@ }, { "name": "nikic/php-parser", - "version": "v5.2.0", + "version": "v5.3.0", "source": { "type": "git", "url": "https://github.com/nikic/PHP-Parser.git", - "reference": "23c79fbbfb725fb92af9bcf41065c8e9a0d49ddb" + "reference": "3abf7425cd284141dc5d8d14a9ee444de3345d1a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/23c79fbbfb725fb92af9bcf41065c8e9a0d49ddb", - "reference": "23c79fbbfb725fb92af9bcf41065c8e9a0d49ddb", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/3abf7425cd284141dc5d8d14a9ee444de3345d1a", + "reference": "3abf7425cd284141dc5d8d14a9ee444de3345d1a", "shasum": "" }, "require": { @@ -3605,9 +3605,9 @@ ], "support": { "issues": "https://github.com/nikic/PHP-Parser/issues", - "source": "https://github.com/nikic/PHP-Parser/tree/v5.2.0" + "source": "https://github.com/nikic/PHP-Parser/tree/v5.3.0" }, - "time": "2024-09-15T16:40:33+00:00" + "time": "2024-09-29T13:56:26+00:00" }, { "name": "paragonie/constant_time_encoding", diff --git a/server.php b/server.php index 04e9064..61bef7a 100644 --- a/server.php +++ b/server.php @@ -83,7 +83,9 @@ } StartUpFixes::fix(); - +foreach ($sessions as $session) { + StartUpFixes::removeBrokenIpc($session); +} new TelegramApiServer\Server\Server( $options, $sessions diff --git a/src/Migrations/StartUpFixes.php b/src/Migrations/StartUpFixes.php index ad0ff26..0184a53 100644 --- a/src/Migrations/StartUpFixes.php +++ b/src/Migrations/StartUpFixes.php @@ -11,4 +11,13 @@ public static function fix(): void \define('MADELINE_WORKER_TYPE', 'madeline-ipc'); Magic::$isIpcWorker = true; } + + public static function removeBrokenIpc(string $session): void + { + info('Removing ipc sockets from sessions to fix startup' . PHP_EOL); + foreach (glob(ROOT_DIR . "/$session/*ipc") as $file) { + info("removing: $file"); + unlink($file); + } + } } From 058a885c76df9d51e572cb20ae423ca4893f0db3 Mon Sep 17 00:00:00 2001 From: Alexander Pankratov Date: Thu, 3 Oct 2024 18:09:59 +0200 Subject: [PATCH 179/270] Fix: remove prometheus port by default --- docker-compose.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/docker-compose.yml b/docker-compose.yml index 74eb406..4e82bde 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -5,7 +5,6 @@ services: service: base-api ports: - "127.0.0.1:9503:9503" - - "12345:12345" command: - "-s=session" mysql: From 646c5ed7494d34d3c67387905a49be8ece31710d Mon Sep 17 00:00:00 2001 From: Alexander Pankratov Date: Thu, 31 Oct 2024 11:44:59 +0100 Subject: [PATCH 180/270] Update madeline proto --- composer.json | 6 -- composer.lock | 277 +++++++++++++++++++------------------------------- 2 files changed, 107 insertions(+), 176 deletions(-) diff --git a/composer.json b/composer.json index 243206a..24aa9fd 100644 --- a/composer.json +++ b/composer.json @@ -17,12 +17,6 @@ "micro-service", "madelineproto" ], - "repositories": [ - { - "type": "github", - "url": "https://github.com/xtrime-ru/dns" - } - ], "require": { "php": "^8.2", "ext-json": "*", diff --git a/composer.lock b/composer.lock index 069e12d..984be2a 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "c4f466ac2e8d88035f620e533f7fac12", + "content-hash": "4a54f497157904504efa179b11ddac18", "packages": [ { "name": "amphp/amp", @@ -232,13 +232,13 @@ "version": "2.x-dev", "source": { "type": "git", - "url": "https://github.com/xtrime-ru/dns.git", - "reference": "037b762d95f7d9e855b9c6736c0ccc4adcb8921e" + "url": "https://github.com/amphp/dns.git", + "reference": "b7515c1c41e12cbd09b1ab76872bf0b04e949142" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/xtrime-ru/dns/zipball/037b762d95f7d9e855b9c6736c0ccc4adcb8921e", - "reference": "037b762d95f7d9e855b9c6736c0ccc4adcb8921e", + "url": "https://api.github.com/repos/amphp/dns/zipball/b7515c1c41e12cbd09b1ab76872bf0b04e949142", + "reference": "b7515c1c41e12cbd09b1ab76872bf0b04e949142", "shasum": "" }, "require": { @@ -246,9 +246,10 @@ "amphp/byte-stream": "^2", "amphp/cache": "^2", "amphp/parser": "^1", - "amphp/windows-registry": "^1.0.1", + "amphp/process": "^2", "daverandom/libdns": "^2.0.2", "ext-filter": "*", + "ext-json": "*", "php": ">=8.1", "revolt/event-loop": "^1 || ^0.2" }, @@ -261,33 +262,14 @@ "default-branch": true, "type": "library", "autoload": { - "psr-4": { - "Amp\\Dns\\": "src" - }, "files": [ "src/functions.php" - ] - }, - "autoload-dev": { + ], "psr-4": { - "Amp\\Dns\\Test\\": "test" + "Amp\\Dns\\": "src" } }, - "scripts": { - "check": [ - "@cs", - "@test" - ], - "cs": [ - "PHP_CS_FIXER_IGNORE_ENV=1 php-cs-fixer fix -v --diff --dry-run" - ], - "cs-fix": [ - "PHP_CS_FIXER_IGNORE_ENV=1 php-cs-fixer fix -v --diff" - ], - "test": [ - "@php -dzend.assertions=1 -dassert.exception=1 ./vendor/bin/phpunit --coverage-text" - ] - }, + "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], @@ -324,9 +306,16 @@ "resolve" ], "support": { - "source": "https://github.com/xtrime-ru/dns/tree/2.x" + "issues": "https://github.com/amphp/dns/issues", + "source": "https://github.com/amphp/dns/tree/2.x" }, - "time": "2024-05-14T18:13:22+00:00" + "funding": [ + { + "url": "https://github.com/amphp", + "type": "github" + } + ], + "time": "2024-08-11T15:10:35+00:00" }, { "name": "amphp/file", @@ -1128,16 +1117,16 @@ }, { "name": "amphp/parallel", - "version": "v2.2.9", + "version": "v2.3.0", "source": { "type": "git", "url": "https://github.com/amphp/parallel.git", - "reference": "73d293f1fc4df1bebc3c4fce1432e82dd7032238" + "reference": "9777db1460d1535bc2a843840684fb1205225b87" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/amphp/parallel/zipball/73d293f1fc4df1bebc3c4fce1432e82dd7032238", - "reference": "73d293f1fc4df1bebc3c4fce1432e82dd7032238", + "url": "https://api.github.com/repos/amphp/parallel/zipball/9777db1460d1535bc2a843840684fb1205225b87", + "reference": "9777db1460d1535bc2a843840684fb1205225b87", "shasum": "" }, "require": { @@ -1200,7 +1189,7 @@ ], "support": { "issues": "https://github.com/amphp/parallel/issues", - "source": "https://github.com/amphp/parallel/tree/v2.2.9" + "source": "https://github.com/amphp/parallel/tree/v2.3.0" }, "funding": [ { @@ -1208,7 +1197,7 @@ "type": "github" } ], - "time": "2024-03-24T18:27:44+00:00" + "time": "2024-09-14T19:16:14+00:00" }, { "name": "amphp/parser", @@ -1341,16 +1330,16 @@ }, { "name": "amphp/postgres", - "version": "v2.0.0", + "version": "v2.1.0", "source": { "type": "git", "url": "https://github.com/amphp/postgres.git", - "reference": "4fffbb2087e40ccaf779acdb27ca021d8718308d" + "reference": "48ee97e6899427f68d66c6319b778507e5f1abea" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/amphp/postgres/zipball/4fffbb2087e40ccaf779acdb27ca021d8718308d", - "reference": "4fffbb2087e40ccaf779acdb27ca021d8718308d", + "url": "https://api.github.com/repos/amphp/postgres/zipball/48ee97e6899427f68d66c6319b778507e5f1abea", + "reference": "48ee97e6899427f68d66c6319b778507e5f1abea", "shasum": "" }, "require": { @@ -1401,7 +1390,7 @@ ], "support": { "issues": "https://github.com/amphp/postgres/issues", - "source": "https://github.com/amphp/postgres/tree/v2.0.0" + "source": "https://github.com/amphp/postgres/tree/v2.1.0" }, "funding": [ { @@ -1409,7 +1398,7 @@ "type": "github" } ], - "time": "2024-03-10T17:02:44+00:00" + "time": "2024-10-11T02:41:50+00:00" }, { "name": "amphp/process", @@ -1758,16 +1747,16 @@ }, { "name": "amphp/sql-common", - "version": "v2.0.1", + "version": "v2.0.2", "source": { "type": "git", "url": "https://github.com/amphp/sql-common.git", - "reference": "85449d526f33e1b24a17ae0f1b729536707b165b" + "reference": "069183d57f17f85c60842ea3a8ce5ff52dba5399" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/amphp/sql-common/zipball/85449d526f33e1b24a17ae0f1b729536707b165b", - "reference": "85449d526f33e1b24a17ae0f1b729536707b165b", + "url": "https://api.github.com/repos/amphp/sql-common/zipball/069183d57f17f85c60842ea3a8ce5ff52dba5399", + "reference": "069183d57f17f85c60842ea3a8ce5ff52dba5399", "shasum": "" }, "require": { @@ -1802,7 +1791,7 @@ ], "support": { "issues": "https://github.com/amphp/sql-common/issues", - "source": "https://github.com/amphp/sql-common/tree/v2.0.1" + "source": "https://github.com/amphp/sql-common/tree/v2.0.2" }, "funding": [ { @@ -1810,7 +1799,7 @@ "type": "github" } ], - "time": "2024-10-02T20:30:11+00:00" + "time": "2024-10-27T16:04:14+00:00" }, { "name": "amphp/sync", @@ -1889,16 +1878,16 @@ }, { "name": "amphp/websocket", - "version": "v2.0.3", + "version": "v2.0.4", "source": { "type": "git", "url": "https://github.com/amphp/websocket.git", - "reference": "1dc9d2c3b9b10965510d2762181254d825098419" + "reference": "963904b6a883c4b62d9222d1d9749814fac96a3b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/amphp/websocket/zipball/1dc9d2c3b9b10965510d2762181254d825098419", - "reference": "1dc9d2c3b9b10965510d2762181254d825098419", + "url": "https://api.github.com/repos/amphp/websocket/zipball/963904b6a883c4b62d9222d1d9749814fac96a3b", + "reference": "963904b6a883c4b62d9222d1d9749814fac96a3b", "shasum": "" }, "require": { @@ -1958,7 +1947,7 @@ ], "support": { "issues": "https://github.com/amphp/websocket/issues", - "source": "https://github.com/amphp/websocket/tree/v2.0.3" + "source": "https://github.com/amphp/websocket/tree/v2.0.4" }, "funding": [ { @@ -1966,7 +1955,7 @@ "type": "github" } ], - "time": "2023-12-28T23:16:28+00:00" + "time": "2024-10-28T21:28:45+00:00" }, { "name": "amphp/websocket-client", @@ -2139,58 +2128,6 @@ ], "time": "2023-10-21T17:10:20+00:00" }, - { - "name": "amphp/windows-registry", - "version": "v1.0.1", - "source": { - "type": "git", - "url": "https://github.com/amphp/windows-registry.git", - "reference": "0d569e8f256cca974e3842b6e78b4e434bf98306" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/amphp/windows-registry/zipball/0d569e8f256cca974e3842b6e78b4e434bf98306", - "reference": "0d569e8f256cca974e3842b6e78b4e434bf98306", - "shasum": "" - }, - "require": { - "amphp/byte-stream": "^2", - "amphp/process": "^2", - "php": ">=8.1" - }, - "require-dev": { - "amphp/php-cs-fixer-config": "^2", - "psalm/phar": "^5.4" - }, - "type": "library", - "autoload": { - "psr-4": { - "Amp\\WindowsRegistry\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Niklas Keller", - "email": "me@kelunik.com" - } - ], - "description": "Windows Registry Reader.", - "support": { - "issues": "https://github.com/amphp/windows-registry/issues", - "source": "https://github.com/amphp/windows-registry/tree/v1.0.1" - }, - "funding": [ - { - "url": "https://github.com/amphp", - "type": "github" - } - ], - "time": "2024-01-30T23:01:51+00:00" - }, { "name": "bacon/bacon-qr-code", "version": "v3.0.1", @@ -2646,12 +2583,12 @@ "source": { "type": "git", "url": "https://github.com/danog/MadelineProto.git", - "reference": "2a3188f343ce5558eeb99076af0cd3239ca7072d" + "reference": "ba4853bb34d210e4427da07c76f9733fccea51cd" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/danog/MadelineProto/zipball/2a3188f343ce5558eeb99076af0cd3239ca7072d", - "reference": "2a3188f343ce5558eeb99076af0cd3239ca7072d", + "url": "https://api.github.com/repos/danog/MadelineProto/zipball/ba4853bb34d210e4427da07c76f9733fccea51cd", + "reference": "ba4853bb34d210e4427da07c76f9733fccea51cd", "shasum": "" }, "require": { @@ -2766,7 +2703,7 @@ "type": "github" } ], - "time": "2024-09-28T07:35:08+00:00" + "time": "2024-10-31T10:27:25+00:00" }, { "name": "danog/primemodule", @@ -3553,16 +3490,16 @@ }, { "name": "nikic/php-parser", - "version": "v5.3.0", + "version": "v5.3.1", "source": { "type": "git", "url": "https://github.com/nikic/PHP-Parser.git", - "reference": "3abf7425cd284141dc5d8d14a9ee444de3345d1a" + "reference": "8eea230464783aa9671db8eea6f8c6ac5285794b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/3abf7425cd284141dc5d8d14a9ee444de3345d1a", - "reference": "3abf7425cd284141dc5d8d14a9ee444de3345d1a", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/8eea230464783aa9671db8eea6f8c6ac5285794b", + "reference": "8eea230464783aa9671db8eea6f8c6ac5285794b", "shasum": "" }, "require": { @@ -3605,9 +3542,9 @@ ], "support": { "issues": "https://github.com/nikic/PHP-Parser/issues", - "source": "https://github.com/nikic/PHP-Parser/tree/v5.3.0" + "source": "https://github.com/nikic/PHP-Parser/tree/v5.3.1" }, - "time": "2024-09-29T13:56:26+00:00" + "time": "2024-10-08T18:51:32+00:00" }, { "name": "paragonie/constant_time_encoding", @@ -3913,16 +3850,16 @@ }, { "name": "promphp/prometheus_client_php", - "version": "v2.11.0", + "version": "v2.12.0", "source": { "type": "git", "url": "https://github.com/PromPHP/prometheus_client_php.git", - "reference": "35d5a68628ea18209938bc1b8796646015ab93cf" + "reference": "50b70a6df4017081917e004f177a3c01cc8115db" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/PromPHP/prometheus_client_php/zipball/35d5a68628ea18209938bc1b8796646015ab93cf", - "reference": "35d5a68628ea18209938bc1b8796646015ab93cf", + "url": "https://api.github.com/repos/PromPHP/prometheus_client_php/zipball/50b70a6df4017081917e004f177a3c01cc8115db", + "reference": "50b70a6df4017081917e004f177a3c01cc8115db", "shasum": "" }, "require": { @@ -3975,9 +3912,9 @@ "description": "Prometheus instrumentation library for PHP applications.", "support": { "issues": "https://github.com/PromPHP/prometheus_client_php/issues", - "source": "https://github.com/PromPHP/prometheus_client_php/tree/v2.11.0" + "source": "https://github.com/PromPHP/prometheus_client_php/tree/v2.12.0" }, - "time": "2024-08-05T07:58:08+00:00" + "time": "2024-10-18T07:33:22+00:00" }, { "name": "psr/http-factory", @@ -5767,16 +5704,16 @@ }, { "name": "symfony/console", - "version": "v7.1.5", + "version": "v7.1.6", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "0fa539d12b3ccf068a722bbbffa07ca7079af9ee" + "reference": "bb5192af6edc797cbab5c8e8ecfea2fe5f421e57" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/0fa539d12b3ccf068a722bbbffa07ca7079af9ee", - "reference": "0fa539d12b3ccf068a722bbbffa07ca7079af9ee", + "url": "https://api.github.com/repos/symfony/console/zipball/bb5192af6edc797cbab5c8e8ecfea2fe5f421e57", + "reference": "bb5192af6edc797cbab5c8e8ecfea2fe5f421e57", "shasum": "" }, "require": { @@ -5840,7 +5777,7 @@ "terminal" ], "support": { - "source": "https://github.com/symfony/console/tree/v7.1.5" + "source": "https://github.com/symfony/console/tree/v7.1.6" }, "funding": [ { @@ -5856,7 +5793,7 @@ "type": "tidelift" } ], - "time": "2024-09-20T08:28:38+00:00" + "time": "2024-10-09T08:46:59+00:00" }, { "name": "symfony/deprecation-contracts", @@ -5927,16 +5864,16 @@ }, { "name": "symfony/event-dispatcher", - "version": "v7.1.1", + "version": "v7.1.6", "source": { "type": "git", "url": "https://github.com/symfony/event-dispatcher.git", - "reference": "9fa7f7a21beb22a39a8f3f28618b29e50d7a55a7" + "reference": "87254c78dd50721cfd015b62277a8281c5589702" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/9fa7f7a21beb22a39a8f3f28618b29e50d7a55a7", - "reference": "9fa7f7a21beb22a39a8f3f28618b29e50d7a55a7", + "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/87254c78dd50721cfd015b62277a8281c5589702", + "reference": "87254c78dd50721cfd015b62277a8281c5589702", "shasum": "" }, "require": { @@ -5987,7 +5924,7 @@ "description": "Provides tools that allow your application components to communicate with each other by dispatching events and listening to them", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/event-dispatcher/tree/v7.1.1" + "source": "https://github.com/symfony/event-dispatcher/tree/v7.1.6" }, "funding": [ { @@ -6003,7 +5940,7 @@ "type": "tidelift" } ], - "time": "2024-05-31T14:57:53+00:00" + "time": "2024-09-25T14:20:29+00:00" }, { "name": "symfony/event-dispatcher-contracts", @@ -6083,16 +6020,16 @@ }, { "name": "symfony/filesystem", - "version": "v7.1.5", + "version": "v7.1.6", "source": { "type": "git", "url": "https://github.com/symfony/filesystem.git", - "reference": "61fe0566189bf32e8cfee78335d8776f64a66f5a" + "reference": "c835867b3c62bb05c7fe3d637c871c7ae52024d4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/filesystem/zipball/61fe0566189bf32e8cfee78335d8776f64a66f5a", - "reference": "61fe0566189bf32e8cfee78335d8776f64a66f5a", + "url": "https://api.github.com/repos/symfony/filesystem/zipball/c835867b3c62bb05c7fe3d637c871c7ae52024d4", + "reference": "c835867b3c62bb05c7fe3d637c871c7ae52024d4", "shasum": "" }, "require": { @@ -6129,7 +6066,7 @@ "description": "Provides basic utilities for the filesystem", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/filesystem/tree/v7.1.5" + "source": "https://github.com/symfony/filesystem/tree/v7.1.6" }, "funding": [ { @@ -6145,20 +6082,20 @@ "type": "tidelift" } ], - "time": "2024-09-17T09:16:35+00:00" + "time": "2024-10-25T15:11:02+00:00" }, { "name": "symfony/finder", - "version": "v7.1.4", + "version": "v7.1.6", "source": { "type": "git", "url": "https://github.com/symfony/finder.git", - "reference": "d95bbf319f7d052082fb7af147e0f835a695e823" + "reference": "2cb89664897be33f78c65d3d2845954c8d7a43b8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/finder/zipball/d95bbf319f7d052082fb7af147e0f835a695e823", - "reference": "d95bbf319f7d052082fb7af147e0f835a695e823", + "url": "https://api.github.com/repos/symfony/finder/zipball/2cb89664897be33f78c65d3d2845954c8d7a43b8", + "reference": "2cb89664897be33f78c65d3d2845954c8d7a43b8", "shasum": "" }, "require": { @@ -6193,7 +6130,7 @@ "description": "Finds files and directories via an intuitive fluent interface", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/finder/tree/v7.1.4" + "source": "https://github.com/symfony/finder/tree/v7.1.6" }, "funding": [ { @@ -6209,20 +6146,20 @@ "type": "tidelift" } ], - "time": "2024-08-13T14:28:19+00:00" + "time": "2024-10-01T08:31:23+00:00" }, { "name": "symfony/options-resolver", - "version": "v7.1.1", + "version": "v7.1.6", "source": { "type": "git", "url": "https://github.com/symfony/options-resolver.git", - "reference": "47aa818121ed3950acd2b58d1d37d08a94f9bf55" + "reference": "85e95eeede2d41cd146146e98c9c81d9214cae85" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/options-resolver/zipball/47aa818121ed3950acd2b58d1d37d08a94f9bf55", - "reference": "47aa818121ed3950acd2b58d1d37d08a94f9bf55", + "url": "https://api.github.com/repos/symfony/options-resolver/zipball/85e95eeede2d41cd146146e98c9c81d9214cae85", + "reference": "85e95eeede2d41cd146146e98c9c81d9214cae85", "shasum": "" }, "require": { @@ -6260,7 +6197,7 @@ "options" ], "support": { - "source": "https://github.com/symfony/options-resolver/tree/v7.1.1" + "source": "https://github.com/symfony/options-resolver/tree/v7.1.6" }, "funding": [ { @@ -6276,7 +6213,7 @@ "type": "tidelift" } ], - "time": "2024-05-31T14:57:53+00:00" + "time": "2024-09-25T14:20:29+00:00" }, { "name": "symfony/polyfill-intl-grapheme", @@ -6595,16 +6532,16 @@ }, { "name": "symfony/process", - "version": "v7.1.5", + "version": "v7.1.6", "source": { "type": "git", "url": "https://github.com/symfony/process.git", - "reference": "5c03ee6369281177f07f7c68252a280beccba847" + "reference": "6aaa189ddb4ff6b5de8fa3210f2fb42c87b4d12e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/5c03ee6369281177f07f7c68252a280beccba847", - "reference": "5c03ee6369281177f07f7c68252a280beccba847", + "url": "https://api.github.com/repos/symfony/process/zipball/6aaa189ddb4ff6b5de8fa3210f2fb42c87b4d12e", + "reference": "6aaa189ddb4ff6b5de8fa3210f2fb42c87b4d12e", "shasum": "" }, "require": { @@ -6636,7 +6573,7 @@ "description": "Executes commands in sub-processes", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/process/tree/v7.1.5" + "source": "https://github.com/symfony/process/tree/v7.1.6" }, "funding": [ { @@ -6652,7 +6589,7 @@ "type": "tidelift" } ], - "time": "2024-09-19T21:48:23+00:00" + "time": "2024-09-25T14:20:29+00:00" }, { "name": "symfony/service-contracts", @@ -6739,16 +6676,16 @@ }, { "name": "symfony/stopwatch", - "version": "v7.1.1", + "version": "v7.1.6", "source": { "type": "git", "url": "https://github.com/symfony/stopwatch.git", - "reference": "5b75bb1ac2ba1b9d05c47fc4b3046a625377d23d" + "reference": "8b4a434e6e7faf6adedffb48783a5c75409a1a05" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/stopwatch/zipball/5b75bb1ac2ba1b9d05c47fc4b3046a625377d23d", - "reference": "5b75bb1ac2ba1b9d05c47fc4b3046a625377d23d", + "url": "https://api.github.com/repos/symfony/stopwatch/zipball/8b4a434e6e7faf6adedffb48783a5c75409a1a05", + "reference": "8b4a434e6e7faf6adedffb48783a5c75409a1a05", "shasum": "" }, "require": { @@ -6781,7 +6718,7 @@ "description": "Provides a way to profile code", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/stopwatch/tree/v7.1.1" + "source": "https://github.com/symfony/stopwatch/tree/v7.1.6" }, "funding": [ { @@ -6797,20 +6734,20 @@ "type": "tidelift" } ], - "time": "2024-05-31T14:57:53+00:00" + "time": "2024-09-25T14:20:29+00:00" }, { "name": "symfony/string", - "version": "v7.1.5", + "version": "v7.1.6", "source": { "type": "git", "url": "https://github.com/symfony/string.git", - "reference": "d66f9c343fa894ec2037cc928381df90a7ad4306" + "reference": "61b72d66bf96c360a727ae6232df5ac83c71f626" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/string/zipball/d66f9c343fa894ec2037cc928381df90a7ad4306", - "reference": "d66f9c343fa894ec2037cc928381df90a7ad4306", + "url": "https://api.github.com/repos/symfony/string/zipball/61b72d66bf96c360a727ae6232df5ac83c71f626", + "reference": "61b72d66bf96c360a727ae6232df5ac83c71f626", "shasum": "" }, "require": { @@ -6868,7 +6805,7 @@ "utf8" ], "support": { - "source": "https://github.com/symfony/string/tree/v7.1.5" + "source": "https://github.com/symfony/string/tree/v7.1.6" }, "funding": [ { @@ -6884,7 +6821,7 @@ "type": "tidelift" } ], - "time": "2024-09-20T08:28:38+00:00" + "time": "2024-09-25T14:20:29+00:00" } ], "aliases": [], From c61b29650ab3cbceb84c3f9cbc0ffe3e19685275 Mon Sep 17 00:00:00 2001 From: Alexander Pankratov Date: Thu, 31 Oct 2024 12:03:11 +0100 Subject: [PATCH 181/270] Fix media preview --- src/MadelineProtoExtensions/ApiExtensions.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/MadelineProtoExtensions/ApiExtensions.php b/src/MadelineProtoExtensions/ApiExtensions.php index 7a3a181..a57fb63 100644 --- a/src/MadelineProtoExtensions/ApiExtensions.php +++ b/src/MadelineProtoExtensions/ApiExtensions.php @@ -243,7 +243,12 @@ public function getMediaPreview(array $data): Response throw new NoMediaException('Message has no media'); } - $media = $message['media'][\array_key_last($message['media'])]; + $media = match ($message['media']['_']) { + 'messageMediaPhoto' => $message['media']['photo'], + 'messageMediaDocument' => $message['media']['document'], + 'messageMediaWebPage' => $message['media']['webpage'], + }; + $thumb = null; switch (true) { case isset($media['sizes']): From 1c5799016041a9752be42acb449af62bd05c31bb Mon Sep 17 00:00:00 2001 From: Alexander Pankratov Date: Tue, 5 Nov 2024 17:25:16 +0100 Subject: [PATCH 182/270] Update readme --- README.md | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 7b73a51..95d0e14 100644 --- a/README.md +++ b/README.md @@ -29,6 +29,8 @@ docker compose pull ``` ## Authorization +Please only use old and valid accounts. All new accounts will be banned by telegram. +If your account was banned read this: https://docs.madelineproto.xyz/docs/LOGIN.html#getting-permission-to-use-the-telegram-api 1. Get app_id and app_hash at [my.telegram.org](https://my.telegram.org/). Only one app_id needed for any amount of users and bots. 1. Fill app_id and app_hash in `.env.docker`. @@ -36,8 +38,11 @@ docker compose pull 1. Start container interactively: `docker compose run --rm api` 2. If you need to start multiple sessions, create docker-compose.override.yml. Add additional containers there. Use unique ports and session names in `command`. 1. Authorize your session: - 1. After promt fill your phone number, or bot hash. - 1. Follow instructions + 1. After promt, fill your phone number, or bot hash. + 1. You will receive telegram code. Type it in. + If you're not receiving code - your server IP or hosting may be blocked by telegram. + Try another server or change server IP. + 1. If you have 2fa enabled - enter 2fa passord. 1. Wait 10-30 seconds until session is started. You will see logs: ```text From 1e3ef6bb98ae5fb234607177f6c632335ad98c32 Mon Sep 17 00:00:00 2001 From: Alexander Pankratov Date: Mon, 9 Dec 2024 18:38:53 +0100 Subject: [PATCH 183/270] Update madeline --- composer.lock | 384 +++++++++++++++++++++++++------------------------- 1 file changed, 193 insertions(+), 191 deletions(-) diff --git a/composer.lock b/composer.lock index 984be2a..ad5889f 100644 --- a/composer.lock +++ b/composer.lock @@ -478,16 +478,16 @@ }, { "name": "amphp/http", - "version": "v2.1.1", + "version": "v2.1.2", "source": { "type": "git", "url": "https://github.com/amphp/http.git", - "reference": "fe6b4dd50c1e70caf823092398074b5082e1d6da" + "reference": "3680d80bd38b5d6f3c2cef2214ca6dd6cef26588" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/amphp/http/zipball/fe6b4dd50c1e70caf823092398074b5082e1d6da", - "reference": "fe6b4dd50c1e70caf823092398074b5082e1d6da", + "url": "https://api.github.com/repos/amphp/http/zipball/3680d80bd38b5d6f3c2cef2214ca6dd6cef26588", + "reference": "3680d80bd38b5d6f3c2cef2214ca6dd6cef26588", "shasum": "" }, "require": { @@ -501,7 +501,7 @@ "amphp/php-cs-fixer-config": "^2", "league/uri": "^6.8 | ^7.1", "phpunit/phpunit": "^9", - "psalm/phar": "^5.4" + "psalm/phar": "^5.26.1" }, "type": "library", "autoload": { @@ -530,7 +530,7 @@ "description": "Basic HTTP primitives which can be shared by servers and clients.", "support": { "issues": "https://github.com/amphp/http/issues", - "source": "https://github.com/amphp/http/tree/v2.1.1" + "source": "https://github.com/amphp/http/tree/v2.1.2" }, "funding": [ { @@ -538,20 +538,20 @@ "type": "github" } ], - "time": "2024-04-03T18:00:53+00:00" + "time": "2024-11-23T14:57:26+00:00" }, { "name": "amphp/http-client", - "version": "v5.1.0", + "version": "v5.2.0", "source": { "type": "git", "url": "https://github.com/amphp/http-client.git", - "reference": "483df9a856625fe4406c7fb6a64d6787105bd184" + "reference": "30888873d747d994ad0b2719134211c587134fb5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/amphp/http-client/zipball/483df9a856625fe4406c7fb6a64d6787105bd184", - "reference": "483df9a856625fe4406c7fb6a64d6787105bd184", + "url": "https://api.github.com/repos/amphp/http-client/zipball/30888873d747d994ad0b2719134211c587134fb5", + "reference": "30888873d747d994ad0b2719134211c587134fb5", "shasum": "" }, "require": { @@ -625,7 +625,7 @@ ], "support": { "issues": "https://github.com/amphp/http-client/issues", - "source": "https://github.com/amphp/http-client/tree/v5.1.0" + "source": "https://github.com/amphp/http-client/tree/v5.2.0" }, "funding": [ { @@ -633,7 +633,7 @@ "type": "github" } ], - "time": "2024-04-21T16:40:36+00:00" + "time": "2024-12-07T00:28:37+00:00" }, { "name": "amphp/http-client-cookies", @@ -1330,16 +1330,16 @@ }, { "name": "amphp/postgres", - "version": "v2.1.0", + "version": "v2.1.1", "source": { "type": "git", "url": "https://github.com/amphp/postgres.git", - "reference": "48ee97e6899427f68d66c6319b778507e5f1abea" + "reference": "c62555c6497782399a166f15c8da8e64be456141" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/amphp/postgres/zipball/48ee97e6899427f68d66c6319b778507e5f1abea", - "reference": "48ee97e6899427f68d66c6319b778507e5f1abea", + "url": "https://api.github.com/repos/amphp/postgres/zipball/c62555c6497782399a166f15c8da8e64be456141", + "reference": "c62555c6497782399a166f15c8da8e64be456141", "shasum": "" }, "require": { @@ -1390,7 +1390,7 @@ ], "support": { "issues": "https://github.com/amphp/postgres/issues", - "source": "https://github.com/amphp/postgres/tree/v2.1.0" + "source": "https://github.com/amphp/postgres/tree/v2.1.1" }, "funding": [ { @@ -1398,7 +1398,7 @@ "type": "github" } ], - "time": "2024-10-11T02:41:50+00:00" + "time": "2024-11-21T04:45:08+00:00" }, { "name": "amphp/process", @@ -1693,16 +1693,16 @@ }, { "name": "amphp/sql", - "version": "v2.0.0", + "version": "v2.0.1", "source": { "type": "git", "url": "https://github.com/amphp/sql.git", - "reference": "4cf80b477b5d40089ba2c162373a604e06d57d7b" + "reference": "2a7962dba23bf017bbdd3c3a0af0eb212481627b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/amphp/sql/zipball/4cf80b477b5d40089ba2c162373a604e06d57d7b", - "reference": "4cf80b477b5d40089ba2c162373a604e06d57d7b", + "url": "https://api.github.com/repos/amphp/sql/zipball/2a7962dba23bf017bbdd3c3a0af0eb212481627b", + "reference": "2a7962dba23bf017bbdd3c3a0af0eb212481627b", "shasum": "" }, "require": { @@ -1735,7 +1735,7 @@ ], "support": { "issues": "https://github.com/amphp/sql/issues", - "source": "https://github.com/amphp/sql/tree/v2.0.0" + "source": "https://github.com/amphp/sql/tree/v2.0.1" }, "funding": [ { @@ -1743,7 +1743,7 @@ "type": "github" } ], - "time": "2024-03-10T15:03:32+00:00" + "time": "2024-11-23T16:16:34+00:00" }, { "name": "amphp/sql-common", @@ -1959,16 +1959,16 @@ }, { "name": "amphp/websocket-client", - "version": "v2.0.0", + "version": "v2.0.1", "source": { "type": "git", "url": "https://github.com/amphp/websocket-client.git", - "reference": "87a5d324997421c79cafbacb9a0f870f95fd42e9" + "reference": "c388f19ebb70233489df5f0c995506d45001a026" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/amphp/websocket-client/zipball/87a5d324997421c79cafbacb9a0f870f95fd42e9", - "reference": "87a5d324997421c79cafbacb9a0f870f95fd42e9", + "url": "https://api.github.com/repos/amphp/websocket-client/zipball/c388f19ebb70233489df5f0c995506d45001a026", + "reference": "c388f19ebb70233489df5f0c995506d45001a026", "shasum": "" }, "require": { @@ -1989,7 +1989,7 @@ "amphp/phpunit-util": "^3", "amphp/websocket-server": "^3|^4", "phpunit/phpunit": "^9", - "psalm/phar": "^5.18", + "psalm/phar": "~5.26.1", "psr/log": "^1" }, "type": "library", @@ -2031,7 +2031,7 @@ ], "support": { "issues": "https://github.com/amphp/websocket-client/issues", - "source": "https://github.com/amphp/websocket-client/tree/v2.0.0" + "source": "https://github.com/amphp/websocket-client/tree/v2.0.1" }, "funding": [ { @@ -2039,7 +2039,7 @@ "type": "github" } ], - "time": "2023-12-28T01:48:55+00:00" + "time": "2024-12-07T01:07:56+00:00" }, { "name": "amphp/websocket-server", @@ -2300,16 +2300,16 @@ }, { "name": "danog/dns-over-https", - "version": "1.0.0", + "version": "1.0.1", "source": { "type": "git", "url": "https://github.com/danog/dns-over-https.git", - "reference": "8c4ac578b8c7231b6df91e03a28a4d807a636a93" + "reference": "142b8d439e7a582d66b13d9f1119820dd3110884" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/danog/dns-over-https/zipball/8c4ac578b8c7231b6df91e03a28a4d807a636a93", - "reference": "8c4ac578b8c7231b6df91e03a28a4d807a636a93", + "url": "https://api.github.com/repos/danog/dns-over-https/zipball/142b8d439e7a582d66b13d9f1119820dd3110884", + "reference": "142b8d439e7a582d66b13d9f1119820dd3110884", "shasum": "" }, "require": { @@ -2382,9 +2382,9 @@ ], "support": { "issues": "https://github.com/danog/dns-over-https/issues", - "source": "https://github.com/danog/dns-over-https/tree/1.0.0" + "source": "https://github.com/danog/dns-over-https/tree/1.0.1" }, - "time": "2023-12-14T20:00:28+00:00" + "time": "2024-12-02T16:42:09+00:00" }, { "name": "danog/ipc", @@ -2457,16 +2457,16 @@ }, { "name": "danog/libdns-json", - "version": "0.2.0", + "version": "0.2.1", "source": { "type": "git", "url": "https://github.com/danog/LibDNSJson.git", - "reference": "a49d7930943666b86eb9f33e8305376a724280b9" + "reference": "cd2981a386a32ff62d447a9553e203384651ba90" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/danog/LibDNSJson/zipball/a49d7930943666b86eb9f33e8305376a724280b9", - "reference": "a49d7930943666b86eb9f33e8305376a724280b9", + "url": "https://api.github.com/repos/danog/LibDNSJson/zipball/cd2981a386a32ff62d447a9553e203384651ba90", + "reference": "cd2981a386a32ff62d447a9553e203384651ba90", "shasum": "" }, "require": { @@ -2512,9 +2512,9 @@ ], "support": { "issues": "https://github.com/danog/LibDNSJson/issues", - "source": "https://github.com/danog/LibDNSJson/tree/0.2.0" + "source": "https://github.com/danog/LibDNSJson/tree/0.2.1" }, - "time": "2022-12-05T21:13:49+00:00" + "time": "2024-12-02T16:40:37+00:00" }, { "name": "danog/loop", @@ -2583,12 +2583,12 @@ "source": { "type": "git", "url": "https://github.com/danog/MadelineProto.git", - "reference": "ba4853bb34d210e4427da07c76f9733fccea51cd" + "reference": "6ed73bfd391f634d933c8aaaad2b70105be081dd" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/danog/MadelineProto/zipball/ba4853bb34d210e4427da07c76f9733fccea51cd", - "reference": "ba4853bb34d210e4427da07c76f9733fccea51cd", + "url": "https://api.github.com/repos/danog/MadelineProto/zipball/6ed73bfd391f634d933c8aaaad2b70105be081dd", + "reference": "6ed73bfd391f634d933c8aaaad2b70105be081dd", "shasum": "" }, "require": { @@ -2596,17 +2596,17 @@ "amphp/byte-stream": "^2.1.1", "amphp/dns": "^2.2.0", "amphp/file": "^3.1.1", - "amphp/http": "^2.1.1", + "amphp/http": "^2.1.2", "amphp/http-client": "^5.1.0", "amphp/http-client-cookies": "^2", "amphp/http-server": "^3.3.1", "amphp/log": "^2", "amphp/mysql": "^3", - "amphp/postgres": "^2", + "amphp/postgres": "^2.1.1", "amphp/redis": "^2.0.1", "amphp/socket": "^2.3.1", "amphp/websocket-client": "^2", - "bacon/bacon-qr-code": "^3", + "bacon/bacon-qr-code": "^3.0.1", "danog/async-orm": "^1.1.0", "danog/better-prometheus": "^0.1.1", "danog/dns-over-https": "^1", @@ -2624,7 +2624,7 @@ "ext-xml": "*", "ext-zlib": "*", "league/uri": "^7.4.1", - "nikic/php-parser": "^5.2.0", + "nikic/php-parser": "^5.3.1", "php-64bit": ">=8.2", "phpseclib/phpseclib": "^3.0.42", "psr/http-factory": "^1.1.0", @@ -2646,7 +2646,7 @@ "ext-ctype": "*", "phpunit/phpunit": "^9.6.21", "revolt/event-loop-adapter-react": "^1.1.1", - "symfony/yaml": "^6.4.12", + "symfony/yaml": "^6.4.13", "vimeo/psalm": "dev-master" }, "suggest": { @@ -2703,7 +2703,7 @@ "type": "github" } ], - "time": "2024-10-31T10:27:25+00:00" + "time": "2024-12-09T17:33:51+00:00" }, { "name": "danog/primemodule", @@ -3083,20 +3083,20 @@ }, { "name": "league/uri", - "version": "7.4.1", + "version": "7.5.1", "source": { "type": "git", "url": "https://github.com/thephpleague/uri.git", - "reference": "bedb6e55eff0c933668addaa7efa1e1f2c417cc4" + "reference": "81fb5145d2644324614cc532b28efd0215bda430" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thephpleague/uri/zipball/bedb6e55eff0c933668addaa7efa1e1f2c417cc4", - "reference": "bedb6e55eff0c933668addaa7efa1e1f2c417cc4", + "url": "https://api.github.com/repos/thephpleague/uri/zipball/81fb5145d2644324614cc532b28efd0215bda430", + "reference": "81fb5145d2644324614cc532b28efd0215bda430", "shasum": "" }, "require": { - "league/uri-interfaces": "^7.3", + "league/uri-interfaces": "^7.5", "php": "^8.1" }, "conflict": { @@ -3161,7 +3161,7 @@ "docs": "https://uri.thephpleague.com", "forum": "https://thephpleague.slack.com", "issues": "https://github.com/thephpleague/uri-src/issues", - "source": "https://github.com/thephpleague/uri/tree/7.4.1" + "source": "https://github.com/thephpleague/uri/tree/7.5.1" }, "funding": [ { @@ -3169,24 +3169,24 @@ "type": "github" } ], - "time": "2024-03-23T07:42:40+00:00" + "time": "2024-12-08T08:40:02+00:00" }, { "name": "league/uri-components", - "version": "7.4.1", + "version": "7.5.1", "source": { "type": "git", "url": "https://github.com/thephpleague/uri-components.git", - "reference": "b94fe4097885f1b51c4c3fcb78025fbbabbb5d9d" + "reference": "4aabf0e2f2f9421ffcacab35be33e4fb5e63c44f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thephpleague/uri-components/zipball/b94fe4097885f1b51c4c3fcb78025fbbabbb5d9d", - "reference": "b94fe4097885f1b51c4c3fcb78025fbbabbb5d9d", + "url": "https://api.github.com/repos/thephpleague/uri-components/zipball/4aabf0e2f2f9421ffcacab35be33e4fb5e63c44f", + "reference": "4aabf0e2f2f9421ffcacab35be33e4fb5e63c44f", "shasum": "" }, "require": { - "league/uri": "^7.3", + "league/uri": "^7.5", "php": "^8.1" }, "suggest": { @@ -3243,7 +3243,7 @@ "docs": "https://uri.thephpleague.com", "forum": "https://thephpleague.slack.com", "issues": "https://github.com/thephpleague/uri-src/issues", - "source": "https://github.com/thephpleague/uri-components/tree/7.4.1" + "source": "https://github.com/thephpleague/uri-components/tree/7.5.1" }, "funding": [ { @@ -3251,20 +3251,20 @@ "type": "github" } ], - "time": "2024-03-23T07:42:40+00:00" + "time": "2024-12-08T08:40:02+00:00" }, { "name": "league/uri-interfaces", - "version": "7.4.1", + "version": "7.5.0", "source": { "type": "git", "url": "https://github.com/thephpleague/uri-interfaces.git", - "reference": "8d43ef5c841032c87e2de015972c06f3865ef718" + "reference": "08cfc6c4f3d811584fb09c37e2849e6a7f9b0742" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thephpleague/uri-interfaces/zipball/8d43ef5c841032c87e2de015972c06f3865ef718", - "reference": "8d43ef5c841032c87e2de015972c06f3865ef718", + "url": "https://api.github.com/repos/thephpleague/uri-interfaces/zipball/08cfc6c4f3d811584fb09c37e2849e6a7f9b0742", + "reference": "08cfc6c4f3d811584fb09c37e2849e6a7f9b0742", "shasum": "" }, "require": { @@ -3327,7 +3327,7 @@ "docs": "https://uri.thephpleague.com", "forum": "https://thephpleague.slack.com", "issues": "https://github.com/thephpleague/uri-src/issues", - "source": "https://github.com/thephpleague/uri-interfaces/tree/7.4.1" + "source": "https://github.com/thephpleague/uri-interfaces/tree/7.5.0" }, "funding": [ { @@ -3335,20 +3335,20 @@ "type": "github" } ], - "time": "2024-03-23T07:42:40+00:00" + "time": "2024-12-08T08:18:47+00:00" }, { "name": "monolog/monolog", - "version": "3.7.0", + "version": "3.8.1", "source": { "type": "git", "url": "https://github.com/Seldaek/monolog.git", - "reference": "f4393b648b78a5408747de94fca38beb5f7e9ef8" + "reference": "aef6ee73a77a66e404dd6540934a9ef1b3c855b4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Seldaek/monolog/zipball/f4393b648b78a5408747de94fca38beb5f7e9ef8", - "reference": "f4393b648b78a5408747de94fca38beb5f7e9ef8", + "url": "https://api.github.com/repos/Seldaek/monolog/zipball/aef6ee73a77a66e404dd6540934a9ef1b3c855b4", + "reference": "aef6ee73a77a66e404dd6540934a9ef1b3c855b4", "shasum": "" }, "require": { @@ -3368,12 +3368,14 @@ "guzzlehttp/psr7": "^2.2", "mongodb/mongodb": "^1.8", "php-amqplib/php-amqplib": "~2.4 || ^3", - "phpstan/phpstan": "^1.9", - "phpstan/phpstan-deprecation-rules": "^1.0", - "phpstan/phpstan-strict-rules": "^1.4", - "phpunit/phpunit": "^10.5.17", + "php-console/php-console": "^3.1.8", + "phpstan/phpstan": "^2", + "phpstan/phpstan-deprecation-rules": "^2", + "phpstan/phpstan-strict-rules": "^2", + "phpunit/phpunit": "^10.5.17 || ^11.0.7", "predis/predis": "^1.1 || ^2", - "ruflin/elastica": "^7", + "rollbar/rollbar": "^4.0", + "ruflin/elastica": "^7 || ^8", "symfony/mailer": "^5.4 || ^6", "symfony/mime": "^5.4 || ^6" }, @@ -3424,7 +3426,7 @@ ], "support": { "issues": "https://github.com/Seldaek/monolog/issues", - "source": "https://github.com/Seldaek/monolog/tree/3.7.0" + "source": "https://github.com/Seldaek/monolog/tree/3.8.1" }, "funding": [ { @@ -3436,7 +3438,7 @@ "type": "tidelift" } ], - "time": "2024-06-28T09:40:51+00:00" + "time": "2024-12-05T17:15:07+00:00" }, { "name": "nikic/fast-route", @@ -3850,16 +3852,16 @@ }, { "name": "promphp/prometheus_client_php", - "version": "v2.12.0", + "version": "v2.13.0", "source": { "type": "git", "url": "https://github.com/PromPHP/prometheus_client_php.git", - "reference": "50b70a6df4017081917e004f177a3c01cc8115db" + "reference": "abe6bbb198ba83a306c45c9872c8f386dc323e91" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/PromPHP/prometheus_client_php/zipball/50b70a6df4017081917e004f177a3c01cc8115db", - "reference": "50b70a6df4017081917e004f177a3c01cc8115db", + "url": "https://api.github.com/repos/PromPHP/prometheus_client_php/zipball/abe6bbb198ba83a306c45c9872c8f386dc323e91", + "reference": "abe6bbb198ba83a306c45c9872c8f386dc323e91", "shasum": "" }, "require": { @@ -3912,9 +3914,9 @@ "description": "Prometheus instrumentation library for PHP applications.", "support": { "issues": "https://github.com/PromPHP/prometheus_client_php/issues", - "source": "https://github.com/PromPHP/prometheus_client_php/tree/v2.12.0" + "source": "https://github.com/PromPHP/prometheus_client_php/tree/v2.13.0" }, - "time": "2024-10-18T07:33:22+00:00" + "time": "2024-12-02T12:27:42+00:00" }, { "name": "psr/http-factory", @@ -4172,8 +4174,8 @@ "type": "library", "extra": { "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" + "url": "https://github.com/symfony/polyfill", + "name": "symfony/polyfill" } }, "autoload": { @@ -4567,16 +4569,16 @@ }, { "name": "composer/pcre", - "version": "3.3.1", + "version": "3.3.2", "source": { "type": "git", "url": "https://github.com/composer/pcre.git", - "reference": "63aaeac21d7e775ff9bc9d45021e1745c97521c4" + "reference": "b2bed4734f0cc156ee1fe9c0da2550420d99a21e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/pcre/zipball/63aaeac21d7e775ff9bc9d45021e1745c97521c4", - "reference": "63aaeac21d7e775ff9bc9d45021e1745c97521c4", + "url": "https://api.github.com/repos/composer/pcre/zipball/b2bed4734f0cc156ee1fe9c0da2550420d99a21e", + "reference": "b2bed4734f0cc156ee1fe9c0da2550420d99a21e", "shasum": "" }, "require": { @@ -4586,8 +4588,8 @@ "phpstan/phpstan": "<1.11.10" }, "require-dev": { - "phpstan/phpstan": "^1.11.10", - "phpstan/phpstan-strict-rules": "^1.1", + "phpstan/phpstan": "^1.12 || ^2", + "phpstan/phpstan-strict-rules": "^1 || ^2", "phpunit/phpunit": "^8 || ^9" }, "type": "library", @@ -4626,7 +4628,7 @@ ], "support": { "issues": "https://github.com/composer/pcre/issues", - "source": "https://github.com/composer/pcre/tree/3.3.1" + "source": "https://github.com/composer/pcre/tree/3.3.2" }, "funding": [ { @@ -4642,7 +4644,7 @@ "type": "tidelift" } ], - "time": "2024-08-27T18:44:43+00:00" + "time": "2024-11-12T16:29:46+00:00" }, { "name": "composer/semver", @@ -4901,16 +4903,16 @@ }, { "name": "friendsofphp/php-cs-fixer", - "version": "v3.64.0", + "version": "v3.65.0", "source": { "type": "git", "url": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer.git", - "reference": "58dd9c931c785a79739310aef5178928305ffa67" + "reference": "79d4f3e77b250a7d8043d76c6af8f0695e8a469f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/PHP-CS-Fixer/PHP-CS-Fixer/zipball/58dd9c931c785a79739310aef5178928305ffa67", - "reference": "58dd9c931c785a79739310aef5178928305ffa67", + "url": "https://api.github.com/repos/PHP-CS-Fixer/PHP-CS-Fixer/zipball/79d4f3e77b250a7d8043d76c6af8f0695e8a469f", + "reference": "79d4f3e77b250a7d8043d76c6af8f0695e8a469f", "shasum": "" }, "require": { @@ -4920,7 +4922,7 @@ "ext-filter": "*", "ext-json": "*", "ext-tokenizer": "*", - "fidry/cpu-core-counter": "^1.0", + "fidry/cpu-core-counter": "^1.2", "php": "^7.4 || ^8.0", "react/child-process": "^0.6.5", "react/event-loop": "^1.0", @@ -4940,18 +4942,18 @@ "symfony/stopwatch": "^5.4 || ^6.0 || ^7.0" }, "require-dev": { - "facile-it/paraunit": "^1.3 || ^2.3", - "infection/infection": "^0.29.5", - "justinrainbow/json-schema": "^5.2", + "facile-it/paraunit": "^1.3.1 || ^2.4", + "infection/infection": "^0.29.8", + "justinrainbow/json-schema": "^5.3 || ^6.0", "keradus/cli-executor": "^2.1", - "mikey179/vfsstream": "^1.6.11", + "mikey179/vfsstream": "^1.6.12", "php-coveralls/php-coveralls": "^2.7", "php-cs-fixer/accessible-object": "^1.1", "php-cs-fixer/phpunit-constraint-isidenticalstring": "^1.5", "php-cs-fixer/phpunit-constraint-xmlmatchesxsd": "^1.5", - "phpunit/phpunit": "^9.6.19 || ^10.5.21 || ^11.2", - "symfony/var-dumper": "^5.4 || ^6.0 || ^7.0", - "symfony/yaml": "^5.4 || ^6.0 || ^7.0" + "phpunit/phpunit": "^9.6.21 || ^10.5.38 || ^11.4.3", + "symfony/var-dumper": "^5.4.47 || ^6.4.15 || ^7.1.8", + "symfony/yaml": "^5.4.45 || ^6.4.13 || ^7.1.6" }, "suggest": { "ext-dom": "For handling output formats in XML", @@ -4992,7 +4994,7 @@ ], "support": { "issues": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/issues", - "source": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/tree/v3.64.0" + "source": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/tree/v3.65.0" }, "funding": [ { @@ -5000,7 +5002,7 @@ "type": "github" } ], - "time": "2024-08-30T23:09:38+00:00" + "time": "2024-11-25T00:39:24+00:00" }, { "name": "psr/container", @@ -5704,16 +5706,16 @@ }, { "name": "symfony/console", - "version": "v7.1.6", + "version": "v7.2.0", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "bb5192af6edc797cbab5c8e8ecfea2fe5f421e57" + "reference": "23c8aae6d764e2bae02d2a99f7532a7f6ed619cf" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/bb5192af6edc797cbab5c8e8ecfea2fe5f421e57", - "reference": "bb5192af6edc797cbab5c8e8ecfea2fe5f421e57", + "url": "https://api.github.com/repos/symfony/console/zipball/23c8aae6d764e2bae02d2a99f7532a7f6ed619cf", + "reference": "23c8aae6d764e2bae02d2a99f7532a7f6ed619cf", "shasum": "" }, "require": { @@ -5777,7 +5779,7 @@ "terminal" ], "support": { - "source": "https://github.com/symfony/console/tree/v7.1.6" + "source": "https://github.com/symfony/console/tree/v7.2.0" }, "funding": [ { @@ -5793,20 +5795,20 @@ "type": "tidelift" } ], - "time": "2024-10-09T08:46:59+00:00" + "time": "2024-11-06T14:24:19+00:00" }, { "name": "symfony/deprecation-contracts", - "version": "v3.5.0", + "version": "v3.5.1", "source": { "type": "git", "url": "https://github.com/symfony/deprecation-contracts.git", - "reference": "0e0d29ce1f20deffb4ab1b016a7257c4f1e789a1" + "reference": "74c71c939a79f7d5bf3c1ce9f5ea37ba0114c6f6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/0e0d29ce1f20deffb4ab1b016a7257c4f1e789a1", - "reference": "0e0d29ce1f20deffb4ab1b016a7257c4f1e789a1", + "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/74c71c939a79f7d5bf3c1ce9f5ea37ba0114c6f6", + "reference": "74c71c939a79f7d5bf3c1ce9f5ea37ba0114c6f6", "shasum": "" }, "require": { @@ -5844,7 +5846,7 @@ "description": "A generic function and convention to trigger deprecation notices", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/deprecation-contracts/tree/v3.5.0" + "source": "https://github.com/symfony/deprecation-contracts/tree/v3.5.1" }, "funding": [ { @@ -5860,20 +5862,20 @@ "type": "tidelift" } ], - "time": "2024-04-18T09:32:20+00:00" + "time": "2024-09-25T14:20:29+00:00" }, { "name": "symfony/event-dispatcher", - "version": "v7.1.6", + "version": "v7.2.0", "source": { "type": "git", "url": "https://github.com/symfony/event-dispatcher.git", - "reference": "87254c78dd50721cfd015b62277a8281c5589702" + "reference": "910c5db85a5356d0fea57680defec4e99eb9c8c1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/87254c78dd50721cfd015b62277a8281c5589702", - "reference": "87254c78dd50721cfd015b62277a8281c5589702", + "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/910c5db85a5356d0fea57680defec4e99eb9c8c1", + "reference": "910c5db85a5356d0fea57680defec4e99eb9c8c1", "shasum": "" }, "require": { @@ -5924,7 +5926,7 @@ "description": "Provides tools that allow your application components to communicate with each other by dispatching events and listening to them", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/event-dispatcher/tree/v7.1.6" + "source": "https://github.com/symfony/event-dispatcher/tree/v7.2.0" }, "funding": [ { @@ -5940,20 +5942,20 @@ "type": "tidelift" } ], - "time": "2024-09-25T14:20:29+00:00" + "time": "2024-09-25T14:21:43+00:00" }, { "name": "symfony/event-dispatcher-contracts", - "version": "v3.5.0", + "version": "v3.5.1", "source": { "type": "git", "url": "https://github.com/symfony/event-dispatcher-contracts.git", - "reference": "8f93aec25d41b72493c6ddff14e916177c9efc50" + "reference": "7642f5e970b672283b7823222ae8ef8bbc160b9f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher-contracts/zipball/8f93aec25d41b72493c6ddff14e916177c9efc50", - "reference": "8f93aec25d41b72493c6ddff14e916177c9efc50", + "url": "https://api.github.com/repos/symfony/event-dispatcher-contracts/zipball/7642f5e970b672283b7823222ae8ef8bbc160b9f", + "reference": "7642f5e970b672283b7823222ae8ef8bbc160b9f", "shasum": "" }, "require": { @@ -6000,7 +6002,7 @@ "standards" ], "support": { - "source": "https://github.com/symfony/event-dispatcher-contracts/tree/v3.5.0" + "source": "https://github.com/symfony/event-dispatcher-contracts/tree/v3.5.1" }, "funding": [ { @@ -6016,20 +6018,20 @@ "type": "tidelift" } ], - "time": "2024-04-18T09:32:20+00:00" + "time": "2024-09-25T14:20:29+00:00" }, { "name": "symfony/filesystem", - "version": "v7.1.6", + "version": "v7.2.0", "source": { "type": "git", "url": "https://github.com/symfony/filesystem.git", - "reference": "c835867b3c62bb05c7fe3d637c871c7ae52024d4" + "reference": "b8dce482de9d7c9fe2891155035a7248ab5c7fdb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/filesystem/zipball/c835867b3c62bb05c7fe3d637c871c7ae52024d4", - "reference": "c835867b3c62bb05c7fe3d637c871c7ae52024d4", + "url": "https://api.github.com/repos/symfony/filesystem/zipball/b8dce482de9d7c9fe2891155035a7248ab5c7fdb", + "reference": "b8dce482de9d7c9fe2891155035a7248ab5c7fdb", "shasum": "" }, "require": { @@ -6066,7 +6068,7 @@ "description": "Provides basic utilities for the filesystem", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/filesystem/tree/v7.1.6" + "source": "https://github.com/symfony/filesystem/tree/v7.2.0" }, "funding": [ { @@ -6082,20 +6084,20 @@ "type": "tidelift" } ], - "time": "2024-10-25T15:11:02+00:00" + "time": "2024-10-25T15:15:23+00:00" }, { "name": "symfony/finder", - "version": "v7.1.6", + "version": "v7.2.0", "source": { "type": "git", "url": "https://github.com/symfony/finder.git", - "reference": "2cb89664897be33f78c65d3d2845954c8d7a43b8" + "reference": "6de263e5868b9a137602dd1e33e4d48bfae99c49" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/finder/zipball/2cb89664897be33f78c65d3d2845954c8d7a43b8", - "reference": "2cb89664897be33f78c65d3d2845954c8d7a43b8", + "url": "https://api.github.com/repos/symfony/finder/zipball/6de263e5868b9a137602dd1e33e4d48bfae99c49", + "reference": "6de263e5868b9a137602dd1e33e4d48bfae99c49", "shasum": "" }, "require": { @@ -6130,7 +6132,7 @@ "description": "Finds files and directories via an intuitive fluent interface", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/finder/tree/v7.1.6" + "source": "https://github.com/symfony/finder/tree/v7.2.0" }, "funding": [ { @@ -6146,20 +6148,20 @@ "type": "tidelift" } ], - "time": "2024-10-01T08:31:23+00:00" + "time": "2024-10-23T06:56:12+00:00" }, { "name": "symfony/options-resolver", - "version": "v7.1.6", + "version": "v7.2.0", "source": { "type": "git", "url": "https://github.com/symfony/options-resolver.git", - "reference": "85e95eeede2d41cd146146e98c9c81d9214cae85" + "reference": "7da8fbac9dcfef75ffc212235d76b2754ce0cf50" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/options-resolver/zipball/85e95eeede2d41cd146146e98c9c81d9214cae85", - "reference": "85e95eeede2d41cd146146e98c9c81d9214cae85", + "url": "https://api.github.com/repos/symfony/options-resolver/zipball/7da8fbac9dcfef75ffc212235d76b2754ce0cf50", + "reference": "7da8fbac9dcfef75ffc212235d76b2754ce0cf50", "shasum": "" }, "require": { @@ -6197,7 +6199,7 @@ "options" ], "support": { - "source": "https://github.com/symfony/options-resolver/tree/v7.1.6" + "source": "https://github.com/symfony/options-resolver/tree/v7.2.0" }, "funding": [ { @@ -6213,7 +6215,7 @@ "type": "tidelift" } ], - "time": "2024-09-25T14:20:29+00:00" + "time": "2024-11-20T11:17:29+00:00" }, { "name": "symfony/polyfill-intl-grapheme", @@ -6238,8 +6240,8 @@ "type": "library", "extra": { "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" + "url": "https://github.com/symfony/polyfill", + "name": "symfony/polyfill" } }, "autoload": { @@ -6316,8 +6318,8 @@ "type": "library", "extra": { "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" + "url": "https://github.com/symfony/polyfill", + "name": "symfony/polyfill" } }, "autoload": { @@ -6394,8 +6396,8 @@ "type": "library", "extra": { "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" + "url": "https://github.com/symfony/polyfill", + "name": "symfony/polyfill" } }, "autoload": { @@ -6474,8 +6476,8 @@ "type": "library", "extra": { "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" + "url": "https://github.com/symfony/polyfill", + "name": "symfony/polyfill" } }, "autoload": { @@ -6532,16 +6534,16 @@ }, { "name": "symfony/process", - "version": "v7.1.6", + "version": "v7.2.0", "source": { "type": "git", "url": "https://github.com/symfony/process.git", - "reference": "6aaa189ddb4ff6b5de8fa3210f2fb42c87b4d12e" + "reference": "d34b22ba9390ec19d2dd966c40aa9e8462f27a7e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/6aaa189ddb4ff6b5de8fa3210f2fb42c87b4d12e", - "reference": "6aaa189ddb4ff6b5de8fa3210f2fb42c87b4d12e", + "url": "https://api.github.com/repos/symfony/process/zipball/d34b22ba9390ec19d2dd966c40aa9e8462f27a7e", + "reference": "d34b22ba9390ec19d2dd966c40aa9e8462f27a7e", "shasum": "" }, "require": { @@ -6573,7 +6575,7 @@ "description": "Executes commands in sub-processes", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/process/tree/v7.1.6" + "source": "https://github.com/symfony/process/tree/v7.2.0" }, "funding": [ { @@ -6589,20 +6591,20 @@ "type": "tidelift" } ], - "time": "2024-09-25T14:20:29+00:00" + "time": "2024-11-06T14:24:19+00:00" }, { "name": "symfony/service-contracts", - "version": "v3.5.0", + "version": "v3.5.1", "source": { "type": "git", "url": "https://github.com/symfony/service-contracts.git", - "reference": "bd1d9e59a81d8fa4acdcea3f617c581f7475a80f" + "reference": "e53260aabf78fb3d63f8d79d69ece59f80d5eda0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/service-contracts/zipball/bd1d9e59a81d8fa4acdcea3f617c581f7475a80f", - "reference": "bd1d9e59a81d8fa4acdcea3f617c581f7475a80f", + "url": "https://api.github.com/repos/symfony/service-contracts/zipball/e53260aabf78fb3d63f8d79d69ece59f80d5eda0", + "reference": "e53260aabf78fb3d63f8d79d69ece59f80d5eda0", "shasum": "" }, "require": { @@ -6656,7 +6658,7 @@ "standards" ], "support": { - "source": "https://github.com/symfony/service-contracts/tree/v3.5.0" + "source": "https://github.com/symfony/service-contracts/tree/v3.5.1" }, "funding": [ { @@ -6672,20 +6674,20 @@ "type": "tidelift" } ], - "time": "2024-04-18T09:32:20+00:00" + "time": "2024-09-25T14:20:29+00:00" }, { "name": "symfony/stopwatch", - "version": "v7.1.6", + "version": "v7.2.0", "source": { "type": "git", "url": "https://github.com/symfony/stopwatch.git", - "reference": "8b4a434e6e7faf6adedffb48783a5c75409a1a05" + "reference": "696f418b0d722a4225e1c3d95489d262971ca924" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/stopwatch/zipball/8b4a434e6e7faf6adedffb48783a5c75409a1a05", - "reference": "8b4a434e6e7faf6adedffb48783a5c75409a1a05", + "url": "https://api.github.com/repos/symfony/stopwatch/zipball/696f418b0d722a4225e1c3d95489d262971ca924", + "reference": "696f418b0d722a4225e1c3d95489d262971ca924", "shasum": "" }, "require": { @@ -6718,7 +6720,7 @@ "description": "Provides a way to profile code", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/stopwatch/tree/v7.1.6" + "source": "https://github.com/symfony/stopwatch/tree/v7.2.0" }, "funding": [ { @@ -6734,20 +6736,20 @@ "type": "tidelift" } ], - "time": "2024-09-25T14:20:29+00:00" + "time": "2024-09-25T14:21:43+00:00" }, { "name": "symfony/string", - "version": "v7.1.6", + "version": "v7.2.0", "source": { "type": "git", "url": "https://github.com/symfony/string.git", - "reference": "61b72d66bf96c360a727ae6232df5ac83c71f626" + "reference": "446e0d146f991dde3e73f45f2c97a9faad773c82" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/string/zipball/61b72d66bf96c360a727ae6232df5ac83c71f626", - "reference": "61b72d66bf96c360a727ae6232df5ac83c71f626", + "url": "https://api.github.com/repos/symfony/string/zipball/446e0d146f991dde3e73f45f2c97a9faad773c82", + "reference": "446e0d146f991dde3e73f45f2c97a9faad773c82", "shasum": "" }, "require": { @@ -6805,7 +6807,7 @@ "utf8" ], "support": { - "source": "https://github.com/symfony/string/tree/v7.1.6" + "source": "https://github.com/symfony/string/tree/v7.2.0" }, "funding": [ { @@ -6821,14 +6823,14 @@ "type": "tidelift" } ], - "time": "2024-09-25T14:20:29+00:00" + "time": "2024-11-13T13:31:26+00:00" } ], "aliases": [], "minimum-stability": "dev", "stability-flags": { - "danog/madelineproto": 20, - "amphp/dns": 20 + "amphp/dns": 20, + "danog/madelineproto": 20 }, "prefer-stable": true, "prefer-lowest": false, @@ -6838,6 +6840,6 @@ "ext-mbstring": "*", "ext-curl": "*" }, - "platform-dev": [], + "platform-dev": {}, "plugin-api-version": "2.6.0" } From 100cda3997bcc786997c0c2657d4c835b1886dff Mon Sep 17 00:00:00 2001 From: Alexander Pankratov Date: Mon, 16 Dec 2024 12:51:20 +0100 Subject: [PATCH 184/270] Update madeline --- composer.lock | 104 +++++++++++++++++++++++++------------------------- 1 file changed, 52 insertions(+), 52 deletions(-) diff --git a/composer.lock b/composer.lock index ad5889f..ce01b03 100644 --- a/composer.lock +++ b/composer.lock @@ -319,23 +319,23 @@ }, { "name": "amphp/file", - "version": "v3.1.1", + "version": "v3.2.0", "source": { "type": "git", "url": "https://github.com/amphp/file.git", - "reference": "58c8efefb8808d25456ef3ef4a628645442578a2" + "reference": "28b38a805d2c235bb581d24415e78a42cd03aedc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/amphp/file/zipball/58c8efefb8808d25456ef3ef4a628645442578a2", - "reference": "58c8efefb8808d25456ef3ef4a628645442578a2", + "url": "https://api.github.com/repos/amphp/file/zipball/28b38a805d2c235bb581d24415e78a42cd03aedc", + "reference": "28b38a805d2c235bb581d24415e78a42cd03aedc", "shasum": "" }, "require": { "amphp/amp": "^3", "amphp/byte-stream": "^2", "amphp/cache": "^2", - "amphp/parallel": "^2.1", + "amphp/parallel": "^2.3", "amphp/sync": "^2", "php": ">=8.1", "revolt/event-loop": "^1" @@ -392,7 +392,7 @@ ], "support": { "issues": "https://github.com/amphp/file/issues", - "source": "https://github.com/amphp/file/tree/v3.1.1" + "source": "https://github.com/amphp/file/tree/v3.2.0" }, "funding": [ { @@ -400,7 +400,7 @@ "type": "github" } ], - "time": "2024-08-15T15:04:06+00:00" + "time": "2024-12-06T23:39:02+00:00" }, { "name": "amphp/hpack", @@ -542,16 +542,16 @@ }, { "name": "amphp/http-client", - "version": "v5.2.0", + "version": "v5.2.1", "source": { "type": "git", "url": "https://github.com/amphp/http-client.git", - "reference": "30888873d747d994ad0b2719134211c587134fb5" + "reference": "2117f7e7cd1ecf35d4d0daea1ba5dc6fd318b114" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/amphp/http-client/zipball/30888873d747d994ad0b2719134211c587134fb5", - "reference": "30888873d747d994ad0b2719134211c587134fb5", + "url": "https://api.github.com/repos/amphp/http-client/zipball/2117f7e7cd1ecf35d4d0daea1ba5dc6fd318b114", + "reference": "2117f7e7cd1ecf35d4d0daea1ba5dc6fd318b114", "shasum": "" }, "require": { @@ -562,8 +562,8 @@ "amphp/pipeline": "^1", "amphp/socket": "^2", "amphp/sync": "^2", - "league/uri": "^6 | ^7", - "league/uri-components": "^2.4 | ^7", + "league/uri": "^7", + "league/uri-components": "^7", "league/uri-interfaces": "^7.1", "php": ">=8.1", "psr/http-message": "^1 | ^2", @@ -625,7 +625,7 @@ ], "support": { "issues": "https://github.com/amphp/http-client/issues", - "source": "https://github.com/amphp/http-client/tree/v5.2.0" + "source": "https://github.com/amphp/http-client/tree/v5.2.1" }, "funding": [ { @@ -633,7 +633,7 @@ "type": "github" } ], - "time": "2024-12-07T00:28:37+00:00" + "time": "2024-12-13T16:16:08+00:00" }, { "name": "amphp/http-client-cookies", @@ -714,16 +714,16 @@ }, { "name": "amphp/http-server", - "version": "v3.3.1", + "version": "v3.4.0", "source": { "type": "git", "url": "https://github.com/amphp/http-server.git", - "reference": "26001b1ffac11db30c627ed4daba2088951b0ffa" + "reference": "4b87c0f359835406184ac04f31563f8e29d9f883" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/amphp/http-server/zipball/26001b1ffac11db30c627ed4daba2088951b0ffa", - "reference": "26001b1ffac11db30c627ed4daba2088951b0ffa", + "url": "https://api.github.com/repos/amphp/http-server/zipball/4b87c0f359835406184ac04f31563f8e29d9f883", + "reference": "4b87c0f359835406184ac04f31563f8e29d9f883", "shasum": "" }, "require": { @@ -734,7 +734,7 @@ "amphp/http": "^2", "amphp/pipeline": "^1", "amphp/socket": "^2.1", - "amphp/sync": "^2", + "amphp/sync": "^2.2", "league/uri": "^6.8 | ^7.1", "league/uri-interfaces": "^2.3 | ^7.1", "php": ">=8.1", @@ -799,7 +799,7 @@ ], "support": { "issues": "https://github.com/amphp/http-server/issues", - "source": "https://github.com/amphp/http-server/tree/v3.3.1" + "source": "https://github.com/amphp/http-server/tree/v3.4.0" }, "funding": [ { @@ -807,7 +807,7 @@ "type": "github" } ], - "time": "2024-04-21T15:46:46+00:00" + "time": "2024-12-15T17:14:18+00:00" }, { "name": "amphp/http-server-form-parser", @@ -2583,21 +2583,21 @@ "source": { "type": "git", "url": "https://github.com/danog/MadelineProto.git", - "reference": "6ed73bfd391f634d933c8aaaad2b70105be081dd" + "reference": "a8ef54df3230d4ac42f399045f037430b0791bf4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/danog/MadelineProto/zipball/6ed73bfd391f634d933c8aaaad2b70105be081dd", - "reference": "6ed73bfd391f634d933c8aaaad2b70105be081dd", + "url": "https://api.github.com/repos/danog/MadelineProto/zipball/a8ef54df3230d4ac42f399045f037430b0791bf4", + "reference": "a8ef54df3230d4ac42f399045f037430b0791bf4", "shasum": "" }, "require": { "amphp/amp": "^3.0.2", "amphp/byte-stream": "^2.1.1", "amphp/dns": "^2.2.0", - "amphp/file": "^3.1.1", + "amphp/file": "^3.2.0", "amphp/http": "^2.1.2", - "amphp/http-client": "^5.1.0", + "amphp/http-client": "^5.2.1", "amphp/http-client-cookies": "^2", "amphp/http-server": "^3.3.1", "amphp/log": "^2", @@ -2605,11 +2605,11 @@ "amphp/postgres": "^2.1.1", "amphp/redis": "^2.0.1", "amphp/socket": "^2.3.1", - "amphp/websocket-client": "^2", + "amphp/websocket-client": "^2.0.1", "bacon/bacon-qr-code": "^3.0.1", "danog/async-orm": "^1.1.0", "danog/better-prometheus": "^0.1.1", - "danog/dns-over-https": "^1", + "danog/dns-over-https": "^1.0.1", "danog/ipc": "^1", "danog/loop": "^1.1.1", "danog/primemodule": "^1.0.13", @@ -2623,7 +2623,7 @@ "ext-json": "*", "ext-xml": "*", "ext-zlib": "*", - "league/uri": "^7.4.1", + "league/uri": "^7.5.1", "nikic/php-parser": "^5.3.1", "php-64bit": ">=8.2", "phpseclib/phpseclib": "^3.0.42", @@ -2644,7 +2644,7 @@ "danog/phpdoc": "^0.1.24", "dg/bypass-finals": "dev-master", "ext-ctype": "*", - "phpunit/phpunit": "^9.6.21", + "phpunit/phpunit": "^9.6.22", "revolt/event-loop-adapter-react": "^1.1.1", "symfony/yaml": "^6.4.13", "vimeo/psalm": "dev-master" @@ -2703,7 +2703,7 @@ "type": "github" } ], - "time": "2024-12-09T17:33:51+00:00" + "time": "2024-12-16T11:50:20+00:00" }, { "name": "danog/primemodule", @@ -3742,16 +3742,16 @@ }, { "name": "phpseclib/phpseclib", - "version": "3.0.42", + "version": "3.0.43", "source": { "type": "git", "url": "https://github.com/phpseclib/phpseclib.git", - "reference": "db92f1b1987b12b13f248fe76c3a52cadb67bb98" + "reference": "709ec107af3cb2f385b9617be72af8cf62441d02" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpseclib/phpseclib/zipball/db92f1b1987b12b13f248fe76c3a52cadb67bb98", - "reference": "db92f1b1987b12b13f248fe76c3a52cadb67bb98", + "url": "https://api.github.com/repos/phpseclib/phpseclib/zipball/709ec107af3cb2f385b9617be72af8cf62441d02", + "reference": "709ec107af3cb2f385b9617be72af8cf62441d02", "shasum": "" }, "require": { @@ -3832,7 +3832,7 @@ ], "support": { "issues": "https://github.com/phpseclib/phpseclib/issues", - "source": "https://github.com/phpseclib/phpseclib/tree/3.0.42" + "source": "https://github.com/phpseclib/phpseclib/tree/3.0.43" }, "funding": [ { @@ -3848,20 +3848,20 @@ "type": "tidelift" } ], - "time": "2024-09-16T03:06:04+00:00" + "time": "2024-12-14T21:12:59+00:00" }, { "name": "promphp/prometheus_client_php", - "version": "v2.13.0", + "version": "v2.13.1", "source": { "type": "git", "url": "https://github.com/PromPHP/prometheus_client_php.git", - "reference": "abe6bbb198ba83a306c45c9872c8f386dc323e91" + "reference": "3f8e4ff20e4090e494572feaf68b36c197e0e3ef" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/PromPHP/prometheus_client_php/zipball/abe6bbb198ba83a306c45c9872c8f386dc323e91", - "reference": "abe6bbb198ba83a306c45c9872c8f386dc323e91", + "url": "https://api.github.com/repos/PromPHP/prometheus_client_php/zipball/3f8e4ff20e4090e494572feaf68b36c197e0e3ef", + "reference": "3f8e4ff20e4090e494572feaf68b36c197e0e3ef", "shasum": "" }, "require": { @@ -3914,9 +3914,9 @@ "description": "Prometheus instrumentation library for PHP applications.", "support": { "issues": "https://github.com/PromPHP/prometheus_client_php/issues", - "source": "https://github.com/PromPHP/prometheus_client_php/tree/v2.13.0" + "source": "https://github.com/PromPHP/prometheus_client_php/tree/v2.13.1" }, - "time": "2024-12-02T12:27:42+00:00" + "time": "2024-12-10T13:48:27+00:00" }, { "name": "psr/http-factory", @@ -4253,8 +4253,8 @@ "type": "library", "extra": { "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" + "url": "https://github.com/symfony/polyfill", + "name": "symfony/polyfill" } }, "autoload": { @@ -5706,16 +5706,16 @@ }, { "name": "symfony/console", - "version": "v7.2.0", + "version": "v7.2.1", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "23c8aae6d764e2bae02d2a99f7532a7f6ed619cf" + "reference": "fefcc18c0f5d0efe3ab3152f15857298868dc2c3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/23c8aae6d764e2bae02d2a99f7532a7f6ed619cf", - "reference": "23c8aae6d764e2bae02d2a99f7532a7f6ed619cf", + "url": "https://api.github.com/repos/symfony/console/zipball/fefcc18c0f5d0efe3ab3152f15857298868dc2c3", + "reference": "fefcc18c0f5d0efe3ab3152f15857298868dc2c3", "shasum": "" }, "require": { @@ -5779,7 +5779,7 @@ "terminal" ], "support": { - "source": "https://github.com/symfony/console/tree/v7.2.0" + "source": "https://github.com/symfony/console/tree/v7.2.1" }, "funding": [ { @@ -5795,7 +5795,7 @@ "type": "tidelift" } ], - "time": "2024-11-06T14:24:19+00:00" + "time": "2024-12-11T03:49:26+00:00" }, { "name": "symfony/deprecation-contracts", From 79334cc2ea5396805c98a02f86115266518e520d Mon Sep 17 00:00:00 2001 From: Alexander Pankratov Date: Wed, 18 Dec 2024 11:48:42 +0100 Subject: [PATCH 185/270] Fix: ads bug --- composer.lock | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/composer.lock b/composer.lock index ce01b03..8b859e9 100644 --- a/composer.lock +++ b/composer.lock @@ -233,12 +233,12 @@ "source": { "type": "git", "url": "https://github.com/amphp/dns.git", - "reference": "b7515c1c41e12cbd09b1ab76872bf0b04e949142" + "reference": "f2ed903c0a522593c7c552fa5b1e20dfe7ba1ec6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/amphp/dns/zipball/b7515c1c41e12cbd09b1ab76872bf0b04e949142", - "reference": "b7515c1c41e12cbd09b1ab76872bf0b04e949142", + "url": "https://api.github.com/repos/amphp/dns/zipball/f2ed903c0a522593c7c552fa5b1e20dfe7ba1ec6", + "reference": "f2ed903c0a522593c7c552fa5b1e20dfe7ba1ec6", "shasum": "" }, "require": { @@ -315,7 +315,7 @@ "type": "github" } ], - "time": "2024-08-11T15:10:35+00:00" + "time": "2024-12-17T05:20:18+00:00" }, { "name": "amphp/file", @@ -2583,12 +2583,12 @@ "source": { "type": "git", "url": "https://github.com/danog/MadelineProto.git", - "reference": "a8ef54df3230d4ac42f399045f037430b0791bf4" + "reference": "ef4adcb251713239eb40d6ae041e3aa805b8b7a3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/danog/MadelineProto/zipball/a8ef54df3230d4ac42f399045f037430b0791bf4", - "reference": "a8ef54df3230d4ac42f399045f037430b0791bf4", + "url": "https://api.github.com/repos/danog/MadelineProto/zipball/ef4adcb251713239eb40d6ae041e3aa805b8b7a3", + "reference": "ef4adcb251713239eb40d6ae041e3aa805b8b7a3", "shasum": "" }, "require": { @@ -2703,7 +2703,7 @@ "type": "github" } ], - "time": "2024-12-16T11:50:20+00:00" + "time": "2024-12-18T10:46:10+00:00" }, { "name": "danog/primemodule", From 19c3c807646ebd7ddc1d0edd7cbaf8611d6ad57c Mon Sep 17 00:00:00 2001 From: Alexander Pankratov Date: Thu, 19 Dec 2024 18:23:05 +0100 Subject: [PATCH 186/270] Fix: disable prometheus --- composer.lock | 8 ++++---- config.php | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/composer.lock b/composer.lock index 8b859e9..7183326 100644 --- a/composer.lock +++ b/composer.lock @@ -2583,12 +2583,12 @@ "source": { "type": "git", "url": "https://github.com/danog/MadelineProto.git", - "reference": "ef4adcb251713239eb40d6ae041e3aa805b8b7a3" + "reference": "c95df658fa2da6721e408fec140f7dc48a5d9ada" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/danog/MadelineProto/zipball/ef4adcb251713239eb40d6ae041e3aa805b8b7a3", - "reference": "ef4adcb251713239eb40d6ae041e3aa805b8b7a3", + "url": "https://api.github.com/repos/danog/MadelineProto/zipball/c95df658fa2da6721e408fec140f7dc48a5d9ada", + "reference": "c95df658fa2da6721e408fec140f7dc48a5d9ada", "shasum": "" }, "require": { @@ -2703,7 +2703,7 @@ "type": "github" } ], - "time": "2024-12-18T10:46:10+00:00" + "time": "2024-12-19T17:19:56+00:00" }, { "name": "danog/primemodule", diff --git a/config.php b/config.php index bf9b416..5a8855d 100644 --- a/config.php +++ b/config.php @@ -76,7 +76,7 @@ static function (string $peer): string|int { ], 'metrics' => [ 'enable_prometheus_collection' => (bool)getenv("PROMETHEUS_ENABLE"), - 'metrics_bind_to' => fromString((string)getenv("PROMETHEUS_BIND_TO")), + 'metrics_bind_to' => (bool)getenv("PROMETHEUS_ENABLE") ? fromString((string)getenv("PROMETHEUS_BIND_TO")) : null, ] ], 'api' => [ From 5e5ae2eadb6c6eee2b0f8eeae11cf7fb878854e2 Mon Sep 17 00:00:00 2001 From: Alexander Pankratov Date: Fri, 20 Dec 2024 16:25:14 +0100 Subject: [PATCH 187/270] Fix: examples --- .env.docker.example | 2 +- .env.example | 2 +- README.md | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.env.docker.example b/.env.docker.example index 31e67c6..318f217 100644 --- a/.env.docker.example +++ b/.env.docker.example @@ -25,7 +25,7 @@ REQUESTS_BULK_INTERVAL=0.0 IP_WHITELIST=127.0.0.1 # Allow requests from any IP with given user and password -# Example: {"myusername": "mySuperStrongPassword", "otherName": "otherPassword"} +# Example: {"myusername":"mySuperStrongPassword","otherName":"otherPassword"} PASSWORDS={} # TELEGRAM CLIENT diff --git a/.env.example b/.env.example index bb21a3a..05f0e7e 100644 --- a/.env.example +++ b/.env.example @@ -23,7 +23,7 @@ REQUESTS_BULK_INTERVAL=0.0 IP_WHITELIST=127.0.0.1 # Allow requests from any IP with given user and password -# Example: {"myusername": "mySuperStrongPassword", "otherName": "otherPassword"} +# Example: {"myUsername":"mySuperStrongPassword","otheruUsername":"otherPassword"} PASSWORDS={} # TELEGRAM CLIENT diff --git a/README.md b/README.md index 95d0e14..0cbea74 100644 --- a/README.md +++ b/README.md @@ -74,7 +74,7 @@ Default settings allow to access API only from localhost/127.0.0.1. If you specify password, then `IP_WHITELIST` is ignored How to make requests with basic auth: ```shell - curl --user 'username:password' "http://127.0.0.1:9503/getSelf" + curl --user username:password "http://127.0.0.1:9503/getSelf" curl "http://username:password@127.0.0.1:9503/getSelf" ``` From 9053a03e5eb5bff0f07477250c9a356f9a9fe91d Mon Sep 17 00:00:00 2001 From: MarcusLestrange Date: Fri, 20 Dec 2024 23:25:56 +0200 Subject: [PATCH 188/270] feat: add sendVideo method --- src/MadelineProtoExtensions/ApiExtensions.php | 26 +++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/src/MadelineProtoExtensions/ApiExtensions.php b/src/MadelineProtoExtensions/ApiExtensions.php index a57fb63..7b810b8 100644 --- a/src/MadelineProtoExtensions/ApiExtensions.php +++ b/src/MadelineProtoExtensions/ApiExtensions.php @@ -440,5 +440,31 @@ public function unsubscribeFromUpdates(?string $channel = null): array 'current_update_loops' => \count(Client::getWrapper($this->madelineProto)->getAPI()->feeders), ]; } + + public function sendVideo(array $data): MadelineProto\EventHandler\Message + { + $fileClass = '\\danog\\MadelineProto\\' . $data['file']['_']; + switch ($data['file']['_']) { + case 'LocalFile': case 'RemoteUrl': { + unset($data['file']['_']); + $data['file'] = new $fileClass(...$data['file']); + break; + } + default: { + throw new InvalidArgumentException("supported file types: LocalFile, RemoteUrl"); + } + } + + if(isset($data['parseMode'])) { + $data['parseMode'] = match ($data['parseMode']) { + 'HTML' => \danog\MadelineProto\ParseMode::HTML, + 'MARKDOWN' => \danog\MadelineProto\ParseMode::MARKDOWN, + 'TEXT' => \danog\MadelineProto\ParseMode::TEXT, + default => throw new InvalidArgumentException("supported parseMode types: HTML, MARKDOWN, TEXT"), + }; + } + + return $this->madelineProto->sendVideo(...$data); + } } From 954fef043271f8dd9efc58f88058eb8ad73f8620 Mon Sep 17 00:00:00 2001 From: MarcusLestrange Date: Sat, 21 Dec 2024 20:56:58 +0200 Subject: [PATCH 189/270] edit Readme --- README.md | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/README.md b/README.md index 0cbea74..94fbf59 100644 --- a/README.md +++ b/README.md @@ -132,6 +132,38 @@ Example uses urlencoded url in query. ### Uploading files. There are few options to upload and send media files: + +- Custom method `sendVideo` to send video by url or local path + ```shell script + curl --location --request POST 'http://127.0.0.1:9503/api/sendVideo' \ + --header 'Content-Type: application/json' \ + --data-raw '{ + "data": { + "peer": "@xtrime", + "file": { + "_": "RemoteUrl", + "url": "https://domain.site/storage/video.mp4" + }, + 'parseMode' => 'HTML', + "caption": "caption text" + } + }' + ``` + ```shell script + curl --location --request POST 'http://127.0.0.1:9503/api/sendVideo' \ + --header 'Content-Type: application/json' \ + --data-raw '{ + "data": { + "peer": "@xtrime", + "file": { + "_": "LocalFile", + "file": realpath('path/to/file.mp4') + }, + "caption": "caption text" + } + }' + ``` + - Custom method `sendMedia` supports upload from form: ```shell script curl "http://127.0.0.1:9503/api/messages.sendMedia?data[peer]=xtrime&data[message]=Hello" -g \ From 7803aef057926bb0562fcf8af71f1009b336747e Mon Sep 17 00:00:00 2001 From: Alexander Pankratov Date: Sun, 22 Dec 2024 18:56:49 +0100 Subject: [PATCH 190/270] Feat: add multipart stream support to sendVideo --- README.md | 14 +------ src/MadelineProtoExtensions/ApiExtensions.php | 42 +++++++++++-------- 2 files changed, 27 insertions(+), 29 deletions(-) diff --git a/README.md b/README.md index 94fbf59..9ff7cc6 100644 --- a/README.md +++ b/README.md @@ -150,18 +150,8 @@ There are few options to upload and send media files: }' ``` ```shell script - curl --location --request POST 'http://127.0.0.1:9503/api/sendVideo' \ - --header 'Content-Type: application/json' \ - --data-raw '{ - "data": { - "peer": "@xtrime", - "file": { - "_": "LocalFile", - "file": realpath('path/to/file.mp4') - }, - "caption": "caption text" - } - }' + curl --location --request POST 'http://127.0.0.1:9503/api/sendVideo/?data[peer]=xtrime&data[caption]=hey' -g \ + -F "file=@ADM-RaceWay-24-08-2014.mp4" ``` - Custom method `sendMedia` supports upload from form: diff --git a/src/MadelineProtoExtensions/ApiExtensions.php b/src/MadelineProtoExtensions/ApiExtensions.php index 7b810b8..3dcd69e 100644 --- a/src/MadelineProtoExtensions/ApiExtensions.php +++ b/src/MadelineProtoExtensions/ApiExtensions.php @@ -2,10 +2,13 @@ namespace TelegramApiServer\MadelineProtoExtensions; +use Amp\ByteStream\ReadableBuffer; +use Amp\ByteStream\WritableResourceStream; use Amp\Http\Server\FormParser\StreamedField; use Amp\Http\Server\Request; use Amp\Http\Server\Response; use danog\MadelineProto; +use danog\MadelineProto\ParseMode; use danog\MadelineProto\StrTools; use InvalidArgumentException; use TelegramApiServer\Client; @@ -443,25 +446,30 @@ public function unsubscribeFromUpdates(?string $channel = null): array public function sendVideo(array $data): MadelineProto\EventHandler\Message { - $fileClass = '\\danog\\MadelineProto\\' . $data['file']['_']; - switch ($data['file']['_']) { - case 'LocalFile': case 'RemoteUrl': { - unset($data['file']['_']); - $data['file'] = new $fileClass(...$data['file']); - break; - } - default: { - throw new InvalidArgumentException("supported file types: LocalFile, RemoteUrl"); - } - } + if (!empty($this->file)) { + $data['file'] = $this->file; + $data['fileName'] = $this->file->getFilename(); + } + + foreach (['file', 'thumb'] as $key) { + if (!empty($data[$key])) { + if (is_array($data[$key]) && !empty($data[$key]['_'])) { + $type = $data[$key]['_']; + unset($data[$key]['_']); + $data[$key] = match ($type) { + 'LocalFile' => new MadelineProto\LocalFile(...$data[$key]), + 'RemoteUrl' => new MadelineProto\RemoteUrl(...$data[$key]), + 'BotApiFieldId' => new MadelineProto\BotApiFileId(...$data[$key]), + default => throw new InvalidArgumentException("Unknown type: {$type}"), + }; + } elseif (is_string($data[$key])) { + $data[$key] = new ReadableBuffer($data[$key]); + } + } + } if(isset($data['parseMode'])) { - $data['parseMode'] = match ($data['parseMode']) { - 'HTML' => \danog\MadelineProto\ParseMode::HTML, - 'MARKDOWN' => \danog\MadelineProto\ParseMode::MARKDOWN, - 'TEXT' => \danog\MadelineProto\ParseMode::TEXT, - default => throw new InvalidArgumentException("supported parseMode types: HTML, MARKDOWN, TEXT"), - }; + $data['parseMode'] = ParseMode::from($data['parseMode']); } return $this->madelineProto->sendVideo(...$data); From d809be2abd44031b7fa7dcd400aad6b736839518 Mon Sep 17 00:00:00 2001 From: Alexander Pankratov Date: Sun, 22 Dec 2024 22:28:42 +0100 Subject: [PATCH 191/270] php 8.4 support --- bootstrap.php | 2 +- composer.json | 2 +- composer.lock | 304 ++++++++++++++++++++++++++++++-------------------- 3 files changed, 186 insertions(+), 122 deletions(-) diff --git a/bootstrap.php b/bootstrap.php index 0717e49..1a2ced0 100644 --- a/bootstrap.php +++ b/bootstrap.php @@ -48,7 +48,7 @@ } } - Dotenv\Dotenv::createImmutable(ROOT_DIR, $envFile)->load(); + Dotenv\Dotenv::createUnsafeImmutable(ROOT_DIR, $envFile)->load(); if (getenv('VERSION') !== ENV_VERSION) { Logger::getInstance()->critical("Env version mismatch. Update {$envPath} from {$envPathExample}", [ diff --git a/composer.json b/composer.json index 24aa9fd..1ac2a19 100644 --- a/composer.json +++ b/composer.json @@ -28,7 +28,7 @@ "amphp/http-server-form-parser": "^v2", "amphp/websocket-server": "^3.0.1", "amphp/websocket-client": "^v2", - "vlucas/phpdotenv": "^4.3", + "vlucas/phpdotenv": "^5", "danog/madelineproto": "dev-v8-tas", "amphp/dns": "2.x-dev" }, diff --git a/composer.lock b/composer.lock index 7183326..416c07a 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "4a54f497157904504efa179b11ddac18", + "content-hash": "8ec117f2ff8dea2cad0f4ff5903a5386", "packages": [ { "name": "amphp/amp", @@ -233,12 +233,12 @@ "source": { "type": "git", "url": "https://github.com/amphp/dns.git", - "reference": "f2ed903c0a522593c7c552fa5b1e20dfe7ba1ec6" + "reference": "166c43737cef1b77782c648a9d9ed11ee0c9859f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/amphp/dns/zipball/f2ed903c0a522593c7c552fa5b1e20dfe7ba1ec6", - "reference": "f2ed903c0a522593c7c552fa5b1e20dfe7ba1ec6", + "url": "https://api.github.com/repos/amphp/dns/zipball/166c43737cef1b77782c648a9d9ed11ee0c9859f", + "reference": "166c43737cef1b77782c648a9d9ed11ee0c9859f", "shasum": "" }, "require": { @@ -307,7 +307,7 @@ ], "support": { "issues": "https://github.com/amphp/dns/issues", - "source": "https://github.com/amphp/dns/tree/2.x" + "source": "https://github.com/amphp/dns/tree/v2.3.0" }, "funding": [ { @@ -315,7 +315,7 @@ "type": "github" } ], - "time": "2024-12-17T05:20:18+00:00" + "time": "2024-12-21T01:15:34+00:00" }, { "name": "amphp/file", @@ -714,16 +714,16 @@ }, { "name": "amphp/http-server", - "version": "v3.4.0", + "version": "v3.4.1", "source": { "type": "git", "url": "https://github.com/amphp/http-server.git", - "reference": "4b87c0f359835406184ac04f31563f8e29d9f883" + "reference": "027bd022ee76927bf1b9f0c188744af461ea9f0d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/amphp/http-server/zipball/4b87c0f359835406184ac04f31563f8e29d9f883", - "reference": "4b87c0f359835406184ac04f31563f8e29d9f883", + "url": "https://api.github.com/repos/amphp/http-server/zipball/027bd022ee76927bf1b9f0c188744af461ea9f0d", + "reference": "027bd022ee76927bf1b9f0c188744af461ea9f0d", "shasum": "" }, "require": { @@ -735,8 +735,8 @@ "amphp/pipeline": "^1", "amphp/socket": "^2.1", "amphp/sync": "^2.2", - "league/uri": "^6.8 | ^7.1", - "league/uri-interfaces": "^2.3 | ^7.1", + "league/uri": "^7.1", + "league/uri-interfaces": "^7.1", "php": ">=8.1", "psr/http-message": "^1 | ^2", "psr/log": "^1 | ^2 | ^3", @@ -747,7 +747,7 @@ "amphp/log": "^2", "amphp/php-cs-fixer-config": "^2", "amphp/phpunit-util": "^3", - "league/uri-components": "^2.4.2 | ^7.1", + "league/uri-components": "^7.1", "monolog/monolog": "^3", "phpunit/phpunit": "^9", "psalm/phar": "~5.23" @@ -799,7 +799,7 @@ ], "support": { "issues": "https://github.com/amphp/http-server/issues", - "source": "https://github.com/amphp/http-server/tree/v3.4.0" + "source": "https://github.com/amphp/http-server/tree/v3.4.1" }, "funding": [ { @@ -807,7 +807,7 @@ "type": "github" } ], - "time": "2024-12-15T17:14:18+00:00" + "time": "2024-12-16T01:30:20+00:00" }, { "name": "amphp/http-server-form-parser", @@ -1117,16 +1117,16 @@ }, { "name": "amphp/parallel", - "version": "v2.3.0", + "version": "v2.3.1", "source": { "type": "git", "url": "https://github.com/amphp/parallel.git", - "reference": "9777db1460d1535bc2a843840684fb1205225b87" + "reference": "5113111de02796a782f5d90767455e7391cca190" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/amphp/parallel/zipball/9777db1460d1535bc2a843840684fb1205225b87", - "reference": "9777db1460d1535bc2a843840684fb1205225b87", + "url": "https://api.github.com/repos/amphp/parallel/zipball/5113111de02796a782f5d90767455e7391cca190", + "reference": "5113111de02796a782f5d90767455e7391cca190", "shasum": "" }, "require": { @@ -1189,7 +1189,7 @@ ], "support": { "issues": "https://github.com/amphp/parallel/issues", - "source": "https://github.com/amphp/parallel/tree/v2.3.0" + "source": "https://github.com/amphp/parallel/tree/v2.3.1" }, "funding": [ { @@ -1197,7 +1197,7 @@ "type": "github" } ], - "time": "2024-09-14T19:16:14+00:00" + "time": "2024-12-21T01:56:09+00:00" }, { "name": "amphp/parser", @@ -3023,6 +3023,68 @@ }, "time": "2024-04-12T12:12:48+00:00" }, + { + "name": "graham-campbell/result-type", + "version": "v1.1.3", + "source": { + "type": "git", + "url": "https://github.com/GrahamCampbell/Result-Type.git", + "reference": "3ba905c11371512af9d9bdd27d99b782216b6945" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/GrahamCampbell/Result-Type/zipball/3ba905c11371512af9d9bdd27d99b782216b6945", + "reference": "3ba905c11371512af9d9bdd27d99b782216b6945", + "shasum": "" + }, + "require": { + "php": "^7.2.5 || ^8.0", + "phpoption/phpoption": "^1.9.3" + }, + "require-dev": { + "phpunit/phpunit": "^8.5.39 || ^9.6.20 || ^10.5.28" + }, + "type": "library", + "autoload": { + "psr-4": { + "GrahamCampbell\\ResultType\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Graham Campbell", + "email": "hello@gjcampbell.co.uk", + "homepage": "https://github.com/GrahamCampbell" + } + ], + "description": "An Implementation Of The Result Type", + "keywords": [ + "Graham Campbell", + "GrahamCampbell", + "Result Type", + "Result-Type", + "result" + ], + "support": { + "issues": "https://github.com/GrahamCampbell/Result-Type/issues", + "source": "https://github.com/GrahamCampbell/Result-Type/tree/v1.1.3" + }, + "funding": [ + { + "url": "https://github.com/GrahamCampbell", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/graham-campbell/result-type", + "type": "tidelift" + } + ], + "time": "2024-07-20T21:45:45+00:00" + }, { "name": "kelunik/certificate", "version": "v1.1.3", @@ -4307,43 +4369,125 @@ ], "time": "2024-09-09T11:45:10+00:00" }, + { + "name": "symfony/polyfill-php80", + "version": "v1.31.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-php80.git", + "reference": "60328e362d4c2c802a54fcbf04f9d3fb892b4cf8" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/60328e362d4c2c802a54fcbf04f9d3fb892b4cf8", + "reference": "60328e362d4c2c802a54fcbf04f9d3fb892b4cf8", + "shasum": "" + }, + "require": { + "php": ">=7.2" + }, + "type": "library", + "extra": { + "thanks": { + "url": "https://github.com/symfony/polyfill", + "name": "symfony/polyfill" + } + }, + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Php80\\": "" + }, + "classmap": [ + "Resources/stubs" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Ion Bazan", + "email": "ion.bazan@gmail.com" + }, + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill backporting some PHP 8.0+ features to lower PHP versions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-php80/tree/v1.31.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2024-09-09T11:45:10+00:00" + }, { "name": "vlucas/phpdotenv", - "version": "v4.3.0", + "version": "v5.6.1", "source": { "type": "git", "url": "https://github.com/vlucas/phpdotenv.git", - "reference": "67a491df68208bef8c37092db11fa3885008efcf" + "reference": "a59a13791077fe3d44f90e7133eb68e7d22eaff2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/vlucas/phpdotenv/zipball/67a491df68208bef8c37092db11fa3885008efcf", - "reference": "67a491df68208bef8c37092db11fa3885008efcf", + "url": "https://api.github.com/repos/vlucas/phpdotenv/zipball/a59a13791077fe3d44f90e7133eb68e7d22eaff2", + "reference": "a59a13791077fe3d44f90e7133eb68e7d22eaff2", "shasum": "" }, "require": { - "php": "^5.5.9 || ^7.0 || ^8.0", - "phpoption/phpoption": "^1.7.3", - "symfony/polyfill-ctype": "^1.17" + "ext-pcre": "*", + "graham-campbell/result-type": "^1.1.3", + "php": "^7.2.5 || ^8.0", + "phpoption/phpoption": "^1.9.3", + "symfony/polyfill-ctype": "^1.24", + "symfony/polyfill-mbstring": "^1.24", + "symfony/polyfill-php80": "^1.24" }, "require-dev": { - "bamarni/composer-bin-plugin": "^1.4.1", + "bamarni/composer-bin-plugin": "^1.8.2", "ext-filter": "*", - "ext-pcre": "*", - "phpunit/phpunit": "^4.8.36 || ^5.7.27 || ^6.5.14 || ^7.5.20 || ^8.5.30" + "phpunit/phpunit": "^8.5.34 || ^9.6.13 || ^10.4.2" }, "suggest": { - "ext-filter": "Required to use the boolean validator.", - "ext-pcre": "Required to use most of the library." + "ext-filter": "Required to use the boolean validator." }, "type": "library", "extra": { "bamarni-bin": { "bin-links": true, - "forward-command": true + "forward-command": false }, "branch-alias": { - "dev-master": "4.3-dev" + "dev-master": "5.6-dev" } }, "autoload": { @@ -4375,7 +4519,7 @@ ], "support": { "issues": "https://github.com/vlucas/phpdotenv/issues", - "source": "https://github.com/vlucas/phpdotenv/tree/v4.3.0" + "source": "https://github.com/vlucas/phpdotenv/tree/v5.6.1" }, "funding": [ { @@ -4387,7 +4531,7 @@ "type": "tidelift" } ], - "time": "2022-10-16T00:51:09+00:00" + "time": "2024-07-20T21:52:34+00:00" }, { "name": "webmozart/assert", @@ -4594,13 +4738,13 @@ }, "type": "library", "extra": { - "branch-alias": { - "dev-main": "3.x-dev" - }, "phpstan": { "includes": [ "extension.neon" ] + }, + "branch-alias": { + "dev-main": "3.x-dev" } }, "autoload": { @@ -6376,86 +6520,6 @@ ], "time": "2024-09-09T11:45:10+00:00" }, - { - "name": "symfony/polyfill-php80", - "version": "v1.31.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-php80.git", - "reference": "60328e362d4c2c802a54fcbf04f9d3fb892b4cf8" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/60328e362d4c2c802a54fcbf04f9d3fb892b4cf8", - "reference": "60328e362d4c2c802a54fcbf04f9d3fb892b4cf8", - "shasum": "" - }, - "require": { - "php": ">=7.2" - }, - "type": "library", - "extra": { - "thanks": { - "url": "https://github.com/symfony/polyfill", - "name": "symfony/polyfill" - } - }, - "autoload": { - "files": [ - "bootstrap.php" - ], - "psr-4": { - "Symfony\\Polyfill\\Php80\\": "" - }, - "classmap": [ - "Resources/stubs" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Ion Bazan", - "email": "ion.bazan@gmail.com" - }, - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony polyfill backporting some PHP 8.0+ features to lower PHP versions", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "polyfill", - "portable", - "shim" - ], - "support": { - "source": "https://github.com/symfony/polyfill-php80/tree/v1.31.0" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2024-09-09T11:45:10+00:00" - }, { "name": "symfony/polyfill-php81", "version": "v1.31.0", From 1f87e3178b1933569941d0b7560ae6acd0cf0e41 Mon Sep 17 00:00:00 2001 From: Alexander Pankratov Date: Sun, 22 Dec 2024 23:34:03 +0100 Subject: [PATCH 192/270] Fix: sendVideo ffmpeg invalid attributes --- composer.lock | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/composer.lock b/composer.lock index 416c07a..1420313 100644 --- a/composer.lock +++ b/composer.lock @@ -2583,12 +2583,12 @@ "source": { "type": "git", "url": "https://github.com/danog/MadelineProto.git", - "reference": "c95df658fa2da6721e408fec140f7dc48a5d9ada" + "reference": "a4d321a91a22e5b1ff63e14a76e4cf628cfe9632" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/danog/MadelineProto/zipball/c95df658fa2da6721e408fec140f7dc48a5d9ada", - "reference": "c95df658fa2da6721e408fec140f7dc48a5d9ada", + "url": "https://api.github.com/repos/danog/MadelineProto/zipball/a4d321a91a22e5b1ff63e14a76e4cf628cfe9632", + "reference": "a4d321a91a22e5b1ff63e14a76e4cf628cfe9632", "shasum": "" }, "require": { @@ -2703,7 +2703,7 @@ "type": "github" } ], - "time": "2024-12-19T17:19:56+00:00" + "time": "2024-12-22T22:19:12+00:00" }, { "name": "danog/primemodule", From 48186a4cdc120d7535b7688b63958f5073c1a677 Mon Sep 17 00:00:00 2001 From: Alexander Pankratov Date: Mon, 23 Dec 2024 00:09:39 +0100 Subject: [PATCH 193/270] Fix: segfaults with php8.4 --- Dockerfile | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index b97a32f..5d7c0de 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,25 @@ -FROM danog/madelineproto:latest +FROM php:8.3-fpm-alpine + +RUN apk add --no-cache make g++ && \ + curl -sSLf https://github.com/danog/PrimeModule-ext/archive/refs/tags/2.0.tar.gz | tar -xz && \ + cd PrimeModule-ext-2.0 && \ + make -j$(nproc) && \ + make install && \ + cd .. && \ + rm -r PrimeModule-ext-2.0 && \ + apk del make g++ + +ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/ + +RUN chmod +x /usr/local/bin/install-php-extensions && \ + install-php-extensions pcntl uv-beta ffi pgsql memprof intl gmp mbstring pdo_mysql xml dom iconv zip igbinary gd && \ + rm /usr/local/bin/install-php-extensions + +RUN apk add --no-cache ffmpeg nghttp2 jemalloc + +ENV LD_PRELOAD=libjemalloc.so.2 + +STOPSIGNAL SIGTERM RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer From 5bfaa19cd9922ed2cec2311986726a10dbedc923 Mon Sep 17 00:00:00 2001 From: Alexander Pankratov Date: Fri, 10 Jan 2025 21:30:33 +0100 Subject: [PATCH 194/270] Update madelineproto --- composer.lock | 148 ++++++++++++++++++++++++-------------------------- 1 file changed, 72 insertions(+), 76 deletions(-) diff --git a/composer.lock b/composer.lock index 1420313..7b93232 100644 --- a/composer.lock +++ b/composer.lock @@ -714,16 +714,16 @@ }, { "name": "amphp/http-server", - "version": "v3.4.1", + "version": "v3.4.2", "source": { "type": "git", "url": "https://github.com/amphp/http-server.git", - "reference": "027bd022ee76927bf1b9f0c188744af461ea9f0d" + "reference": "c60cde9a1e331f539b7ef5a7705f42092e646f90" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/amphp/http-server/zipball/027bd022ee76927bf1b9f0c188744af461ea9f0d", - "reference": "027bd022ee76927bf1b9f0c188744af461ea9f0d", + "url": "https://api.github.com/repos/amphp/http-server/zipball/c60cde9a1e331f539b7ef5a7705f42092e646f90", + "reference": "c60cde9a1e331f539b7ef5a7705f42092e646f90", "shasum": "" }, "require": { @@ -799,7 +799,7 @@ ], "support": { "issues": "https://github.com/amphp/http-server/issues", - "source": "https://github.com/amphp/http-server/tree/v3.4.1" + "source": "https://github.com/amphp/http-server/tree/v3.4.2" }, "funding": [ { @@ -807,7 +807,7 @@ "type": "github" } ], - "time": "2024-12-16T01:30:20+00:00" + "time": "2024-12-31T16:35:28+00:00" }, { "name": "amphp/http-server-form-parser", @@ -2583,12 +2583,12 @@ "source": { "type": "git", "url": "https://github.com/danog/MadelineProto.git", - "reference": "a4d321a91a22e5b1ff63e14a76e4cf628cfe9632" + "reference": "6673f4eba3c07cbea93501b36e2f7495721b7d29" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/danog/MadelineProto/zipball/a4d321a91a22e5b1ff63e14a76e4cf628cfe9632", - "reference": "a4d321a91a22e5b1ff63e14a76e4cf628cfe9632", + "url": "https://api.github.com/repos/danog/MadelineProto/zipball/6673f4eba3c07cbea93501b36e2f7495721b7d29", + "reference": "6673f4eba3c07cbea93501b36e2f7495721b7d29", "shasum": "" }, "require": { @@ -2703,7 +2703,7 @@ "type": "github" } ], - "time": "2024-12-22T22:19:12+00:00" + "time": "2025-01-10T20:27:36+00:00" }, { "name": "danog/primemodule", @@ -3554,16 +3554,16 @@ }, { "name": "nikic/php-parser", - "version": "v5.3.1", + "version": "v5.4.0", "source": { "type": "git", "url": "https://github.com/nikic/PHP-Parser.git", - "reference": "8eea230464783aa9671db8eea6f8c6ac5285794b" + "reference": "447a020a1f875a434d62f2a401f53b82a396e494" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/8eea230464783aa9671db8eea6f8c6ac5285794b", - "reference": "8eea230464783aa9671db8eea6f8c6ac5285794b", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/447a020a1f875a434d62f2a401f53b82a396e494", + "reference": "447a020a1f875a434d62f2a401f53b82a396e494", "shasum": "" }, "require": { @@ -3606,9 +3606,9 @@ ], "support": { "issues": "https://github.com/nikic/PHP-Parser/issues", - "source": "https://github.com/nikic/PHP-Parser/tree/v5.3.1" + "source": "https://github.com/nikic/PHP-Parser/tree/v5.4.0" }, - "time": "2024-10-08T18:51:32+00:00" + "time": "2024-12-30T11:07:19+00:00" }, { "name": "paragonie/constant_time_encoding", @@ -5047,16 +5047,16 @@ }, { "name": "friendsofphp/php-cs-fixer", - "version": "v3.65.0", + "version": "v3.67.0", "source": { "type": "git", "url": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer.git", - "reference": "79d4f3e77b250a7d8043d76c6af8f0695e8a469f" + "reference": "0ad34c75d1172f7d30320460e803887981830cbf" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/PHP-CS-Fixer/PHP-CS-Fixer/zipball/79d4f3e77b250a7d8043d76c6af8f0695e8a469f", - "reference": "79d4f3e77b250a7d8043d76c6af8f0695e8a469f", + "url": "https://api.github.com/repos/PHP-CS-Fixer/PHP-CS-Fixer/zipball/0ad34c75d1172f7d30320460e803887981830cbf", + "reference": "0ad34c75d1172f7d30320460e803887981830cbf", "shasum": "" }, "require": { @@ -5073,17 +5073,17 @@ "react/promise": "^2.0 || ^3.0", "react/socket": "^1.0", "react/stream": "^1.0", - "sebastian/diff": "^4.0 || ^5.0 || ^6.0", - "symfony/console": "^5.4 || ^6.0 || ^7.0", - "symfony/event-dispatcher": "^5.4 || ^6.0 || ^7.0", - "symfony/filesystem": "^5.4 || ^6.0 || ^7.0", - "symfony/finder": "^5.4 || ^6.0 || ^7.0", - "symfony/options-resolver": "^5.4 || ^6.0 || ^7.0", - "symfony/polyfill-mbstring": "^1.28", - "symfony/polyfill-php80": "^1.28", - "symfony/polyfill-php81": "^1.28", - "symfony/process": "^5.4 || ^6.0 || ^7.0", - "symfony/stopwatch": "^5.4 || ^6.0 || ^7.0" + "sebastian/diff": "^4.0 || ^5.1 || ^6.0", + "symfony/console": "^5.4 || ^6.4 || ^7.0", + "symfony/event-dispatcher": "^5.4 || ^6.4 || ^7.0", + "symfony/filesystem": "^5.4 || ^6.4 || ^7.0", + "symfony/finder": "^5.4 || ^6.4 || ^7.0", + "symfony/options-resolver": "^5.4 || ^6.4 || ^7.0", + "symfony/polyfill-mbstring": "^1.31", + "symfony/polyfill-php80": "^1.31", + "symfony/polyfill-php81": "^1.31", + "symfony/process": "^5.4 || ^6.4 || ^7.2", + "symfony/stopwatch": "^5.4 || ^6.4 || ^7.0" }, "require-dev": { "facile-it/paraunit": "^1.3.1 || ^2.4", @@ -5095,9 +5095,9 @@ "php-cs-fixer/accessible-object": "^1.1", "php-cs-fixer/phpunit-constraint-isidenticalstring": "^1.5", "php-cs-fixer/phpunit-constraint-xmlmatchesxsd": "^1.5", - "phpunit/phpunit": "^9.6.21 || ^10.5.38 || ^11.4.3", - "symfony/var-dumper": "^5.4.47 || ^6.4.15 || ^7.1.8", - "symfony/yaml": "^5.4.45 || ^6.4.13 || ^7.1.6" + "phpunit/phpunit": "^9.6.22 || ^10.5.40 || ^11.5.2", + "symfony/var-dumper": "^5.4.48 || ^6.4.15 || ^7.2.0", + "symfony/yaml": "^5.4.45 || ^6.4.13 || ^7.2.0" }, "suggest": { "ext-dom": "For handling output formats in XML", @@ -5138,7 +5138,7 @@ ], "support": { "issues": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/issues", - "source": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/tree/v3.65.0" + "source": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/tree/v3.67.0" }, "funding": [ { @@ -5146,7 +5146,7 @@ "type": "github" } ], - "time": "2024-11-25T00:39:24+00:00" + "time": "2025-01-08T10:17:40+00:00" }, { "name": "psr/container", @@ -5325,33 +5325,33 @@ }, { "name": "react/child-process", - "version": "v0.6.5", + "version": "v0.6.6", "source": { "type": "git", "url": "https://github.com/reactphp/child-process.git", - "reference": "e71eb1aa55f057c7a4a0d08d06b0b0a484bead43" + "reference": "1721e2b93d89b745664353b9cfc8f155ba8a6159" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/reactphp/child-process/zipball/e71eb1aa55f057c7a4a0d08d06b0b0a484bead43", - "reference": "e71eb1aa55f057c7a4a0d08d06b0b0a484bead43", + "url": "https://api.github.com/repos/reactphp/child-process/zipball/1721e2b93d89b745664353b9cfc8f155ba8a6159", + "reference": "1721e2b93d89b745664353b9cfc8f155ba8a6159", "shasum": "" }, "require": { "evenement/evenement": "^3.0 || ^2.0 || ^1.0", "php": ">=5.3.0", "react/event-loop": "^1.2", - "react/stream": "^1.2" + "react/stream": "^1.4" }, "require-dev": { - "phpunit/phpunit": "^9.3 || ^5.7 || ^4.8.35", - "react/socket": "^1.8", + "phpunit/phpunit": "^9.6 || ^5.7 || ^4.8.36", + "react/socket": "^1.16", "sebastian/environment": "^5.0 || ^3.0 || ^2.0 || ^1.0" }, "type": "library", "autoload": { "psr-4": { - "React\\ChildProcess\\": "src" + "React\\ChildProcess\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", @@ -5388,19 +5388,15 @@ ], "support": { "issues": "https://github.com/reactphp/child-process/issues", - "source": "https://github.com/reactphp/child-process/tree/v0.6.5" + "source": "https://github.com/reactphp/child-process/tree/v0.6.6" }, "funding": [ { - "url": "https://github.com/WyriHaximus", - "type": "github" - }, - { - "url": "https://github.com/clue", - "type": "github" + "url": "https://opencollective.com/reactphp", + "type": "open_collective" } ], - "time": "2022-09-16T13:41:56+00:00" + "time": "2025-01-01T16:37:48+00:00" }, { "name": "react/dns", @@ -5960,12 +5956,12 @@ }, "type": "library", "extra": { + "thanks": { + "url": "https://github.com/symfony/contracts", + "name": "symfony/contracts" + }, "branch-alias": { "dev-main": "3.5-dev" - }, - "thanks": { - "name": "symfony/contracts", - "url": "https://github.com/symfony/contracts" } }, "autoload": { @@ -6108,12 +6104,12 @@ }, "type": "library", "extra": { + "thanks": { + "url": "https://github.com/symfony/contracts", + "name": "symfony/contracts" + }, "branch-alias": { "dev-main": "3.5-dev" - }, - "thanks": { - "name": "symfony/contracts", - "url": "https://github.com/symfony/contracts" } }, "autoload": { @@ -6232,16 +6228,16 @@ }, { "name": "symfony/finder", - "version": "v7.2.0", + "version": "v7.2.2", "source": { "type": "git", "url": "https://github.com/symfony/finder.git", - "reference": "6de263e5868b9a137602dd1e33e4d48bfae99c49" + "reference": "87a71856f2f56e4100373e92529eed3171695cfb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/finder/zipball/6de263e5868b9a137602dd1e33e4d48bfae99c49", - "reference": "6de263e5868b9a137602dd1e33e4d48bfae99c49", + "url": "https://api.github.com/repos/symfony/finder/zipball/87a71856f2f56e4100373e92529eed3171695cfb", + "reference": "87a71856f2f56e4100373e92529eed3171695cfb", "shasum": "" }, "require": { @@ -6276,7 +6272,7 @@ "description": "Finds files and directories via an intuitive fluent interface", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/finder/tree/v7.2.0" + "source": "https://github.com/symfony/finder/tree/v7.2.2" }, "funding": [ { @@ -6292,7 +6288,7 @@ "type": "tidelift" } ], - "time": "2024-10-23T06:56:12+00:00" + "time": "2024-12-30T19:00:17+00:00" }, { "name": "symfony/options-resolver", @@ -6681,12 +6677,12 @@ }, "type": "library", "extra": { + "thanks": { + "url": "https://github.com/symfony/contracts", + "name": "symfony/contracts" + }, "branch-alias": { "dev-main": "3.5-dev" - }, - "thanks": { - "name": "symfony/contracts", - "url": "https://github.com/symfony/contracts" } }, "autoload": { @@ -6742,16 +6738,16 @@ }, { "name": "symfony/stopwatch", - "version": "v7.2.0", + "version": "v7.2.2", "source": { "type": "git", "url": "https://github.com/symfony/stopwatch.git", - "reference": "696f418b0d722a4225e1c3d95489d262971ca924" + "reference": "e46690d5b9d7164a6d061cab1e8d46141b9f49df" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/stopwatch/zipball/696f418b0d722a4225e1c3d95489d262971ca924", - "reference": "696f418b0d722a4225e1c3d95489d262971ca924", + "url": "https://api.github.com/repos/symfony/stopwatch/zipball/e46690d5b9d7164a6d061cab1e8d46141b9f49df", + "reference": "e46690d5b9d7164a6d061cab1e8d46141b9f49df", "shasum": "" }, "require": { @@ -6784,7 +6780,7 @@ "description": "Provides a way to profile code", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/stopwatch/tree/v7.2.0" + "source": "https://github.com/symfony/stopwatch/tree/v7.2.2" }, "funding": [ { @@ -6800,7 +6796,7 @@ "type": "tidelift" } ], - "time": "2024-09-25T14:21:43+00:00" + "time": "2024-12-18T14:28:33+00:00" }, { "name": "symfony/string", From dc596bc5f1c72a974cefce376c2ecdb2f6b4aba3 Mon Sep 17 00:00:00 2001 From: Alexander Pankratov Date: Tue, 21 Jan 2025 19:49:23 +0100 Subject: [PATCH 195/270] Feat: Php 8.4 docker --- Dockerfile | 4 +++- Dockerfile-dev | 10 +++------- docker/php/php.ini | 33 +++++++++++++++++++++++++++++++++ 3 files changed, 39 insertions(+), 8 deletions(-) create mode 100644 docker/php/php.ini diff --git a/Dockerfile b/Dockerfile index 5d7c0de..8588826 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM php:8.3-fpm-alpine +FROM php:8.4-cli-alpine RUN apk add --no-cache make g++ && \ curl -sSLf https://github.com/danog/PrimeModule-ext/archive/refs/tags/2.0.tar.gz | tar -xz && \ @@ -27,6 +27,8 @@ COPY --from=ghcr.io/ufoscout/docker-compose-wait:latest /wait /usr/local/bin/doc RUN echo 1.0.0 > /tas_version +ADD docker/php/php.ini $PHP_INI_DIR/php.ini + EXPOSE 9503 ENV UV_USE_IO_URING=0 diff --git a/Dockerfile-dev b/Dockerfile-dev index dff93a0..e52c862 100644 --- a/Dockerfile-dev +++ b/Dockerfile-dev @@ -2,14 +2,10 @@ FROM xtrime/telegram-api-server:latest ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/ -RUN echo "opcache.jit=disable" > "$PHP_INI_DIR/conf.d/tmp.ini" - -RUN chmod +x /usr/local/bin/install-php-extensions && \ - install-php-extensions xdebug && \ - rm /usr/local/bin/install-php-extensions && \ - rm $PHP_INI_DIR/conf.d/docker-php-ext-xdebug.ini && \ - rm $PHP_INI_DIR/conf.d/tmp.ini +RUN chmod +x /usr/local/bin/install-php-extensions \ + && install-php-extensions xdebug +ADD dev/xdebug.ini $PHP_INI_DIR/conf.d/xdebug.ini EXPOSE 9503 EXPOSE 9003 diff --git a/docker/php/php.ini b/docker/php/php.ini new file mode 100644 index 0000000..8a3115f --- /dev/null +++ b/docker/php/php.ini @@ -0,0 +1,33 @@ +memory_limit = -1 +zend.assertions = -1 +display_errors = On +display_startup_errors = On + +ffi.enable=true + +zend_extension=opcache + +[opcache] +opcache.memory_consumption=256M +opcache.enable=1 +opcache.enable_cli=1 +opcache.jit=function +opcache.validate_timestamps=0 +opcache.jit_buffer_size=128M +opcache.file_update_protection=0 +opcache.max_accelerated_files=1000000 +opcache.interned_strings_buffer=64 + +opcache.jit_prof_threshold=0.000000001 +opcache.jit_max_root_traces= 1000000 +opcache.jit_max_side_traces= 1000000 +opcache.jit_max_exit_counters=1000000 +opcache.jit_hot_loop=1 +opcache.jit_hot_func=1 +opcache.jit_hot_return=1 +opcache.jit_hot_side_exit=1 + +opcache.jit_blacklist_root_trace=255 +opcache.jit_blacklist_side_trace=255 + +opcache.protect_memory=1 From c96ccd4e83a28748d8539970c543c526c1dd4fc7 Mon Sep 17 00:00:00 2001 From: Alexander Pankratov Date: Tue, 21 Jan 2025 19:51:33 +0100 Subject: [PATCH 196/270] Update madeline --- composer.lock | 73 +++++++++++++++++++++++++++------------------------ 1 file changed, 38 insertions(+), 35 deletions(-) diff --git a/composer.lock b/composer.lock index 7b93232..b4a23f7 100644 --- a/composer.lock +++ b/composer.lock @@ -233,12 +233,12 @@ "source": { "type": "git", "url": "https://github.com/amphp/dns.git", - "reference": "166c43737cef1b77782c648a9d9ed11ee0c9859f" + "reference": "78eb3db5fc69bf2fc0cb503c4fcba667bc223c71" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/amphp/dns/zipball/166c43737cef1b77782c648a9d9ed11ee0c9859f", - "reference": "166c43737cef1b77782c648a9d9ed11ee0c9859f", + "url": "https://api.github.com/repos/amphp/dns/zipball/78eb3db5fc69bf2fc0cb503c4fcba667bc223c71", + "reference": "78eb3db5fc69bf2fc0cb503c4fcba667bc223c71", "shasum": "" }, "require": { @@ -307,7 +307,7 @@ ], "support": { "issues": "https://github.com/amphp/dns/issues", - "source": "https://github.com/amphp/dns/tree/v2.3.0" + "source": "https://github.com/amphp/dns/tree/v2.4.0" }, "funding": [ { @@ -315,7 +315,7 @@ "type": "github" } ], - "time": "2024-12-21T01:15:34+00:00" + "time": "2025-01-19T15:43:40+00:00" }, { "name": "amphp/file", @@ -542,16 +542,16 @@ }, { "name": "amphp/http-client", - "version": "v5.2.1", + "version": "v5.2.2", "source": { "type": "git", "url": "https://github.com/amphp/http-client.git", - "reference": "2117f7e7cd1ecf35d4d0daea1ba5dc6fd318b114" + "reference": "a3e8711cb71fe909c1ae17450bfa5db652559c20" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/amphp/http-client/zipball/2117f7e7cd1ecf35d4d0daea1ba5dc6fd318b114", - "reference": "2117f7e7cd1ecf35d4d0daea1ba5dc6fd318b114", + "url": "https://api.github.com/repos/amphp/http-client/zipball/a3e8711cb71fe909c1ae17450bfa5db652559c20", + "reference": "a3e8711cb71fe909c1ae17450bfa5db652559c20", "shasum": "" }, "require": { @@ -569,8 +569,11 @@ "psr/http-message": "^1 | ^2", "revolt/event-loop": "^1" }, + "conflict": { + "amphp/file": "<3 | >=5" + }, "require-dev": { - "amphp/file": "^3", + "amphp/file": "^3 | ^4", "amphp/http-server": "^3", "amphp/php-cs-fixer-config": "^2", "amphp/phpunit-util": "^3", @@ -625,7 +628,7 @@ ], "support": { "issues": "https://github.com/amphp/http-client/issues", - "source": "https://github.com/amphp/http-client/tree/v5.2.1" + "source": "https://github.com/amphp/http-client/tree/v5.2.2" }, "funding": [ { @@ -633,7 +636,7 @@ "type": "github" } ], - "time": "2024-12-13T16:16:08+00:00" + "time": "2025-01-12T20:02:49+00:00" }, { "name": "amphp/http-client-cookies", @@ -1263,16 +1266,16 @@ }, { "name": "amphp/pipeline", - "version": "v1.2.1", + "version": "v1.2.2", "source": { "type": "git", "url": "https://github.com/amphp/pipeline.git", - "reference": "66c095673aa5b6e689e63b52d19e577459129ab3" + "reference": "97cbf289f4d8877acfe58dd90ed5a4370a43caa4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/amphp/pipeline/zipball/66c095673aa5b6e689e63b52d19e577459129ab3", - "reference": "66c095673aa5b6e689e63b52d19e577459129ab3", + "url": "https://api.github.com/repos/amphp/pipeline/zipball/97cbf289f4d8877acfe58dd90ed5a4370a43caa4", + "reference": "97cbf289f4d8877acfe58dd90ed5a4370a43caa4", "shasum": "" }, "require": { @@ -1318,7 +1321,7 @@ ], "support": { "issues": "https://github.com/amphp/pipeline/issues", - "source": "https://github.com/amphp/pipeline/tree/v1.2.1" + "source": "https://github.com/amphp/pipeline/tree/v1.2.2" }, "funding": [ { @@ -1326,7 +1329,7 @@ "type": "github" } ], - "time": "2024-07-04T00:56:47+00:00" + "time": "2025-01-19T15:42:46+00:00" }, { "name": "amphp/postgres", @@ -1470,16 +1473,16 @@ }, { "name": "amphp/redis", - "version": "v2.0.1", + "version": "v2.0.3", "source": { "type": "git", "url": "https://github.com/amphp/redis.git", - "reference": "679350556def8f8b412a15a4b82651c4a5caa597" + "reference": "1572c2fec2849d272570919e998f9a3c1a5b1703" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/amphp/redis/zipball/679350556def8f8b412a15a4b82651c4a5caa597", - "reference": "679350556def8f8b412a15a4b82651c4a5caa597", + "url": "https://api.github.com/repos/amphp/redis/zipball/1572c2fec2849d272570919e998f9a3c1a5b1703", + "reference": "1572c2fec2849d272570919e998f9a3c1a5b1703", "shasum": "" }, "require": { @@ -1491,7 +1494,7 @@ "amphp/serialization": "^1", "amphp/socket": "^2", "amphp/sync": "^2", - "league/uri": "^6.5|^7", + "league/uri": "^7", "php": ">=8.1", "psr/log": "^1|^2|^3", "revolt/event-loop": "^1" @@ -1539,7 +1542,7 @@ ], "support": { "issues": "https://github.com/amphp/redis/issues", - "source": "https://github.com/amphp/redis/tree/v2.0.1" + "source": "https://github.com/amphp/redis/tree/v2.0.3" }, "funding": [ { @@ -1547,7 +1550,7 @@ "type": "github" } ], - "time": "2024-08-03T18:48:06+00:00" + "time": "2025-01-15T04:14:11+00:00" }, { "name": "amphp/serialization", @@ -2583,12 +2586,12 @@ "source": { "type": "git", "url": "https://github.com/danog/MadelineProto.git", - "reference": "6673f4eba3c07cbea93501b36e2f7495721b7d29" + "reference": "97027ecdf542392c8bdbfc68b2a184fdc1440001" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/danog/MadelineProto/zipball/6673f4eba3c07cbea93501b36e2f7495721b7d29", - "reference": "6673f4eba3c07cbea93501b36e2f7495721b7d29", + "url": "https://api.github.com/repos/danog/MadelineProto/zipball/97027ecdf542392c8bdbfc68b2a184fdc1440001", + "reference": "97027ecdf542392c8bdbfc68b2a184fdc1440001", "shasum": "" }, "require": { @@ -2703,7 +2706,7 @@ "type": "github" } ], - "time": "2025-01-10T20:27:36+00:00" + "time": "2025-01-21T18:49:49+00:00" }, { "name": "danog/primemodule", @@ -5047,16 +5050,16 @@ }, { "name": "friendsofphp/php-cs-fixer", - "version": "v3.67.0", + "version": "v3.68.1", "source": { "type": "git", "url": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer.git", - "reference": "0ad34c75d1172f7d30320460e803887981830cbf" + "reference": "b9db2b2ea3cdba7201067acee46f984ef2397cff" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/PHP-CS-Fixer/PHP-CS-Fixer/zipball/0ad34c75d1172f7d30320460e803887981830cbf", - "reference": "0ad34c75d1172f7d30320460e803887981830cbf", + "url": "https://api.github.com/repos/PHP-CS-Fixer/PHP-CS-Fixer/zipball/b9db2b2ea3cdba7201067acee46f984ef2397cff", + "reference": "b9db2b2ea3cdba7201067acee46f984ef2397cff", "shasum": "" }, "require": { @@ -5138,7 +5141,7 @@ ], "support": { "issues": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/issues", - "source": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/tree/v3.67.0" + "source": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/tree/v3.68.1" }, "funding": [ { @@ -5146,7 +5149,7 @@ "type": "github" } ], - "time": "2025-01-08T10:17:40+00:00" + "time": "2025-01-17T09:20:36+00:00" }, { "name": "psr/container", From f070c2404686729157d7e4cf70399f77eef6eb5c Mon Sep 17 00:00:00 2001 From: Alexander Pankratov Date: Tue, 21 Jan 2025 20:30:23 +0100 Subject: [PATCH 197/270] Disable jit --- docker/php/php.ini | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/docker/php/php.ini b/docker/php/php.ini index 8a3115f..00f36fb 100644 --- a/docker/php/php.ini +++ b/docker/php/php.ini @@ -11,9 +11,10 @@ zend_extension=opcache opcache.memory_consumption=256M opcache.enable=1 opcache.enable_cli=1 -opcache.jit=function -opcache.validate_timestamps=0 -opcache.jit_buffer_size=128M +opcache.jit=off +opcache.validate_timestamps=1 +opcache.revalidate_freq=0 +opcache.jit_buffer_size=0 opcache.file_update_protection=0 opcache.max_accelerated_files=1000000 opcache.interned_strings_buffer=64 From 601bb79b6d1f0da5650945bf708acce8fb880c30 Mon Sep 17 00:00:00 2001 From: Alexander Pankratov Date: Thu, 13 Feb 2025 12:27:31 +0100 Subject: [PATCH 198/270] Remove nice --- entrypoint.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/entrypoint.sh b/entrypoint.sh index 31ed46a..679944c 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -11,4 +11,4 @@ fi composer install docker-compose-wait \ -&& nice -n 19 php server.php -e=.env.docker --docker "$@" +&& php server.php -e=.env.docker --docker "$@" From 42655cd88dae07dc02b346ddc82d90da2555c5b7 Mon Sep 17 00:00:00 2001 From: Alexander Pankratov Date: Mon, 17 Feb 2025 00:11:06 +0100 Subject: [PATCH 199/270] Feat: Use danog's htmlEscape --- composer.lock | 80 +++++++++---------- src/MadelineProtoExtensions/ApiExtensions.php | 66 ++------------- 2 files changed, 45 insertions(+), 101 deletions(-) diff --git a/composer.lock b/composer.lock index b4a23f7..9fd79f2 100644 --- a/composer.lock +++ b/composer.lock @@ -8,16 +8,16 @@ "packages": [ { "name": "amphp/amp", - "version": "v3.0.2", + "version": "v3.1.0", "source": { "type": "git", "url": "https://github.com/amphp/amp.git", - "reference": "138801fb68cfc9c329da8a7b39d01ce7291ee4b0" + "reference": "7cf7fef3d667bfe4b2560bc87e67d5387a7bcde9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/amphp/amp/zipball/138801fb68cfc9c329da8a7b39d01ce7291ee4b0", - "reference": "138801fb68cfc9c329da8a7b39d01ce7291ee4b0", + "url": "https://api.github.com/repos/amphp/amp/zipball/7cf7fef3d667bfe4b2560bc87e67d5387a7bcde9", + "reference": "7cf7fef3d667bfe4b2560bc87e67d5387a7bcde9", "shasum": "" }, "require": { @@ -77,7 +77,7 @@ ], "support": { "issues": "https://github.com/amphp/amp/issues", - "source": "https://github.com/amphp/amp/tree/v3.0.2" + "source": "https://github.com/amphp/amp/tree/v3.1.0" }, "funding": [ { @@ -85,7 +85,7 @@ "type": "github" } ], - "time": "2024-05-10T21:37:46+00:00" + "time": "2025-01-26T16:07:39+00:00" }, { "name": "amphp/byte-stream", @@ -2586,12 +2586,12 @@ "source": { "type": "git", "url": "https://github.com/danog/MadelineProto.git", - "reference": "97027ecdf542392c8bdbfc68b2a184fdc1440001" + "reference": "4a834835d88db4386803ad37495fb37bfb165173" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/danog/MadelineProto/zipball/97027ecdf542392c8bdbfc68b2a184fdc1440001", - "reference": "97027ecdf542392c8bdbfc68b2a184fdc1440001", + "url": "https://api.github.com/repos/danog/MadelineProto/zipball/4a834835d88db4386803ad37495fb37bfb165173", + "reference": "4a834835d88db4386803ad37495fb37bfb165173", "shasum": "" }, "require": { @@ -2706,7 +2706,7 @@ "type": "github" } ], - "time": "2025-01-21T18:49:49+00:00" + "time": "2025-02-16T22:54:43+00:00" }, { "name": "danog/primemodule", @@ -4143,16 +4143,16 @@ }, { "name": "revolt/event-loop", - "version": "v1.0.6", + "version": "v1.0.7", "source": { "type": "git", "url": "https://github.com/revoltphp/event-loop.git", - "reference": "25de49af7223ba039f64da4ae9a28ec2d10d0254" + "reference": "09bf1bf7f7f574453efe43044b06fafe12216eb3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/revoltphp/event-loop/zipball/25de49af7223ba039f64da4ae9a28ec2d10d0254", - "reference": "25de49af7223ba039f64da4ae9a28ec2d10d0254", + "url": "https://api.github.com/repos/revoltphp/event-loop/zipball/09bf1bf7f7f574453efe43044b06fafe12216eb3", + "reference": "09bf1bf7f7f574453efe43044b06fafe12216eb3", "shasum": "" }, "require": { @@ -4209,9 +4209,9 @@ ], "support": { "issues": "https://github.com/revoltphp/event-loop/issues", - "source": "https://github.com/revoltphp/event-loop/tree/v1.0.6" + "source": "https://github.com/revoltphp/event-loop/tree/v1.0.7" }, - "time": "2023-11-30T05:34:44+00:00" + "time": "2025-01-25T19:27:39+00:00" }, { "name": "symfony/polyfill-ctype", @@ -5050,16 +5050,16 @@ }, { "name": "friendsofphp/php-cs-fixer", - "version": "v3.68.1", + "version": "v3.69.0", "source": { "type": "git", "url": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer.git", - "reference": "b9db2b2ea3cdba7201067acee46f984ef2397cff" + "reference": "630a59448c00729bc235d5e95cfedefeaca37523" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/PHP-CS-Fixer/PHP-CS-Fixer/zipball/b9db2b2ea3cdba7201067acee46f984ef2397cff", - "reference": "b9db2b2ea3cdba7201067acee46f984ef2397cff", + "url": "https://api.github.com/repos/PHP-CS-Fixer/PHP-CS-Fixer/zipball/630a59448c00729bc235d5e95cfedefeaca37523", + "reference": "630a59448c00729bc235d5e95cfedefeaca37523", "shasum": "" }, "require": { @@ -5076,7 +5076,7 @@ "react/promise": "^2.0 || ^3.0", "react/socket": "^1.0", "react/stream": "^1.0", - "sebastian/diff": "^4.0 || ^5.1 || ^6.0", + "sebastian/diff": "^4.0 || ^5.1 || ^6.0 || ^7.0", "symfony/console": "^5.4 || ^6.4 || ^7.0", "symfony/event-dispatcher": "^5.4 || ^6.4 || ^7.0", "symfony/filesystem": "^5.4 || ^6.4 || ^7.0", @@ -5089,18 +5089,18 @@ "symfony/stopwatch": "^5.4 || ^6.4 || ^7.0" }, "require-dev": { - "facile-it/paraunit": "^1.3.1 || ^2.4", - "infection/infection": "^0.29.8", + "facile-it/paraunit": "^1.3.1 || ^2.5", + "infection/infection": "^0.29.10", "justinrainbow/json-schema": "^5.3 || ^6.0", "keradus/cli-executor": "^2.1", "mikey179/vfsstream": "^1.6.12", "php-coveralls/php-coveralls": "^2.7", "php-cs-fixer/accessible-object": "^1.1", - "php-cs-fixer/phpunit-constraint-isidenticalstring": "^1.5", - "php-cs-fixer/phpunit-constraint-xmlmatchesxsd": "^1.5", - "phpunit/phpunit": "^9.6.22 || ^10.5.40 || ^11.5.2", - "symfony/var-dumper": "^5.4.48 || ^6.4.15 || ^7.2.0", - "symfony/yaml": "^5.4.45 || ^6.4.13 || ^7.2.0" + "php-cs-fixer/phpunit-constraint-isidenticalstring": "^1.6", + "php-cs-fixer/phpunit-constraint-xmlmatchesxsd": "^1.6", + "phpunit/phpunit": "^9.6.22 || ^10.5.45 || ^11.5.7", + "symfony/var-dumper": "^5.4.48 || ^6.4.18 || ^7.2.0", + "symfony/yaml": "^5.4.45 || ^6.4.18 || ^7.2.0" }, "suggest": { "ext-dom": "For handling output formats in XML", @@ -5141,7 +5141,7 @@ ], "support": { "issues": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/issues", - "source": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/tree/v3.68.1" + "source": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/tree/v3.69.0" }, "funding": [ { @@ -5149,7 +5149,7 @@ "type": "github" } ], - "time": "2025-01-17T09:20:36+00:00" + "time": "2025-02-14T16:19:23+00:00" }, { "name": "psr/container", @@ -5782,29 +5782,29 @@ }, { "name": "sebastian/diff", - "version": "6.0.2", + "version": "7.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/diff.git", - "reference": "b4ccd857127db5d41a5b676f24b51371d76d8544" + "reference": "7ab1ea946c012266ca32390913653d844ecd085f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/b4ccd857127db5d41a5b676f24b51371d76d8544", - "reference": "b4ccd857127db5d41a5b676f24b51371d76d8544", + "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/7ab1ea946c012266ca32390913653d844ecd085f", + "reference": "7ab1ea946c012266ca32390913653d844ecd085f", "shasum": "" }, "require": { - "php": ">=8.2" + "php": ">=8.3" }, "require-dev": { - "phpunit/phpunit": "^11.0", - "symfony/process": "^4.2 || ^5" + "phpunit/phpunit": "^12.0", + "symfony/process": "^7.2" }, "type": "library", "extra": { "branch-alias": { - "dev-main": "6.0-dev" + "dev-main": "7.0-dev" } }, "autoload": { @@ -5837,7 +5837,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/diff/issues", "security": "https://github.com/sebastianbergmann/diff/security/policy", - "source": "https://github.com/sebastianbergmann/diff/tree/6.0.2" + "source": "https://github.com/sebastianbergmann/diff/tree/7.0.0" }, "funding": [ { @@ -5845,7 +5845,7 @@ "type": "github" } ], - "time": "2024-07-03T04:53:05+00:00" + "time": "2025-02-07T04:55:46+00:00" }, { "name": "symfony/console", diff --git a/src/MadelineProtoExtensions/ApiExtensions.php b/src/MadelineProtoExtensions/ApiExtensions.php index 3dcd69e..fe11e1e 100644 --- a/src/MadelineProtoExtensions/ApiExtensions.php +++ b/src/MadelineProtoExtensions/ApiExtensions.php @@ -35,7 +35,11 @@ public function getHistoryHtml(array $data): array $response = $this->madelineProto->messages->getHistory(...$data); if (!empty($response['messages'])) { foreach ($response['messages'] as &$message) { - $message['message'] = $this->formatMessage($message['message'] ?? null, $message['entities'] ?? []); + if (empty($message['entities'])) { + $message['message'] = StrTools::htmlEscape($message['message'] ?? ''); + } else { + $message['message'] = StrTools::entitiesToHtml($message['message'] ?? '', $message['entities'], true); + } } unset($message); } @@ -64,66 +68,6 @@ private static function hasMedia(array $message = [], bool $allowWebPage = false return true; } - public function formatMessage(?string $message = null, array $entities = []): ?string - { - if ($message === null) { - return null; - } - $html = [ - 'messageEntityItalic' => '%s', - 'messageEntityBold' => '%s', - 'messageEntityCode' => '%s', - 'messageEntityPre' => '
%s
', - 'messageEntityStrike' => '%s', - 'messageEntityUnderline' => '%s', - 'messageEntityBlockquote' => '
%s
', - 'messageEntityTextUrl' => '%s', - 'messageEntityMention' => '%s', - 'messageEntityUrl' => '%s', - ]; - - foreach ($entities as $key => &$entity) { - if (isset($html[$entity['_']])) { - - $text = StrTools::mbSubstr($message, $entity['offset'], $entity['length']); - - $template = $html[$entity['_']]; - if (\in_array($entity['_'], ['messageEntityTextUrl', 'messageEntityMention', 'messageEntityUrl'])) { - $textFormated = \sprintf($template, \strip_tags($entity['url'] ?? $text), $text); - } else { - $textFormated = \sprintf($template, $text); - } - - $message = self::substringReplace($message, $textFormated, $entity['offset'], $entity['length']); - - //Увеличим оффсеты всех следующих entity - foreach ($entities as $nextKey => &$nextEntity) { - if ($nextKey <= $key) { - continue; - } - if ($nextEntity['offset'] < ($entity['offset'] + $entity['length'])) { - $nextEntity['offset'] += StrTools::mbStrlen( - \preg_replace('~(\>).*<\/.*$~', '$1', $textFormated) - ); - } else { - $nextEntity['offset'] += StrTools::mbStrlen($textFormated) - StrTools::mbStrlen($text); - } - } - unset($nextEntity); - } - } - unset($entity); - $message = \nl2br($message); - return $message; - } - - private static function substringReplace(string $original, string $replacement, int $position, int $length): string - { - $startString = StrTools::mbSubstr($original, 0, $position); - $endString = StrTools::mbSubstr($original, $position + $length, StrTools::mbStrlen($original)); - return $startString . $replacement . $endString; - } - /** * Пересылает сообщения без ссылки на оригинал. * From 6b651445c2904e25470dc3f78e9179d588f6d109 Mon Sep 17 00:00:00 2001 From: Alexander Pankratov Date: Wed, 19 Feb 2025 13:32:16 +0100 Subject: [PATCH 200/270] Revert "Remove nice" This reverts commit 601bb79b6d1f0da5650945bf708acce8fb880c30. --- entrypoint.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/entrypoint.sh b/entrypoint.sh index 679944c..31ed46a 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -11,4 +11,4 @@ fi composer install docker-compose-wait \ -&& php server.php -e=.env.docker --docker "$@" +&& nice -n 19 php server.php -e=.env.docker --docker "$@" From 9b48fd11ac67dde135fb2e2c798a1e0480a8889a Mon Sep 17 00:00:00 2001 From: Alexander Pankratov Date: Wed, 19 Feb 2025 19:09:41 +0100 Subject: [PATCH 201/270] Fix: docker run --rm --- docker-compose.base.yml | 4 ++-- docker-compose.dev.yml | 4 ++-- docker-compose.yml | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/docker-compose.base.yml b/docker-compose.base.yml index bf68a13..fb7f209 100644 --- a/docker-compose.base.yml +++ b/docker-compose.base.yml @@ -1,5 +1,5 @@ services: - base-api: + api: image: xtrime/telegram-api-server:latest init: true build: @@ -23,7 +23,7 @@ services: interval: 60s timeout: 30s retries: 1 - base-mysql: + mysql: image: mariadb:11.4 restart: unless-stopped volumes: diff --git a/docker-compose.dev.yml b/docker-compose.dev.yml index 4e3cbb8..a7b519a 100644 --- a/docker-compose.dev.yml +++ b/docker-compose.dev.yml @@ -2,7 +2,7 @@ services: api: extends: file: docker-compose.base.yml - service: base-api + service: api image: xtrime/telegram-api-server:dev build: context: . @@ -19,7 +19,7 @@ services: mysql: extends: file: docker-compose.base.yml - service: base-mysql + service: mysql ports: - "127.0.0.1:9507:3306" networks: diff --git a/docker-compose.yml b/docker-compose.yml index 4e82bde..fc3d966 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -2,7 +2,7 @@ services: api: extends: file: docker-compose.base.yml - service: base-api + service: api ports: - "127.0.0.1:9503:9503" command: @@ -10,7 +10,7 @@ services: mysql: extends: file: docker-compose.base.yml - service: base-mysql + service: mysql ports: - "127.0.0.1:9507:3306" networks: From b0a8d5272e81b3606e54b1da5284587338f634d3 Mon Sep 17 00:00:00 2001 From: Alexander Pankratov Date: Wed, 19 Feb 2025 19:48:48 +0100 Subject: [PATCH 202/270] Fix: missing new lines in getHistoryHtml --- dev/xdebug.ini | 2 +- src/MadelineProtoExtensions/ApiExtensions.php | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/dev/xdebug.ini b/dev/xdebug.ini index 2ed9594..dc6f541 100644 --- a/dev/xdebug.ini +++ b/dev/xdebug.ini @@ -1,4 +1,4 @@ -opcache.jit=disable +opcache.enable_cli=0 zend_extension=xdebug.so xdebug.max_nesting_level=512 diff --git a/src/MadelineProtoExtensions/ApiExtensions.php b/src/MadelineProtoExtensions/ApiExtensions.php index fe11e1e..fe80a1a 100644 --- a/src/MadelineProtoExtensions/ApiExtensions.php +++ b/src/MadelineProtoExtensions/ApiExtensions.php @@ -35,11 +35,11 @@ public function getHistoryHtml(array $data): array $response = $this->madelineProto->messages->getHistory(...$data); if (!empty($response['messages'])) { foreach ($response['messages'] as &$message) { - if (empty($message['entities'])) { - $message['message'] = StrTools::htmlEscape($message['message'] ?? ''); - } else { - $message['message'] = StrTools::entitiesToHtml($message['message'] ?? '', $message['entities'], true); - } + $message['message'] = StrTools::entitiesToHtml( + $message['message'] ?? '', + $message['entities'] ?? [], + true + ); } unset($message); } From ec048db5fa0653ff51c7a23c3773c32871c6c7b5 Mon Sep 17 00:00:00 2001 From: Alexander Pankratov Date: Wed, 26 Feb 2025 14:17:13 +0100 Subject: [PATCH 203/270] Fix: start on old docker --- docker-compose.dev.yml | 2 ++ docker-compose.yml | 2 ++ 2 files changed, 4 insertions(+) diff --git a/docker-compose.dev.yml b/docker-compose.dev.yml index a7b519a..d9a48f3 100644 --- a/docker-compose.dev.yml +++ b/docker-compose.dev.yml @@ -16,6 +16,8 @@ services: PHP_IDE_CONFIG: "serverName=Docker" command: - "-s=session" + depends_on: + - mysql mysql: extends: file: docker-compose.base.yml diff --git a/docker-compose.yml b/docker-compose.yml index fc3d966..b7e4f7d 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -7,6 +7,8 @@ services: - "127.0.0.1:9503:9503" command: - "-s=session" + depends_on: + - mysql mysql: extends: file: docker-compose.base.yml From 542e8298746f3f475459bf93fa2eefefd00fe348 Mon Sep 17 00:00:00 2001 From: Alexander Pankratov Date: Mon, 3 Mar 2025 20:21:31 +0100 Subject: [PATCH 204/270] Feat: support sendVideo, sendPhoto, sendDocument and other custom madelineProto methods --- README.md | 34 ++++-- composer.lock | 36 +++--- src/MadelineProtoExtensions/ApiExtensions.php | 111 ++++++++++++++---- 3 files changed, 132 insertions(+), 49 deletions(-) diff --git a/README.md b/README.md index 9ff7cc6..735b095 100644 --- a/README.md +++ b/README.md @@ -133,31 +133,43 @@ Example uses urlencoded url in query. There are few options to upload and send media files: -- Custom method `sendVideo` to send video by url or local path +- Custom method `sendVideo` to send video by url or local path, remote url, or stream. + RemoteUrl: ```shell script curl --location --request POST 'http://127.0.0.1:9503/api/sendVideo' \ --header 'Content-Type: application/json' \ --data-raw '{ "data": { - "peer": "@xtrime", + "peer": "me", "file": { "_": "RemoteUrl", "url": "https://domain.site/storage/video.mp4" }, - 'parseMode' => 'HTML', + "parseMode": "HTML", "caption": "caption text" } }' ``` + Stream upload from client: ```shell script - curl --location --request POST 'http://127.0.0.1:9503/api/sendVideo/?data[peer]=xtrime&data[caption]=hey' -g \ - -F "file=@ADM-RaceWay-24-08-2014.mp4" + curl --location --request POST 'http://127.0.0.1:9503/api/sendDocument/?data[peer]=me&data[caption]=hey' -g \ + -F "file=@screenshot.png" ``` - -- Custom method `sendMedia` supports upload from form: - ```shell script - curl "http://127.0.0.1:9503/api/messages.sendMedia?data[peer]=xtrime&data[message]=Hello" -g \ - -F "file=@/Users/xtrime/Downloads/test.txt" + Local file on server: + ```shell script + curl --location --request POST 'http://127.0.0.1:9503/api/sendDocument' \ + --header 'Content-Type: application/json' \ + --data-raw '{ + "data": { + "peer": "me", + "file": { + "_": "LocalUrl", + "file": "faust.txt" + }, + "parseMode": "HTML", + "caption": "caption text" + } + }' ``` - use custom `uploadMediaForm` method and then pass result to `messages.sendMedia`: 1. `curl "http://127.0.0.1:9503/api/uploadMediaForm" -g -F "file=@/Users/xtrime/Downloads/test.txt"` @@ -169,7 +181,7 @@ There are few options to upload and send media files: --header 'Content-Type: application/json' \ --data-raw '{ "data":{ - "peer": "@xtrime", + "peer": "me", "media": { "_": "inputMediaUploadedDocument", "file": { diff --git a/composer.lock b/composer.lock index 9fd79f2..d73e17f 100644 --- a/composer.lock +++ b/composer.lock @@ -5050,16 +5050,16 @@ }, { "name": "friendsofphp/php-cs-fixer", - "version": "v3.69.0", + "version": "v3.70.1", "source": { "type": "git", "url": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer.git", - "reference": "630a59448c00729bc235d5e95cfedefeaca37523" + "reference": "add1b3a05256392dbad63875240041b2c0349ceb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/PHP-CS-Fixer/PHP-CS-Fixer/zipball/630a59448c00729bc235d5e95cfedefeaca37523", - "reference": "630a59448c00729bc235d5e95cfedefeaca37523", + "url": "https://api.github.com/repos/PHP-CS-Fixer/PHP-CS-Fixer/zipball/add1b3a05256392dbad63875240041b2c0349ceb", + "reference": "add1b3a05256392dbad63875240041b2c0349ceb", "shasum": "" }, "require": { @@ -5141,7 +5141,7 @@ ], "support": { "issues": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/issues", - "source": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/tree/v3.69.0" + "source": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/tree/v3.70.1" }, "funding": [ { @@ -5149,7 +5149,7 @@ "type": "github" } ], - "time": "2025-02-14T16:19:23+00:00" + "time": "2025-03-01T22:05:46+00:00" }, { "name": "psr/container", @@ -6597,16 +6597,16 @@ }, { "name": "symfony/process", - "version": "v7.2.0", + "version": "v7.2.4", "source": { "type": "git", "url": "https://github.com/symfony/process.git", - "reference": "d34b22ba9390ec19d2dd966c40aa9e8462f27a7e" + "reference": "d8f411ff3c7ddc4ae9166fb388d1190a2df5b5cf" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/d34b22ba9390ec19d2dd966c40aa9e8462f27a7e", - "reference": "d34b22ba9390ec19d2dd966c40aa9e8462f27a7e", + "url": "https://api.github.com/repos/symfony/process/zipball/d8f411ff3c7ddc4ae9166fb388d1190a2df5b5cf", + "reference": "d8f411ff3c7ddc4ae9166fb388d1190a2df5b5cf", "shasum": "" }, "require": { @@ -6638,7 +6638,7 @@ "description": "Executes commands in sub-processes", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/process/tree/v7.2.0" + "source": "https://github.com/symfony/process/tree/v7.2.4" }, "funding": [ { @@ -6654,7 +6654,7 @@ "type": "tidelift" } ], - "time": "2024-11-06T14:24:19+00:00" + "time": "2025-02-05T08:33:46+00:00" }, { "name": "symfony/service-contracts", @@ -6741,16 +6741,16 @@ }, { "name": "symfony/stopwatch", - "version": "v7.2.2", + "version": "v7.2.4", "source": { "type": "git", "url": "https://github.com/symfony/stopwatch.git", - "reference": "e46690d5b9d7164a6d061cab1e8d46141b9f49df" + "reference": "5a49289e2b308214c8b9c2fda4ea454d8b8ad7cd" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/stopwatch/zipball/e46690d5b9d7164a6d061cab1e8d46141b9f49df", - "reference": "e46690d5b9d7164a6d061cab1e8d46141b9f49df", + "url": "https://api.github.com/repos/symfony/stopwatch/zipball/5a49289e2b308214c8b9c2fda4ea454d8b8ad7cd", + "reference": "5a49289e2b308214c8b9c2fda4ea454d8b8ad7cd", "shasum": "" }, "require": { @@ -6783,7 +6783,7 @@ "description": "Provides a way to profile code", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/stopwatch/tree/v7.2.2" + "source": "https://github.com/symfony/stopwatch/tree/v7.2.4" }, "funding": [ { @@ -6799,7 +6799,7 @@ "type": "tidelift" } ], - "time": "2024-12-18T14:28:33+00:00" + "time": "2025-02-24T10:49:57+00:00" }, { "name": "symfony/string", diff --git a/src/MadelineProtoExtensions/ApiExtensions.php b/src/MadelineProtoExtensions/ApiExtensions.php index fe80a1a..bbd408e 100644 --- a/src/MadelineProtoExtensions/ApiExtensions.php +++ b/src/MadelineProtoExtensions/ApiExtensions.php @@ -3,6 +3,7 @@ namespace TelegramApiServer\MadelineProtoExtensions; use Amp\ByteStream\ReadableBuffer; +use Amp\ByteStream\ReadableStream; use Amp\ByteStream\WritableResourceStream; use Amp\Http\Server\FormParser\StreamedField; use Amp\Http\Server\Request; @@ -276,7 +277,7 @@ public function getMessages(array $data): array */ public function downloadToResponse(array $info): Response { - return $this->madelineProto->downloadToResponse($info, $this->request); + return $this->madelineProto->messages->sendMedia($info, $this->request); } /** @@ -299,7 +300,7 @@ public function uploadMediaForm(): array if (empty($this->file)) { throw new NoMediaException('File not found'); } - $inputFile = $this->madelineProto->uploadFromStream( + $inputFile = $this->madelineProto->messages->sendMedia( $this->file, 0, $this->file->getMimeType(), @@ -397,26 +398,96 @@ public function sendVideo(array $data): MadelineProto\EventHandler\Message foreach (['file', 'thumb'] as $key) { if (!empty($data[$key])) { - if (is_array($data[$key]) && !empty($data[$key]['_'])) { - $type = $data[$key]['_']; - unset($data[$key]['_']); - $data[$key] = match ($type) { - 'LocalFile' => new MadelineProto\LocalFile(...$data[$key]), - 'RemoteUrl' => new MadelineProto\RemoteUrl(...$data[$key]), - 'BotApiFieldId' => new MadelineProto\BotApiFileId(...$data[$key]), - default => throw new InvalidArgumentException("Unknown type: {$type}"), - }; - } elseif (is_string($data[$key])) { - $data[$key] = new ReadableBuffer($data[$key]); - } + $data[$key] = self::getMadelineMediaObject($data[$key]); } } - - if(isset($data['parseMode'])) { - $data['parseMode'] = ParseMode::from($data['parseMode']); - } - - return $this->madelineProto->sendVideo(...$data); + + if (isset($data['parseMode'])) { + $data['parseMode'] = ParseMode::from($data['parseMode']); + } + + return $this->madelineProto->sendVideo(...$data); } + public function sendPhoto(array $data): MadelineProto\EventHandler\Message + { + if (!empty($this->file)) { + $data['file'] = $this->file; + $data['fileName'] = $this->file->getFilename(); + } + return $this->madelineProto->sendPhoto(...$data); + } + + public function sendSticker(array $data): MadelineProto\EventHandler\Message + { + if (!empty($this->file)) { + $data['file'] = $this->file; + $data['fileName'] = $this->file->getFilename(); + } + return $this->madelineProto->sendSticker(...$data); + } + + public function sendVoice(array $data): MadelineProto\EventHandler\Message + { + if (!empty($this->file)) { + $data['file'] = $this->file; + $data['fileName'] = $this->file->getFilename(); + } + return $this->madelineProto->sendVoice(...$data); + } + + public function sendAudio(array $data): MadelineProto\EventHandler\Message + { + if (!empty($this->file)) { + $data['file'] = $this->file; + $data['fileName'] = $this->file->getFilename(); + } + return $this->madelineProto->sendAudio(...$data); + } + + public function sendDocument(array $data): MadelineProto\EventHandler\Message + { + if (!empty($this->file)) { + $data['file'] = $this->file; + $data['fileName'] = $this->file->getFilename(); + } + return $this->madelineProto->sendDocument(...$data); + } + + public function sendDocumentPhoto(array $data): MadelineProto\EventHandler\Message + { + if (!empty($this->file)) { + $data['file'] = $this->file; + $data['fileName'] = $this->file->getFilename(); + } + return $this->madelineProto->sendDocumentPhoto(...$data); + } + + public function sendGif(array $data): MadelineProto\EventHandler\Message + { + if (!empty($this->file)) { + $data['file'] = $this->file; + $data['fileName'] = $this->file->getFilename(); + } + return $this->madelineProto->sendGif(...$data); + } + + private static function getMadelineMediaObject(string |array | StreamedField | null $input): MadelineProto\LocalFile|MadelineProto\RemoteUrl|MadelineProto\BotApiFileId|ReadableBuffer|ReadableStream|null + { + if (is_array($input) && !empty($input['_'])) { + $type = $input['_']; + unset($input['_']); + return match ($type) { + 'LocalFile' => new MadelineProto\LocalFile(...$input), + 'RemoteUrl' => new MadelineProto\RemoteUrl(...$input), + 'BotApiFieldId' => new MadelineProto\BotApiFileId(...$input), + default => throw new InvalidArgumentException("Unknown type: {$type}"), + }; + } elseif (is_string($input)) { + return new ReadableBuffer($input); + } else { + return $input; + } + } + } From 6d55f4c6df1e036282ae88ee0ee1a012942b68ca Mon Sep 17 00:00:00 2001 From: Alexander Pankratov Date: Tue, 4 Mar 2025 20:53:04 +0100 Subject: [PATCH 205/270] Fix: downloadToResponse method --- src/MadelineProtoExtensions/ApiExtensions.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/MadelineProtoExtensions/ApiExtensions.php b/src/MadelineProtoExtensions/ApiExtensions.php index bbd408e..98bbda5 100644 --- a/src/MadelineProtoExtensions/ApiExtensions.php +++ b/src/MadelineProtoExtensions/ApiExtensions.php @@ -277,7 +277,7 @@ public function getMessages(array $data): array */ public function downloadToResponse(array $info): Response { - return $this->madelineProto->messages->sendMedia($info, $this->request); + return $this->madelineProto->downloadToResponse($info, $this->request); } /** From 598ff92f57eedaa33fb89aa9ee889c08c798f75c Mon Sep 17 00:00:00 2001 From: Alexander Pankratov Date: Sat, 22 Mar 2025 23:37:47 +0100 Subject: [PATCH 206/270] Update madelineProto --- composer.lock | 83 ++++++++++++++++++++++++++------------------------- 1 file changed, 42 insertions(+), 41 deletions(-) diff --git a/composer.lock b/composer.lock index d73e17f..ea0619f 100644 --- a/composer.lock +++ b/composer.lock @@ -89,16 +89,16 @@ }, { "name": "amphp/byte-stream", - "version": "v2.1.1", + "version": "v2.1.2", "source": { "type": "git", "url": "https://github.com/amphp/byte-stream.git", - "reference": "daa00f2efdbd71565bf64ffefa89e37542addf93" + "reference": "55a6bd071aec26fa2a3e002618c20c35e3df1b46" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/amphp/byte-stream/zipball/daa00f2efdbd71565bf64ffefa89e37542addf93", - "reference": "daa00f2efdbd71565bf64ffefa89e37542addf93", + "url": "https://api.github.com/repos/amphp/byte-stream/zipball/55a6bd071aec26fa2a3e002618c20c35e3df1b46", + "reference": "55a6bd071aec26fa2a3e002618c20c35e3df1b46", "shasum": "" }, "require": { @@ -152,7 +152,7 @@ ], "support": { "issues": "https://github.com/amphp/byte-stream/issues", - "source": "https://github.com/amphp/byte-stream/tree/v2.1.1" + "source": "https://github.com/amphp/byte-stream/tree/v2.1.2" }, "funding": [ { @@ -160,7 +160,7 @@ "type": "github" } ], - "time": "2024-02-17T04:49:38+00:00" + "time": "2025-03-16T17:10:27+00:00" }, { "name": "amphp/cache", @@ -542,16 +542,16 @@ }, { "name": "amphp/http-client", - "version": "v5.2.2", + "version": "v5.3.0", "source": { "type": "git", "url": "https://github.com/amphp/http-client.git", - "reference": "a3e8711cb71fe909c1ae17450bfa5db652559c20" + "reference": "d50928ec41d4ac3bcec5a01fe1caaf7575cbdc75" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/amphp/http-client/zipball/a3e8711cb71fe909c1ae17450bfa5db652559c20", - "reference": "a3e8711cb71fe909c1ae17450bfa5db652559c20", + "url": "https://api.github.com/repos/amphp/http-client/zipball/d50928ec41d4ac3bcec5a01fe1caaf7575cbdc75", + "reference": "d50928ec41d4ac3bcec5a01fe1caaf7575cbdc75", "shasum": "" }, "require": { @@ -628,7 +628,7 @@ ], "support": { "issues": "https://github.com/amphp/http-client/issues", - "source": "https://github.com/amphp/http-client/tree/v5.2.2" + "source": "https://github.com/amphp/http-client/tree/v5.3.0" }, "funding": [ { @@ -636,7 +636,7 @@ "type": "github" } ], - "time": "2025-01-12T20:02:49+00:00" + "time": "2025-03-16T17:32:21+00:00" }, { "name": "amphp/http-client-cookies", @@ -1266,16 +1266,16 @@ }, { "name": "amphp/pipeline", - "version": "v1.2.2", + "version": "v1.2.3", "source": { "type": "git", "url": "https://github.com/amphp/pipeline.git", - "reference": "97cbf289f4d8877acfe58dd90ed5a4370a43caa4" + "reference": "7b52598c2e9105ebcddf247fc523161581930367" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/amphp/pipeline/zipball/97cbf289f4d8877acfe58dd90ed5a4370a43caa4", - "reference": "97cbf289f4d8877acfe58dd90ed5a4370a43caa4", + "url": "https://api.github.com/repos/amphp/pipeline/zipball/7b52598c2e9105ebcddf247fc523161581930367", + "reference": "7b52598c2e9105ebcddf247fc523161581930367", "shasum": "" }, "require": { @@ -1321,7 +1321,7 @@ ], "support": { "issues": "https://github.com/amphp/pipeline/issues", - "source": "https://github.com/amphp/pipeline/tree/v1.2.2" + "source": "https://github.com/amphp/pipeline/tree/v1.2.3" }, "funding": [ { @@ -1329,7 +1329,7 @@ "type": "github" } ], - "time": "2025-01-19T15:42:46+00:00" + "time": "2025-03-16T16:33:53+00:00" }, { "name": "amphp/postgres", @@ -2586,12 +2586,12 @@ "source": { "type": "git", "url": "https://github.com/danog/MadelineProto.git", - "reference": "4a834835d88db4386803ad37495fb37bfb165173" + "reference": "30359988972488d8b3cb827ef6b940f8e1283dc6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/danog/MadelineProto/zipball/4a834835d88db4386803ad37495fb37bfb165173", - "reference": "4a834835d88db4386803ad37495fb37bfb165173", + "url": "https://api.github.com/repos/danog/MadelineProto/zipball/30359988972488d8b3cb827ef6b940f8e1283dc6", + "reference": "30359988972488d8b3cb827ef6b940f8e1283dc6", "shasum": "" }, "require": { @@ -2706,7 +2706,7 @@ "type": "github" } ], - "time": "2025-02-16T22:54:43+00:00" + "time": "2025-03-22T22:28:19+00:00" }, { "name": "danog/primemodule", @@ -3917,21 +3917,21 @@ }, { "name": "promphp/prometheus_client_php", - "version": "v2.13.1", + "version": "v2.14.0", "source": { "type": "git", "url": "https://github.com/PromPHP/prometheus_client_php.git", - "reference": "3f8e4ff20e4090e494572feaf68b36c197e0e3ef" + "reference": "3e4811f231c1e444a21072eccae90ab40bae199e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/PromPHP/prometheus_client_php/zipball/3f8e4ff20e4090e494572feaf68b36c197e0e3ef", - "reference": "3f8e4ff20e4090e494572feaf68b36c197e0e3ef", + "url": "https://api.github.com/repos/PromPHP/prometheus_client_php/zipball/3e4811f231c1e444a21072eccae90ab40bae199e", + "reference": "3e4811f231c1e444a21072eccae90ab40bae199e", "shasum": "" }, "require": { "ext-json": "*", - "php": "^7.2|^8.0" + "php": "^7.4|^8.0" }, "replace": { "endclothing/prometheus_client_php": "*", @@ -3979,9 +3979,9 @@ "description": "Prometheus instrumentation library for PHP applications.", "support": { "issues": "https://github.com/PromPHP/prometheus_client_php/issues", - "source": "https://github.com/PromPHP/prometheus_client_php/tree/v2.13.1" + "source": "https://github.com/PromPHP/prometheus_client_php/tree/v2.14.0" }, - "time": "2024-12-10T13:48:27+00:00" + "time": "2025-03-05T10:11:57+00:00" }, { "name": "psr/http-factory", @@ -5050,16 +5050,16 @@ }, { "name": "friendsofphp/php-cs-fixer", - "version": "v3.70.1", + "version": "v3.73.1", "source": { "type": "git", "url": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer.git", - "reference": "add1b3a05256392dbad63875240041b2c0349ceb" + "reference": "ffcb8200a42045e65049af7910cfd022f631b064" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/PHP-CS-Fixer/PHP-CS-Fixer/zipball/add1b3a05256392dbad63875240041b2c0349ceb", - "reference": "add1b3a05256392dbad63875240041b2c0349ceb", + "url": "https://api.github.com/repos/PHP-CS-Fixer/PHP-CS-Fixer/zipball/ffcb8200a42045e65049af7910cfd022f631b064", + "reference": "ffcb8200a42045e65049af7910cfd022f631b064", "shasum": "" }, "require": { @@ -5067,6 +5067,7 @@ "composer/semver": "^3.4", "composer/xdebug-handler": "^3.0.3", "ext-filter": "*", + "ext-hash": "*", "ext-json": "*", "ext-tokenizer": "*", "fidry/cpu-core-counter": "^1.2", @@ -5089,18 +5090,18 @@ "symfony/stopwatch": "^5.4 || ^6.4 || ^7.0" }, "require-dev": { - "facile-it/paraunit": "^1.3.1 || ^2.5", - "infection/infection": "^0.29.10", - "justinrainbow/json-schema": "^5.3 || ^6.0", + "facile-it/paraunit": "^1.3.1 || ^2.6", + "infection/infection": "^0.29.14", + "justinrainbow/json-schema": "^5.3 || ^6.2", "keradus/cli-executor": "^2.1", "mikey179/vfsstream": "^1.6.12", "php-coveralls/php-coveralls": "^2.7", "php-cs-fixer/accessible-object": "^1.1", "php-cs-fixer/phpunit-constraint-isidenticalstring": "^1.6", "php-cs-fixer/phpunit-constraint-xmlmatchesxsd": "^1.6", - "phpunit/phpunit": "^9.6.22 || ^10.5.45 || ^11.5.7", - "symfony/var-dumper": "^5.4.48 || ^6.4.18 || ^7.2.0", - "symfony/yaml": "^5.4.45 || ^6.4.18 || ^7.2.0" + "phpunit/phpunit": "^9.6.22 || ^10.5.45 || ^11.5.12", + "symfony/var-dumper": "^5.4.48 || ^6.4.18 || ^7.2.3", + "symfony/yaml": "^5.4.45 || ^6.4.18 || ^7.2.3" }, "suggest": { "ext-dom": "For handling output formats in XML", @@ -5141,7 +5142,7 @@ ], "support": { "issues": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/issues", - "source": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/tree/v3.70.1" + "source": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/tree/v3.73.1" }, "funding": [ { @@ -5149,7 +5150,7 @@ "type": "github" } ], - "time": "2025-03-01T22:05:46+00:00" + "time": "2025-03-19T23:42:16+00:00" }, { "name": "psr/container", From 1685a8d23bd94e28041e036053cd40ee1dbf3824 Mon Sep 17 00:00:00 2001 From: Alexander Pankratov Date: Sat, 22 Mar 2025 23:38:32 +0100 Subject: [PATCH 207/270] Use versions in docker compose --- docker-compose.base.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker-compose.base.yml b/docker-compose.base.yml index fb7f209..eee316d 100644 --- a/docker-compose.base.yml +++ b/docker-compose.base.yml @@ -1,6 +1,6 @@ services: api: - image: xtrime/telegram-api-server:latest + image: xtrime/telegram-api-server:2.4 init: true build: context: . From 5ca364e60aa436cb2cb3160818e3727cc81ece69 Mon Sep 17 00:00:00 2001 From: Daniil Gentili Date: Fri, 18 Apr 2025 23:37:45 +0200 Subject: [PATCH 208/270] Refactor (#178) --- Dockerfile | 25 +- README.md | 98 ++---- docker/php/php.ini | 34 --- entrypoint.sh | 2 +- src/Controllers/AbstractApiController.php | 281 ++++++------------ src/Controllers/ApiController.php | 82 ++++- src/Controllers/SystemController.php | 35 ++- src/MadelineProtoExtensions/ApiExtensions.php | 227 ++++---------- src/Server/AccessLoggerMiddleware.php | 1 - src/Server/Router.php | 4 +- 10 files changed, 279 insertions(+), 510 deletions(-) delete mode 100644 docker/php/php.ini diff --git a/Dockerfile b/Dockerfile index 8588826..694b9f3 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,23 +1,4 @@ -FROM php:8.4-cli-alpine - -RUN apk add --no-cache make g++ && \ - curl -sSLf https://github.com/danog/PrimeModule-ext/archive/refs/tags/2.0.tar.gz | tar -xz && \ - cd PrimeModule-ext-2.0 && \ - make -j$(nproc) && \ - make install && \ - cd .. && \ - rm -r PrimeModule-ext-2.0 && \ - apk del make g++ - -ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/ - -RUN chmod +x /usr/local/bin/install-php-extensions && \ - install-php-extensions pcntl uv-beta ffi pgsql memprof intl gmp mbstring pdo_mysql xml dom iconv zip igbinary gd && \ - rm /usr/local/bin/install-php-extensions - -RUN apk add --no-cache ffmpeg nghttp2 jemalloc - -ENV LD_PRELOAD=libjemalloc.so.2 +FROM danog/madelineproto:latest STOPSIGNAL SIGTERM @@ -25,9 +6,9 @@ RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local COPY --from=ghcr.io/ufoscout/docker-compose-wait:latest /wait /usr/local/bin/docker-compose-wait -RUN echo 1.0.0 > /tas_version +RUN echo 1.0.1 > /tas_version -ADD docker/php/php.ini $PHP_INI_DIR/php.ini +RUN echo -e "\nopcache.jit=off" >> $PHP_INI_DIR/php.ini EXPOSE 9503 diff --git a/README.md b/README.md index 735b095..511c82c 100644 --- a/README.md +++ b/README.md @@ -89,7 +89,7 @@ Regular and application/json POST supported. It's recommended to use http_build_query, when using GET requests. **Rules:** -* All methods from MadelineProto supported: [Methods List](https://docs.madelineproto.xyz/API_docs/methods/) +* All methods from MadelineProto supported: [Method List](https://docs.madelineproto.xyz/API_docs/methods/) * Url: `http://%address%:%port%/api[/%session%]/%class%.%method%/?%param%=%val%` * Important: api available only from ip in whitelist. By default it is: `127.0.0.1` @@ -101,20 +101,17 @@ It's recommended to use http_build_query, when using GET requests. Only protection is the `IP_WHITELIST`, and there are no warranties that it will secure your accounts. * If method is inside class (messages, contacts and etc.) use '.' to separate class from method: `http://127.0.0.1:9503/api/contacts.getContacts` -* If method requires array of values, use any name of array, for example 'data': - `?data[peer]=@xtrime&data[message]=Hello!`. Order of parameters does't matter in this case. -* If method requires one or multiple separate parameters (not inside array) then pass parameters with any names but **in strict order**: - `http://127.0.0.1:9503/api/getInfo/?id=@xtrime` or `http://127.0.0.1:9503/api/getInfo/?abcd=@xtrime` works the same +* When passing files in POST forms, if the name of the field is `file`, it must always come **last** in the field list, and all fields after `file` will be ignored (this limit is not present for file fields named in another way, such as thumbnail fields). **Examples:** * get_info about channel/user: `http://127.0.0.1:9503/api/getInfo/?id=@xtrime` * get_info about currect account: `http://127.0.0.1:9503/api/getSelf` -* repost: `http://127.0.0.1:9503/api/messages.forwardMessages/?data[from_peer]=@xtrime&data[to_peer]=@xtrime&data[id]=1234` -* get messages from channel/user: `http://127.0.0.1:9503/api/messages.getHistory/?data[peer]=@breakingmash&data[limit]=10` -* get messages with text in HTML: `http://127.0.0.1:9503/api/getHistoryHtml/?data[peer]=@breakingmash&data[limit]=10` -* search: `http://127.0.0.1:9503/api/searchGlobal/?data[q]=Hello%20World&data[limit]=10` -* sendMessage: `http://127.0.0.1:9503/api/messages.sendMessage/?data[peer]=@xtrime&data[message]=Hello!` -* copy message from one channel to another (not repost): `http://127.0.0.1:9503/api/copyMessages/?data[from_peer]=@xtrime&data[to_peer]=@xtrime&data[id][0]=1` +* repost: `http://127.0.0.1:9503/api/messages.forwardMessages/?from_peer=@xtrime&to_peer=@xtrime&id=1234` +* get messages from channel/user: `http://127.0.0.1:9503/api/messages.getHistory/?peer=@breakingmash&limit=10` +* get messages with text in HTML: `http://127.0.0.1:9503/api/getHistoryHtml/?peer=@breakingmash&limit=10` +* search: `http://127.0.0.1:9503/api/searchGlobal/?q=Hello%20World&limit=10` +* sendMessage: `http://127.0.0.1:9503/api/messages.sendMessage/?peer=@xtrime&message=Hello!` +* copy message from one channel to another (not repost): `http://127.0.0.1:9503/api/copyMessages/?from_peer=@xtrime&to_peer=@xtrime&id[0]=1` ## Advanced features ### Get events/updates @@ -123,7 +120,7 @@ There are multiple ways of [getting updates](https://docs.madelineproto.xyz/docs 1. [Websocket](#eventhandler-updates-webhooks) 2. Long Polling: send request to getUpdates endpoint -`curl "127.0.0.1:9503/api/getUpdates?data[limit]=3&data[offset]=0&data[timeout]=10.0" -g` +`curl "127.0.0.1:9503/api/getUpdates?limit=3&offset=0&timeout=10.0" -g` 3. Webhook: Redirect all updates to your endpoint, just like bot api! `curl "127.0.0.1:9503/api/setWebhook?url=http%3A%2F%2Fexample.com%2Fsome_webhook" -g ` @@ -133,73 +130,40 @@ Example uses urlencoded url in query. There are few options to upload and send media files: -- Custom method `sendVideo` to send video by url or local path, remote url, or stream. +- Custom method `sendDocument`/`sendVideo`/etc ([full list here](https://docs.madelineproto.xyz/docs/FILES.html)) to send document/video/audio/voice/etc by url or local path, remote url, or stream. + Stream upload from client: + ```shell script + curl --location --request POST 'http://127.0.0.1:9503/api/sendDocument' -g \ + -F peer=me \ + -F caption=key + -F file=@screenshot.png \ + ``` RemoteUrl: ```shell script curl --location --request POST 'http://127.0.0.1:9503/api/sendVideo' \ --header 'Content-Type: application/json' \ --data-raw '{ - "data": { - "peer": "me", - "file": { - "_": "RemoteUrl", - "url": "https://domain.site/storage/video.mp4" - }, - "parseMode": "HTML", - "caption": "caption text" - } + "peer": "me", + "file": { + "_": "RemoteUrl", + "url": "https://domain.site/storage/video.mp4" + }, + "parseMode": "HTML", + "caption": "caption text" }' ``` - Stream upload from client: - ```shell script - curl --location --request POST 'http://127.0.0.1:9503/api/sendDocument/?data[peer]=me&data[caption]=hey' -g \ - -F "file=@screenshot.png" - ``` Local file on server: ```shell script curl --location --request POST 'http://127.0.0.1:9503/api/sendDocument' \ --header 'Content-Type: application/json' \ --data-raw '{ - "data": { - "peer": "me", - "file": { - "_": "LocalUrl", - "file": "faust.txt" - }, - "parseMode": "HTML", - "caption": "caption text" - } - }' - ``` -- use custom `uploadMediaForm` method and then pass result to `messages.sendMedia`: - 1. `curl "http://127.0.0.1:9503/api/uploadMediaForm" -g -F "file=@/Users/xtrime/Downloads/test.txt"` - Method supports `application/x-www-form-urlencoded` and `multipart/form-data`. - - 2. Send result from `uploadMediaForm` to `messages.sendMedia` or `sendMedia`: - ```shell script - curl --location --request POST 'http://127.0.0.1:9503/api/sendMedia' \ - --header 'Content-Type: application/json' \ - --data-raw '{ - "data":{ - "peer": "me", - "media": { - "_": "inputMediaUploadedDocument", - "file": { - "_": "inputFile", - "id": 1164670976363200575, - "parts": 1, - "name": "test.txt", - "mime_type": "text/plain", - "md5_checksum": "" - }, - "attributes": [ - { - "_": "documentAttributeFilename", - "file_name": "test.txt" - } - ] - } - } + "peer": "me", + "file": { + "_": "LocalUrl", + "file": "faust.txt" + }, + "parseMode": "HTML", + "caption": "caption text" }' ``` - See other options: https://docs.madelineproto.xyz/docs/FILES.html#uploading-files diff --git a/docker/php/php.ini b/docker/php/php.ini deleted file mode 100644 index 00f36fb..0000000 --- a/docker/php/php.ini +++ /dev/null @@ -1,34 +0,0 @@ -memory_limit = -1 -zend.assertions = -1 -display_errors = On -display_startup_errors = On - -ffi.enable=true - -zend_extension=opcache - -[opcache] -opcache.memory_consumption=256M -opcache.enable=1 -opcache.enable_cli=1 -opcache.jit=off -opcache.validate_timestamps=1 -opcache.revalidate_freq=0 -opcache.jit_buffer_size=0 -opcache.file_update_protection=0 -opcache.max_accelerated_files=1000000 -opcache.interned_strings_buffer=64 - -opcache.jit_prof_threshold=0.000000001 -opcache.jit_max_root_traces= 1000000 -opcache.jit_max_side_traces= 1000000 -opcache.jit_max_exit_counters=1000000 -opcache.jit_hot_loop=1 -opcache.jit_hot_func=1 -opcache.jit_hot_return=1 -opcache.jit_hot_side_exit=1 - -opcache.jit_blacklist_root_trace=255 -opcache.jit_blacklist_side_trace=255 - -opcache.protect_memory=1 diff --git a/entrypoint.sh b/entrypoint.sh index 31ed46a..6d7d904 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -1,6 +1,6 @@ #!/usr/bin/env sh -VERSION=1.0.0 +VERSION=1.0.1 CURRENT_VERSION=$(cat /tas_version) if [ "$VERSION" != "$CURRENT_VERSION" ]; then diff --git a/src/Controllers/AbstractApiController.php b/src/Controllers/AbstractApiController.php index 049011e..8598f29 100644 --- a/src/Controllers/AbstractApiController.php +++ b/src/Controllers/AbstractApiController.php @@ -2,7 +2,9 @@ namespace TelegramApiServer\Controllers; +use Amp\ByteStream\ReadableBuffer; use Amp\Future; +use Amp\Http\HttpStatus; use Amp\Http\Server\FormParser\StreamedField; use Amp\Http\Server\FormParser\StreamingFormParser; use Amp\Http\Server\Request; @@ -10,6 +12,11 @@ use Amp\Http\Server\Response; use Amp\Http\Server\Router; use danog\MadelineProto\API; +use danog\MadelineProto\BotApiFileId; +use danog\MadelineProto\LocalFile; +use danog\MadelineProto\ParseMode; +use danog\MadelineProto\RemoteUrl; +use InvalidArgumentException; use JsonException; use TelegramApiServer\Client; use TelegramApiServer\Exceptions\NoticeException; @@ -23,228 +30,134 @@ abstract class AbstractApiController { public const JSON_HEADER = ['Content-Type' => 'application/json;charset=utf-8']; - protected Request $request; - protected ?StreamedField $file = null; - protected string $extensionClass; + abstract protected function callApi(Request $request); - public array $page = [ - 'headers' => self::JSON_HEADER, - 'success' => false, - 'errors' => [], - 'code' => 200, - 'response' => null, - ]; - protected array $parameters = []; - protected array $api; - - abstract protected function resolvePath(array $path); - - abstract protected function callApi(); - - public static function getRouterCallback(string $extensionClass): ClosureRequestHandler + public static function getRouterCallback(): ClosureRequestHandler { - return new ClosureRequestHandler( - static function (Request $request) use ($extensionClass) { - $requestCallback = new static($request, $extensionClass); - $response = $requestCallback->process(); - + $cb = new static(); + return new ClosureRequestHandler(static function (Request $request) use ($cb) { + try { + $response = $cb->callApi($request); + if ($response instanceof Future) { + $response = $response->await(); + } if ($response instanceof Response) { return $response; } return new Response( - $requestCallback->page['code'], - $requestCallback->page['headers'], - $response + HttpStatus::OK, + self::JSON_HEADER, + \json_encode( + [ + 'success' => true, + 'response' => $response, + 'errors' => [] + ], + JSON_THROW_ON_ERROR | + JSON_INVALID_UTF8_SUBSTITUTE | + JSON_PARTIAL_OUTPUT_ON_ERROR | + JSON_PRETTY_PRINT | + JSON_UNESCAPED_SLASHES | + JSON_UNESCAPED_UNICODE + )."\n" + ); + } catch (\Throwable $e) { + if (!$e instanceof NoticeException) { + error($e->getMessage(), Logger::getExceptionAsArray($e)); + } else { + notice($e->getMessage()); + } + $code = $e->getCode(); + return new Response( + $code >= 100 && $code <= 599 ? $code : 400, + self::JSON_HEADER, + \json_encode( + [ + 'success' => false, + 'response' => null, + 'errors' => [Logger::getExceptionAsArray($e)] + ], + JSON_THROW_ON_ERROR | + JSON_INVALID_UTF8_SUBSTITUTE | + JSON_PARTIAL_OUTPUT_ON_ERROR | + JSON_PRETTY_PRINT | + JSON_UNESCAPED_SLASHES | + JSON_UNESCAPED_UNICODE + )."\n" ); } - ); - } - - public function __construct(Request $request, string $extensionClass) - { - $this->request = $request; - $this->extensionClass = $extensionClass; - } - - /** - * @return Response|string - * @throws Throwable - */ - public function process() - { - $this->resolvePath($this->request->getAttribute(Router::class)); - $this->resolveRequest(); - $this->generateResponse(); - - return $this->getResponse(); + }); } /** * Получаем параметры из GET и POST. * */ - private function resolveRequest(): void + protected function resolveRequest(Request $request): array { - $query = $this->request->getUri()->getQuery(); - $contentType = (string) $this->request->getHeader('Content-Type'); + $query = $request->getUri()->getQuery(); + $contentType = (string) $request->getHeader('Content-Type'); - \parse_str($query, $get); + \parse_str($query, $params); switch (true) { case $contentType === 'application/x-www-form-urlencoded': case \str_contains($contentType, 'multipart/form-data'): - $form = (new StreamingFormParser())->parseForm($this->request); - $post = []; + $form = (new StreamingFormParser())->parseForm($request); - while ($form->continue()) { - /** @var StreamedField $field */ - $field = $form->getValue(); + foreach ($form as $field) { if ($field->isFile()) { - $this->file = $field; - //We need to break loop without getting file - //All other post field will be omitted, hope we dont need them :) - break; + if ($field->getName() === 'file') { + $params[$field->getName()] = $field; + $params['fileName'] = $field->getFilename(); + $params['mimeType'] = $field->getMimeType(); + break; + } + $params[$field->getName()] = new ReadableBuffer($field->buffer()); + } else { + $params[$field->getName()] = $field->buffer(); } - $post[$field->getName()] = $field->buffer(); - } break; case $contentType === 'application/json': - $body = $this->request->getBody()->buffer(); - $post = \json_decode($body, true); + $body = $request->getBody()->buffer(); + $params += \json_decode($body, true); break; default: - $body = $this->request->getBody()->buffer(); - \parse_str($body, $post); - } - - $this->parameters = \array_merge((array) $post, $get); - $this->parameters = \array_values($this->parameters); - - } - - /** - * Получает посты для формирования ответа. - * - */ - private function generateResponse(): void - { - if ($this->page['code'] !== 200) { - return; + \parse_str($request->getBody()->buffer(), $post); + $params += $post; } - if (!$this->api) { - return; + if (isset($params['data']) && is_array($params['data'])) { + $params += $params['data']; + unset($params['data']); } - - try { - $this->page['response'] = $this->callApi(); - - if ($this->page['response'] instanceof Future) { - $this->page['response'] = $this->page['response']->await(); - } - - } catch (Throwable $e) { - if (!$e instanceof NoticeException) { - error($e->getMessage(), Logger::getExceptionAsArray($e)); - } else { - notice($e->getMessage()); - } - $this->setError($e); + if (isset($data['parseMode'])) { + $data['parseMode'] = ParseMode::from($data['parseMode']); } - } - - protected function callApiCommon(API $madelineProto) - { - $pathCount = \count($this->api); - if ($pathCount === 1 && \method_exists($this->extensionClass, $this->api[0])) { - /** @var ApiExtensions|SystemApiExtensions $madelineProtoExtensions */ - $madelineProtoExtensions = new $this->extensionClass($madelineProto, $this->request, $this->file); - $result = $madelineProtoExtensions->{$this->api[0]}(...$this->parameters); - } else { - if ($this->api[0] === 'API') { - $madelineProto = Client::getWrapper($madelineProto)->getAPI(); - \array_shift($this->api); - $pathCount = \count($this->api); + foreach (['file', 'thumb'] as $key) { + if (isset($data[$key])) { + $data[$key] = self::getMadelineMediaObject($data[$key]); } - //Проверяем нет ли в MadilineProto такого метода. - switch ($pathCount) { - case 1: - $result = $madelineProto->{$this->api[0]}(...$this->parameters); - break; - case 2: - $result = $madelineProto->{$this->api[0]}->{$this->api[1]}(...$this->parameters); - break; - case 3: - $result = $madelineProto->{$this->api[0]}->{$this->api[1]}->{$this->api[2]}(...$this->parameters); - break; - default: - throw new UnexpectedValueException('Incorrect method format'); - } - } - - return $result; - } - - /** - * - * @throws Throwable - */ - private function setError(Throwable $e): self - { - $errorCode = $e->getCode(); - if ($errorCode >= 400 && $errorCode < 500) { - $this->setPageCode($errorCode); - } else { - $this->setPageCode(400); } - $this->page['errors'][] = Logger::getExceptionAsArray($e); + $params['request'] = $request; + return $params; - return $this; } - - /** - * Кодирует ответ в нужный формат: json. - * - * @throws JsonException - */ - private function getResponse(): string|Response + private static function getMadelineMediaObject(string |array | StreamedField | null $input): RemoteUrl|BotApiFileId|ReadableBuffer|null { - if ($this->page['response'] instanceof Response) { - return $this->page['response']; + if (is_array($input) && !empty($input['_'])) { + return match ($input['_']) { + 'LocalFile' => new LocalFile(...$input), + 'RemoteUrl' => new RemoteUrl(...$input), + 'BotApiFieldId' => new BotApiFileId(...$input), + default => throw new InvalidArgumentException("Unknown type: {$input['_']}"), + }; } - - $data = [ - 'success' => $this->page['success'], - 'errors' => $this->page['errors'], - 'response' => $this->page['response'], - ]; - if (!$data['errors']) { - $data['success'] = true; + if (is_string($input)) { + return new ReadableBuffer($input); } - - $result = \json_encode( - $data, - JSON_THROW_ON_ERROR | - JSON_INVALID_UTF8_SUBSTITUTE | - JSON_PARTIAL_OUTPUT_ON_ERROR | - JSON_PRETTY_PRINT | - JSON_UNESCAPED_SLASHES | - JSON_UNESCAPED_UNICODE - ); - - return $result . "\n"; - } - - /** - * Устанавливает http код ответа (200, 400, 404 и тд.). - * - * - */ - private function setPageCode(int $code): self - { - $this->page['code'] = $this->page['code'] === 200 ? $code : $this->page['code']; - return $this; + return $input; } -} +} \ No newline at end of file diff --git a/src/Controllers/ApiController.php b/src/Controllers/ApiController.php index 7ce1b45..bb404be 100644 --- a/src/Controllers/ApiController.php +++ b/src/Controllers/ApiController.php @@ -4,37 +4,66 @@ use Amp\DeferredFuture; use Amp\Future; +use Amp\Http\Server\Request; +use Amp\Http\Server\Router; +use danog\MadelineProto\API; use Exception; +use ReflectionClass; +use ReflectionMethod; use Revolt\EventLoop; use TelegramApiServer\Client; use TelegramApiServer\Config; +use TelegramApiServer\MadelineProtoExtensions\ApiExtensions; +use UnexpectedValueException; final class ApiController extends AbstractApiController { private ?string $session = ''; + private readonly ApiExtensions $extension; - /** - * Получаем параметры из uri. - * - * - */ - protected function resolvePath(array $path): void + private array $methods = []; + private array $methodsMadeline = []; + public function __construct() { - $this->session = $path['session'] ?? null; - $this->api = \explode('.', $path['method'] ?? ''); + $this->extension = new ApiExtensions; + foreach ((new ReflectionClass(ApiExtensions::class))->getMethods(ReflectionMethod::IS_PUBLIC) as $method) { + $args = []; + foreach ($method->getParameters() as $param) { + $args[$param->getName()] = true; + } + $name = $method->getName(); + $this->methods[$method->getName()] = function (API $API, ...$params) use ($args, $name) { + return $this->extension->{$name}($API, ...array_intersect_key($params, $args)); + }; + } + foreach ((new ReflectionClass(API::class))->getMethods(ReflectionMethod::IS_PUBLIC) as $method) { + $args = []; + foreach ($method->getParameters() as $param) { + $args[$param->getName()] = true; + } + $name = $method->getName(); + $this->methodsMadeline[$method->getName()] = function (API $API, ...$params) use ($args, $name) { + return $API->{$name}(...array_intersect_key($params, $args)); + }; + } } private static ?Future $w = null; /** * @throws Exception */ - protected function callApi(): mixed + protected function callApi(Request $request): mixed { - $madelineProto = Client::getInstance()->getSession($this->session); + $path = $request->getAttribute(Router::class); + $session = $path['session'] ?? null; + $api = \explode('.', $path['method'] ?? ''); + + $madelineProto = Client::getInstance()->getSession($session); $tick = Config::getInstance()->get('api.bulk_interval'); + $params = $this->resolveRequest($request); if (!$tick) { - return $this->callApiCommon($madelineProto); + return $this->callApiCommon($madelineProto, $api, $params); } if (!self::$w) { @@ -47,6 +76,35 @@ protected function callApi(): mixed } self::$w->await(); - return $this->callApiCommon($madelineProto); + return $this->callApiCommon($madelineProto, $api, $params); + } + + + private function callApiCommon(API $madelineProto, array $api, array $parameters) + { + $pathCount = \count($api); + if ($pathCount === 1 && \array_key_exists($api[0], $this->methods)) { + $result = $this->methods[$api[0]]($madelineProto, ...$parameters); + } else { + if ($api[0] === 'API') { + $madelineProto = Client::getWrapper($madelineProto)->getAPI(); + \array_shift($api); + $pathCount = \count($api); + } + //Проверяем нет ли в MadilineProto такого метода. + switch ($pathCount) { + case 1: + $result = $this->methodsMadeline[$api[0]]($madelineProto, ...$parameters); + break; + case 2: + $result = $madelineProto->{$api[0]}->{$api[1]}(...$parameters); + break; + default: + throw new UnexpectedValueException('Incorrect method format'); + } + } + + return $result; } + } diff --git a/src/Controllers/SystemController.php b/src/Controllers/SystemController.php index a9077da..88dcbe7 100644 --- a/src/Controllers/SystemController.php +++ b/src/Controllers/SystemController.php @@ -2,29 +2,40 @@ namespace TelegramApiServer\Controllers; +use Amp\Http\Server\Request; +use Amp\Http\Server\Router; use Exception; +use ReflectionClass; +use ReflectionMethod; use TelegramApiServer\Client; +use TelegramApiServer\MadelineProtoExtensions\SystemApiExtensions; final class SystemController extends AbstractApiController { - /** - * Получаем параметры из uri. - * - * - */ - protected function resolvePath(array $path): void + private readonly SystemApiExtensions $extension; + private array $methods = []; + public function __construct() { - $this->api = \explode('.', $path['method'] ?? ''); + $this->extension = new SystemApiExtensions(Client::getInstance()); + foreach ((new ReflectionClass(SystemApiExtensions::class))->getMethods(ReflectionMethod::IS_PUBLIC) as $method) { + $args = []; + foreach ($method->getParameters() as $param) { + $args[$param->getName()] = true; + } + $name = $method->getName(); + $this->methods[$method->getName()] = function (...$params) use ($args, $name) { + return $this->extension->{$name}(...array_intersect_key($params, $args)); + }; + } } /** * @throws Exception */ - protected function callApi() + protected function callApi(Request $request) { - $madelineProtoExtensions = new $this->extensionClass(Client::getInstance()); - $result = $madelineProtoExtensions->{$this->api[0]}(...$this->parameters); - return $result; + $path = $request->getAttribute(Router::class); + $api = \explode('.', $path['method'] ?? ''); + return $this->methods[$api[0]](...$this->resolveRequest($request)); } - } diff --git a/src/MadelineProtoExtensions/ApiExtensions.php b/src/MadelineProtoExtensions/ApiExtensions.php index 98bbda5..b3d7fff 100644 --- a/src/MadelineProtoExtensions/ApiExtensions.php +++ b/src/MadelineProtoExtensions/ApiExtensions.php @@ -8,7 +8,9 @@ use Amp\Http\Server\FormParser\StreamedField; use Amp\Http\Server\Request; use Amp\Http\Server\Response; +use AssertionError; use danog\MadelineProto; +use danog\MadelineProto\API; use danog\MadelineProto\ParseMode; use danog\MadelineProto\StrTools; use InvalidArgumentException; @@ -20,20 +22,9 @@ final class ApiExtensions { - private MadelineProto\Api $madelineProto; - private Request $request; - private ?StreamedField $file; - - public function __construct(MadelineProto\Api $madelineProto, Request $request, ?StreamedField $file) - { - $this->madelineProto = $madelineProto; - $this->request = $request; - $this->file = $file; - } - - public function getHistoryHtml(array $data): array + public function getHistoryHtml(API $madelineProto, ...$params): array { - $response = $this->madelineProto->messages->getHistory(...$data); + $response = $madelineProto->messages->getHistory(...$params); if (!empty($response['messages'])) { foreach ($response['messages'] as &$message) { $message['message'] = StrTools::entitiesToHtml( @@ -82,7 +73,7 @@ private static function hasMedia(array $message = [], bool $allowWebPage = false *
* */ - public function copyMessages(array $data) + public function copyMessages(API $madelineProto, ...$data) { $data = \array_merge( [ @@ -93,7 +84,7 @@ public function copyMessages(array $data) $data ); - $response = $this->madelineProto->channels->getMessages( + $response = $madelineProto->channels->getMessages( [ 'channel' => $data['from_peer'], 'id' => $data['id'], @@ -112,9 +103,9 @@ public function copyMessages(array $data) ]; if (self::hasMedia($message, false)) { $messageData['media'] = $message; //MadelineProto сама достанет все media из сообщения. - $result[] = $this->madelineProto->messages->sendMedia(...$messageData); + $result[] = $madelineProto->messages->sendMedia(...$messageData); } else { - $result[] = $this->madelineProto->messages->sendMessage(...$messageData); + $result[] = $madelineProto->messages->sendMessage(...$messageData); } if ($key > 0) { delay(\random_int(300, 2000) / 1000); @@ -129,7 +120,7 @@ public function copyMessages(array $data) * * */ - public function getMedia(array $data): Response + public function getMedia(API $madelineProto, ...$data): Response { $data = \array_merge( [ @@ -140,7 +131,7 @@ public function getMedia(array $data): Response $data ); - $message = $data['message'] ?: ($this->getMessages($data))['messages'][0] ?? null; + $message = $data['message'] ?: ($this->getMessages($madelineProto, ...$data))['messages'][0] ?? null; if (!$message || $message['_'] === 'messageEmpty') { throw new NoMediaException('Empty message'); } @@ -150,28 +141,28 @@ public function getMedia(array $data): Response } if ($message['media']['_'] !== 'messageMediaWebPage') { - $info = $this->madelineProto->getDownloadInfo($message); + $info = $madelineProto->getDownloadInfo($message); } else { $webpage = $message['media']['webpage']; if (!empty($webpage['embed_url'])) { return new Response(302, ['Location' => $webpage['embed_url']]); } elseif (!empty($webpage['document'])) { - $info = $this->madelineProto->getDownloadInfo($webpage['document']); + $info = $madelineProto->getDownloadInfo($webpage['document']); } elseif (!empty($webpage['photo'])) { - $info = $this->madelineProto->getDownloadInfo($webpage['photo']); + $info = $madelineProto->getDownloadInfo($webpage['photo']); } else { - return $this->getMediaPreview($data); + return $this->getMediaPreview($madelineProto, ...$data); } } - return $this->downloadToResponse($info); + return $madelineProto->downloadToResponse(...$info); } /** * Загружает превью медиафайла из указанного сообщения в поток. * */ - public function getMediaPreview(array $data): Response + public function getMediaPreview(API $madelineProto, ...$data): Response { $data = \array_merge( [ @@ -182,7 +173,7 @@ public function getMediaPreview(array $data): Response $data ); - $message = $data['message'] ?: ($this->getMessages($data))['messages'][0] ?? null; + $message = $data['message'] ?: ($this->getMessages($madelineProto, ...$data))['messages'][0] ?? null; if (!$message || $message['_'] === 'messageEmpty') { throw new NoMediaException('Empty message'); } @@ -230,7 +221,7 @@ public function getMediaPreview(array $data): Response if (null === $thumb) { throw new NoMediaException('Empty preview'); } - $info = $this->madelineProto->getDownloadInfo($thumb); + $info = $madelineProto->getDownloadInfo($thumb); if ($media['_'] === 'webPage') { $media = $media['photo']; @@ -239,7 +230,7 @@ public function getMediaPreview(array $data): Response //Фикс для LAYER 100+ //TODO: Удалить, когда снова станет доступна загрузка photoSize if (isset($info['thumb_size'])) { - $infoFull = $this->madelineProto->getDownloadInfo($media); + $infoFull = $madelineProto->getDownloadInfo($media); $infoFull['InputFileLocation']['thumb_size'] = $info['thumb_size']; $infoFull['size'] = $info['size']; $infoFull['mime'] = $info['mime'] ?? 'image/jpeg'; @@ -248,21 +239,21 @@ public function getMediaPreview(array $data): Response $info = $infoFull; } - return $this->downloadToResponse($info); + return $madelineProto->downloadToResponse(...$info); } - public function getMessages(array $data): array + public function getMessages(API $madelineProto, ...$data): array { - $peerInfo = $this->madelineProto->getInfo($data['peer']); + $peerInfo = $madelineProto->getInfo($data['peer']); if (\in_array($peerInfo['type'], ['channel', 'supergroup'])) { - $response = $this->madelineProto->channels->getMessages( + $response = $madelineProto->channels->getMessages( [ 'channel' => $data['peer'], 'id' => (array) $data['id'], ] ); } else { - $response = $this->madelineProto->messages->getMessages(['id' => (array) $data['id']]); + $response = $madelineProto->messages->getMessages(['id' => (array) $data['id']]); } return $response; @@ -275,18 +266,18 @@ public function getMessages(array $data): array * Any downloadable array: message, media etc... * */ - public function downloadToResponse(array $info): Response + public function downloadToResponse(API $madelineProto, ...$info): Response { - return $this->madelineProto->downloadToResponse($info, $this->request); + return $madelineProto->downloadToResponse(...$info); } /** * Адаптер для стандартного метода. * */ - public function downloadToBrowser(array $info): Response + public function downloadToBrowser(API $madelineProto, ...$info): Response { - return $this->downloadToResponse($info); + return $madelineProto->downloadToResponse(...$info); } /** @@ -295,16 +286,16 @@ public function downloadToBrowser(array $info): Response * * @throws NoMediaException */ - public function uploadMediaForm(): array + public function uploadMediaForm(API $madelineProto, ReadableStream $file, string $mimeType, ?string $fileName): array { - if (empty($this->file)) { - throw new NoMediaException('File not found'); + if ($fileName === null) { + throw new AssertionError("No file name was provided!"); } - $inputFile = $this->madelineProto->messages->sendMedia( - $this->file, + $inputFile = $madelineProto->uploadFromStream( + $file, 0, - $this->file->getMimeType(), - $this->file->getFilename() + $mimeType, + $fileName ?? '' ); $inputFile['id'] = \unpack('P', $inputFile['id'])['1']; return [ @@ -312,24 +303,24 @@ public function uploadMediaForm(): array '_' => 'inputMediaUploadedDocument', 'file' => $inputFile, 'attributes' => [ - ['_' => 'documentAttributeFilename', 'file_name' => $this->file->getFilename()] + ['_' => 'documentAttributeFilename', 'file_name' => $fileName] ] ] ]; } - public function setEventHandler(): void + public function setEventHandler(API $madelineProto): void { - Client::getWrapper($this->madelineProto)->getAPI()->setEventHandler(EventHandler::class); - Client::getWrapper($this->madelineProto)->serialize(); + Client::getWrapper($madelineProto)->getAPI()->setEventHandler(EventHandler::class); + Client::getWrapper($madelineProto)->serialize(); } - public function serialize(): void + public function serialize(API $madelineProto): void { - Client::getWrapper($this->madelineProto)->serialize(); + Client::getWrapper($madelineProto)->serialize(); } - public function getUpdates(array $params): array + public function getUpdates(API $madelineProto, array $params): array { foreach ($params as $key => $value) { $params[$key] = match($key) { @@ -339,26 +330,14 @@ public function getUpdates(array $params): array }; } - return $this->madelineProto->getUpdates($params); - } - - public function setNoop(): void - { - $this->madelineProto->setNoop(); - Client::getWrapper($this->madelineProto)->serialize(); + return $madelineProto->getUpdates($params); } - public function setWebhook(string $url): void - { - $this->madelineProto->setWebhook($url); - Client::getWrapper($this->madelineProto)->serialize(); - } - - public function unsubscribeFromUpdates(?string $channel = null): array + public function unsubscribeFromUpdates(API $madelineProto, ?string $channel = null): array { $inputChannelId = null; if ($channel) { - $id = (string) $this->madelineProto->getId($channel); + $id = (string) $madelineProto->getId($channel); $inputChannelId = (int) \str_replace(['-100', '-'], '', $id); if (!$inputChannelId) { @@ -366,128 +345,26 @@ public function unsubscribeFromUpdates(?string $channel = null): array } } $counter = 0; - foreach (Client::getWrapper($this->madelineProto)->getAPI()->feeders as $channelId => $_) { + foreach (Client::getWrapper($madelineProto)->getAPI()->feeders as $channelId => $_) { if ($channelId === 0) { continue; } if ($inputChannelId && $inputChannelId !== $channelId) { continue; } - Client::getWrapper($this->madelineProto)->getAPI()->feeders[$channelId]->stop(); - Client::getWrapper($this->madelineProto)->getAPI()->updaters[$channelId]->stop(); + Client::getWrapper($madelineProto)->getAPI()->feeders[$channelId]->stop(); + Client::getWrapper($madelineProto)->getAPI()->updaters[$channelId]->stop(); unset( - Client::getWrapper($this->madelineProto)->getAPI()->feeders[$channelId], - Client::getWrapper($this->madelineProto)->getAPI()->updaters[$channelId] + Client::getWrapper($madelineProto)->getAPI()->feeders[$channelId], + Client::getWrapper($madelineProto)->getAPI()->updaters[$channelId] ); - Client::getWrapper($this->madelineProto)->getAPI()->getChannelStates()->remove($channelId); + Client::getWrapper($madelineProto)->getAPI()->getChannelStates()->remove($channelId); $counter++; } return [ 'disabled_update_loops' => $counter, - 'current_update_loops' => \count(Client::getWrapper($this->madelineProto)->getAPI()->feeders), + 'current_update_loops' => \count(Client::getWrapper($madelineProto)->getAPI()->feeders), ]; } - - public function sendVideo(array $data): MadelineProto\EventHandler\Message - { - if (!empty($this->file)) { - $data['file'] = $this->file; - $data['fileName'] = $this->file->getFilename(); - } - - foreach (['file', 'thumb'] as $key) { - if (!empty($data[$key])) { - $data[$key] = self::getMadelineMediaObject($data[$key]); - } - } - - if (isset($data['parseMode'])) { - $data['parseMode'] = ParseMode::from($data['parseMode']); - } - - return $this->madelineProto->sendVideo(...$data); - } - - public function sendPhoto(array $data): MadelineProto\EventHandler\Message - { - if (!empty($this->file)) { - $data['file'] = $this->file; - $data['fileName'] = $this->file->getFilename(); - } - return $this->madelineProto->sendPhoto(...$data); - } - - public function sendSticker(array $data): MadelineProto\EventHandler\Message - { - if (!empty($this->file)) { - $data['file'] = $this->file; - $data['fileName'] = $this->file->getFilename(); - } - return $this->madelineProto->sendSticker(...$data); - } - - public function sendVoice(array $data): MadelineProto\EventHandler\Message - { - if (!empty($this->file)) { - $data['file'] = $this->file; - $data['fileName'] = $this->file->getFilename(); - } - return $this->madelineProto->sendVoice(...$data); - } - - public function sendAudio(array $data): MadelineProto\EventHandler\Message - { - if (!empty($this->file)) { - $data['file'] = $this->file; - $data['fileName'] = $this->file->getFilename(); - } - return $this->madelineProto->sendAudio(...$data); - } - - public function sendDocument(array $data): MadelineProto\EventHandler\Message - { - if (!empty($this->file)) { - $data['file'] = $this->file; - $data['fileName'] = $this->file->getFilename(); - } - return $this->madelineProto->sendDocument(...$data); - } - - public function sendDocumentPhoto(array $data): MadelineProto\EventHandler\Message - { - if (!empty($this->file)) { - $data['file'] = $this->file; - $data['fileName'] = $this->file->getFilename(); - } - return $this->madelineProto->sendDocumentPhoto(...$data); - } - - public function sendGif(array $data): MadelineProto\EventHandler\Message - { - if (!empty($this->file)) { - $data['file'] = $this->file; - $data['fileName'] = $this->file->getFilename(); - } - return $this->madelineProto->sendGif(...$data); - } - - private static function getMadelineMediaObject(string |array | StreamedField | null $input): MadelineProto\LocalFile|MadelineProto\RemoteUrl|MadelineProto\BotApiFileId|ReadableBuffer|ReadableStream|null - { - if (is_array($input) && !empty($input['_'])) { - $type = $input['_']; - unset($input['_']); - return match ($type) { - 'LocalFile' => new MadelineProto\LocalFile(...$input), - 'RemoteUrl' => new MadelineProto\RemoteUrl(...$input), - 'BotApiFieldId' => new MadelineProto\BotApiFileId(...$input), - default => throw new InvalidArgumentException("Unknown type: {$type}"), - }; - } elseif (is_string($input)) { - return new ReadableBuffer($input); - } else { - return $input; - } - } - } diff --git a/src/Server/AccessLoggerMiddleware.php b/src/Server/AccessLoggerMiddleware.php index 40e76e5..499fb30 100644 --- a/src/Server/AccessLoggerMiddleware.php +++ b/src/Server/AccessLoggerMiddleware.php @@ -18,7 +18,6 @@ public function __construct( public function handleRequest(Request $request, RequestHandler $requestHandler): Response { - $method = $request->getMethod(); $uri = (string) $request->getUri(); $protocolVersion = $request->getProtocolVersion(); diff --git a/src/Server/Router.php b/src/Server/Router.php index 762c39a..76256dc 100644 --- a/src/Server/Router.php +++ b/src/Server/Router.php @@ -52,8 +52,8 @@ private function setRoutes(): void new AccessLoggerMiddleware(Logger::getInstance()), new Authorization() ]; - $apiHandler = stackMiddleware(ApiController::getRouterCallback(ApiExtensions::class), ...$middlewares); - $systemApiHandler = stackMiddleware(SystemController::getRouterCallback(SystemApiExtensions::class), ...$middlewares); + $apiHandler = stackMiddleware(ApiController::getRouterCallback(), ...$middlewares); + $systemApiHandler = stackMiddleware(SystemController::getRouterCallback(), ...$middlewares); $eventsHandler = stackMiddleware(EventsController::getRouterCallback($this->server), ...$middlewares); $logHandler = stackMiddleware(LogController::getRouterCallback($this->server), ...$middlewares); From e944911280ae560c1408dace71e5de52e62c8206 Mon Sep 17 00:00:00 2001 From: Alexander Pankratov Date: Sat, 19 Apr 2025 01:01:36 +0200 Subject: [PATCH 209/270] Fix refactoring --- Dockerfile | 2 +- README.md | 4 ++-- entrypoint.sh | 2 +- src/MadelineProtoExtensions/ApiExtensions.php | 22 +++++++------------ 4 files changed, 12 insertions(+), 18 deletions(-) diff --git a/Dockerfile b/Dockerfile index 694b9f3..bf0640b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -6,7 +6,7 @@ RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local COPY --from=ghcr.io/ufoscout/docker-compose-wait:latest /wait /usr/local/bin/docker-compose-wait -RUN echo 1.0.1 > /tas_version +RUN echo 1.0.0 > /tas_version RUN echo -e "\nopcache.jit=off" >> $PHP_INI_DIR/php.ini diff --git a/README.md b/README.md index 511c82c..55484a1 100644 --- a/README.md +++ b/README.md @@ -135,8 +135,8 @@ There are few options to upload and send media files: ```shell script curl --location --request POST 'http://127.0.0.1:9503/api/sendDocument' -g \ -F peer=me \ - -F caption=key - -F file=@screenshot.png \ + -F caption=key \ + -F file=@screenshot.png ``` RemoteUrl: ```shell script diff --git a/entrypoint.sh b/entrypoint.sh index 6d7d904..31ed46a 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -1,6 +1,6 @@ #!/usr/bin/env sh -VERSION=1.0.1 +VERSION=1.0.0 CURRENT_VERSION=$(cat /tas_version) if [ "$VERSION" != "$CURRENT_VERSION" ]; then diff --git a/src/MadelineProtoExtensions/ApiExtensions.php b/src/MadelineProtoExtensions/ApiExtensions.php index b3d7fff..4ca65be 100644 --- a/src/MadelineProtoExtensions/ApiExtensions.php +++ b/src/MadelineProtoExtensions/ApiExtensions.php @@ -2,22 +2,15 @@ namespace TelegramApiServer\MadelineProtoExtensions; -use Amp\ByteStream\ReadableBuffer; use Amp\ByteStream\ReadableStream; -use Amp\ByteStream\WritableResourceStream; -use Amp\Http\Server\FormParser\StreamedField; -use Amp\Http\Server\Request; use Amp\Http\Server\Response; use AssertionError; -use danog\MadelineProto; use danog\MadelineProto\API; -use danog\MadelineProto\ParseMode; use danog\MadelineProto\StrTools; use InvalidArgumentException; use TelegramApiServer\Client; use TelegramApiServer\EventObservers\EventHandler; use TelegramApiServer\Exceptions\NoMediaException; - use function Amp\delay; final class ApiExtensions @@ -249,11 +242,11 @@ public function getMessages(API $madelineProto, ...$data): array $response = $madelineProto->channels->getMessages( [ 'channel' => $data['peer'], - 'id' => (array) $data['id'], + 'id' => (array)$data['id'], ] ); } else { - $response = $madelineProto->messages->getMessages(['id' => (array) $data['id']]); + $response = $madelineProto->messages->getMessages(['id' => (array)$data['id']]); } return $response; @@ -285,6 +278,7 @@ public function downloadToBrowser(API $madelineProto, ...$info): Response * Response can be passed to 'media' field in messages.sendMedia. * * @throws NoMediaException + * @deprecated use SendDocument */ public function uploadMediaForm(API $madelineProto, ReadableStream $file, string $mimeType, ?string $fileName): array { @@ -323,9 +317,9 @@ public function serialize(API $madelineProto): void public function getUpdates(API $madelineProto, array $params): array { foreach ($params as $key => $value) { - $params[$key] = match($key) { - 'offset', 'limit' => (int) $value, - 'timeout' => (float) $value, + $params[$key] = match ($key) { + 'offset', 'limit' => (int)$value, + 'timeout' => (float)$value, default => throw new InvalidArgumentException("Unknown parameter: {$key}"), }; } @@ -337,9 +331,9 @@ public function unsubscribeFromUpdates(API $madelineProto, ?string $channel = nu { $inputChannelId = null; if ($channel) { - $id = (string) $madelineProto->getId($channel); + $id = (string)$madelineProto->getId($channel); - $inputChannelId = (int) \str_replace(['-100', '-'], '', $id); + $inputChannelId = (int)\str_replace(['-100', '-'], '', $id); if (!$inputChannelId) { throw new InvalidArgumentException('Invalid id'); } From 9cd4bc12c213c0ade4ea2d309bb3a94777f98356 Mon Sep 17 00:00:00 2001 From: Alexander Pankratov Date: Sat, 19 Apr 2025 02:41:06 +0200 Subject: [PATCH 210/270] Fix: unnamed arguments after refactoring --- src/Controllers/AbstractApiController.php | 5 +- src/Controllers/ApiController.php | 22 ++- src/Controllers/SystemController.php | 11 +- src/MadelineProtoExtensions/ApiExtensions.php | 129 ++++++++---------- 4 files changed, 81 insertions(+), 86 deletions(-) diff --git a/src/Controllers/AbstractApiController.php b/src/Controllers/AbstractApiController.php index 8598f29..5bf9a07 100644 --- a/src/Controllers/AbstractApiController.php +++ b/src/Controllers/AbstractApiController.php @@ -121,7 +121,7 @@ protected function resolveRequest(Request $request): array break; case $contentType === 'application/json': $body = $request->getBody()->buffer(); - $params += \json_decode($body, true); + $params += (array)\json_decode($body, true); break; default: \parse_str($request->getBody()->buffer(), $post); @@ -145,7 +145,7 @@ protected function resolveRequest(Request $request): array return $params; } - private static function getMadelineMediaObject(string |array | StreamedField | null $input): RemoteUrl|BotApiFileId|ReadableBuffer|null + private static function getMadelineMediaObject(string |array | StreamedField | null $input): RemoteUrl|BotApiFileId|ReadableBuffer|StreamedField|null { if (is_array($input) && !empty($input['_'])) { return match ($input['_']) { @@ -158,6 +158,7 @@ private static function getMadelineMediaObject(string |array | StreamedField | n if (is_string($input)) { return new ReadableBuffer($input); } + return $input; } } \ No newline at end of file diff --git a/src/Controllers/ApiController.php b/src/Controllers/ApiController.php index bb404be..4c3c088 100644 --- a/src/Controllers/ApiController.php +++ b/src/Controllers/ApiController.php @@ -29,21 +29,31 @@ public function __construct() foreach ((new ReflectionClass(ApiExtensions::class))->getMethods(ReflectionMethod::IS_PUBLIC) as $method) { $args = []; foreach ($method->getParameters() as $param) { - $args[$param->getName()] = true; + $args[$param->getName()] = null; } $name = $method->getName(); - $this->methods[$method->getName()] = function (API $API, ...$params) use ($args, $name) { - return $this->extension->{$name}($API, ...array_intersect_key($params, $args)); + $needRequest = array_key_exists('request', $args); + $this->methods[$method->getName()] = function (API $API, ...$params) use ($args, $name, $needRequest) { + if (!$needRequest) { + unset($params['request']); + } + $argsPrepared = array_intersect_key($params, $args) ?: array_values($params); + return $this->extension->{$name}($API, ...$argsPrepared); }; } foreach ((new ReflectionClass(API::class))->getMethods(ReflectionMethod::IS_PUBLIC) as $method) { $args = []; foreach ($method->getParameters() as $param) { - $args[$param->getName()] = true; + $args[$param->getName()] = null; } $name = $method->getName(); - $this->methodsMadeline[$method->getName()] = function (API $API, ...$params) use ($args, $name) { - return $API->{$name}(...array_intersect_key($params, $args)); + $needRequest = array_key_exists('request', $args); + $this->methodsMadeline[$method->getName()] = function (API $API, ...$params) use ($args, $name, $needRequest) { + if (!$needRequest) { + unset($params['request']); + } + $argsPrepared = array_intersect_key($params, $args) ?: array_values($params); + return $API->{$name}(...$argsPrepared); }; } } diff --git a/src/Controllers/SystemController.php b/src/Controllers/SystemController.php index 88dcbe7..93666c0 100644 --- a/src/Controllers/SystemController.php +++ b/src/Controllers/SystemController.php @@ -20,11 +20,16 @@ public function __construct() foreach ((new ReflectionClass(SystemApiExtensions::class))->getMethods(ReflectionMethod::IS_PUBLIC) as $method) { $args = []; foreach ($method->getParameters() as $param) { - $args[$param->getName()] = true; + $args[$param->getName()] = null; } $name = $method->getName(); - $this->methods[$method->getName()] = function (...$params) use ($args, $name) { - return $this->extension->{$name}(...array_intersect_key($params, $args)); + $needRequest = array_key_exists('request', $args); + $this->methods[$method->getName()] = function (...$params) use ($args, $name, $needRequest) { + if (!$needRequest) { + unset($params['request']); + } + $argsPrepared = array_intersect_key($params, $args) ?: array_values($params); + return $this->extension->{$name}(...$argsPrepared); }; } } diff --git a/src/MadelineProtoExtensions/ApiExtensions.php b/src/MadelineProtoExtensions/ApiExtensions.php index 4ca65be..a936ead 100644 --- a/src/MadelineProtoExtensions/ApiExtensions.php +++ b/src/MadelineProtoExtensions/ApiExtensions.php @@ -3,9 +3,12 @@ namespace TelegramApiServer\MadelineProtoExtensions; use Amp\ByteStream\ReadableStream; +use Amp\Http\Server\Request; use Amp\Http\Server\Response; use AssertionError; use danog\MadelineProto\API; +use danog\MadelineProto\EventHandler\Message; +use danog\MadelineProto\FileCallbackInterface; use danog\MadelineProto\StrTools; use InvalidArgumentException; use TelegramApiServer\Client; @@ -15,9 +18,19 @@ final class ApiExtensions { - public function getHistoryHtml(API $madelineProto, ...$params): array + public function getHistoryHtml(API $madelineProto, array|int|string|null $peer = null, int|null $offset_id = 0, int|null $offset_date = 0, int|null $add_offset = 0, int|null $limit = 0, int|null $max_id = 0, int|null $min_id = 0, array $hash = [], ?int $floodWaitLimit = null, ?string $queueId = null): array { - $response = $madelineProto->messages->getHistory(...$params); + $response = $madelineProto->messages->getHistory( + peer: $peer, + offset_id: $offset_id, + offset_date: $offset_date, add_offset: $add_offset, + limit: $limit, + max_id: $max_id, + min_id: $min_id, + hash: $hash, + floodWaitLimit: $floodWaitLimit, + queueId: $queueId, + ); if (!empty($response['messages'])) { foreach ($response['messages'] as &$message) { $message['message'] = StrTools::entitiesToHtml( @@ -34,8 +47,6 @@ public function getHistoryHtml(API $madelineProto, ...$params): array /** * Проверяет есть ли подходящие медиа у сообщения. - * - * */ private static function hasMedia(array $message = [], bool $allowWebPage = false): bool { @@ -55,33 +66,12 @@ private static function hasMedia(array $message = [], bool $allowWebPage = false /** * Пересылает сообщения без ссылки на оригинал. - * - * @param array $data - *
-     * [
-     *  'from_peer' => '',
-     *  'to_peer' => '',
-     *  'id' => [], //Id сообщения, или нескольких сообщений
-     * ]
-     * 
- * */ - public function copyMessages(API $madelineProto, ...$data) + public function copyMessages(API $madelineProto, string|int $from_peer, string|int $to_peer, array|int $id) { - $data = \array_merge( - [ - 'from_peer' => '', - 'to_peer' => '', - 'id' => [], - ], - $data - ); - $response = $madelineProto->channels->getMessages( - [ - 'channel' => $data['from_peer'], - 'id' => $data['id'], - ] + channel: $from_peer, + id: (array)$id, ); $result = []; if (!$response || !\is_array($response) || !\array_key_exists('messages', $response)) { @@ -91,7 +81,7 @@ public function copyMessages(API $madelineProto, ...$data) foreach ($response['messages'] as $key => $message) { $messageData = [ 'message' => $message['message'] ?? '', - 'peer' => $data['to_peer'], + 'peer' => $to_peer, 'entities' => $message['entities'] ?? [], ]; if (self::hasMedia($message, false)) { @@ -110,21 +100,10 @@ public function copyMessages(API $madelineProto, ...$data) /** * Загружает медиафайл из указанного сообщения в поток. - * - * */ - public function getMedia(API $madelineProto, ...$data): Response + public function getMedia(API $madelineProto, Request $request, string|int $peer = '', array|int $id = 0, array $message = []): Response { - $data = \array_merge( - [ - 'peer' => '', - 'id' => [0], - 'message' => [], - ], - $data - ); - - $message = $data['message'] ?: ($this->getMessages($madelineProto, ...$data))['messages'][0] ?? null; + $message = $message ?: ($this->getMessages($madelineProto, $peer, (array)$id))['messages'][0] ?? null; if (!$message || $message['_'] === 'messageEmpty') { throw new NoMediaException('Empty message'); } @@ -144,29 +123,20 @@ public function getMedia(API $madelineProto, ...$data): Response } elseif (!empty($webpage['photo'])) { $info = $madelineProto->getDownloadInfo($webpage['photo']); } else { - return $this->getMediaPreview($madelineProto, ...$data); + return $this->getMediaPreview($madelineProto, $request, $peer, $id, $message); } } - return $madelineProto->downloadToResponse(...$info); + return $madelineProto->downloadToResponse(messageMedia: $info, request: $request); } /** * Загружает превью медиафайла из указанного сообщения в поток. * */ - public function getMediaPreview(API $madelineProto, ...$data): Response + public function getMediaPreview(API $madelineProto, Request $request, string|int $peer = '', array|int $id = 0, array $message = []): Response { - $data = \array_merge( - [ - 'peer' => '', - 'id' => [0], - 'message' => [], - ], - $data - ); - - $message = $data['message'] ?: ($this->getMessages($madelineProto, ...$data))['messages'][0] ?? null; + $message = $message ?: ($this->getMessages($madelineProto, $peer, (array)$id))['messages'][0] ?? null; if (!$message || $message['_'] === 'messageEmpty') { throw new NoMediaException('Empty message'); } @@ -232,45 +202,54 @@ public function getMediaPreview(API $madelineProto, ...$data): Response $info = $infoFull; } - return $madelineProto->downloadToResponse(...$info); + return $madelineProto->downloadToResponse(messageMedia: $info, request: $request); } - public function getMessages(API $madelineProto, ...$data): array + public function getMessages(API $madelineProto, string|int $peer, array|int $id): array { - $peerInfo = $madelineProto->getInfo($data['peer']); + $peerInfo = $madelineProto->getInfo($peer); if (\in_array($peerInfo['type'], ['channel', 'supergroup'])) { $response = $madelineProto->channels->getMessages( - [ - 'channel' => $data['peer'], - 'id' => (array)$data['id'], - ] + channel:$peer, + id: $id, ); } else { - $response = $madelineProto->messages->getMessages(['id' => (array)$data['id']]); + $response = $madelineProto->messages->getMessages(id: $id); } return $response; } /** - * Download to Amp HTTP response. - * - * @param array $info - * Any downloadable array: message, media etc... + * Адаптер для стандартного метода. * */ - public function downloadToResponse(API $madelineProto, ...$info): Response + public function downloadToResponse(API $madelineProto, FileCallbackInterface|Message|array|string $messageMedia, Request $request, ?callable $cb = null, ?int $size = null, ?string $mime = null, ?string $name = null): Response { - return $madelineProto->downloadToResponse(...$info); + return $madelineProto->downloadToResponse( + messageMedia: $messageMedia, + request: $request, + cb: $cb, + size: $size, + mime: $mime, + name: $name, + ); } /** * Адаптер для стандартного метода. * */ - public function downloadToBrowser(API $madelineProto, ...$info): Response + public function downloadToBrowser(API $madelineProto, FileCallbackInterface|Message|array|string $messageMedia, Request $request, ?callable $cb = null, ?int $size = null, ?string $mime = null, ?string $name = null): Response { - return $madelineProto->downloadToResponse(...$info); + return $madelineProto->downloadToResponse( + messageMedia: $messageMedia, + request: $request, + cb: $cb, + size: $size, + mime: $mime, + name: $name, + ); } /** @@ -286,10 +265,10 @@ public function uploadMediaForm(API $madelineProto, ReadableStream $file, string throw new AssertionError("No file name was provided!"); } $inputFile = $madelineProto->uploadFromStream( - $file, - 0, - $mimeType, - $fileName ?? '' + stream: $file, + size: 0, + mime: $mimeType, + fileName: $fileName ?? '', ); $inputFile['id'] = \unpack('P', $inputFile['id'])['1']; return [ From 8b3ca6f2f161dcaebfb5bd1a8d2d10aa4ef31bb6 Mon Sep 17 00:00:00 2001 From: Alexander Pankratov Date: Mon, 21 Apr 2025 12:53:13 +0200 Subject: [PATCH 211/270] Upgrade madeline --- composer.lock | 167 ++++++++++++++++++++++++++++++++++++-------------- 1 file changed, 122 insertions(+), 45 deletions(-) diff --git a/composer.lock b/composer.lock index ea0619f..5bb83b4 100644 --- a/composer.lock +++ b/composer.lock @@ -2391,30 +2391,30 @@ }, { "name": "danog/ipc", - "version": "1.0.0", + "version": "1.0.1", "source": { "type": "git", "url": "https://github.com/danog/ipc.git", - "reference": "ab6a5af03950e61846b36e65301e2bc278581a39" + "reference": "505e672b76af6ec623f7ef78efb2416f62ef8e29" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/danog/ipc/zipball/ab6a5af03950e61846b36e65301e2bc278581a39", - "reference": "ab6a5af03950e61846b36e65301e2bc278581a39", + "url": "https://api.github.com/repos/danog/ipc/zipball/505e672b76af6ec623f7ef78efb2416f62ef8e29", + "reference": "505e672b76af6ec623f7ef78efb2416f62ef8e29", "shasum": "" }, "require": { - "amphp/byte-stream": "^2", - "amphp/parser": "^1", + "amphp/byte-stream": "^2.1.2", + "amphp/parallel": "^2.3.1", + "amphp/parser": "^1.1.1", "php": ">=8.1" }, "require-dev": { "amphp/amp": "v3.x-dev", - "amphp/parallel": "v2.x-dev", "amphp/php-cs-fixer-config": "v2.x-dev", "amphp/phpunit-util": "v3.x-dev", - "phpunit/phpunit": "^9", - "psalm/phar": "^5" + "phpunit/phpunit": "^9.6.22", + "psalm/phar": "^5.26.1" }, "type": "library", "autoload": { @@ -2454,9 +2454,9 @@ ], "support": { "issues": "https://github.com/danog/ipc/issues", - "source": "https://github.com/danog/ipc/tree/1.0.0" + "source": "https://github.com/danog/ipc/tree/1.0.1" }, - "time": "2023-02-14T13:19:59+00:00" + "time": "2025-04-18T14:42:00+00:00" }, { "name": "danog/libdns-json", @@ -2586,12 +2586,12 @@ "source": { "type": "git", "url": "https://github.com/danog/MadelineProto.git", - "reference": "30359988972488d8b3cb827ef6b940f8e1283dc6" + "reference": "96124be6baeb76649dd7e5c20423069dd0330bc3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/danog/MadelineProto/zipball/30359988972488d8b3cb827ef6b940f8e1283dc6", - "reference": "30359988972488d8b3cb827ef6b940f8e1283dc6", + "url": "https://api.github.com/repos/danog/MadelineProto/zipball/96124be6baeb76649dd7e5c20423069dd0330bc3", + "reference": "96124be6baeb76649dd7e5c20423069dd0330bc3", "shasum": "" }, "require": { @@ -2634,6 +2634,7 @@ "psr/log": "^3.0.2", "revolt/event-loop": "^1.0.6", "symfony/polyfill-mbstring": "*", + "symfony/polyfill-php83": "^1.31", "webmozart/assert": "^1.11" }, "conflict": { @@ -2706,7 +2707,7 @@ "type": "github" } ], - "time": "2025-03-22T22:28:19+00:00" + "time": "2025-04-21T10:51:41+00:00" }, { "name": "danog/primemodule", @@ -3404,16 +3405,16 @@ }, { "name": "monolog/monolog", - "version": "3.8.1", + "version": "3.9.0", "source": { "type": "git", "url": "https://github.com/Seldaek/monolog.git", - "reference": "aef6ee73a77a66e404dd6540934a9ef1b3c855b4" + "reference": "10d85740180ecba7896c87e06a166e0c95a0e3b6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Seldaek/monolog/zipball/aef6ee73a77a66e404dd6540934a9ef1b3c855b4", - "reference": "aef6ee73a77a66e404dd6540934a9ef1b3c855b4", + "url": "https://api.github.com/repos/Seldaek/monolog/zipball/10d85740180ecba7896c87e06a166e0c95a0e3b6", + "reference": "10d85740180ecba7896c87e06a166e0c95a0e3b6", "shasum": "" }, "require": { @@ -3491,7 +3492,7 @@ ], "support": { "issues": "https://github.com/Seldaek/monolog/issues", - "source": "https://github.com/Seldaek/monolog/tree/3.8.1" + "source": "https://github.com/Seldaek/monolog/tree/3.9.0" }, "funding": [ { @@ -3503,7 +3504,7 @@ "type": "tidelift" } ], - "time": "2024-12-05T17:15:07+00:00" + "time": "2025-03-24T10:02:05+00:00" }, { "name": "nikic/fast-route", @@ -3917,16 +3918,16 @@ }, { "name": "promphp/prometheus_client_php", - "version": "v2.14.0", + "version": "v2.14.1", "source": { "type": "git", "url": "https://github.com/PromPHP/prometheus_client_php.git", - "reference": "3e4811f231c1e444a21072eccae90ab40bae199e" + "reference": "a283aea8269287dc35313a0055480d950c59ac1f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/PromPHP/prometheus_client_php/zipball/3e4811f231c1e444a21072eccae90ab40bae199e", - "reference": "3e4811f231c1e444a21072eccae90ab40bae199e", + "url": "https://api.github.com/repos/PromPHP/prometheus_client_php/zipball/a283aea8269287dc35313a0055480d950c59ac1f", + "reference": "a283aea8269287dc35313a0055480d950c59ac1f", "shasum": "" }, "require": { @@ -3979,9 +3980,9 @@ "description": "Prometheus instrumentation library for PHP applications.", "support": { "issues": "https://github.com/PromPHP/prometheus_client_php/issues", - "source": "https://github.com/PromPHP/prometheus_client_php/tree/v2.14.0" + "source": "https://github.com/PromPHP/prometheus_client_php/tree/v2.14.1" }, - "time": "2025-03-05T10:11:57+00:00" + "time": "2025-04-14T07:59:43+00:00" }, { "name": "psr/http-factory", @@ -4452,6 +4453,82 @@ ], "time": "2024-09-09T11:45:10+00:00" }, + { + "name": "symfony/polyfill-php83", + "version": "v1.31.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-php83.git", + "reference": "2fb86d65e2d424369ad2905e83b236a8805ba491" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-php83/zipball/2fb86d65e2d424369ad2905e83b236a8805ba491", + "reference": "2fb86d65e2d424369ad2905e83b236a8805ba491", + "shasum": "" + }, + "require": { + "php": ">=7.2" + }, + "type": "library", + "extra": { + "thanks": { + "url": "https://github.com/symfony/polyfill", + "name": "symfony/polyfill" + } + }, + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Php83\\": "" + }, + "classmap": [ + "Resources/stubs" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill backporting some PHP 8.3+ features to lower PHP versions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-php83/tree/v1.31.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2024-09-09T11:45:10+00:00" + }, { "name": "vlucas/phpdotenv", "version": "v5.6.1", @@ -5050,16 +5127,16 @@ }, { "name": "friendsofphp/php-cs-fixer", - "version": "v3.73.1", + "version": "v3.75.0", "source": { "type": "git", "url": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer.git", - "reference": "ffcb8200a42045e65049af7910cfd022f631b064" + "reference": "399a128ff2fdaf4281e4e79b755693286cdf325c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/PHP-CS-Fixer/PHP-CS-Fixer/zipball/ffcb8200a42045e65049af7910cfd022f631b064", - "reference": "ffcb8200a42045e65049af7910cfd022f631b064", + "url": "https://api.github.com/repos/PHP-CS-Fixer/PHP-CS-Fixer/zipball/399a128ff2fdaf4281e4e79b755693286cdf325c", + "reference": "399a128ff2fdaf4281e4e79b755693286cdf325c", "shasum": "" }, "require": { @@ -5142,7 +5219,7 @@ ], "support": { "issues": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/issues", - "source": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/tree/v3.73.1" + "source": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/tree/v3.75.0" }, "funding": [ { @@ -5150,7 +5227,7 @@ "type": "github" } ], - "time": "2025-03-19T23:42:16+00:00" + "time": "2025-03-31T18:40:42+00:00" }, { "name": "psr/container", @@ -5850,16 +5927,16 @@ }, { "name": "symfony/console", - "version": "v7.2.1", + "version": "v7.2.5", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "fefcc18c0f5d0efe3ab3152f15857298868dc2c3" + "reference": "e51498ea18570c062e7df29d05a7003585b19b88" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/fefcc18c0f5d0efe3ab3152f15857298868dc2c3", - "reference": "fefcc18c0f5d0efe3ab3152f15857298868dc2c3", + "url": "https://api.github.com/repos/symfony/console/zipball/e51498ea18570c062e7df29d05a7003585b19b88", + "reference": "e51498ea18570c062e7df29d05a7003585b19b88", "shasum": "" }, "require": { @@ -5923,7 +6000,7 @@ "terminal" ], "support": { - "source": "https://github.com/symfony/console/tree/v7.2.1" + "source": "https://github.com/symfony/console/tree/v7.2.5" }, "funding": [ { @@ -5939,7 +6016,7 @@ "type": "tidelift" } ], - "time": "2024-12-11T03:49:26+00:00" + "time": "2025-03-12T08:11:12+00:00" }, { "name": "symfony/deprecation-contracts", @@ -6598,16 +6675,16 @@ }, { "name": "symfony/process", - "version": "v7.2.4", + "version": "v7.2.5", "source": { "type": "git", "url": "https://github.com/symfony/process.git", - "reference": "d8f411ff3c7ddc4ae9166fb388d1190a2df5b5cf" + "reference": "87b7c93e57df9d8e39a093d32587702380ff045d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/d8f411ff3c7ddc4ae9166fb388d1190a2df5b5cf", - "reference": "d8f411ff3c7ddc4ae9166fb388d1190a2df5b5cf", + "url": "https://api.github.com/repos/symfony/process/zipball/87b7c93e57df9d8e39a093d32587702380ff045d", + "reference": "87b7c93e57df9d8e39a093d32587702380ff045d", "shasum": "" }, "require": { @@ -6639,7 +6716,7 @@ "description": "Executes commands in sub-processes", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/process/tree/v7.2.4" + "source": "https://github.com/symfony/process/tree/v7.2.5" }, "funding": [ { @@ -6655,7 +6732,7 @@ "type": "tidelift" } ], - "time": "2025-02-05T08:33:46+00:00" + "time": "2025-03-13T12:21:46+00:00" }, { "name": "symfony/service-contracts", From d33e273245c5377c7ff0632ae7306bf5d904bea6 Mon Sep 17 00:00:00 2001 From: Alexander Pankratov Date: Sun, 4 May 2025 22:30:36 +0200 Subject: [PATCH 212/270] Upgrade madeline --- composer.lock | 125 +++++++++++++++++++++++++------------------------- 1 file changed, 63 insertions(+), 62 deletions(-) diff --git a/composer.lock b/composer.lock index 5bb83b4..2749d80 100644 --- a/composer.lock +++ b/composer.lock @@ -542,16 +542,16 @@ }, { "name": "amphp/http-client", - "version": "v5.3.0", + "version": "v5.3.1", "source": { "type": "git", "url": "https://github.com/amphp/http-client.git", - "reference": "d50928ec41d4ac3bcec5a01fe1caaf7575cbdc75" + "reference": "c6a789d5bca0450e125e88c38aa3859c4450b0d6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/amphp/http-client/zipball/d50928ec41d4ac3bcec5a01fe1caaf7575cbdc75", - "reference": "d50928ec41d4ac3bcec5a01fe1caaf7575cbdc75", + "url": "https://api.github.com/repos/amphp/http-client/zipball/c6a789d5bca0450e125e88c38aa3859c4450b0d6", + "reference": "c6a789d5bca0450e125e88c38aa3859c4450b0d6", "shasum": "" }, "require": { @@ -628,7 +628,7 @@ ], "support": { "issues": "https://github.com/amphp/http-client/issues", - "source": "https://github.com/amphp/http-client/tree/v5.3.0" + "source": "https://github.com/amphp/http-client/tree/v5.3.1" }, "funding": [ { @@ -636,7 +636,7 @@ "type": "github" } ], - "time": "2025-03-16T17:32:21+00:00" + "time": "2025-04-30T02:58:16+00:00" }, { "name": "amphp/http-client-cookies", @@ -2586,34 +2586,34 @@ "source": { "type": "git", "url": "https://github.com/danog/MadelineProto.git", - "reference": "96124be6baeb76649dd7e5c20423069dd0330bc3" + "reference": "edd03346c02dee8a5adceadd8d2962f64a74f88f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/danog/MadelineProto/zipball/96124be6baeb76649dd7e5c20423069dd0330bc3", - "reference": "96124be6baeb76649dd7e5c20423069dd0330bc3", + "url": "https://api.github.com/repos/danog/MadelineProto/zipball/edd03346c02dee8a5adceadd8d2962f64a74f88f", + "reference": "edd03346c02dee8a5adceadd8d2962f64a74f88f", "shasum": "" }, "require": { - "amphp/amp": "^3.0.2", - "amphp/byte-stream": "^2.1.1", - "amphp/dns": "^2.2.0", + "amphp/amp": "^3.1.0", + "amphp/byte-stream": "^2.1.2", + "amphp/dns": "^2.4.0", "amphp/file": "^3.2.0", "amphp/http": "^2.1.2", - "amphp/http-client": "^5.2.1", + "amphp/http-client": "^5.3.1", "amphp/http-client-cookies": "^2", - "amphp/http-server": "^3.3.1", + "amphp/http-server": "^3.4.2", "amphp/log": "^2", "amphp/mysql": "^3", "amphp/postgres": "^2.1.1", - "amphp/redis": "^2.0.1", + "amphp/redis": "^2.0.3", "amphp/socket": "^2.3.1", "amphp/websocket-client": "^2.0.1", "bacon/bacon-qr-code": "^3.0.1", "danog/async-orm": "^1.1.0", "danog/better-prometheus": "^0.1.1", "danog/dns-over-https": "^1.0.1", - "danog/ipc": "^1", + "danog/ipc": "^1.0.1", "danog/loop": "^1.1.1", "danog/primemodule": "^1.0.13", "danog/telegram-entities": "^1.0.4", @@ -2627,13 +2627,13 @@ "ext-xml": "*", "ext-zlib": "*", "league/uri": "^7.5.1", - "nikic/php-parser": "^5.3.1", + "nikic/php-parser": "^5.4.0", "php-64bit": ">=8.2", - "phpseclib/phpseclib": "^3.0.42", + "phpseclib/phpseclib": "^3.0.43", "psr/http-factory": "^1.1.0", "psr/log": "^3.0.2", - "revolt/event-loop": "^1.0.6", - "symfony/polyfill-mbstring": "*", + "revolt/event-loop": "^1.0.7", + "symfony/polyfill-mbstring": ">=1.31", "symfony/polyfill-php83": "^1.31", "webmozart/assert": "^1.11" }, @@ -2650,7 +2650,7 @@ "ext-ctype": "*", "phpunit/phpunit": "^9.6.22", "revolt/event-loop-adapter-react": "^1.1.1", - "symfony/yaml": "^6.4.13", + "symfony/yaml": "^6.4.20", "vimeo/psalm": "dev-master" }, "suggest": { @@ -2707,7 +2707,7 @@ "type": "github" } ], - "time": "2025-04-21T10:51:41+00:00" + "time": "2025-05-04T20:29:44+00:00" }, { "name": "danog/primemodule", @@ -4216,7 +4216,7 @@ }, { "name": "symfony/polyfill-ctype", - "version": "v1.31.0", + "version": "v1.32.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-ctype.git", @@ -4275,7 +4275,7 @@ "portable" ], "support": { - "source": "https://github.com/symfony/polyfill-ctype/tree/v1.31.0" + "source": "https://github.com/symfony/polyfill-ctype/tree/v1.32.0" }, "funding": [ { @@ -4295,19 +4295,20 @@ }, { "name": "symfony/polyfill-mbstring", - "version": "v1.31.0", + "version": "v1.32.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "85181ba99b2345b0ef10ce42ecac37612d9fd341" + "reference": "6d857f4d76bd4b343eac26d6b539585d2bc56493" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/85181ba99b2345b0ef10ce42ecac37612d9fd341", - "reference": "85181ba99b2345b0ef10ce42ecac37612d9fd341", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/6d857f4d76bd4b343eac26d6b539585d2bc56493", + "reference": "6d857f4d76bd4b343eac26d6b539585d2bc56493", "shasum": "" }, "require": { + "ext-iconv": "*", "php": ">=7.2" }, "provide": { @@ -4355,7 +4356,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.31.0" + "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.32.0" }, "funding": [ { @@ -4371,20 +4372,20 @@ "type": "tidelift" } ], - "time": "2024-09-09T11:45:10+00:00" + "time": "2024-12-23T08:48:59+00:00" }, { "name": "symfony/polyfill-php80", - "version": "v1.31.0", + "version": "v1.32.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php80.git", - "reference": "60328e362d4c2c802a54fcbf04f9d3fb892b4cf8" + "reference": "0cc9dd0f17f61d8131e7df6b84bd344899fe2608" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/60328e362d4c2c802a54fcbf04f9d3fb892b4cf8", - "reference": "60328e362d4c2c802a54fcbf04f9d3fb892b4cf8", + "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/0cc9dd0f17f61d8131e7df6b84bd344899fe2608", + "reference": "0cc9dd0f17f61d8131e7df6b84bd344899fe2608", "shasum": "" }, "require": { @@ -4435,7 +4436,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php80/tree/v1.31.0" + "source": "https://github.com/symfony/polyfill-php80/tree/v1.32.0" }, "funding": [ { @@ -4451,11 +4452,11 @@ "type": "tidelift" } ], - "time": "2024-09-09T11:45:10+00:00" + "time": "2025-01-02T08:10:11+00:00" }, { "name": "symfony/polyfill-php83", - "version": "v1.31.0", + "version": "v1.32.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php83.git", @@ -4511,7 +4512,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php83/tree/v1.31.0" + "source": "https://github.com/symfony/polyfill-php83/tree/v1.32.0" }, "funding": [ { @@ -4531,16 +4532,16 @@ }, { "name": "vlucas/phpdotenv", - "version": "v5.6.1", + "version": "v5.6.2", "source": { "type": "git", "url": "https://github.com/vlucas/phpdotenv.git", - "reference": "a59a13791077fe3d44f90e7133eb68e7d22eaff2" + "reference": "24ac4c74f91ee2c193fa1aaa5c249cb0822809af" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/vlucas/phpdotenv/zipball/a59a13791077fe3d44f90e7133eb68e7d22eaff2", - "reference": "a59a13791077fe3d44f90e7133eb68e7d22eaff2", + "url": "https://api.github.com/repos/vlucas/phpdotenv/zipball/24ac4c74f91ee2c193fa1aaa5c249cb0822809af", + "reference": "24ac4c74f91ee2c193fa1aaa5c249cb0822809af", "shasum": "" }, "require": { @@ -4599,7 +4600,7 @@ ], "support": { "issues": "https://github.com/vlucas/phpdotenv/issues", - "source": "https://github.com/vlucas/phpdotenv/tree/v5.6.1" + "source": "https://github.com/vlucas/phpdotenv/tree/v5.6.2" }, "funding": [ { @@ -4611,7 +4612,7 @@ "type": "tidelift" } ], - "time": "2024-07-20T21:52:34+00:00" + "time": "2025-04-30T23:37:27+00:00" }, { "name": "webmozart/assert", @@ -5927,16 +5928,16 @@ }, { "name": "symfony/console", - "version": "v7.2.5", + "version": "v7.2.6", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "e51498ea18570c062e7df29d05a7003585b19b88" + "reference": "0e2e3f38c192e93e622e41ec37f4ca70cfedf218" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/e51498ea18570c062e7df29d05a7003585b19b88", - "reference": "e51498ea18570c062e7df29d05a7003585b19b88", + "url": "https://api.github.com/repos/symfony/console/zipball/0e2e3f38c192e93e622e41ec37f4ca70cfedf218", + "reference": "0e2e3f38c192e93e622e41ec37f4ca70cfedf218", "shasum": "" }, "require": { @@ -6000,7 +6001,7 @@ "terminal" ], "support": { - "source": "https://github.com/symfony/console/tree/v7.2.5" + "source": "https://github.com/symfony/console/tree/v7.2.6" }, "funding": [ { @@ -6016,7 +6017,7 @@ "type": "tidelift" } ], - "time": "2025-03-12T08:11:12+00:00" + "time": "2025-04-07T19:09:28+00:00" }, { "name": "symfony/deprecation-contracts", @@ -6440,7 +6441,7 @@ }, { "name": "symfony/polyfill-intl-grapheme", - "version": "v1.31.0", + "version": "v1.32.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-grapheme.git", @@ -6498,7 +6499,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.31.0" + "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.32.0" }, "funding": [ { @@ -6518,7 +6519,7 @@ }, { "name": "symfony/polyfill-intl-normalizer", - "version": "v1.31.0", + "version": "v1.32.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-normalizer.git", @@ -6579,7 +6580,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.31.0" + "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.32.0" }, "funding": [ { @@ -6599,7 +6600,7 @@ }, { "name": "symfony/polyfill-php81", - "version": "v1.31.0", + "version": "v1.32.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php81.git", @@ -6655,7 +6656,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php81/tree/v1.31.0" + "source": "https://github.com/symfony/polyfill-php81/tree/v1.32.0" }, "funding": [ { @@ -6881,16 +6882,16 @@ }, { "name": "symfony/string", - "version": "v7.2.0", + "version": "v7.2.6", "source": { "type": "git", "url": "https://github.com/symfony/string.git", - "reference": "446e0d146f991dde3e73f45f2c97a9faad773c82" + "reference": "a214fe7d62bd4df2a76447c67c6b26e1d5e74931" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/string/zipball/446e0d146f991dde3e73f45f2c97a9faad773c82", - "reference": "446e0d146f991dde3e73f45f2c97a9faad773c82", + "url": "https://api.github.com/repos/symfony/string/zipball/a214fe7d62bd4df2a76447c67c6b26e1d5e74931", + "reference": "a214fe7d62bd4df2a76447c67c6b26e1d5e74931", "shasum": "" }, "require": { @@ -6948,7 +6949,7 @@ "utf8" ], "support": { - "source": "https://github.com/symfony/string/tree/v7.2.0" + "source": "https://github.com/symfony/string/tree/v7.2.6" }, "funding": [ { @@ -6964,7 +6965,7 @@ "type": "tidelift" } ], - "time": "2024-11-13T13:31:26+00:00" + "time": "2025-04-20T20:18:16+00:00" } ], "aliases": [], From c6b8ed3e0a62d8bc6bed6d56abeac9a4ad642eb3 Mon Sep 17 00:00:00 2001 From: Alexander Pankratov Date: Mon, 5 May 2025 04:48:34 +0200 Subject: [PATCH 213/270] Enable mysql compression by default --- docker-compose.base.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docker-compose.base.yml b/docker-compose.base.yml index eee316d..efc6cca 100644 --- a/docker-compose.base.yml +++ b/docker-compose.base.yml @@ -34,4 +34,5 @@ services: command: - --skip-grant-tables - --innodb-buffer-pool-size=128M - - --wait_timeout=65 \ No newline at end of file + - --innodb-compression-default=1 + - --innodb_compression_algorithm=zlib \ No newline at end of file From 0af5baa2b2e82eda3c34b900ec8c2327068329da Mon Sep 17 00:00:00 2001 From: Alexander Pankratov Date: Mon, 5 May 2025 13:03:55 +0200 Subject: [PATCH 214/270] Fix: db settings not applied --- composer.lock | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/composer.lock b/composer.lock index 2749d80..203a541 100644 --- a/composer.lock +++ b/composer.lock @@ -2187,16 +2187,16 @@ }, { "name": "danog/async-orm", - "version": "1.1.0", + "version": "1.1.2", "source": { "type": "git", "url": "https://github.com/danog/AsyncOrm.git", - "reference": "1a5129adeab04a4949b74289b4acfbc8a773bdc0" + "reference": "e5baea2f55e338eb54b24100e6f3b9ab9ed236a4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/danog/AsyncOrm/zipball/1a5129adeab04a4949b74289b4acfbc8a773bdc0", - "reference": "1a5129adeab04a4949b74289b4acfbc8a773bdc0", + "url": "https://api.github.com/repos/danog/AsyncOrm/zipball/e5baea2f55e338eb54b24100e6f3b9ab9ed236a4", + "reference": "e5baea2f55e338eb54b24100e6f3b9ab9ed236a4", "shasum": "" }, "require": { @@ -2205,7 +2205,8 @@ "amphp/redis": "^2.0", "amphp/sync": "^2.2", "php": ">=8.2.4", - "revolt/event-loop": "^1.0.6" + "revolt/event-loop": "^1.0.6", + "symfony/polyfill-php83": "^1.32" }, "require-dev": { "amphp/php-cs-fixer-config": "^2.0.1", @@ -2239,7 +2240,7 @@ "description": "Async ORM based on AMPHP v3 and fibers.", "support": { "issues": "https://github.com/danog/AsyncOrm/issues", - "source": "https://github.com/danog/AsyncOrm/tree/1.1.0" + "source": "https://github.com/danog/AsyncOrm/tree/1.1.2" }, "funding": [ { @@ -2247,7 +2248,7 @@ "type": "github" } ], - "time": "2024-09-24T16:49:13+00:00" + "time": "2025-05-05T09:43:33+00:00" }, { "name": "danog/better-prometheus", @@ -2586,12 +2587,12 @@ "source": { "type": "git", "url": "https://github.com/danog/MadelineProto.git", - "reference": "edd03346c02dee8a5adceadd8d2962f64a74f88f" + "reference": "c01f3f376430e5a87239635f3768ae6937eb2705" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/danog/MadelineProto/zipball/edd03346c02dee8a5adceadd8d2962f64a74f88f", - "reference": "edd03346c02dee8a5adceadd8d2962f64a74f88f", + "url": "https://api.github.com/repos/danog/MadelineProto/zipball/c01f3f376430e5a87239635f3768ae6937eb2705", + "reference": "c01f3f376430e5a87239635f3768ae6937eb2705", "shasum": "" }, "require": { @@ -2707,7 +2708,7 @@ "type": "github" } ], - "time": "2025-05-04T20:29:44+00:00" + "time": "2025-05-05T09:32:50+00:00" }, { "name": "danog/primemodule", From 1f6c468a2a16b871dc21a43878ce44c70731a780 Mon Sep 17 00:00:00 2001 From: Alexander Pankratov Date: Mon, 5 May 2025 13:09:51 +0200 Subject: [PATCH 215/270] Fix: db settings not applied --- composer.json | 3 ++- composer.lock | 14 +++++++------- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/composer.json b/composer.json index 1ac2a19..dd5fba4 100644 --- a/composer.json +++ b/composer.json @@ -30,7 +30,8 @@ "amphp/websocket-client": "^v2", "vlucas/phpdotenv": "^5", "danog/madelineproto": "dev-v8-tas", - "amphp/dns": "2.x-dev" + "amphp/dns": "2.x-dev", + "danog/async-orm": "1.1.1" }, "require-dev": { "amphp/php-cs-fixer-config": "^2.0.1" diff --git a/composer.lock b/composer.lock index 203a541..93c5be8 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "8ec117f2ff8dea2cad0f4ff5903a5386", + "content-hash": "a3a843cc3adfb453289bc960aec6bbec", "packages": [ { "name": "amphp/amp", @@ -2187,16 +2187,16 @@ }, { "name": "danog/async-orm", - "version": "1.1.2", + "version": "1.1.1", "source": { "type": "git", "url": "https://github.com/danog/AsyncOrm.git", - "reference": "e5baea2f55e338eb54b24100e6f3b9ab9ed236a4" + "reference": "da21147000bd9f1fae78ea46e749ca8b45b8c3b8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/danog/AsyncOrm/zipball/e5baea2f55e338eb54b24100e6f3b9ab9ed236a4", - "reference": "e5baea2f55e338eb54b24100e6f3b9ab9ed236a4", + "url": "https://api.github.com/repos/danog/AsyncOrm/zipball/da21147000bd9f1fae78ea46e749ca8b45b8c3b8", + "reference": "da21147000bd9f1fae78ea46e749ca8b45b8c3b8", "shasum": "" }, "require": { @@ -2240,7 +2240,7 @@ "description": "Async ORM based on AMPHP v3 and fibers.", "support": { "issues": "https://github.com/danog/AsyncOrm/issues", - "source": "https://github.com/danog/AsyncOrm/tree/1.1.2" + "source": "https://github.com/danog/AsyncOrm/tree/1.1.1" }, "funding": [ { @@ -2248,7 +2248,7 @@ "type": "github" } ], - "time": "2025-05-05T09:43:33+00:00" + "time": "2025-05-05T09:35:44+00:00" }, { "name": "danog/better-prometheus", From 1b1c07b0ec32c4487f4697dfe65505c9207f75d0 Mon Sep 17 00:00:00 2001 From: Alexander Pankratov Date: Mon, 5 May 2025 14:56:14 +0200 Subject: [PATCH 216/270] Fix: compression settings --- docker-compose.base.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker-compose.base.yml b/docker-compose.base.yml index efc6cca..3e3cdb9 100644 --- a/docker-compose.base.yml +++ b/docker-compose.base.yml @@ -35,4 +35,4 @@ services: - --skip-grant-tables - --innodb-buffer-pool-size=128M - --innodb-compression-default=1 - - --innodb_compression_algorithm=zlib \ No newline at end of file + - --innodb-compression-algorithm=zlib \ No newline at end of file From a5e2b2fddbadf9a1541df08996ea3171f36fab31 Mon Sep 17 00:00:00 2001 From: Alexander Pankratov Date: Tue, 13 May 2025 14:11:44 +0200 Subject: [PATCH 217/270] Fix: API.methodCallAsyncRead --- src/Controllers/ApiController.php | 31 ++++++++++++++++++------------- 1 file changed, 18 insertions(+), 13 deletions(-) diff --git a/src/Controllers/ApiController.php b/src/Controllers/ApiController.php index 4c3c088..65800eb 100644 --- a/src/Controllers/ApiController.php +++ b/src/Controllers/ApiController.php @@ -7,6 +7,7 @@ use Amp\Http\Server\Request; use Amp\Http\Server\Router; use danog\MadelineProto\API; +use danog\MadelineProto\MTProto; use Exception; use ReflectionClass; use ReflectionMethod; @@ -41,21 +42,25 @@ public function __construct() return $this->extension->{$name}($API, ...$argsPrepared); }; } - foreach ((new ReflectionClass(API::class))->getMethods(ReflectionMethod::IS_PUBLIC) as $method) { - $args = []; - foreach ($method->getParameters() as $param) { - $args[$param->getName()] = null; - } - $name = $method->getName(); - $needRequest = array_key_exists('request', $args); - $this->methodsMadeline[$method->getName()] = function (API $API, ...$params) use ($args, $name, $needRequest) { - if (!$needRequest) { - unset($params['request']); + $classes = [API::class, \danog\MadelineProto\MTProto::class]; + foreach ($classes as $class) { + foreach ((new ReflectionClass($class))->getMethods(ReflectionMethod::IS_PUBLIC) as $method) { + $args = []; + foreach ($method->getParameters() as $param) { + $args[$param->getName()] = null; } - $argsPrepared = array_intersect_key($params, $args) ?: array_values($params); - return $API->{$name}(...$argsPrepared); - }; + $name = $method->getName(); + $needRequest = array_key_exists('request', $args); + $this->methodsMadeline[$method->getName()] = function (API|MTProto $API, ...$params) use ($args, $name, $needRequest) { + if (!$needRequest) { + unset($params['request']); + } + $argsPrepared = array_intersect_key($params, $args) ?: array_values($params); + return $API->{$name}(...$argsPrepared); + }; + } } + } private static ?Future $w = null; From e3630080287866c1b90613647878889cbe3ae327 Mon Sep 17 00:00:00 2001 From: Alexander Pankratov Date: Tue, 13 May 2025 14:13:09 +0200 Subject: [PATCH 218/270] Update madelineProto --- composer.lock | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/composer.lock b/composer.lock index 93c5be8..961e121 100644 --- a/composer.lock +++ b/composer.lock @@ -2587,12 +2587,12 @@ "source": { "type": "git", "url": "https://github.com/danog/MadelineProto.git", - "reference": "c01f3f376430e5a87239635f3768ae6937eb2705" + "reference": "afa0c906ad500a2ad43c977717e74ce853caf735" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/danog/MadelineProto/zipball/c01f3f376430e5a87239635f3768ae6937eb2705", - "reference": "c01f3f376430e5a87239635f3768ae6937eb2705", + "url": "https://api.github.com/repos/danog/MadelineProto/zipball/afa0c906ad500a2ad43c977717e74ce853caf735", + "reference": "afa0c906ad500a2ad43c977717e74ce853caf735", "shasum": "" }, "require": { @@ -2611,7 +2611,7 @@ "amphp/socket": "^2.3.1", "amphp/websocket-client": "^2.0.1", "bacon/bacon-qr-code": "^3.0.1", - "danog/async-orm": "^1.1.0", + "danog/async-orm": "^1.1.1", "danog/better-prometheus": "^0.1.1", "danog/dns-over-https": "^1.0.1", "danog/ipc": "^1.0.1", @@ -2634,8 +2634,8 @@ "psr/http-factory": "^1.1.0", "psr/log": "^3.0.2", "revolt/event-loop": "^1.0.7", - "symfony/polyfill-mbstring": ">=1.31", - "symfony/polyfill-php83": "^1.31", + "symfony/polyfill-mbstring": ">=1.32", + "symfony/polyfill-php83": "^1.32", "webmozart/assert": "^1.11" }, "conflict": { @@ -2649,9 +2649,9 @@ "danog/phpdoc": "^0.1.24", "dg/bypass-finals": "dev-master", "ext-ctype": "*", - "phpunit/phpunit": "^9.6.22", + "phpunit/phpunit": "^9.6.23", "revolt/event-loop-adapter-react": "^1.1.1", - "symfony/yaml": "^6.4.20", + "symfony/yaml": "^6.4.21", "vimeo/psalm": "dev-master" }, "suggest": { @@ -2708,7 +2708,7 @@ "type": "github" } ], - "time": "2025-05-05T09:32:50+00:00" + "time": "2025-05-13T12:12:43+00:00" }, { "name": "danog/primemodule", From d7e03cacaf194f61b38a33c10cea73b45db46a76 Mon Sep 17 00:00:00 2001 From: Alexander Pankratov Date: Thu, 15 May 2025 13:29:31 +0200 Subject: [PATCH 219/270] Feat: Throw error if json is invalid in request --- Dockerfile-dev | 7 ++++++- src/Controllers/AbstractApiController.php | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/Dockerfile-dev b/Dockerfile-dev index e52c862..4647eb2 100644 --- a/Dockerfile-dev +++ b/Dockerfile-dev @@ -2,8 +2,13 @@ FROM xtrime/telegram-api-server:latest ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/ +RUN echo "opcache.jit=disable" > "$PHP_INI_DIR/conf.d/tmp.ini" + RUN chmod +x /usr/local/bin/install-php-extensions \ - && install-php-extensions xdebug + && install-php-extensions xdebug \ + && rm /usr/local/bin/install-php-extensions \ + && rm $PHP_INI_DIR/conf.d/docker-php-ext-xdebug.ini \ + && rm $PHP_INI_DIR/conf.d/tmp.ini ADD dev/xdebug.ini $PHP_INI_DIR/conf.d/xdebug.ini diff --git a/src/Controllers/AbstractApiController.php b/src/Controllers/AbstractApiController.php index 5bf9a07..19d2ade 100644 --- a/src/Controllers/AbstractApiController.php +++ b/src/Controllers/AbstractApiController.php @@ -121,7 +121,7 @@ protected function resolveRequest(Request $request): array break; case $contentType === 'application/json': $body = $request->getBody()->buffer(); - $params += (array)\json_decode($body, true); + $params += (array)\json_decode($body, true, flags: JSON_THROW_ON_ERROR); break; default: \parse_str($request->getBody()->buffer(), $post); From 536fedbcfce3132f9eff5d4d2da988b45b774568 Mon Sep 17 00:00:00 2001 From: Alexander Pankratov Date: Thu, 15 May 2025 14:20:53 +0200 Subject: [PATCH 220/270] Fix: support old keys format for methods with request in properties. --- src/Controllers/ApiController.php | 26 ++++++++++++++++---------- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/src/Controllers/ApiController.php b/src/Controllers/ApiController.php index 65800eb..2553c72 100644 --- a/src/Controllers/ApiController.php +++ b/src/Controllers/ApiController.php @@ -35,11 +35,7 @@ public function __construct() $name = $method->getName(); $needRequest = array_key_exists('request', $args); $this->methods[$method->getName()] = function (API $API, ...$params) use ($args, $name, $needRequest) { - if (!$needRequest) { - unset($params['request']); - } - $argsPrepared = array_intersect_key($params, $args) ?: array_values($params); - return $this->extension->{$name}($API, ...$argsPrepared); + return $this->extension->{$name}($API, ...self::prepareArgs($needRequest, $params, $args)); }; } $classes = [API::class, \danog\MadelineProto\MTProto::class]; @@ -52,11 +48,7 @@ public function __construct() $name = $method->getName(); $needRequest = array_key_exists('request', $args); $this->methodsMadeline[$method->getName()] = function (API|MTProto $API, ...$params) use ($args, $name, $needRequest) { - if (!$needRequest) { - unset($params['request']); - } - $argsPrepared = array_intersect_key($params, $args) ?: array_values($params); - return $API->{$name}(...$argsPrepared); + return $API->{$name}(...self::prepareArgs($needRequest, $params, $args)); }; } } @@ -64,6 +56,20 @@ public function __construct() } private static ?Future $w = null; + + private static function prepareArgs(bool $needRequest, array $params, array $args): array + { + if (!$needRequest) { + unset($params['request']); + } + $argsPrepared = array_intersect_key($params, $args); + if (count($argsPrepared) !== count($params)) { + $argsPrepared = array_values($params); + } + + return $argsPrepared; + } + /** * @throws Exception */ From 59b4b6bf9e349c1a1f6ebdcbb34052005ee4728c Mon Sep 17 00:00:00 2001 From: Alexander Pankratov Date: Thu, 15 May 2025 15:35:22 +0200 Subject: [PATCH 221/270] Fix: download profile pictures --- composer.lock | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/composer.lock b/composer.lock index 961e121..166cebb 100644 --- a/composer.lock +++ b/composer.lock @@ -2587,12 +2587,12 @@ "source": { "type": "git", "url": "https://github.com/danog/MadelineProto.git", - "reference": "afa0c906ad500a2ad43c977717e74ce853caf735" + "reference": "78e8ddf861a1d20691005962fd2beecbf9d2d261" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/danog/MadelineProto/zipball/afa0c906ad500a2ad43c977717e74ce853caf735", - "reference": "afa0c906ad500a2ad43c977717e74ce853caf735", + "url": "https://api.github.com/repos/danog/MadelineProto/zipball/78e8ddf861a1d20691005962fd2beecbf9d2d261", + "reference": "78e8ddf861a1d20691005962fd2beecbf9d2d261", "shasum": "" }, "require": { @@ -2708,7 +2708,7 @@ "type": "github" } ], - "time": "2025-05-13T12:12:43+00:00" + "time": "2025-05-15T13:34:03+00:00" }, { "name": "danog/primemodule", From c2dc582e20e48be8a431c94288f528a52f0b4648 Mon Sep 17 00:00:00 2001 From: Alexander Pankratov Date: Sat, 31 May 2025 15:50:37 +0200 Subject: [PATCH 222/270] Upgrade madelineProto with fixes for files downloading --- composer.json | 2 +- composer.lock | 187 +++++++++--------- docker-compose.dev.yml | 1 + src/MadelineProtoExtensions/ApiExtensions.php | 3 +- 4 files changed, 98 insertions(+), 95 deletions(-) diff --git a/composer.json b/composer.json index dd5fba4..5a81b7d 100644 --- a/composer.json +++ b/composer.json @@ -31,7 +31,7 @@ "vlucas/phpdotenv": "^5", "danog/madelineproto": "dev-v8-tas", "amphp/dns": "2.x-dev", - "danog/async-orm": "1.1.1" + "danog/async-orm": "^1.1.1" }, "require-dev": { "amphp/php-cs-fixer-config": "^2.0.1" diff --git a/composer.lock b/composer.lock index 166cebb..20f4592 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "a3a843cc3adfb453289bc960aec6bbec", + "content-hash": "788bbdd4aae8a1600ea0748e878b9934", "packages": [ { "name": "amphp/amp", @@ -542,16 +542,16 @@ }, { "name": "amphp/http-client", - "version": "v5.3.1", + "version": "v5.3.3", "source": { "type": "git", "url": "https://github.com/amphp/http-client.git", - "reference": "c6a789d5bca0450e125e88c38aa3859c4450b0d6" + "reference": "09212ebc2f34efb5e1eaac4374fef6b11a7d2fbc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/amphp/http-client/zipball/c6a789d5bca0450e125e88c38aa3859c4450b0d6", - "reference": "c6a789d5bca0450e125e88c38aa3859c4450b0d6", + "url": "https://api.github.com/repos/amphp/http-client/zipball/09212ebc2f34efb5e1eaac4374fef6b11a7d2fbc", + "reference": "09212ebc2f34efb5e1eaac4374fef6b11a7d2fbc", "shasum": "" }, "require": { @@ -628,7 +628,7 @@ ], "support": { "issues": "https://github.com/amphp/http-client/issues", - "source": "https://github.com/amphp/http-client/tree/v5.3.1" + "source": "https://github.com/amphp/http-client/tree/v5.3.3" }, "funding": [ { @@ -636,7 +636,7 @@ "type": "github" } ], - "time": "2025-04-30T02:58:16+00:00" + "time": "2025-05-21T03:24:20+00:00" }, { "name": "amphp/http-client-cookies", @@ -717,16 +717,16 @@ }, { "name": "amphp/http-server", - "version": "v3.4.2", + "version": "v3.4.3", "source": { "type": "git", "url": "https://github.com/amphp/http-server.git", - "reference": "c60cde9a1e331f539b7ef5a7705f42092e646f90" + "reference": "7aa962b0569f664af3ba23bc819f2a69884329cd" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/amphp/http-server/zipball/c60cde9a1e331f539b7ef5a7705f42092e646f90", - "reference": "c60cde9a1e331f539b7ef5a7705f42092e646f90", + "url": "https://api.github.com/repos/amphp/http-server/zipball/7aa962b0569f664af3ba23bc819f2a69884329cd", + "reference": "7aa962b0569f664af3ba23bc819f2a69884329cd", "shasum": "" }, "require": { @@ -802,7 +802,7 @@ ], "support": { "issues": "https://github.com/amphp/http-server/issues", - "source": "https://github.com/amphp/http-server/tree/v3.4.2" + "source": "https://github.com/amphp/http-server/tree/v3.4.3" }, "funding": [ { @@ -810,7 +810,7 @@ "type": "github" } ], - "time": "2024-12-31T16:35:28+00:00" + "time": "2025-05-18T15:43:42+00:00" }, { "name": "amphp/http-server-form-parser", @@ -2187,16 +2187,16 @@ }, { "name": "danog/async-orm", - "version": "1.1.1", + "version": "1.1.3", "source": { "type": "git", "url": "https://github.com/danog/AsyncOrm.git", - "reference": "da21147000bd9f1fae78ea46e749ca8b45b8c3b8" + "reference": "77b2ef792b805db9a59fed1da515fd55f0ba75f5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/danog/AsyncOrm/zipball/da21147000bd9f1fae78ea46e749ca8b45b8c3b8", - "reference": "da21147000bd9f1fae78ea46e749ca8b45b8c3b8", + "url": "https://api.github.com/repos/danog/AsyncOrm/zipball/77b2ef792b805db9a59fed1da515fd55f0ba75f5", + "reference": "77b2ef792b805db9a59fed1da515fd55f0ba75f5", "shasum": "" }, "require": { @@ -2240,7 +2240,7 @@ "description": "Async ORM based on AMPHP v3 and fibers.", "support": { "issues": "https://github.com/danog/AsyncOrm/issues", - "source": "https://github.com/danog/AsyncOrm/tree/1.1.1" + "source": "https://github.com/danog/AsyncOrm/tree/1.1.3" }, "funding": [ { @@ -2248,7 +2248,7 @@ "type": "github" } ], - "time": "2025-05-05T09:35:44+00:00" + "time": "2025-05-18T16:18:44+00:00" }, { "name": "danog/better-prometheus", @@ -2587,12 +2587,12 @@ "source": { "type": "git", "url": "https://github.com/danog/MadelineProto.git", - "reference": "78e8ddf861a1d20691005962fd2beecbf9d2d261" + "reference": "3e5a1c4750af098d18d23a153e9df20d70f3213e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/danog/MadelineProto/zipball/78e8ddf861a1d20691005962fd2beecbf9d2d261", - "reference": "78e8ddf861a1d20691005962fd2beecbf9d2d261", + "url": "https://api.github.com/repos/danog/MadelineProto/zipball/3e5a1c4750af098d18d23a153e9df20d70f3213e", + "reference": "3e5a1c4750af098d18d23a153e9df20d70f3213e", "shasum": "" }, "require": { @@ -2603,7 +2603,7 @@ "amphp/http": "^2.1.2", "amphp/http-client": "^5.3.1", "amphp/http-client-cookies": "^2", - "amphp/http-server": "^3.4.2", + "amphp/http-server": "^3.4.3", "amphp/log": "^2", "amphp/mysql": "^3", "amphp/postgres": "^2.1.1", @@ -2611,7 +2611,7 @@ "amphp/socket": "^2.3.1", "amphp/websocket-client": "^2.0.1", "bacon/bacon-qr-code": "^3.0.1", - "danog/async-orm": "^1.1.1", + "danog/async-orm": "^1.1.3", "danog/better-prometheus": "^0.1.1", "danog/dns-over-https": "^1.0.1", "danog/ipc": "^1.0.1", @@ -2708,7 +2708,7 @@ "type": "github" } ], - "time": "2025-05-15T13:34:03+00:00" + "time": "2025-05-31T13:44:36+00:00" }, { "name": "danog/primemodule", @@ -3559,16 +3559,16 @@ }, { "name": "nikic/php-parser", - "version": "v5.4.0", + "version": "v5.5.0", "source": { "type": "git", "url": "https://github.com/nikic/PHP-Parser.git", - "reference": "447a020a1f875a434d62f2a401f53b82a396e494" + "reference": "ae59794362fe85e051a58ad36b289443f57be7a9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/447a020a1f875a434d62f2a401f53b82a396e494", - "reference": "447a020a1f875a434d62f2a401f53b82a396e494", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/ae59794362fe85e051a58ad36b289443f57be7a9", + "reference": "ae59794362fe85e051a58ad36b289443f57be7a9", "shasum": "" }, "require": { @@ -3611,9 +3611,9 @@ ], "support": { "issues": "https://github.com/nikic/PHP-Parser/issues", - "source": "https://github.com/nikic/PHP-Parser/tree/v5.4.0" + "source": "https://github.com/nikic/PHP-Parser/tree/v5.5.0" }, - "time": "2024-12-30T11:07:19+00:00" + "time": "2025-05-31T08:24:38+00:00" }, { "name": "paragonie/constant_time_encoding", @@ -5929,23 +5929,24 @@ }, { "name": "symfony/console", - "version": "v7.2.6", + "version": "v7.3.0", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "0e2e3f38c192e93e622e41ec37f4ca70cfedf218" + "reference": "66c1440edf6f339fd82ed6c7caa76cb006211b44" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/0e2e3f38c192e93e622e41ec37f4ca70cfedf218", - "reference": "0e2e3f38c192e93e622e41ec37f4ca70cfedf218", + "url": "https://api.github.com/repos/symfony/console/zipball/66c1440edf6f339fd82ed6c7caa76cb006211b44", + "reference": "66c1440edf6f339fd82ed6c7caa76cb006211b44", "shasum": "" }, "require": { "php": ">=8.2", + "symfony/deprecation-contracts": "^2.5|^3", "symfony/polyfill-mbstring": "~1.0", "symfony/service-contracts": "^2.5|^3", - "symfony/string": "^6.4|^7.0" + "symfony/string": "^7.2" }, "conflict": { "symfony/dependency-injection": "<6.4", @@ -6002,7 +6003,7 @@ "terminal" ], "support": { - "source": "https://github.com/symfony/console/tree/v7.2.6" + "source": "https://github.com/symfony/console/tree/v7.3.0" }, "funding": [ { @@ -6018,20 +6019,20 @@ "type": "tidelift" } ], - "time": "2025-04-07T19:09:28+00:00" + "time": "2025-05-24T10:34:04+00:00" }, { "name": "symfony/deprecation-contracts", - "version": "v3.5.1", + "version": "v3.6.0", "source": { "type": "git", "url": "https://github.com/symfony/deprecation-contracts.git", - "reference": "74c71c939a79f7d5bf3c1ce9f5ea37ba0114c6f6" + "reference": "63afe740e99a13ba87ec199bb07bbdee937a5b62" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/74c71c939a79f7d5bf3c1ce9f5ea37ba0114c6f6", - "reference": "74c71c939a79f7d5bf3c1ce9f5ea37ba0114c6f6", + "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/63afe740e99a13ba87ec199bb07bbdee937a5b62", + "reference": "63afe740e99a13ba87ec199bb07bbdee937a5b62", "shasum": "" }, "require": { @@ -6044,7 +6045,7 @@ "name": "symfony/contracts" }, "branch-alias": { - "dev-main": "3.5-dev" + "dev-main": "3.6-dev" } }, "autoload": { @@ -6069,7 +6070,7 @@ "description": "A generic function and convention to trigger deprecation notices", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/deprecation-contracts/tree/v3.5.1" + "source": "https://github.com/symfony/deprecation-contracts/tree/v3.6.0" }, "funding": [ { @@ -6085,20 +6086,20 @@ "type": "tidelift" } ], - "time": "2024-09-25T14:20:29+00:00" + "time": "2024-09-25T14:21:43+00:00" }, { "name": "symfony/event-dispatcher", - "version": "v7.2.0", + "version": "v7.3.0", "source": { "type": "git", "url": "https://github.com/symfony/event-dispatcher.git", - "reference": "910c5db85a5356d0fea57680defec4e99eb9c8c1" + "reference": "497f73ac996a598c92409b44ac43b6690c4f666d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/910c5db85a5356d0fea57680defec4e99eb9c8c1", - "reference": "910c5db85a5356d0fea57680defec4e99eb9c8c1", + "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/497f73ac996a598c92409b44ac43b6690c4f666d", + "reference": "497f73ac996a598c92409b44ac43b6690c4f666d", "shasum": "" }, "require": { @@ -6149,7 +6150,7 @@ "description": "Provides tools that allow your application components to communicate with each other by dispatching events and listening to them", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/event-dispatcher/tree/v7.2.0" + "source": "https://github.com/symfony/event-dispatcher/tree/v7.3.0" }, "funding": [ { @@ -6165,20 +6166,20 @@ "type": "tidelift" } ], - "time": "2024-09-25T14:21:43+00:00" + "time": "2025-04-22T09:11:45+00:00" }, { "name": "symfony/event-dispatcher-contracts", - "version": "v3.5.1", + "version": "v3.6.0", "source": { "type": "git", "url": "https://github.com/symfony/event-dispatcher-contracts.git", - "reference": "7642f5e970b672283b7823222ae8ef8bbc160b9f" + "reference": "59eb412e93815df44f05f342958efa9f46b1e586" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher-contracts/zipball/7642f5e970b672283b7823222ae8ef8bbc160b9f", - "reference": "7642f5e970b672283b7823222ae8ef8bbc160b9f", + "url": "https://api.github.com/repos/symfony/event-dispatcher-contracts/zipball/59eb412e93815df44f05f342958efa9f46b1e586", + "reference": "59eb412e93815df44f05f342958efa9f46b1e586", "shasum": "" }, "require": { @@ -6192,7 +6193,7 @@ "name": "symfony/contracts" }, "branch-alias": { - "dev-main": "3.5-dev" + "dev-main": "3.6-dev" } }, "autoload": { @@ -6225,7 +6226,7 @@ "standards" ], "support": { - "source": "https://github.com/symfony/event-dispatcher-contracts/tree/v3.5.1" + "source": "https://github.com/symfony/event-dispatcher-contracts/tree/v3.6.0" }, "funding": [ { @@ -6241,11 +6242,11 @@ "type": "tidelift" } ], - "time": "2024-09-25T14:20:29+00:00" + "time": "2024-09-25T14:21:43+00:00" }, { "name": "symfony/filesystem", - "version": "v7.2.0", + "version": "v7.3.0", "source": { "type": "git", "url": "https://github.com/symfony/filesystem.git", @@ -6291,7 +6292,7 @@ "description": "Provides basic utilities for the filesystem", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/filesystem/tree/v7.2.0" + "source": "https://github.com/symfony/filesystem/tree/v7.3.0" }, "funding": [ { @@ -6311,16 +6312,16 @@ }, { "name": "symfony/finder", - "version": "v7.2.2", + "version": "v7.3.0", "source": { "type": "git", "url": "https://github.com/symfony/finder.git", - "reference": "87a71856f2f56e4100373e92529eed3171695cfb" + "reference": "ec2344cf77a48253bbca6939aa3d2477773ea63d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/finder/zipball/87a71856f2f56e4100373e92529eed3171695cfb", - "reference": "87a71856f2f56e4100373e92529eed3171695cfb", + "url": "https://api.github.com/repos/symfony/finder/zipball/ec2344cf77a48253bbca6939aa3d2477773ea63d", + "reference": "ec2344cf77a48253bbca6939aa3d2477773ea63d", "shasum": "" }, "require": { @@ -6355,7 +6356,7 @@ "description": "Finds files and directories via an intuitive fluent interface", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/finder/tree/v7.2.2" + "source": "https://github.com/symfony/finder/tree/v7.3.0" }, "funding": [ { @@ -6371,20 +6372,20 @@ "type": "tidelift" } ], - "time": "2024-12-30T19:00:17+00:00" + "time": "2024-12-30T19:00:26+00:00" }, { "name": "symfony/options-resolver", - "version": "v7.2.0", + "version": "v7.3.0", "source": { "type": "git", "url": "https://github.com/symfony/options-resolver.git", - "reference": "7da8fbac9dcfef75ffc212235d76b2754ce0cf50" + "reference": "afb9a8038025e5dbc657378bfab9198d75f10fca" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/options-resolver/zipball/7da8fbac9dcfef75ffc212235d76b2754ce0cf50", - "reference": "7da8fbac9dcfef75ffc212235d76b2754ce0cf50", + "url": "https://api.github.com/repos/symfony/options-resolver/zipball/afb9a8038025e5dbc657378bfab9198d75f10fca", + "reference": "afb9a8038025e5dbc657378bfab9198d75f10fca", "shasum": "" }, "require": { @@ -6422,7 +6423,7 @@ "options" ], "support": { - "source": "https://github.com/symfony/options-resolver/tree/v7.2.0" + "source": "https://github.com/symfony/options-resolver/tree/v7.3.0" }, "funding": [ { @@ -6438,7 +6439,7 @@ "type": "tidelift" } ], - "time": "2024-11-20T11:17:29+00:00" + "time": "2025-04-04T13:12:05+00:00" }, { "name": "symfony/polyfill-intl-grapheme", @@ -6677,16 +6678,16 @@ }, { "name": "symfony/process", - "version": "v7.2.5", + "version": "v7.3.0", "source": { "type": "git", "url": "https://github.com/symfony/process.git", - "reference": "87b7c93e57df9d8e39a093d32587702380ff045d" + "reference": "40c295f2deb408d5e9d2d32b8ba1dd61e36f05af" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/87b7c93e57df9d8e39a093d32587702380ff045d", - "reference": "87b7c93e57df9d8e39a093d32587702380ff045d", + "url": "https://api.github.com/repos/symfony/process/zipball/40c295f2deb408d5e9d2d32b8ba1dd61e36f05af", + "reference": "40c295f2deb408d5e9d2d32b8ba1dd61e36f05af", "shasum": "" }, "require": { @@ -6718,7 +6719,7 @@ "description": "Executes commands in sub-processes", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/process/tree/v7.2.5" + "source": "https://github.com/symfony/process/tree/v7.3.0" }, "funding": [ { @@ -6734,20 +6735,20 @@ "type": "tidelift" } ], - "time": "2025-03-13T12:21:46+00:00" + "time": "2025-04-17T09:11:12+00:00" }, { "name": "symfony/service-contracts", - "version": "v3.5.1", + "version": "v3.6.0", "source": { "type": "git", "url": "https://github.com/symfony/service-contracts.git", - "reference": "e53260aabf78fb3d63f8d79d69ece59f80d5eda0" + "reference": "f021b05a130d35510bd6b25fe9053c2a8a15d5d4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/service-contracts/zipball/e53260aabf78fb3d63f8d79d69ece59f80d5eda0", - "reference": "e53260aabf78fb3d63f8d79d69ece59f80d5eda0", + "url": "https://api.github.com/repos/symfony/service-contracts/zipball/f021b05a130d35510bd6b25fe9053c2a8a15d5d4", + "reference": "f021b05a130d35510bd6b25fe9053c2a8a15d5d4", "shasum": "" }, "require": { @@ -6765,7 +6766,7 @@ "name": "symfony/contracts" }, "branch-alias": { - "dev-main": "3.5-dev" + "dev-main": "3.6-dev" } }, "autoload": { @@ -6801,7 +6802,7 @@ "standards" ], "support": { - "source": "https://github.com/symfony/service-contracts/tree/v3.5.1" + "source": "https://github.com/symfony/service-contracts/tree/v3.6.0" }, "funding": [ { @@ -6817,11 +6818,11 @@ "type": "tidelift" } ], - "time": "2024-09-25T14:20:29+00:00" + "time": "2025-04-25T09:37:31+00:00" }, { "name": "symfony/stopwatch", - "version": "v7.2.4", + "version": "v7.3.0", "source": { "type": "git", "url": "https://github.com/symfony/stopwatch.git", @@ -6863,7 +6864,7 @@ "description": "Provides a way to profile code", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/stopwatch/tree/v7.2.4" + "source": "https://github.com/symfony/stopwatch/tree/v7.3.0" }, "funding": [ { @@ -6883,16 +6884,16 @@ }, { "name": "symfony/string", - "version": "v7.2.6", + "version": "v7.3.0", "source": { "type": "git", "url": "https://github.com/symfony/string.git", - "reference": "a214fe7d62bd4df2a76447c67c6b26e1d5e74931" + "reference": "f3570b8c61ca887a9e2938e85cb6458515d2b125" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/string/zipball/a214fe7d62bd4df2a76447c67c6b26e1d5e74931", - "reference": "a214fe7d62bd4df2a76447c67c6b26e1d5e74931", + "url": "https://api.github.com/repos/symfony/string/zipball/f3570b8c61ca887a9e2938e85cb6458515d2b125", + "reference": "f3570b8c61ca887a9e2938e85cb6458515d2b125", "shasum": "" }, "require": { @@ -6950,7 +6951,7 @@ "utf8" ], "support": { - "source": "https://github.com/symfony/string/tree/v7.2.6" + "source": "https://github.com/symfony/string/tree/v7.3.0" }, "funding": [ { @@ -6966,7 +6967,7 @@ "type": "tidelift" } ], - "time": "2025-04-20T20:18:16+00:00" + "time": "2025-04-20T20:19:01+00:00" } ], "aliases": [], diff --git a/docker-compose.dev.yml b/docker-compose.dev.yml index d9a48f3..31a8515 100644 --- a/docker-compose.dev.yml +++ b/docker-compose.dev.yml @@ -18,6 +18,7 @@ services: - "-s=session" depends_on: - mysql + healthcheck: !reset [] mysql: extends: file: docker-compose.base.yml diff --git a/src/MadelineProtoExtensions/ApiExtensions.php b/src/MadelineProtoExtensions/ApiExtensions.php index a936ead..003329d 100644 --- a/src/MadelineProtoExtensions/ApiExtensions.php +++ b/src/MadelineProtoExtensions/ApiExtensions.php @@ -242,7 +242,8 @@ public function downloadToResponse(API $madelineProto, FileCallbackInterface|Mes */ public function downloadToBrowser(API $madelineProto, FileCallbackInterface|Message|array|string $messageMedia, Request $request, ?callable $cb = null, ?int $size = null, ?string $mime = null, ?string $name = null): Response { - return $madelineProto->downloadToResponse( + return $this->downloadToResponse( + madelineProto: $madelineProto, messageMedia: $messageMedia, request: $request, cb: $cb, From 4bd4129a49f5ecf611b13b21dca87054ff4ce4c1 Mon Sep 17 00:00:00 2001 From: Alexander Pankratov Date: Sat, 31 May 2025 15:55:58 +0200 Subject: [PATCH 223/270] Fix: remove cached db settings to ensure they properly upgraded --- server.php | 1 + src/Migrations/StartUpFixes.php | 9 +++++++++ 2 files changed, 10 insertions(+) diff --git a/server.php b/server.php index 61bef7a..31935bf 100644 --- a/server.php +++ b/server.php @@ -85,6 +85,7 @@ StartUpFixes::fix(); foreach ($sessions as $session) { StartUpFixes::removeBrokenIpc($session); + StartUpFixes::removeOldSettings($session); } new TelegramApiServer\Server\Server( $options, diff --git a/src/Migrations/StartUpFixes.php b/src/Migrations/StartUpFixes.php index 0184a53..cbc778f 100644 --- a/src/Migrations/StartUpFixes.php +++ b/src/Migrations/StartUpFixes.php @@ -20,4 +20,13 @@ public static function removeBrokenIpc(string $session): void unlink($file); } } + + public static function removeOldSettings(string $session): void + { + info('Removing old settings file to fix startup if db settings changed' . PHP_EOL); + foreach (glob(ROOT_DIR . "/$session/safe.php*") as $file) { + info("removing: $file"); + unlink($file); + } + } } From 547ea021c46f86a34a128c671c36944c2831e453 Mon Sep 17 00:00:00 2001 From: Alexander Pankratov Date: Sat, 31 May 2025 16:41:27 +0200 Subject: [PATCH 224/270] Upgrade image --- docker-compose.base.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker-compose.base.yml b/docker-compose.base.yml index 3e3cdb9..5804ddf 100644 --- a/docker-compose.base.yml +++ b/docker-compose.base.yml @@ -1,6 +1,6 @@ services: api: - image: xtrime/telegram-api-server:2.4 + image: xtrime/telegram-api-server:2.6 init: true build: context: . From 6bfb0df0c1cb893fd499e4d125c0e7da4eb0ce83 Mon Sep 17 00:00:00 2001 From: Alexander Pankratov Date: Tue, 3 Jun 2025 20:54:51 +0200 Subject: [PATCH 225/270] Upgrade docs --- README.md | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 55484a1..b30ca0e 100644 --- a/README.md +++ b/README.md @@ -29,14 +29,17 @@ docker compose pull ``` ## Authorization -Please only use old and valid accounts. All new accounts will be banned by telegram. -If your account was banned read this: https://docs.madelineproto.xyz/docs/LOGIN.html#getting-permission-to-use-the-telegram-api + +> [!CAUTION] +> Please only use old and valid accounts. All new accounts will be banned by telegram. +> If your account was banned read this: https://docs.madelineproto.xyz/docs/LOGIN.html#getting-permission-to-use-the-telegram-api + 1. Get app_id and app_hash at [my.telegram.org](https://my.telegram.org/). Only one app_id needed for any amount of users and bots. 1. Fill app_id and app_hash in `.env.docker`. 1. Start TelegramApiServer in cli: - 1. Start container interactively: `docker compose run --rm api` - 2. If you need to start multiple sessions, create docker-compose.override.yml. Add additional containers there. Use unique ports and session names in `command`. + 1. Start container interactively: `docker compose run --rm api` + 1. If you need to start multiple sessions, create docker-compose.override.yml. Add additional containers there. Use unique ports and session names in `command`. 1. Authorize your session: 1. After promt, fill your phone number, or bot hash. 1. You will receive telegram code. Type it in. @@ -52,6 +55,13 @@ If your account was banned read this: https://docs.madelineproto.xyz/docs/LOGIN. 1. Exit with `Ctrl + C` 1. Run container in background `docker compose up -d`. +## Change existing account/session +1. Stop container `docker compose stop api` +2. Remove session folder: `rm -rf /sessions/session.madeline/` +3. Remove `session_MTProto_session` from mysql database. +4. Log out session from app. +5. Authorize as usual. + ## Update * `git pull` or `git fetch && git reset --hard origin/master` * `rm -rf vendor/` From 346298b8768eae56a59cc0a4de6af9839024ab0c Mon Sep 17 00:00:00 2001 From: Alexander Pankratov Date: Wed, 4 Jun 2025 19:20:59 +0200 Subject: [PATCH 226/270] Bump madeline --- composer.lock | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/composer.lock b/composer.lock index 20f4592..9be8582 100644 --- a/composer.lock +++ b/composer.lock @@ -2587,12 +2587,12 @@ "source": { "type": "git", "url": "https://github.com/danog/MadelineProto.git", - "reference": "3e5a1c4750af098d18d23a153e9df20d70f3213e" + "reference": "a977122fd257fe5fbdfffebe7f97278ffe3bcfa8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/danog/MadelineProto/zipball/3e5a1c4750af098d18d23a153e9df20d70f3213e", - "reference": "3e5a1c4750af098d18d23a153e9df20d70f3213e", + "url": "https://api.github.com/repos/danog/MadelineProto/zipball/a977122fd257fe5fbdfffebe7f97278ffe3bcfa8", + "reference": "a977122fd257fe5fbdfffebe7f97278ffe3bcfa8", "shasum": "" }, "require": { @@ -2708,7 +2708,7 @@ "type": "github" } ], - "time": "2025-05-31T13:44:36+00:00" + "time": "2025-06-04T15:37:56+00:00" }, { "name": "danog/primemodule", @@ -2874,16 +2874,16 @@ }, { "name": "danog/tg-file-decoder", - "version": "1.0.1", + "version": "1.0.2", "source": { "type": "git", "url": "https://github.com/danog/tg-file-decoder.git", - "reference": "5b1b69369e13a16b7a4905bf034a8ed997e5eaf8" + "reference": "f4da78c28d47b658c4596249f1d6595956f3b796" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/danog/tg-file-decoder/zipball/5b1b69369e13a16b7a4905bf034a8ed997e5eaf8", - "reference": "5b1b69369e13a16b7a4905bf034a8ed997e5eaf8", + "url": "https://api.github.com/repos/danog/tg-file-decoder/zipball/f4da78c28d47b658c4596249f1d6595956f3b796", + "reference": "f4da78c28d47b658c4596249f1d6595956f3b796", "shasum": "" }, "require": { @@ -2924,7 +2924,7 @@ ], "support": { "issues": "https://github.com/danog/tg-file-decoder/issues", - "source": "https://github.com/danog/tg-file-decoder/tree/1.0.1" + "source": "https://github.com/danog/tg-file-decoder/tree/1.0.2" }, "funding": [ { @@ -2932,7 +2932,7 @@ "type": "github" } ], - "time": "2024-04-19T21:31:39+00:00" + "time": "2025-05-31T15:14:35+00:00" }, { "name": "dasprid/enum", From d8da3d4d92d20817391663f5f62068d8796d3274 Mon Sep 17 00:00:00 2001 From: Alexander Pankratov Date: Wed, 4 Jun 2025 19:28:19 +0200 Subject: [PATCH 227/270] Revert madeline settings fix --- composer.lock | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/composer.lock b/composer.lock index 9be8582..067f24e 100644 --- a/composer.lock +++ b/composer.lock @@ -2587,12 +2587,12 @@ "source": { "type": "git", "url": "https://github.com/danog/MadelineProto.git", - "reference": "a977122fd257fe5fbdfffebe7f97278ffe3bcfa8" + "reference": "ff9d221e427215dcd2dfa144741d3a45da07b707" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/danog/MadelineProto/zipball/a977122fd257fe5fbdfffebe7f97278ffe3bcfa8", - "reference": "a977122fd257fe5fbdfffebe7f97278ffe3bcfa8", + "url": "https://api.github.com/repos/danog/MadelineProto/zipball/ff9d221e427215dcd2dfa144741d3a45da07b707", + "reference": "ff9d221e427215dcd2dfa144741d3a45da07b707", "shasum": "" }, "require": { @@ -2708,7 +2708,7 @@ "type": "github" } ], - "time": "2025-06-04T15:37:56+00:00" + "time": "2025-06-04T17:27:12+00:00" }, { "name": "danog/primemodule", From e030d1f8be550ecdae05b5f89356215ebcf41e06 Mon Sep 17 00:00:00 2001 From: Alexander Pankratov Date: Wed, 4 Jun 2025 20:02:19 +0200 Subject: [PATCH 228/270] Revert --- composer.lock | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/composer.lock b/composer.lock index 067f24e..2fde2f0 100644 --- a/composer.lock +++ b/composer.lock @@ -2587,12 +2587,12 @@ "source": { "type": "git", "url": "https://github.com/danog/MadelineProto.git", - "reference": "ff9d221e427215dcd2dfa144741d3a45da07b707" + "reference": "c2a5155760979c5cbc5361707baeef37c4552b39" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/danog/MadelineProto/zipball/ff9d221e427215dcd2dfa144741d3a45da07b707", - "reference": "ff9d221e427215dcd2dfa144741d3a45da07b707", + "url": "https://api.github.com/repos/danog/MadelineProto/zipball/c2a5155760979c5cbc5361707baeef37c4552b39", + "reference": "c2a5155760979c5cbc5361707baeef37c4552b39", "shasum": "" }, "require": { @@ -2708,7 +2708,7 @@ "type": "github" } ], - "time": "2025-06-04T17:27:12+00:00" + "time": "2025-06-04T18:01:18+00:00" }, { "name": "danog/primemodule", From 1690b5fa367ae5525401aa4fb1a8ad6056830e9e Mon Sep 17 00:00:00 2001 From: Alexander Pankratov Date: Wed, 4 Jun 2025 21:00:40 +0200 Subject: [PATCH 229/270] Downgrade TL schema to TL 203 --- composer.lock | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/composer.lock b/composer.lock index 2fde2f0..f480801 100644 --- a/composer.lock +++ b/composer.lock @@ -2587,12 +2587,12 @@ "source": { "type": "git", "url": "https://github.com/danog/MadelineProto.git", - "reference": "c2a5155760979c5cbc5361707baeef37c4552b39" + "reference": "40492645f45c1fe92230aa75749b2e9b0282cc90" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/danog/MadelineProto/zipball/c2a5155760979c5cbc5361707baeef37c4552b39", - "reference": "c2a5155760979c5cbc5361707baeef37c4552b39", + "url": "https://api.github.com/repos/danog/MadelineProto/zipball/40492645f45c1fe92230aa75749b2e9b0282cc90", + "reference": "40492645f45c1fe92230aa75749b2e9b0282cc90", "shasum": "" }, "require": { @@ -2708,7 +2708,7 @@ "type": "github" } ], - "time": "2025-06-04T18:01:18+00:00" + "time": "2025-06-04T18:59:56+00:00" }, { "name": "danog/primemodule", From 9beab0c0cd096b1577013f3bafe5209fa0ebcfc0 Mon Sep 17 00:00:00 2001 From: Alexander Pankratov Date: Wed, 4 Jun 2025 21:02:23 +0200 Subject: [PATCH 230/270] Downgrade TL schema to TL 203 --- composer.lock | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/composer.lock b/composer.lock index f480801..d0a4261 100644 --- a/composer.lock +++ b/composer.lock @@ -2587,12 +2587,12 @@ "source": { "type": "git", "url": "https://github.com/danog/MadelineProto.git", - "reference": "40492645f45c1fe92230aa75749b2e9b0282cc90" + "reference": "69896a7e53b3fb115c94781d059fb21a1217cb09" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/danog/MadelineProto/zipball/40492645f45c1fe92230aa75749b2e9b0282cc90", - "reference": "40492645f45c1fe92230aa75749b2e9b0282cc90", + "url": "https://api.github.com/repos/danog/MadelineProto/zipball/69896a7e53b3fb115c94781d059fb21a1217cb09", + "reference": "69896a7e53b3fb115c94781d059fb21a1217cb09", "shasum": "" }, "require": { @@ -2708,7 +2708,7 @@ "type": "github" } ], - "time": "2025-06-04T18:59:56+00:00" + "time": "2025-06-04T19:01:46+00:00" }, { "name": "danog/primemodule", From 6495a95ba7b0dcb7e2b47f74a64251ce8efa22ff Mon Sep 17 00:00:00 2001 From: Alexander Pankratov Date: Wed, 4 Jun 2025 22:14:04 +0200 Subject: [PATCH 231/270] Fix channel ids in TL204 --- composer.lock | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/composer.lock b/composer.lock index d0a4261..cac8494 100644 --- a/composer.lock +++ b/composer.lock @@ -2587,12 +2587,12 @@ "source": { "type": "git", "url": "https://github.com/danog/MadelineProto.git", - "reference": "69896a7e53b3fb115c94781d059fb21a1217cb09" + "reference": "73a2c2981abfdb8f657f5f2d6cc43aecb578cb5f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/danog/MadelineProto/zipball/69896a7e53b3fb115c94781d059fb21a1217cb09", - "reference": "69896a7e53b3fb115c94781d059fb21a1217cb09", + "url": "https://api.github.com/repos/danog/MadelineProto/zipball/73a2c2981abfdb8f657f5f2d6cc43aecb578cb5f", + "reference": "73a2c2981abfdb8f657f5f2d6cc43aecb578cb5f", "shasum": "" }, "require": { @@ -2708,7 +2708,7 @@ "type": "github" } ], - "time": "2025-06-04T19:01:46+00:00" + "time": "2025-06-04T20:13:15+00:00" }, { "name": "danog/primemodule", From c1716a51f765d095b94fc39e0e4ff39911606ef5 Mon Sep 17 00:00:00 2001 From: Alexander Pankratov Date: Wed, 4 Jun 2025 22:56:24 +0200 Subject: [PATCH 232/270] Proper madelineProto update for TL204 ids --- composer.lock | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/composer.lock b/composer.lock index cac8494..2da8c5f 100644 --- a/composer.lock +++ b/composer.lock @@ -2587,12 +2587,12 @@ "source": { "type": "git", "url": "https://github.com/danog/MadelineProto.git", - "reference": "73a2c2981abfdb8f657f5f2d6cc43aecb578cb5f" + "reference": "dd19f6e462ef609af7fd9eabae3f02d94bec0ca2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/danog/MadelineProto/zipball/73a2c2981abfdb8f657f5f2d6cc43aecb578cb5f", - "reference": "73a2c2981abfdb8f657f5f2d6cc43aecb578cb5f", + "url": "https://api.github.com/repos/danog/MadelineProto/zipball/dd19f6e462ef609af7fd9eabae3f02d94bec0ca2", + "reference": "dd19f6e462ef609af7fd9eabae3f02d94bec0ca2", "shasum": "" }, "require": { @@ -2601,7 +2601,7 @@ "amphp/dns": "^2.4.0", "amphp/file": "^3.2.0", "amphp/http": "^2.1.2", - "amphp/http-client": "^5.3.1", + "amphp/http-client": "^5.3.3", "amphp/http-client-cookies": "^2", "amphp/http-server": "^3.4.3", "amphp/log": "^2", @@ -2618,8 +2618,8 @@ "danog/loop": "^1.1.1", "danog/primemodule": "^1.0.13", "danog/telegram-entities": "^1.0.4", - "danog/tg-dialog-id": "^1.1.0", - "danog/tg-file-decoder": "^1.0.1", + "danog/tg-dialog-id": "^1.2.0", + "danog/tg-file-decoder": "^1.0.2", "ext-dom": "*", "ext-fileinfo": "*", "ext-filter": "*", @@ -2628,7 +2628,7 @@ "ext-xml": "*", "ext-zlib": "*", "league/uri": "^7.5.1", - "nikic/php-parser": "^5.4.0", + "nikic/php-parser": "^5.5.0", "php-64bit": ">=8.2", "phpseclib/phpseclib": "^3.0.43", "psr/http-factory": "^1.1.0", @@ -2708,7 +2708,7 @@ "type": "github" } ], - "time": "2025-06-04T20:13:15+00:00" + "time": "2025-06-04T20:39:46+00:00" }, { "name": "danog/primemodule", @@ -2820,16 +2820,16 @@ }, { "name": "danog/tg-dialog-id", - "version": "1.1.0", + "version": "1.2.0", "source": { "type": "git", "url": "https://github.com/danog/tg-dialog-id.git", - "reference": "6118fe5ad17b068237a43262d459664869affcc0" + "reference": "ff4d75f7a40fb3826f0a7c3f67fa734b644ca807" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/danog/tg-dialog-id/zipball/6118fe5ad17b068237a43262d459664869affcc0", - "reference": "6118fe5ad17b068237a43262d459664869affcc0", + "url": "https://api.github.com/repos/danog/tg-dialog-id/zipball/ff4d75f7a40fb3826f0a7c3f67fa734b644ca807", + "reference": "ff4d75f7a40fb3826f0a7c3f67fa734b644ca807", "shasum": "" }, "require": { @@ -2862,7 +2862,7 @@ "description": "A library to work with Telegram bot API dialog IDs", "support": { "issues": "https://github.com/danog/tg-dialog-id/issues", - "source": "https://github.com/danog/tg-dialog-id/tree/1.1.0" + "source": "https://github.com/danog/tg-dialog-id/tree/1.2.0" }, "funding": [ { @@ -2870,7 +2870,7 @@ "type": "github" } ], - "time": "2024-08-16T12:08:16+00:00" + "time": "2025-06-04T20:13:39+00:00" }, { "name": "danog/tg-file-decoder", From 8f099ec7d0739c005bbc6472025952b9f532e15a Mon Sep 17 00:00:00 2001 From: Alexander Pankratov Date: Thu, 5 Jun 2025 22:18:34 +0200 Subject: [PATCH 233/270] Store methods in lower case --- src/Controllers/ApiController.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/Controllers/ApiController.php b/src/Controllers/ApiController.php index 2553c72..da9edcc 100644 --- a/src/Controllers/ApiController.php +++ b/src/Controllers/ApiController.php @@ -34,7 +34,7 @@ public function __construct() } $name = $method->getName(); $needRequest = array_key_exists('request', $args); - $this->methods[$method->getName()] = function (API $API, ...$params) use ($args, $name, $needRequest) { + $this->methods[mb_strtolower($name)] = function (API $API, ...$params) use ($args, $name, $needRequest) { return $this->extension->{$name}($API, ...self::prepareArgs($needRequest, $params, $args)); }; } @@ -47,7 +47,7 @@ public function __construct() } $name = $method->getName(); $needRequest = array_key_exists('request', $args); - $this->methodsMadeline[$method->getName()] = function (API|MTProto $API, ...$params) use ($args, $name, $needRequest) { + $this->methodsMadeline[mb_strtolower($name)] = function (API|MTProto $API, ...$params) use ($args, $name, $needRequest) { return $API->{$name}(...self::prepareArgs($needRequest, $params, $args)); }; } @@ -104,10 +104,10 @@ protected function callApi(Request $request): mixed private function callApiCommon(API $madelineProto, array $api, array $parameters) { $pathCount = \count($api); - if ($pathCount === 1 && \array_key_exists($api[0], $this->methods)) { - $result = $this->methods[$api[0]]($madelineProto, ...$parameters); + if ($pathCount === 1 && \array_key_exists(mb_strtolower($api[0]), $this->methods)) { + $result = $this->methods[mb_strtolower($api[0])]($madelineProto, ...$parameters); } else { - if ($api[0] === 'API') { + if (mb_strtolower($api[0]) === 'api') { $madelineProto = Client::getWrapper($madelineProto)->getAPI(); \array_shift($api); $pathCount = \count($api); @@ -115,7 +115,7 @@ private function callApiCommon(API $madelineProto, array $api, array $parameters //Проверяем нет ли в MadilineProto такого метода. switch ($pathCount) { case 1: - $result = $this->methodsMadeline[$api[0]]($madelineProto, ...$parameters); + $result = $this->methodsMadeline[mb_strtolower($api[0])]($madelineProto, ...$parameters); break; case 2: $result = $madelineProto->{$api[0]}->{$api[1]}(...$parameters); From 3fcab83f52c0ff217648944ba0471d512bccd238 Mon Sep 17 00:00:00 2001 From: Alexander Pankratov Date: Tue, 17 Jun 2025 15:46:55 +0200 Subject: [PATCH 234/270] Fix: Dont remove settings if session not stored in mysql --- server.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/server.php b/server.php index 31935bf..cd1689b 100644 --- a/server.php +++ b/server.php @@ -85,7 +85,9 @@ StartUpFixes::fix(); foreach ($sessions as $session) { StartUpFixes::removeBrokenIpc($session); - StartUpFixes::removeOldSettings($session); + if ((string)getenv('DB_HOST') === 'mysql') { + StartUpFixes::removeOldSettings($session); + } } new TelegramApiServer\Server\Server( $options, From 2de7053f24ad6b6c3aeb9da163971422014df8db Mon Sep 17 00:00:00 2001 From: Alexander Pankratov Date: Thu, 3 Jul 2025 22:08:18 +0200 Subject: [PATCH 235/270] Fix: healthcheck --- docker-compose.base.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker-compose.base.yml b/docker-compose.base.yml index 5804ddf..db94701 100644 --- a/docker-compose.base.yml +++ b/docker-compose.base.yml @@ -19,7 +19,7 @@ services: max-size: "1024k" max-file: "2" healthcheck: - test: timeout 15 curl -f http://localhost:9503/system/healthcheck || sh -c 'kill -INT -1 && (sleep 5; kill -s 9 -1)' + test: timeout 15 curl -f http://localhost:9503/system/healthcheck || sh -c 'kill -INT 1 && (sleep 5; kill -s 9 1)' interval: 60s timeout: 30s retries: 1 From 2edb8467dfb96d0a67c90f2bc1ec9389697fca1f Mon Sep 17 00:00:00 2001 From: Alexander Pankratov Date: Fri, 4 Jul 2025 13:05:03 +0200 Subject: [PATCH 236/270] Revert "Fix: healthcheck" This reverts commit 2de7053f24ad6b6c3aeb9da163971422014df8db. --- docker-compose.base.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker-compose.base.yml b/docker-compose.base.yml index db94701..5804ddf 100644 --- a/docker-compose.base.yml +++ b/docker-compose.base.yml @@ -19,7 +19,7 @@ services: max-size: "1024k" max-file: "2" healthcheck: - test: timeout 15 curl -f http://localhost:9503/system/healthcheck || sh -c 'kill -INT 1 && (sleep 5; kill -s 9 1)' + test: timeout 15 curl -f http://localhost:9503/system/healthcheck || sh -c 'kill -INT -1 && (sleep 5; kill -s 9 -1)' interval: 60s timeout: 30s retries: 1 From 84f9d3b114e2ca86f16d4c9413e252841c222bef Mon Sep 17 00:00:00 2001 From: Alexander Pankratov Date: Mon, 7 Jul 2025 01:44:26 +0200 Subject: [PATCH 237/270] Fix: settings migration --- server.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server.php b/server.php index cd1689b..5dce1e2 100644 --- a/server.php +++ b/server.php @@ -85,7 +85,7 @@ StartUpFixes::fix(); foreach ($sessions as $session) { StartUpFixes::removeBrokenIpc($session); - if ((string)getenv('DB_HOST') === 'mysql') { + if ((string)getenv('DB_TYPE') !== 'memory') { StartUpFixes::removeOldSettings($session); } } From b21beedf5bf6e602f2d139ccb43ba55fbe731f1e Mon Sep 17 00:00:00 2001 From: Alexander Pankratov Date: Sun, 13 Jul 2025 21:41:36 +0200 Subject: [PATCH 238/270] Feat: Switch to own madelineproto fork --- composer.json | 6 ++ composer.lock | 222 +++++++++++++++++++++++++++++++------------------- 2 files changed, 145 insertions(+), 83 deletions(-) diff --git a/composer.json b/composer.json index 5a81b7d..7e5b6fa 100644 --- a/composer.json +++ b/composer.json @@ -17,6 +17,12 @@ "micro-service", "madelineproto" ], + "repositories": [ + { + "type": "github", + "url": "https://github.com/xtrime-ru/MadelineProto.git" + } + ], "require": { "php": "^8.2", "ext-json": "*", diff --git a/composer.lock b/composer.lock index 2da8c5f..defca59 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "788bbdd4aae8a1600ea0748e878b9934", + "content-hash": "943b7f6849887142f37e17d5c228f2ce", "packages": [ { "name": "amphp/amp", @@ -1750,16 +1750,16 @@ }, { "name": "amphp/sql-common", - "version": "v2.0.2", + "version": "v2.0.3", "source": { "type": "git", "url": "https://github.com/amphp/sql-common.git", - "reference": "069183d57f17f85c60842ea3a8ce5ff52dba5399" + "reference": "0c926e0348c238c61bead25af5c2fa0d5afaed8d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/amphp/sql-common/zipball/069183d57f17f85c60842ea3a8ce5ff52dba5399", - "reference": "069183d57f17f85c60842ea3a8ce5ff52dba5399", + "url": "https://api.github.com/repos/amphp/sql-common/zipball/0c926e0348c238c61bead25af5c2fa0d5afaed8d", + "reference": "0c926e0348c238c61bead25af5c2fa0d5afaed8d", "shasum": "" }, "require": { @@ -1794,7 +1794,7 @@ ], "support": { "issues": "https://github.com/amphp/sql-common/issues", - "source": "https://github.com/amphp/sql-common/tree/v2.0.2" + "source": "https://github.com/amphp/sql-common/tree/v2.0.3" }, "funding": [ { @@ -1802,7 +1802,7 @@ "type": "github" } ], - "time": "2024-10-27T16:04:14+00:00" + "time": "2025-06-07T15:35:29+00:00" }, { "name": "amphp/sync", @@ -2187,16 +2187,16 @@ }, { "name": "danog/async-orm", - "version": "1.1.3", + "version": "1.1.4", "source": { "type": "git", "url": "https://github.com/danog/AsyncOrm.git", - "reference": "77b2ef792b805db9a59fed1da515fd55f0ba75f5" + "reference": "495f335d8ddb9dae8b773025911191f31c45e9ea" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/danog/AsyncOrm/zipball/77b2ef792b805db9a59fed1da515fd55f0ba75f5", - "reference": "77b2ef792b805db9a59fed1da515fd55f0ba75f5", + "url": "https://api.github.com/repos/danog/AsyncOrm/zipball/495f335d8ddb9dae8b773025911191f31c45e9ea", + "reference": "495f335d8ddb9dae8b773025911191f31c45e9ea", "shasum": "" }, "require": { @@ -2240,7 +2240,7 @@ "description": "Async ORM based on AMPHP v3 and fibers.", "support": { "issues": "https://github.com/danog/AsyncOrm/issues", - "source": "https://github.com/danog/AsyncOrm/tree/1.1.3" + "source": "https://github.com/danog/AsyncOrm/tree/1.1.4" }, "funding": [ { @@ -2248,7 +2248,7 @@ "type": "github" } ], - "time": "2025-05-18T16:18:44+00:00" + "time": "2025-07-12T18:39:01+00:00" }, { "name": "danog/better-prometheus", @@ -2586,13 +2586,13 @@ "version": "dev-v8-tas", "source": { "type": "git", - "url": "https://github.com/danog/MadelineProto.git", - "reference": "dd19f6e462ef609af7fd9eabae3f02d94bec0ca2" + "url": "https://github.com/xtrime-ru/MadelineProto.git", + "reference": "7eec3dd9f6596bc501ab6e10de313b6ea0dedc1b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/danog/MadelineProto/zipball/dd19f6e462ef609af7fd9eabae3f02d94bec0ca2", - "reference": "dd19f6e462ef609af7fd9eabae3f02d94bec0ca2", + "url": "https://api.github.com/repos/xtrime-ru/MadelineProto/zipball/7eec3dd9f6596bc501ab6e10de313b6ea0dedc1b", + "reference": "7eec3dd9f6596bc501ab6e10de313b6ea0dedc1b", "shasum": "" }, "require": { @@ -2611,14 +2611,14 @@ "amphp/socket": "^2.3.1", "amphp/websocket-client": "^2.0.1", "bacon/bacon-qr-code": "^3.0.1", - "danog/async-orm": "^1.1.3", + "danog/async-orm": "^1.1.4", "danog/better-prometheus": "^0.1.1", "danog/dns-over-https": "^1.0.1", "danog/ipc": "^1.0.1", "danog/loop": "^1.1.1", "danog/primemodule": "^1.0.13", - "danog/telegram-entities": "^1.0.4", - "danog/tg-dialog-id": "^1.2.0", + "danog/telegram-entities": "^1.0.5", + "danog/tg-dialog-id": "^2", "danog/tg-file-decoder": "^1.0.2", "ext-dom": "*", "ext-fileinfo": "*", @@ -2630,7 +2630,7 @@ "league/uri": "^7.5.1", "nikic/php-parser": "^5.5.0", "php-64bit": ">=8.2", - "phpseclib/phpseclib": "^3.0.43", + "phpseclib/phpseclib": "^3.0.46", "psr/http-factory": "^1.1.0", "psr/log": "^3.0.2", "revolt/event-loop": "^1.0.7", @@ -2651,7 +2651,7 @@ "ext-ctype": "*", "phpunit/phpunit": "^9.6.23", "revolt/event-loop-adapter-react": "^1.1.1", - "symfony/yaml": "^6.4.21", + "symfony/yaml": "^6.4.23", "vimeo/psalm": "dev-master" }, "suggest": { @@ -2665,14 +2665,70 @@ }, "type": "library", "autoload": { + "psr-4": { + "danog\\MadelineProto\\": "src" + }, "files": [ "src/polyfill.php" - ], + ] + }, + "autoload-dev": { "psr-4": { - "danog\\MadelineProto\\": "src" - } + "danog\\MadelineProto\\Test\\": "tests/danog/MadelineProto", + "danog\\MadelineProto\\": "tools/" + }, + "files": [ + "tools/build_docs/schemas.php", + "tools/build_docs/merge.php", + "tools/build_docs/layerUpgrade.php" + ] + }, + "scripts": { + "build": [ + "@docs", + "@docs-fix", + "@cs-fix", + "@fuzz", + "@psalm", + "@test-light" + ], + "test": [ + "@paratest" + ], + "test-light": [ + "@paratest-light" + ], + "cs-fix": [ + "PHP_CS_FIXER_IGNORE_ENV=1 php -d pcre.jit=0 vendor/bin/php-cs-fixer fix -v" + ], + "psalm": [ + "psalm --no-cache --threads=10" + ], + "docs": [ + "php tools/build_docs.php" + ], + "fuzz": [ + "php tools/fuzzer.php" + ], + "docs-fix": [ + "tools/fix_docs.sh" + ], + "paratest": [ + "@php -dzend.assertions=1 ./vendor/bin/paratest -fv" + ], + "paratest-light": [ + "@php -dzend.assertions=1 ./vendor/bin/paratest -fvc phpunit-light.xml" + ], + "bin": [ + "echo 'bin not installed'" + ], + "post-install-cmd": [ + "@composer bin all install --ansi" + ], + "post-update-cmd": [ + "@composer bin all update --ansi" + ] }, - "notification-url": "https://packagist.org/downloads/", "license": [ "AGPL-3.0-only" ], @@ -2686,29 +2742,28 @@ "homepage": "https://docs.madelineproto.xyz", "keywords": [ "GB", - "Messenger", + "PHP", "audio", "bytes", "client", "files", + "messenger", "mtproto", - "php", "protocol", "stickers", "telegram", "video" ], "support": { - "issues": "https://github.com/danog/MadelineProto/issues", - "source": "https://github.com/danog/MadelineProto/tree/v8-tas" + "source": "https://github.com/xtrime-ru/MadelineProto/tree/v8-tas" }, "funding": [ { - "url": "https://github.com/danog", - "type": "github" + "type": "github", + "url": "https://github.com/danog" } ], - "time": "2025-06-04T20:39:46+00:00" + "time": "2025-07-13T19:35:37+00:00" }, { "name": "danog/primemodule", @@ -2763,16 +2818,16 @@ }, { "name": "danog/telegram-entities", - "version": "1.0.4", + "version": "1.0.5", "source": { "type": "git", "url": "https://github.com/danog/telegram-entities.git", - "reference": "5202723d6d19471504f7d51130069c45fec952c2" + "reference": "19ab8a48bc4b9519c4493e2c62eb171fba8b58b4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/danog/telegram-entities/zipball/5202723d6d19471504f7d51130069c45fec952c2", - "reference": "5202723d6d19471504f7d51130069c45fec952c2", + "url": "https://api.github.com/repos/danog/telegram-entities/zipball/19ab8a48bc4b9519c4493e2c62eb171fba8b58b4", + "reference": "19ab8a48bc4b9519c4493e2c62eb171fba8b58b4", "shasum": "" }, "require": { @@ -2808,7 +2863,7 @@ "description": "A library to work with Telegram UTF-16 styled text entities.", "support": { "issues": "https://github.com/danog/telegram-entities/issues", - "source": "https://github.com/danog/telegram-entities/tree/1.0.4" + "source": "https://github.com/danog/telegram-entities/tree/1.0.5" }, "funding": [ { @@ -2816,20 +2871,20 @@ "type": "github" } ], - "time": "2024-05-09T18:33:35+00:00" + "time": "2025-06-22T12:27:39+00:00" }, { "name": "danog/tg-dialog-id", - "version": "1.2.0", + "version": "2.0.0", "source": { "type": "git", "url": "https://github.com/danog/tg-dialog-id.git", - "reference": "ff4d75f7a40fb3826f0a7c3f67fa734b644ca807" + "reference": "d03c653b2dad43d739675c83a6e8fa14b3b43636" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/danog/tg-dialog-id/zipball/ff4d75f7a40fb3826f0a7c3f67fa734b644ca807", - "reference": "ff4d75f7a40fb3826f0a7c3f67fa734b644ca807", + "url": "https://api.github.com/repos/danog/tg-dialog-id/zipball/d03c653b2dad43d739675c83a6e8fa14b3b43636", + "reference": "d03c653b2dad43d739675c83a6e8fa14b3b43636", "shasum": "" }, "require": { @@ -2862,7 +2917,7 @@ "description": "A library to work with Telegram bot API dialog IDs", "support": { "issues": "https://github.com/danog/tg-dialog-id/issues", - "source": "https://github.com/danog/tg-dialog-id/tree/1.2.0" + "source": "https://github.com/danog/tg-dialog-id/tree/2.0.0" }, "funding": [ { @@ -2870,7 +2925,7 @@ "type": "github" } ], - "time": "2025-06-04T20:13:39+00:00" + "time": "2025-06-28T15:36:24+00:00" }, { "name": "danog/tg-file-decoder", @@ -3809,16 +3864,16 @@ }, { "name": "phpseclib/phpseclib", - "version": "3.0.43", + "version": "3.0.46", "source": { "type": "git", "url": "https://github.com/phpseclib/phpseclib.git", - "reference": "709ec107af3cb2f385b9617be72af8cf62441d02" + "reference": "56483a7de62a6c2a6635e42e93b8a9e25d4f0ec6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpseclib/phpseclib/zipball/709ec107af3cb2f385b9617be72af8cf62441d02", - "reference": "709ec107af3cb2f385b9617be72af8cf62441d02", + "url": "https://api.github.com/repos/phpseclib/phpseclib/zipball/56483a7de62a6c2a6635e42e93b8a9e25d4f0ec6", + "reference": "56483a7de62a6c2a6635e42e93b8a9e25d4f0ec6", "shasum": "" }, "require": { @@ -3899,7 +3954,7 @@ ], "support": { "issues": "https://github.com/phpseclib/phpseclib/issues", - "source": "https://github.com/phpseclib/phpseclib/tree/3.0.43" + "source": "https://github.com/phpseclib/phpseclib/tree/3.0.46" }, "funding": [ { @@ -3915,7 +3970,7 @@ "type": "tidelift" } ], - "time": "2024-12-14T21:12:59+00:00" + "time": "2025-06-26T16:29:55+00:00" }, { "name": "promphp/prometheus_client_php", @@ -5129,58 +5184,59 @@ }, { "name": "friendsofphp/php-cs-fixer", - "version": "v3.75.0", + "version": "v3.82.2", "source": { "type": "git", "url": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer.git", - "reference": "399a128ff2fdaf4281e4e79b755693286cdf325c" + "reference": "684ed3ab41008a2a4848de8bde17eb168c596247" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/PHP-CS-Fixer/PHP-CS-Fixer/zipball/399a128ff2fdaf4281e4e79b755693286cdf325c", - "reference": "399a128ff2fdaf4281e4e79b755693286cdf325c", + "url": "https://api.github.com/repos/PHP-CS-Fixer/PHP-CS-Fixer/zipball/684ed3ab41008a2a4848de8bde17eb168c596247", + "reference": "684ed3ab41008a2a4848de8bde17eb168c596247", "shasum": "" }, "require": { "clue/ndjson-react": "^1.0", "composer/semver": "^3.4", - "composer/xdebug-handler": "^3.0.3", + "composer/xdebug-handler": "^3.0.5", "ext-filter": "*", "ext-hash": "*", "ext-json": "*", "ext-tokenizer": "*", "fidry/cpu-core-counter": "^1.2", "php": "^7.4 || ^8.0", - "react/child-process": "^0.6.5", + "react/child-process": "^0.6.6", "react/event-loop": "^1.0", - "react/promise": "^2.0 || ^3.0", + "react/promise": "^2.11 || ^3.0", "react/socket": "^1.0", "react/stream": "^1.0", - "sebastian/diff": "^4.0 || ^5.1 || ^6.0 || ^7.0", - "symfony/console": "^5.4 || ^6.4 || ^7.0", - "symfony/event-dispatcher": "^5.4 || ^6.4 || ^7.0", - "symfony/filesystem": "^5.4 || ^6.4 || ^7.0", - "symfony/finder": "^5.4 || ^6.4 || ^7.0", - "symfony/options-resolver": "^5.4 || ^6.4 || ^7.0", - "symfony/polyfill-mbstring": "^1.31", - "symfony/polyfill-php80": "^1.31", - "symfony/polyfill-php81": "^1.31", - "symfony/process": "^5.4 || ^6.4 || ^7.2", - "symfony/stopwatch": "^5.4 || ^6.4 || ^7.0" + "sebastian/diff": "^4.0.6 || ^5.1.1 || ^6.0.2 || ^7.0", + "symfony/console": "^5.4.45 || ^6.4.13 || ^7.0", + "symfony/event-dispatcher": "^5.4.45 || ^6.4.13 || ^7.0", + "symfony/filesystem": "^5.4.45 || ^6.4.13 || ^7.0", + "symfony/finder": "^5.4.45 || ^6.4.17 || ^7.0", + "symfony/options-resolver": "^5.4.45 || ^6.4.16 || ^7.0", + "symfony/polyfill-mbstring": "^1.32", + "symfony/polyfill-php80": "^1.32", + "symfony/polyfill-php81": "^1.32", + "symfony/process": "^5.4.47 || ^6.4.20 || ^7.2", + "symfony/stopwatch": "^5.4.45 || ^6.4.19 || ^7.0" }, "require-dev": { "facile-it/paraunit": "^1.3.1 || ^2.6", "infection/infection": "^0.29.14", - "justinrainbow/json-schema": "^5.3 || ^6.2", - "keradus/cli-executor": "^2.1", + "justinrainbow/json-schema": "^5.3 || ^6.4", + "keradus/cli-executor": "^2.2", "mikey179/vfsstream": "^1.6.12", - "php-coveralls/php-coveralls": "^2.7", + "php-coveralls/php-coveralls": "^2.8", "php-cs-fixer/accessible-object": "^1.1", "php-cs-fixer/phpunit-constraint-isidenticalstring": "^1.6", "php-cs-fixer/phpunit-constraint-xmlmatchesxsd": "^1.6", - "phpunit/phpunit": "^9.6.22 || ^10.5.45 || ^11.5.12", - "symfony/var-dumper": "^5.4.48 || ^6.4.18 || ^7.2.3", - "symfony/yaml": "^5.4.45 || ^6.4.18 || ^7.2.3" + "phpunit/phpunit": "^9.6.23 || ^10.5.47 || ^11.5.25", + "symfony/polyfill-php84": "^1.32", + "symfony/var-dumper": "^5.4.48 || ^6.4.23 || ^7.3.1", + "symfony/yaml": "^5.4.45 || ^6.4.23 || ^7.3.1" }, "suggest": { "ext-dom": "For handling output formats in XML", @@ -5221,7 +5277,7 @@ ], "support": { "issues": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/issues", - "source": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/tree/v3.75.0" + "source": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/tree/v3.82.2" }, "funding": [ { @@ -5229,7 +5285,7 @@ "type": "github" } ], - "time": "2025-03-31T18:40:42+00:00" + "time": "2025-07-08T21:13:15+00:00" }, { "name": "psr/container", @@ -5929,16 +5985,16 @@ }, { "name": "symfony/console", - "version": "v7.3.0", + "version": "v7.3.1", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "66c1440edf6f339fd82ed6c7caa76cb006211b44" + "reference": "9e27aecde8f506ba0fd1d9989620c04a87697101" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/66c1440edf6f339fd82ed6c7caa76cb006211b44", - "reference": "66c1440edf6f339fd82ed6c7caa76cb006211b44", + "url": "https://api.github.com/repos/symfony/console/zipball/9e27aecde8f506ba0fd1d9989620c04a87697101", + "reference": "9e27aecde8f506ba0fd1d9989620c04a87697101", "shasum": "" }, "require": { @@ -6003,7 +6059,7 @@ "terminal" ], "support": { - "source": "https://github.com/symfony/console/tree/v7.3.0" + "source": "https://github.com/symfony/console/tree/v7.3.1" }, "funding": [ { @@ -6019,7 +6075,7 @@ "type": "tidelift" } ], - "time": "2025-05-24T10:34:04+00:00" + "time": "2025-06-27T19:55:54+00:00" }, { "name": "symfony/deprecation-contracts", From 4839c3d072bae8b07f9d072964a0bfcbff585ae9 Mon Sep 17 00:00:00 2001 From: Alexander Pankratov Date: Sun, 13 Jul 2025 21:55:37 +0200 Subject: [PATCH 239/270] Feat: Switch to own madelineproto fork --- composer.lock | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/composer.lock b/composer.lock index defca59..22410c3 100644 --- a/composer.lock +++ b/composer.lock @@ -2587,12 +2587,12 @@ "source": { "type": "git", "url": "https://github.com/xtrime-ru/MadelineProto.git", - "reference": "7eec3dd9f6596bc501ab6e10de313b6ea0dedc1b" + "reference": "31371e46e2a15d8e10d03cd8078a743b2371add5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/xtrime-ru/MadelineProto/zipball/7eec3dd9f6596bc501ab6e10de313b6ea0dedc1b", - "reference": "7eec3dd9f6596bc501ab6e10de313b6ea0dedc1b", + "url": "https://api.github.com/repos/xtrime-ru/MadelineProto/zipball/31371e46e2a15d8e10d03cd8078a743b2371add5", + "reference": "31371e46e2a15d8e10d03cd8078a743b2371add5", "shasum": "" }, "require": { @@ -2763,7 +2763,7 @@ "url": "https://github.com/danog" } ], - "time": "2025-07-13T19:35:37+00:00" + "time": "2025-07-13T19:54:20+00:00" }, { "name": "danog/primemodule", From 394b1dc37983addd6f9bf97e1ca7ccaec6ce0b86 Mon Sep 17 00:00:00 2001 From: Alexander Pankratov Date: Sun, 13 Jul 2025 21:56:58 +0200 Subject: [PATCH 240/270] Bump version in docker --- docker-compose.base.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker-compose.base.yml b/docker-compose.base.yml index 5804ddf..0c91d99 100644 --- a/docker-compose.base.yml +++ b/docker-compose.base.yml @@ -1,6 +1,6 @@ services: api: - image: xtrime/telegram-api-server:2.6 + image: xtrime/telegram-api-server:2.7 init: true build: context: . From ba05854fe493a1d5f49659b0ded92d94defde847 Mon Sep 17 00:00:00 2001 From: Alexander Pankratov Date: Fri, 8 Aug 2025 11:53:36 +0200 Subject: [PATCH 241/270] Bump madelineProto --- composer.lock | 128 ++++++++++++++++++++++++++++++-------------------- 1 file changed, 76 insertions(+), 52 deletions(-) diff --git a/composer.lock b/composer.lock index 22410c3..6028cb8 100644 --- a/composer.lock +++ b/composer.lock @@ -2587,12 +2587,12 @@ "source": { "type": "git", "url": "https://github.com/xtrime-ru/MadelineProto.git", - "reference": "31371e46e2a15d8e10d03cd8078a743b2371add5" + "reference": "2664a8f511ee1a9d09ff6bd8a560a647b26327f5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/xtrime-ru/MadelineProto/zipball/31371e46e2a15d8e10d03cd8078a743b2371add5", - "reference": "31371e46e2a15d8e10d03cd8078a743b2371add5", + "url": "https://api.github.com/repos/xtrime-ru/MadelineProto/zipball/2664a8f511ee1a9d09ff6bd8a560a647b26327f5", + "reference": "2664a8f511ee1a9d09ff6bd8a560a647b26327f5", "shasum": "" }, "require": { @@ -2689,6 +2689,7 @@ "@docs-fix", "@cs-fix", "@fuzz", + "@file_ref_map", "@psalm", "@test-light" ], @@ -2710,6 +2711,9 @@ "fuzz": [ "php tools/fuzzer.php" ], + "file_ref_map": [ + "php tools/gen_filerefmap.php" + ], "docs-fix": [ "tools/fix_docs.sh" ], @@ -2763,7 +2767,7 @@ "url": "https://github.com/danog" } ], - "time": "2025-07-13T19:54:20+00:00" + "time": "2025-08-08T09:28:49+00:00" }, { "name": "danog/primemodule", @@ -3614,16 +3618,16 @@ }, { "name": "nikic/php-parser", - "version": "v5.5.0", + "version": "v5.6.0", "source": { "type": "git", "url": "https://github.com/nikic/PHP-Parser.git", - "reference": "ae59794362fe85e051a58ad36b289443f57be7a9" + "reference": "221b0d0fdf1369c71047ad1d18bb5880017bbc56" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/ae59794362fe85e051a58ad36b289443f57be7a9", - "reference": "ae59794362fe85e051a58ad36b289443f57be7a9", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/221b0d0fdf1369c71047ad1d18bb5880017bbc56", + "reference": "221b0d0fdf1369c71047ad1d18bb5880017bbc56", "shasum": "" }, "require": { @@ -3666,9 +3670,9 @@ ], "support": { "issues": "https://github.com/nikic/PHP-Parser/issues", - "source": "https://github.com/nikic/PHP-Parser/tree/v5.5.0" + "source": "https://github.com/nikic/PHP-Parser/tree/v5.6.0" }, - "time": "2025-05-31T08:24:38+00:00" + "time": "2025-07-27T20:03:57+00:00" }, { "name": "paragonie/constant_time_encoding", @@ -5184,20 +5188,20 @@ }, { "name": "friendsofphp/php-cs-fixer", - "version": "v3.82.2", + "version": "v3.85.1", "source": { "type": "git", "url": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer.git", - "reference": "684ed3ab41008a2a4848de8bde17eb168c596247" + "reference": "2fb6d7f6c3398dca5786a1635b27405d73a417ba" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/PHP-CS-Fixer/PHP-CS-Fixer/zipball/684ed3ab41008a2a4848de8bde17eb168c596247", - "reference": "684ed3ab41008a2a4848de8bde17eb168c596247", + "url": "https://api.github.com/repos/PHP-CS-Fixer/PHP-CS-Fixer/zipball/2fb6d7f6c3398dca5786a1635b27405d73a417ba", + "reference": "2fb6d7f6c3398dca5786a1635b27405d73a417ba", "shasum": "" }, "require": { - "clue/ndjson-react": "^1.0", + "clue/ndjson-react": "^1.3", "composer/semver": "^3.4", "composer/xdebug-handler": "^3.0.5", "ext-filter": "*", @@ -5207,12 +5211,12 @@ "fidry/cpu-core-counter": "^1.2", "php": "^7.4 || ^8.0", "react/child-process": "^0.6.6", - "react/event-loop": "^1.0", - "react/promise": "^2.11 || ^3.0", - "react/socket": "^1.0", - "react/stream": "^1.0", + "react/event-loop": "^1.5", + "react/promise": "^3.2", + "react/socket": "^1.16", + "react/stream": "^1.4", "sebastian/diff": "^4.0.6 || ^5.1.1 || ^6.0.2 || ^7.0", - "symfony/console": "^5.4.45 || ^6.4.13 || ^7.0", + "symfony/console": "^5.4.47 || ^6.4.13 || ^7.0", "symfony/event-dispatcher": "^5.4.45 || ^6.4.13 || ^7.0", "symfony/filesystem": "^5.4.45 || ^6.4.13 || ^7.0", "symfony/finder": "^5.4.45 || ^6.4.17 || ^7.0", @@ -5277,7 +5281,7 @@ ], "support": { "issues": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/issues", - "source": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/tree/v3.82.2" + "source": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/tree/v3.85.1" }, "funding": [ { @@ -5285,7 +5289,7 @@ "type": "github" } ], - "time": "2025-07-08T21:13:15+00:00" + "time": "2025-07-29T22:22:50+00:00" }, { "name": "psr/container", @@ -5985,16 +5989,16 @@ }, { "name": "symfony/console", - "version": "v7.3.1", + "version": "v7.3.2", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "9e27aecde8f506ba0fd1d9989620c04a87697101" + "reference": "5f360ebc65c55265a74d23d7fe27f957870158a1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/9e27aecde8f506ba0fd1d9989620c04a87697101", - "reference": "9e27aecde8f506ba0fd1d9989620c04a87697101", + "url": "https://api.github.com/repos/symfony/console/zipball/5f360ebc65c55265a74d23d7fe27f957870158a1", + "reference": "5f360ebc65c55265a74d23d7fe27f957870158a1", "shasum": "" }, "require": { @@ -6059,7 +6063,7 @@ "terminal" ], "support": { - "source": "https://github.com/symfony/console/tree/v7.3.1" + "source": "https://github.com/symfony/console/tree/v7.3.2" }, "funding": [ { @@ -6070,12 +6074,16 @@ "url": "https://github.com/fabpot", "type": "github" }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, { "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", "type": "tidelift" } ], - "time": "2025-06-27T19:55:54+00:00" + "time": "2025-07-30T17:13:41+00:00" }, { "name": "symfony/deprecation-contracts", @@ -6302,16 +6310,16 @@ }, { "name": "symfony/filesystem", - "version": "v7.3.0", + "version": "v7.3.2", "source": { "type": "git", "url": "https://github.com/symfony/filesystem.git", - "reference": "b8dce482de9d7c9fe2891155035a7248ab5c7fdb" + "reference": "edcbb768a186b5c3f25d0643159a787d3e63b7fd" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/filesystem/zipball/b8dce482de9d7c9fe2891155035a7248ab5c7fdb", - "reference": "b8dce482de9d7c9fe2891155035a7248ab5c7fdb", + "url": "https://api.github.com/repos/symfony/filesystem/zipball/edcbb768a186b5c3f25d0643159a787d3e63b7fd", + "reference": "edcbb768a186b5c3f25d0643159a787d3e63b7fd", "shasum": "" }, "require": { @@ -6348,7 +6356,7 @@ "description": "Provides basic utilities for the filesystem", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/filesystem/tree/v7.3.0" + "source": "https://github.com/symfony/filesystem/tree/v7.3.2" }, "funding": [ { @@ -6359,25 +6367,29 @@ "url": "https://github.com/fabpot", "type": "github" }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, { "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", "type": "tidelift" } ], - "time": "2024-10-25T15:15:23+00:00" + "time": "2025-07-07T08:17:47+00:00" }, { "name": "symfony/finder", - "version": "v7.3.0", + "version": "v7.3.2", "source": { "type": "git", "url": "https://github.com/symfony/finder.git", - "reference": "ec2344cf77a48253bbca6939aa3d2477773ea63d" + "reference": "2a6614966ba1074fa93dae0bc804227422df4dfe" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/finder/zipball/ec2344cf77a48253bbca6939aa3d2477773ea63d", - "reference": "ec2344cf77a48253bbca6939aa3d2477773ea63d", + "url": "https://api.github.com/repos/symfony/finder/zipball/2a6614966ba1074fa93dae0bc804227422df4dfe", + "reference": "2a6614966ba1074fa93dae0bc804227422df4dfe", "shasum": "" }, "require": { @@ -6412,7 +6424,7 @@ "description": "Finds files and directories via an intuitive fluent interface", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/finder/tree/v7.3.0" + "source": "https://github.com/symfony/finder/tree/v7.3.2" }, "funding": [ { @@ -6423,25 +6435,29 @@ "url": "https://github.com/fabpot", "type": "github" }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, { "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", "type": "tidelift" } ], - "time": "2024-12-30T19:00:26+00:00" + "time": "2025-07-15T13:41:35+00:00" }, { "name": "symfony/options-resolver", - "version": "v7.3.0", + "version": "v7.3.2", "source": { "type": "git", "url": "https://github.com/symfony/options-resolver.git", - "reference": "afb9a8038025e5dbc657378bfab9198d75f10fca" + "reference": "119bcf13e67dbd188e5dbc74228b1686f66acd37" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/options-resolver/zipball/afb9a8038025e5dbc657378bfab9198d75f10fca", - "reference": "afb9a8038025e5dbc657378bfab9198d75f10fca", + "url": "https://api.github.com/repos/symfony/options-resolver/zipball/119bcf13e67dbd188e5dbc74228b1686f66acd37", + "reference": "119bcf13e67dbd188e5dbc74228b1686f66acd37", "shasum": "" }, "require": { @@ -6479,7 +6495,7 @@ "options" ], "support": { - "source": "https://github.com/symfony/options-resolver/tree/v7.3.0" + "source": "https://github.com/symfony/options-resolver/tree/v7.3.2" }, "funding": [ { @@ -6490,12 +6506,16 @@ "url": "https://github.com/fabpot", "type": "github" }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, { "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", "type": "tidelift" } ], - "time": "2025-04-04T13:12:05+00:00" + "time": "2025-07-15T11:36:08+00:00" }, { "name": "symfony/polyfill-intl-grapheme", @@ -6940,16 +6960,16 @@ }, { "name": "symfony/string", - "version": "v7.3.0", + "version": "v7.3.2", "source": { "type": "git", "url": "https://github.com/symfony/string.git", - "reference": "f3570b8c61ca887a9e2938e85cb6458515d2b125" + "reference": "42f505aff654e62ac7ac2ce21033818297ca89ca" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/string/zipball/f3570b8c61ca887a9e2938e85cb6458515d2b125", - "reference": "f3570b8c61ca887a9e2938e85cb6458515d2b125", + "url": "https://api.github.com/repos/symfony/string/zipball/42f505aff654e62ac7ac2ce21033818297ca89ca", + "reference": "42f505aff654e62ac7ac2ce21033818297ca89ca", "shasum": "" }, "require": { @@ -7007,7 +7027,7 @@ "utf8" ], "support": { - "source": "https://github.com/symfony/string/tree/v7.3.0" + "source": "https://github.com/symfony/string/tree/v7.3.2" }, "funding": [ { @@ -7018,12 +7038,16 @@ "url": "https://github.com/fabpot", "type": "github" }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, { "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", "type": "tidelift" } ], - "time": "2025-04-20T20:19:01+00:00" + "time": "2025-07-10T08:47:49+00:00" } ], "aliases": [], From 3a4c82432a3ff84b2034a97d9689a61cd776639c Mon Sep 17 00:00:00 2001 From: Alexander Pankratov Date: Tue, 12 Aug 2025 17:59:07 +0200 Subject: [PATCH 242/270] Increase timeouts --- config.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/config.php b/config.php index 5a8855d..94fd211 100644 --- a/config.php +++ b/config.php @@ -36,7 +36,8 @@ static function (string $peer): string|int { 'level' => (int)getenv('LOGGER_LEVEL'), // Logging level, available logging levels are: ULTRA_VERBOSE - 5, VERBOSE - 4 , NOTICE - 3, WARNING - 2, ERROR - 1, FATAL_ERROR - 0. ], 'rpc' => [ - 'flood_timeout' => 5, + 'flood_timeout' => 15, + 'rpc_resend_timeout' => 10, 'rpc_drop_timeout' => 20, ], 'connection' => [ From bb8b49d4b905cff2c12a5aa362da86f0934bd287 Mon Sep 17 00:00:00 2001 From: Alexander Pankratov Date: Wed, 13 Aug 2025 11:43:55 +0200 Subject: [PATCH 243/270] Fix prometheus settings --- .env.docker.example | 2 +- config.php | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.env.docker.example b/.env.docker.example index 318f217..cb63641 100644 --- a/.env.docker.example +++ b/.env.docker.example @@ -69,7 +69,7 @@ DB_ENABLE_MIN_DATABASE=0 # Enable file metadata cache DB_ENABLE_FILE_REFERENCE_DATABASE=0 -PROMETHEUS_ENABLE=false +PROMETHEUS_ENABLE=0 PROMETHEUS_BIND_TO=0.0.0.0:12345 ERROR_NOTIFICATION_BOT_TOKEN= diff --git a/config.php b/config.php index 94fd211..b89b20d 100644 --- a/config.php +++ b/config.php @@ -76,8 +76,9 @@ static function (string $peer): string|int { 'download_parallel_chunks' => 20, ], 'metrics' => [ - 'enable_prometheus_collection' => (bool)getenv("PROMETHEUS_ENABLE"), - 'metrics_bind_to' => (bool)getenv("PROMETHEUS_ENABLE") ? fromString((string)getenv("PROMETHEUS_BIND_TO")) : null, + 'enable_prometheus_collection' => filter_var((string)getenv("PROMETHEUS_ENABLE"), FILTER_VALIDATE_BOOL), + 'enable_memprof_collection' => filter_var((string)getenv("PROMETHEUS_ENABLE"), FILTER_VALIDATE_BOOL), + 'metrics_bind_to' => filter_var((string)getenv("PROMETHEUS_ENABLE"), FILTER_VALIDATE_BOOL) ? fromString((string)getenv("PROMETHEUS_BIND_TO")) : null, ] ], 'api' => [ From 5d860c20199eda0008be74421377bf15e671dc15 Mon Sep 17 00:00:00 2001 From: Alexander Pankratov Date: Wed, 13 Aug 2025 16:01:14 +0200 Subject: [PATCH 244/270] Fix prometheus settings 2 --- config.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config.php b/config.php index b89b20d..759e5c1 100644 --- a/config.php +++ b/config.php @@ -77,7 +77,7 @@ static function (string $peer): string|int { ], 'metrics' => [ 'enable_prometheus_collection' => filter_var((string)getenv("PROMETHEUS_ENABLE"), FILTER_VALIDATE_BOOL), - 'enable_memprof_collection' => filter_var((string)getenv("PROMETHEUS_ENABLE"), FILTER_VALIDATE_BOOL), + 'enable_memprof_collection' => false, 'metrics_bind_to' => filter_var((string)getenv("PROMETHEUS_ENABLE"), FILTER_VALIDATE_BOOL) ? fromString((string)getenv("PROMETHEUS_BIND_TO")) : null, ] ], From ab0ea7129343529bd30b4f05003635b300b7ec33 Mon Sep 17 00:00:00 2001 From: Alexander Pankratov Date: Thu, 28 Aug 2025 11:31:08 +0200 Subject: [PATCH 245/270] Update madelineProto --- composer.lock | 208 ++++++++++++++++++++++++++++---------------------- config.php | 2 +- 2 files changed, 117 insertions(+), 93 deletions(-) diff --git a/composer.lock b/composer.lock index 6028cb8..068b8fb 100644 --- a/composer.lock +++ b/composer.lock @@ -542,16 +542,16 @@ }, { "name": "amphp/http-client", - "version": "v5.3.3", + "version": "v5.3.4", "source": { "type": "git", "url": "https://github.com/amphp/http-client.git", - "reference": "09212ebc2f34efb5e1eaac4374fef6b11a7d2fbc" + "reference": "75ad21574fd632594a2dd914496647816d5106bc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/amphp/http-client/zipball/09212ebc2f34efb5e1eaac4374fef6b11a7d2fbc", - "reference": "09212ebc2f34efb5e1eaac4374fef6b11a7d2fbc", + "url": "https://api.github.com/repos/amphp/http-client/zipball/75ad21574fd632594a2dd914496647816d5106bc", + "reference": "75ad21574fd632594a2dd914496647816d5106bc", "shasum": "" }, "require": { @@ -628,7 +628,7 @@ ], "support": { "issues": "https://github.com/amphp/http-client/issues", - "source": "https://github.com/amphp/http-client/tree/v5.3.3" + "source": "https://github.com/amphp/http-client/tree/v5.3.4" }, "funding": [ { @@ -636,7 +636,7 @@ "type": "github" } ], - "time": "2025-05-21T03:24:20+00:00" + "time": "2025-08-16T20:41:23+00:00" }, { "name": "amphp/http-client-cookies", @@ -1962,16 +1962,16 @@ }, { "name": "amphp/websocket-client", - "version": "v2.0.1", + "version": "v2.0.2", "source": { "type": "git", "url": "https://github.com/amphp/websocket-client.git", - "reference": "c388f19ebb70233489df5f0c995506d45001a026" + "reference": "dc033fdce0af56295a23f63ac4f579b34d470d6c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/amphp/websocket-client/zipball/c388f19ebb70233489df5f0c995506d45001a026", - "reference": "c388f19ebb70233489df5f0c995506d45001a026", + "url": "https://api.github.com/repos/amphp/websocket-client/zipball/dc033fdce0af56295a23f63ac4f579b34d470d6c", + "reference": "dc033fdce0af56295a23f63ac4f579b34d470d6c", "shasum": "" }, "require": { @@ -1981,7 +1981,7 @@ "amphp/http-client": "^5", "amphp/socket": "^2.2", "amphp/websocket": "^2", - "league/uri": "^6.8|^7.1", + "league/uri": "^7.1", "php": ">=8.1", "psr/http-message": "^1|^2", "revolt/event-loop": "^1" @@ -2034,7 +2034,7 @@ ], "support": { "issues": "https://github.com/amphp/websocket-client/issues", - "source": "https://github.com/amphp/websocket-client/tree/v2.0.1" + "source": "https://github.com/amphp/websocket-client/tree/v2.0.2" }, "funding": [ { @@ -2042,7 +2042,7 @@ "type": "github" } ], - "time": "2024-12-07T01:07:56+00:00" + "time": "2025-08-24T17:25:34+00:00" }, { "name": "amphp/websocket-server", @@ -2587,12 +2587,12 @@ "source": { "type": "git", "url": "https://github.com/xtrime-ru/MadelineProto.git", - "reference": "2664a8f511ee1a9d09ff6bd8a560a647b26327f5" + "reference": "d51fdd513a13ccd4aae930342e2a38b69a8c895a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/xtrime-ru/MadelineProto/zipball/2664a8f511ee1a9d09ff6bd8a560a647b26327f5", - "reference": "2664a8f511ee1a9d09ff6bd8a560a647b26327f5", + "url": "https://api.github.com/repos/xtrime-ru/MadelineProto/zipball/d51fdd513a13ccd4aae930342e2a38b69a8c895a", + "reference": "d51fdd513a13ccd4aae930342e2a38b69a8c895a", "shasum": "" }, "require": { @@ -2767,7 +2767,7 @@ "url": "https://github.com/danog" } ], - "time": "2025-08-08T09:28:49+00:00" + "time": "2025-08-28T09:29:57+00:00" }, { "name": "danog/primemodule", @@ -3618,16 +3618,16 @@ }, { "name": "nikic/php-parser", - "version": "v5.6.0", + "version": "v5.6.1", "source": { "type": "git", "url": "https://github.com/nikic/PHP-Parser.git", - "reference": "221b0d0fdf1369c71047ad1d18bb5880017bbc56" + "reference": "f103601b29efebd7ff4a1ca7b3eeea9e3336a2a2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/221b0d0fdf1369c71047ad1d18bb5880017bbc56", - "reference": "221b0d0fdf1369c71047ad1d18bb5880017bbc56", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/f103601b29efebd7ff4a1ca7b3eeea9e3336a2a2", + "reference": "f103601b29efebd7ff4a1ca7b3eeea9e3336a2a2", "shasum": "" }, "require": { @@ -3646,7 +3646,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "5.0-dev" + "dev-master": "5.x-dev" } }, "autoload": { @@ -3670,9 +3670,9 @@ ], "support": { "issues": "https://github.com/nikic/PHP-Parser/issues", - "source": "https://github.com/nikic/PHP-Parser/tree/v5.6.0" + "source": "https://github.com/nikic/PHP-Parser/tree/v5.6.1" }, - "time": "2025-07-27T20:03:57+00:00" + "time": "2025-08-13T20:13:15+00:00" }, { "name": "paragonie/constant_time_encoding", @@ -3793,16 +3793,16 @@ }, { "name": "phpoption/phpoption", - "version": "1.9.3", + "version": "1.9.4", "source": { "type": "git", "url": "https://github.com/schmittjoh/php-option.git", - "reference": "e3fac8b24f56113f7cb96af14958c0dd16330f54" + "reference": "638a154f8d4ee6a5cfa96d6a34dfbe0cffa9566d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/schmittjoh/php-option/zipball/e3fac8b24f56113f7cb96af14958c0dd16330f54", - "reference": "e3fac8b24f56113f7cb96af14958c0dd16330f54", + "url": "https://api.github.com/repos/schmittjoh/php-option/zipball/638a154f8d4ee6a5cfa96d6a34dfbe0cffa9566d", + "reference": "638a154f8d4ee6a5cfa96d6a34dfbe0cffa9566d", "shasum": "" }, "require": { @@ -3810,7 +3810,7 @@ }, "require-dev": { "bamarni/composer-bin-plugin": "^1.8.2", - "phpunit/phpunit": "^8.5.39 || ^9.6.20 || ^10.5.28" + "phpunit/phpunit": "^8.5.44 || ^9.6.25 || ^10.5.53 || ^11.5.34" }, "type": "library", "extra": { @@ -3852,7 +3852,7 @@ ], "support": { "issues": "https://github.com/schmittjoh/php-option/issues", - "source": "https://github.com/schmittjoh/php-option/tree/1.9.3" + "source": "https://github.com/schmittjoh/php-option/tree/1.9.4" }, "funding": [ { @@ -3864,7 +3864,7 @@ "type": "tidelift" } ], - "time": "2024-07-20T21:41:07+00:00" + "time": "2025-08-21T11:53:16+00:00" }, { "name": "phpseclib/phpseclib", @@ -4276,7 +4276,7 @@ }, { "name": "symfony/polyfill-ctype", - "version": "v1.32.0", + "version": "v1.33.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-ctype.git", @@ -4335,7 +4335,7 @@ "portable" ], "support": { - "source": "https://github.com/symfony/polyfill-ctype/tree/v1.32.0" + "source": "https://github.com/symfony/polyfill-ctype/tree/v1.33.0" }, "funding": [ { @@ -4346,6 +4346,10 @@ "url": "https://github.com/fabpot", "type": "github" }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, { "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", "type": "tidelift" @@ -4355,7 +4359,7 @@ }, { "name": "symfony/polyfill-mbstring", - "version": "v1.32.0", + "version": "v1.33.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-mbstring.git", @@ -4416,7 +4420,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.32.0" + "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.33.0" }, "funding": [ { @@ -4427,6 +4431,10 @@ "url": "https://github.com/fabpot", "type": "github" }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, { "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", "type": "tidelift" @@ -4436,7 +4444,7 @@ }, { "name": "symfony/polyfill-php80", - "version": "v1.32.0", + "version": "v1.33.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php80.git", @@ -4496,7 +4504,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php80/tree/v1.32.0" + "source": "https://github.com/symfony/polyfill-php80/tree/v1.33.0" }, "funding": [ { @@ -4507,6 +4515,10 @@ "url": "https://github.com/fabpot", "type": "github" }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, { "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", "type": "tidelift" @@ -4516,16 +4528,16 @@ }, { "name": "symfony/polyfill-php83", - "version": "v1.32.0", + "version": "v1.33.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php83.git", - "reference": "2fb86d65e2d424369ad2905e83b236a8805ba491" + "reference": "17f6f9a6b1735c0f163024d959f700cfbc5155e5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php83/zipball/2fb86d65e2d424369ad2905e83b236a8805ba491", - "reference": "2fb86d65e2d424369ad2905e83b236a8805ba491", + "url": "https://api.github.com/repos/symfony/polyfill-php83/zipball/17f6f9a6b1735c0f163024d959f700cfbc5155e5", + "reference": "17f6f9a6b1735c0f163024d959f700cfbc5155e5", "shasum": "" }, "require": { @@ -4572,7 +4584,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php83/tree/v1.32.0" + "source": "https://github.com/symfony/polyfill-php83/tree/v1.33.0" }, "funding": [ { @@ -4583,12 +4595,16 @@ "url": "https://github.com/fabpot", "type": "github" }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, { "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", "type": "tidelift" } ], - "time": "2024-09-09T11:45:10+00:00" + "time": "2025-07-08T02:45:35+00:00" }, { "name": "vlucas/phpdotenv", @@ -4736,16 +4752,16 @@ "packages-dev": [ { "name": "amphp/php-cs-fixer-config", - "version": "v2.1.0", + "version": "v2.1.1", "source": { "type": "git", "url": "https://github.com/amphp/php-cs-fixer-config.git", - "reference": "0fad9ec6a10a0a58fbf8cb77f41da34f80c031d6" + "reference": "1ec1eb49b0b1744d4d25c5381de78498f6e190de" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/amphp/php-cs-fixer-config/zipball/0fad9ec6a10a0a58fbf8cb77f41da34f80c031d6", - "reference": "0fad9ec6a10a0a58fbf8cb77f41da34f80c031d6", + "url": "https://api.github.com/repos/amphp/php-cs-fixer-config/zipball/1ec1eb49b0b1744d4d25c5381de78498f6e190de", + "reference": "1ec1eb49b0b1744d4d25c5381de78498f6e190de", "shasum": "" }, "require": { @@ -4778,7 +4794,7 @@ "description": "Code style config for AMPHP.", "support": { "issues": "https://github.com/amphp/php-cs-fixer-config/issues", - "source": "https://github.com/amphp/php-cs-fixer-config/tree/v2.1.0" + "source": "https://github.com/amphp/php-cs-fixer-config/tree/v2.1.1" }, "funding": [ { @@ -4786,7 +4802,7 @@ "type": "github" } ], - "time": "2024-04-19T02:16:09+00:00" + "time": "2025-08-27T10:00:03+00:00" }, { "name": "clue/ndjson-react", @@ -4933,16 +4949,16 @@ }, { "name": "composer/semver", - "version": "3.4.3", + "version": "3.4.4", "source": { "type": "git", "url": "https://github.com/composer/semver.git", - "reference": "4313d26ada5e0c4edfbd1dc481a92ff7bff91f12" + "reference": "198166618906cb2de69b95d7d47e5fa8aa1b2b95" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/semver/zipball/4313d26ada5e0c4edfbd1dc481a92ff7bff91f12", - "reference": "4313d26ada5e0c4edfbd1dc481a92ff7bff91f12", + "url": "https://api.github.com/repos/composer/semver/zipball/198166618906cb2de69b95d7d47e5fa8aa1b2b95", + "reference": "198166618906cb2de69b95d7d47e5fa8aa1b2b95", "shasum": "" }, "require": { @@ -4994,7 +5010,7 @@ "support": { "irc": "ircs://irc.libera.chat:6697/composer", "issues": "https://github.com/composer/semver/issues", - "source": "https://github.com/composer/semver/tree/3.4.3" + "source": "https://github.com/composer/semver/tree/3.4.4" }, "funding": [ { @@ -5004,13 +5020,9 @@ { "url": "https://github.com/composer", "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/composer/composer", - "type": "tidelift" } ], - "time": "2024-09-19T14:15:21+00:00" + "time": "2025-08-20T19:15:30+00:00" }, { "name": "composer/xdebug-handler", @@ -5127,16 +5139,16 @@ }, { "name": "fidry/cpu-core-counter", - "version": "1.2.0", + "version": "1.3.0", "source": { "type": "git", "url": "https://github.com/theofidry/cpu-core-counter.git", - "reference": "8520451a140d3f46ac33042715115e290cf5785f" + "reference": "db9508f7b1474469d9d3c53b86f817e344732678" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/theofidry/cpu-core-counter/zipball/8520451a140d3f46ac33042715115e290cf5785f", - "reference": "8520451a140d3f46ac33042715115e290cf5785f", + "url": "https://api.github.com/repos/theofidry/cpu-core-counter/zipball/db9508f7b1474469d9d3c53b86f817e344732678", + "reference": "db9508f7b1474469d9d3c53b86f817e344732678", "shasum": "" }, "require": { @@ -5146,10 +5158,10 @@ "fidry/makefile": "^0.2.0", "fidry/php-cs-fixer-config": "^1.1.2", "phpstan/extension-installer": "^1.2.0", - "phpstan/phpstan": "^1.9.2", - "phpstan/phpstan-deprecation-rules": "^1.0.0", - "phpstan/phpstan-phpunit": "^1.2.2", - "phpstan/phpstan-strict-rules": "^1.4.4", + "phpstan/phpstan": "^2.0", + "phpstan/phpstan-deprecation-rules": "^2.0.0", + "phpstan/phpstan-phpunit": "^2.0", + "phpstan/phpstan-strict-rules": "^2.0", "phpunit/phpunit": "^8.5.31 || ^9.5.26", "webmozarts/strict-phpunit": "^7.5" }, @@ -5176,7 +5188,7 @@ ], "support": { "issues": "https://github.com/theofidry/cpu-core-counter/issues", - "source": "https://github.com/theofidry/cpu-core-counter/tree/1.2.0" + "source": "https://github.com/theofidry/cpu-core-counter/tree/1.3.0" }, "funding": [ { @@ -5184,20 +5196,20 @@ "type": "github" } ], - "time": "2024-08-06T10:04:20+00:00" + "time": "2025-08-14T07:29:31+00:00" }, { "name": "friendsofphp/php-cs-fixer", - "version": "v3.85.1", + "version": "v3.86.0", "source": { "type": "git", "url": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer.git", - "reference": "2fb6d7f6c3398dca5786a1635b27405d73a417ba" + "reference": "4a952bd19dc97879b0620f495552ef09b55f7d36" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/PHP-CS-Fixer/PHP-CS-Fixer/zipball/2fb6d7f6c3398dca5786a1635b27405d73a417ba", - "reference": "2fb6d7f6c3398dca5786a1635b27405d73a417ba", + "url": "https://api.github.com/repos/PHP-CS-Fixer/PHP-CS-Fixer/zipball/4a952bd19dc97879b0620f495552ef09b55f7d36", + "reference": "4a952bd19dc97879b0620f495552ef09b55f7d36", "shasum": "" }, "require": { @@ -5281,7 +5293,7 @@ ], "support": { "issues": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/issues", - "source": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/tree/v3.85.1" + "source": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/tree/v3.86.0" }, "funding": [ { @@ -5289,7 +5301,7 @@ "type": "github" } ], - "time": "2025-07-29T22:22:50+00:00" + "time": "2025-08-13T22:36:21+00:00" }, { "name": "psr/container", @@ -5691,23 +5703,23 @@ }, { "name": "react/promise", - "version": "v3.2.0", + "version": "v3.3.0", "source": { "type": "git", "url": "https://github.com/reactphp/promise.git", - "reference": "8a164643313c71354582dc850b42b33fa12a4b63" + "reference": "23444f53a813a3296c1368bb104793ce8d88f04a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/reactphp/promise/zipball/8a164643313c71354582dc850b42b33fa12a4b63", - "reference": "8a164643313c71354582dc850b42b33fa12a4b63", + "url": "https://api.github.com/repos/reactphp/promise/zipball/23444f53a813a3296c1368bb104793ce8d88f04a", + "reference": "23444f53a813a3296c1368bb104793ce8d88f04a", "shasum": "" }, "require": { "php": ">=7.1.0" }, "require-dev": { - "phpstan/phpstan": "1.10.39 || 1.4.10", + "phpstan/phpstan": "1.12.28 || 1.4.10", "phpunit/phpunit": "^9.6 || ^7.5" }, "type": "library", @@ -5752,7 +5764,7 @@ ], "support": { "issues": "https://github.com/reactphp/promise/issues", - "source": "https://github.com/reactphp/promise/tree/v3.2.0" + "source": "https://github.com/reactphp/promise/tree/v3.3.0" }, "funding": [ { @@ -5760,7 +5772,7 @@ "type": "open_collective" } ], - "time": "2024-05-24T10:39:05+00:00" + "time": "2025-08-19T18:57:03+00:00" }, { "name": "react/socket", @@ -6519,16 +6531,16 @@ }, { "name": "symfony/polyfill-intl-grapheme", - "version": "v1.32.0", + "version": "v1.33.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-grapheme.git", - "reference": "b9123926e3b7bc2f98c02ad54f6a4b02b91a8abe" + "reference": "380872130d3a5dd3ace2f4010d95125fde5d5c70" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/b9123926e3b7bc2f98c02ad54f6a4b02b91a8abe", - "reference": "b9123926e3b7bc2f98c02ad54f6a4b02b91a8abe", + "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/380872130d3a5dd3ace2f4010d95125fde5d5c70", + "reference": "380872130d3a5dd3ace2f4010d95125fde5d5c70", "shasum": "" }, "require": { @@ -6577,7 +6589,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.32.0" + "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.33.0" }, "funding": [ { @@ -6588,16 +6600,20 @@ "url": "https://github.com/fabpot", "type": "github" }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, { "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", "type": "tidelift" } ], - "time": "2024-09-09T11:45:10+00:00" + "time": "2025-06-27T09:58:17+00:00" }, { "name": "symfony/polyfill-intl-normalizer", - "version": "v1.32.0", + "version": "v1.33.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-normalizer.git", @@ -6658,7 +6674,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.32.0" + "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.33.0" }, "funding": [ { @@ -6669,6 +6685,10 @@ "url": "https://github.com/fabpot", "type": "github" }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, { "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", "type": "tidelift" @@ -6678,7 +6698,7 @@ }, { "name": "symfony/polyfill-php81", - "version": "v1.32.0", + "version": "v1.33.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php81.git", @@ -6734,7 +6754,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php81/tree/v1.32.0" + "source": "https://github.com/symfony/polyfill-php81/tree/v1.33.0" }, "funding": [ { @@ -6745,6 +6765,10 @@ "url": "https://github.com/fabpot", "type": "github" }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, { "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", "type": "tidelift" diff --git a/config.php b/config.php index 759e5c1..64dc56c 100644 --- a/config.php +++ b/config.php @@ -36,7 +36,7 @@ static function (string $peer): string|int { 'level' => (int)getenv('LOGGER_LEVEL'), // Logging level, available logging levels are: ULTRA_VERBOSE - 5, VERBOSE - 4 , NOTICE - 3, WARNING - 2, ERROR - 1, FATAL_ERROR - 0. ], 'rpc' => [ - 'flood_timeout' => 15, + 'flood_timeout' => 5, 'rpc_resend_timeout' => 10, 'rpc_drop_timeout' => 20, ], From ee8144cb21916574d4ea9a911710f064a7b6db74 Mon Sep 17 00:00:00 2001 From: Alexander Pankratov Date: Thu, 20 Nov 2025 10:12:37 +0100 Subject: [PATCH 246/270] Update madelineProto to TL 218 --- composer.lock | 473 ++++++++++++++++++++++++++++++-------------------- 1 file changed, 288 insertions(+), 185 deletions(-) diff --git a/composer.lock b/composer.lock index 068b8fb..db1ae82 100644 --- a/composer.lock +++ b/composer.lock @@ -8,16 +8,16 @@ "packages": [ { "name": "amphp/amp", - "version": "v3.1.0", + "version": "v3.1.1", "source": { "type": "git", "url": "https://github.com/amphp/amp.git", - "reference": "7cf7fef3d667bfe4b2560bc87e67d5387a7bcde9" + "reference": "fa0ab33a6f47a82929c38d03ca47ebb71086a93f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/amphp/amp/zipball/7cf7fef3d667bfe4b2560bc87e67d5387a7bcde9", - "reference": "7cf7fef3d667bfe4b2560bc87e67d5387a7bcde9", + "url": "https://api.github.com/repos/amphp/amp/zipball/fa0ab33a6f47a82929c38d03ca47ebb71086a93f", + "reference": "fa0ab33a6f47a82929c38d03ca47ebb71086a93f", "shasum": "" }, "require": { @@ -77,7 +77,7 @@ ], "support": { "issues": "https://github.com/amphp/amp/issues", - "source": "https://github.com/amphp/amp/tree/v3.1.0" + "source": "https://github.com/amphp/amp/tree/v3.1.1" }, "funding": [ { @@ -85,7 +85,7 @@ "type": "github" } ], - "time": "2025-01-26T16:07:39+00:00" + "time": "2025-08-27T21:42:00+00:00" }, { "name": "amphp/byte-stream", @@ -1120,16 +1120,16 @@ }, { "name": "amphp/parallel", - "version": "v2.3.1", + "version": "v2.3.2", "source": { "type": "git", "url": "https://github.com/amphp/parallel.git", - "reference": "5113111de02796a782f5d90767455e7391cca190" + "reference": "321b45ae771d9c33a068186b24117e3cd1c48dce" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/amphp/parallel/zipball/5113111de02796a782f5d90767455e7391cca190", - "reference": "5113111de02796a782f5d90767455e7391cca190", + "url": "https://api.github.com/repos/amphp/parallel/zipball/321b45ae771d9c33a068186b24117e3cd1c48dce", + "reference": "321b45ae771d9c33a068186b24117e3cd1c48dce", "shasum": "" }, "require": { @@ -1192,7 +1192,7 @@ ], "support": { "issues": "https://github.com/amphp/parallel/issues", - "source": "https://github.com/amphp/parallel/tree/v2.3.1" + "source": "https://github.com/amphp/parallel/tree/v2.3.2" }, "funding": [ { @@ -1200,7 +1200,7 @@ "type": "github" } ], - "time": "2024-12-21T01:56:09+00:00" + "time": "2025-08-27T21:55:40+00:00" }, { "name": "amphp/parser", @@ -2133,16 +2133,16 @@ }, { "name": "bacon/bacon-qr-code", - "version": "v3.0.1", + "version": "v3.0.3", "source": { "type": "git", "url": "https://github.com/Bacon/BaconQrCode.git", - "reference": "f9cc1f52b5a463062251d666761178dbdb6b544f" + "reference": "36a1cb2b81493fa5b82e50bf8068bf84d1542563" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Bacon/BaconQrCode/zipball/f9cc1f52b5a463062251d666761178dbdb6b544f", - "reference": "f9cc1f52b5a463062251d666761178dbdb6b544f", + "url": "https://api.github.com/repos/Bacon/BaconQrCode/zipball/36a1cb2b81493fa5b82e50bf8068bf84d1542563", + "reference": "36a1cb2b81493fa5b82e50bf8068bf84d1542563", "shasum": "" }, "require": { @@ -2152,8 +2152,9 @@ }, "require-dev": { "phly/keep-a-changelog": "^2.12", - "phpunit/phpunit": "^10.5.11 || 11.0.4", + "phpunit/phpunit": "^10.5.11 || ^11.0.4", "spatie/phpunit-snapshot-assertions": "^5.1.5", + "spatie/pixelmatch-php": "^1.2.0", "squizlabs/php_codesniffer": "^3.9" }, "suggest": { @@ -2181,9 +2182,9 @@ "homepage": "https://github.com/Bacon/BaconQrCode", "support": { "issues": "https://github.com/Bacon/BaconQrCode/issues", - "source": "https://github.com/Bacon/BaconQrCode/tree/v3.0.1" + "source": "https://github.com/Bacon/BaconQrCode/tree/v3.0.3" }, - "time": "2024-10-01T13:55:55+00:00" + "time": "2025-11-19T17:15:36+00:00" }, { "name": "danog/async-orm", @@ -2587,21 +2588,21 @@ "source": { "type": "git", "url": "https://github.com/xtrime-ru/MadelineProto.git", - "reference": "d51fdd513a13ccd4aae930342e2a38b69a8c895a" + "reference": "7d6b8857a8b8f8360b19861eb72034ca8e19fe81" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/xtrime-ru/MadelineProto/zipball/d51fdd513a13ccd4aae930342e2a38b69a8c895a", - "reference": "d51fdd513a13ccd4aae930342e2a38b69a8c895a", + "url": "https://api.github.com/repos/xtrime-ru/MadelineProto/zipball/7d6b8857a8b8f8360b19861eb72034ca8e19fe81", + "reference": "7d6b8857a8b8f8360b19861eb72034ca8e19fe81", "shasum": "" }, "require": { - "amphp/amp": "^3.1.0", + "amphp/amp": "^3.1.1", "amphp/byte-stream": "^2.1.2", "amphp/dns": "^2.4.0", "amphp/file": "^3.2.0", "amphp/http": "^2.1.2", - "amphp/http-client": "^5.3.3", + "amphp/http-client": "^5.3.4", "amphp/http-client-cookies": "^2", "amphp/http-server": "^3.4.3", "amphp/log": "^2", @@ -2609,7 +2610,7 @@ "amphp/postgres": "^2.1.1", "amphp/redis": "^2.0.3", "amphp/socket": "^2.3.1", - "amphp/websocket-client": "^2.0.1", + "amphp/websocket-client": "^2.0.2", "bacon/bacon-qr-code": "^3.0.1", "danog/async-orm": "^1.1.4", "danog/better-prometheus": "^0.1.1", @@ -2628,15 +2629,15 @@ "ext-xml": "*", "ext-zlib": "*", "league/uri": "^7.5.1", - "nikic/php-parser": "^5.5.0", + "nikic/php-parser": "^5.6.2", "php-64bit": ">=8.2", - "phpseclib/phpseclib": "^3.0.46", + "phpseclib/phpseclib": "^3.0.47", "psr/http-factory": "^1.1.0", "psr/log": "^3.0.2", "revolt/event-loop": "^1.0.7", "symfony/polyfill-mbstring": ">=1.32", "symfony/polyfill-php83": "^1.32", - "webmozart/assert": "^1.11" + "webmozart/assert": "^1.12.1" }, "conflict": { "ext-pthreads": "*", @@ -2649,9 +2650,9 @@ "danog/phpdoc": "^0.1.24", "dg/bypass-finals": "dev-master", "ext-ctype": "*", - "phpunit/phpunit": "^9.6.23", + "phpunit/phpunit": "^9.6.29", "revolt/event-loop-adapter-react": "^1.1.1", - "symfony/yaml": "^6.4.23", + "symfony/yaml": "^6.4.26", "vimeo/psalm": "dev-master" }, "suggest": { @@ -2767,7 +2768,7 @@ "url": "https://github.com/danog" } ], - "time": "2025-08-28T09:29:57+00:00" + "time": "2025-11-20T09:01:55+00:00" }, { "name": "danog/primemodule", @@ -2995,16 +2996,16 @@ }, { "name": "dasprid/enum", - "version": "1.0.6", + "version": "1.0.7", "source": { "type": "git", "url": "https://github.com/DASPRiD/Enum.git", - "reference": "8dfd07c6d2cf31c8da90c53b83c026c7696dda90" + "reference": "b5874fa9ed0043116c72162ec7f4fb50e02e7cce" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/DASPRiD/Enum/zipball/8dfd07c6d2cf31c8da90c53b83c026c7696dda90", - "reference": "8dfd07c6d2cf31c8da90c53b83c026c7696dda90", + "url": "https://api.github.com/repos/DASPRiD/Enum/zipball/b5874fa9ed0043116c72162ec7f4fb50e02e7cce", + "reference": "b5874fa9ed0043116c72162ec7f4fb50e02e7cce", "shasum": "" }, "require": { @@ -3039,9 +3040,9 @@ ], "support": { "issues": "https://github.com/DASPRiD/Enum/issues", - "source": "https://github.com/DASPRiD/Enum/tree/1.0.6" + "source": "https://github.com/DASPRiD/Enum/tree/1.0.7" }, - "time": "2024-08-09T14:30:48+00:00" + "time": "2025-09-16T12:23:56+00:00" }, { "name": "daverandom/libdns", @@ -3209,33 +3210,38 @@ }, { "name": "league/uri", - "version": "7.5.1", + "version": "7.6.0", "source": { "type": "git", "url": "https://github.com/thephpleague/uri.git", - "reference": "81fb5145d2644324614cc532b28efd0215bda430" + "reference": "f625804987a0a9112d954f9209d91fec52182344" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thephpleague/uri/zipball/81fb5145d2644324614cc532b28efd0215bda430", - "reference": "81fb5145d2644324614cc532b28efd0215bda430", + "url": "https://api.github.com/repos/thephpleague/uri/zipball/f625804987a0a9112d954f9209d91fec52182344", + "reference": "f625804987a0a9112d954f9209d91fec52182344", "shasum": "" }, "require": { - "league/uri-interfaces": "^7.5", - "php": "^8.1" + "league/uri-interfaces": "^7.6", + "php": "^8.1", + "psr/http-factory": "^1" }, "conflict": { "league/uri-schemes": "^1.0" }, "suggest": { "ext-bcmath": "to improve IPV4 host parsing", + "ext-dom": "to convert the URI into an HTML anchor tag", "ext-fileinfo": "to create Data URI from file contennts", "ext-gmp": "to improve IPV4 host parsing", "ext-intl": "to handle IDN host with the best performance", + "ext-uri": "to use the PHP native URI class", "jeremykendall/php-domain-parser": "to resolve Public Suffix and Top Level Domain", "league/uri-components": "Needed to easily manipulate URI objects components", + "league/uri-polyfill": "Needed to backport the PHP URI extension for older versions of PHP", "php-64bit": "to improve IPV4 host parsing", + "rowbot/url": "to handle WHATWG URL", "symfony/polyfill-intl-idn": "to handle IDN host via the Symfony polyfill if ext-intl is not present" }, "type": "library", @@ -3263,6 +3269,7 @@ "description": "URI manipulation library", "homepage": "https://uri.thephpleague.com", "keywords": [ + "URN", "data-uri", "file-uri", "ftp", @@ -3275,9 +3282,11 @@ "psr-7", "query-string", "querystring", + "rfc2141", "rfc3986", "rfc3987", "rfc6570", + "rfc8141", "uri", "uri-template", "url", @@ -3287,7 +3296,7 @@ "docs": "https://uri.thephpleague.com", "forum": "https://thephpleague.slack.com", "issues": "https://github.com/thephpleague/uri-src/issues", - "source": "https://github.com/thephpleague/uri/tree/7.5.1" + "source": "https://github.com/thephpleague/uri/tree/7.6.0" }, "funding": [ { @@ -3295,34 +3304,37 @@ "type": "github" } ], - "time": "2024-12-08T08:40:02+00:00" + "time": "2025-11-18T12:17:23+00:00" }, { "name": "league/uri-components", - "version": "7.5.1", + "version": "7.6.0", "source": { "type": "git", "url": "https://github.com/thephpleague/uri-components.git", - "reference": "4aabf0e2f2f9421ffcacab35be33e4fb5e63c44f" + "reference": "ffa1215dbee72ee4b7bc08d983d25293812456c2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thephpleague/uri-components/zipball/4aabf0e2f2f9421ffcacab35be33e4fb5e63c44f", - "reference": "4aabf0e2f2f9421ffcacab35be33e4fb5e63c44f", + "url": "https://api.github.com/repos/thephpleague/uri-components/zipball/ffa1215dbee72ee4b7bc08d983d25293812456c2", + "reference": "ffa1215dbee72ee4b7bc08d983d25293812456c2", "shasum": "" }, "require": { - "league/uri": "^7.5", + "league/uri": "^7.6", "php": "^8.1" }, "suggest": { + "bakame/aide-uri": "A polyfill for PHP8.1 until PHP8.4 to add support to PHP Native URI parser", "ext-bcmath": "to improve IPV4 host parsing", "ext-fileinfo": "to create Data URI from file contennts", "ext-gmp": "to improve IPV4 host parsing", "ext-intl": "to handle IDN host with the best performance", "ext-mbstring": "to use the sorting algorithm of URLSearchParams", "jeremykendall/php-domain-parser": "to resolve Public Suffix and Top Level Domain", + "league/uri-polyfill": "Needed to backport the PHP URI extension for older versions of PHP", "php-64bit": "to improve IPV4 host parsing", + "rowbot/url": "to handle WHATWG URL", "symfony/polyfill-intl-idn": "to handle IDN host via the Symfony polyfill if ext-intl is not present" }, "type": "library", @@ -3369,7 +3381,7 @@ "docs": "https://uri.thephpleague.com", "forum": "https://thephpleague.slack.com", "issues": "https://github.com/thephpleague/uri-src/issues", - "source": "https://github.com/thephpleague/uri-components/tree/7.5.1" + "source": "https://github.com/thephpleague/uri-components/tree/7.6.0" }, "funding": [ { @@ -3377,26 +3389,25 @@ "type": "github" } ], - "time": "2024-12-08T08:40:02+00:00" + "time": "2025-11-18T12:17:23+00:00" }, { "name": "league/uri-interfaces", - "version": "7.5.0", + "version": "7.6.0", "source": { "type": "git", "url": "https://github.com/thephpleague/uri-interfaces.git", - "reference": "08cfc6c4f3d811584fb09c37e2849e6a7f9b0742" + "reference": "ccbfb51c0445298e7e0b7f4481b942f589665368" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thephpleague/uri-interfaces/zipball/08cfc6c4f3d811584fb09c37e2849e6a7f9b0742", - "reference": "08cfc6c4f3d811584fb09c37e2849e6a7f9b0742", + "url": "https://api.github.com/repos/thephpleague/uri-interfaces/zipball/ccbfb51c0445298e7e0b7f4481b942f589665368", + "reference": "ccbfb51c0445298e7e0b7f4481b942f589665368", "shasum": "" }, "require": { "ext-filter": "*", "php": "^8.1", - "psr/http-factory": "^1", "psr/http-message": "^1.1 || ^2.0" }, "suggest": { @@ -3404,6 +3415,7 @@ "ext-gmp": "to improve IPV4 host parsing", "ext-intl": "to handle IDN host with the best performance", "php-64bit": "to improve IPV4 host parsing", + "rowbot/url": "to handle WHATWG URL", "symfony/polyfill-intl-idn": "to handle IDN host via the Symfony polyfill if ext-intl is not present" }, "type": "library", @@ -3428,7 +3440,7 @@ "homepage": "https://nyamsprod.com" } ], - "description": "Common interfaces and classes for URI representation and interaction", + "description": "Common tools for parsing and resolving RFC3987/RFC3986 URI", "homepage": "https://uri.thephpleague.com", "keywords": [ "data-uri", @@ -3453,7 +3465,7 @@ "docs": "https://uri.thephpleague.com", "forum": "https://thephpleague.slack.com", "issues": "https://github.com/thephpleague/uri-src/issues", - "source": "https://github.com/thephpleague/uri-interfaces/tree/7.5.0" + "source": "https://github.com/thephpleague/uri-interfaces/tree/7.6.0" }, "funding": [ { @@ -3461,7 +3473,7 @@ "type": "github" } ], - "time": "2024-12-08T08:18:47+00:00" + "time": "2025-11-18T12:17:23+00:00" }, { "name": "monolog/monolog", @@ -3618,16 +3630,16 @@ }, { "name": "nikic/php-parser", - "version": "v5.6.1", + "version": "v5.6.2", "source": { "type": "git", "url": "https://github.com/nikic/PHP-Parser.git", - "reference": "f103601b29efebd7ff4a1ca7b3eeea9e3336a2a2" + "reference": "3a454ca033b9e06b63282ce19562e892747449bb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/f103601b29efebd7ff4a1ca7b3eeea9e3336a2a2", - "reference": "f103601b29efebd7ff4a1ca7b3eeea9e3336a2a2", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/3a454ca033b9e06b63282ce19562e892747449bb", + "reference": "3a454ca033b9e06b63282ce19562e892747449bb", "shasum": "" }, "require": { @@ -3670,30 +3682,32 @@ ], "support": { "issues": "https://github.com/nikic/PHP-Parser/issues", - "source": "https://github.com/nikic/PHP-Parser/tree/v5.6.1" + "source": "https://github.com/nikic/PHP-Parser/tree/v5.6.2" }, - "time": "2025-08-13T20:13:15+00:00" + "time": "2025-10-21T19:32:17+00:00" }, { "name": "paragonie/constant_time_encoding", - "version": "v3.0.0", + "version": "v3.1.3", "source": { "type": "git", "url": "https://github.com/paragonie/constant_time_encoding.git", - "reference": "df1e7fde177501eee2037dd159cf04f5f301a512" + "reference": "d5b01a39b3415c2cd581d3bd3a3575c1ebbd8e77" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/paragonie/constant_time_encoding/zipball/df1e7fde177501eee2037dd159cf04f5f301a512", - "reference": "df1e7fde177501eee2037dd159cf04f5f301a512", + "url": "https://api.github.com/repos/paragonie/constant_time_encoding/zipball/d5b01a39b3415c2cd581d3bd3a3575c1ebbd8e77", + "reference": "d5b01a39b3415c2cd581d3bd3a3575c1ebbd8e77", "shasum": "" }, "require": { "php": "^8" }, "require-dev": { - "phpunit/phpunit": "^9", - "vimeo/psalm": "^4|^5" + "infection/infection": "^0", + "nikic/php-fuzzer": "^0", + "phpunit/phpunit": "^9|^10|^11", + "vimeo/psalm": "^4|^5|^6" }, "type": "library", "autoload": { @@ -3739,7 +3753,7 @@ "issues": "https://github.com/paragonie/constant_time_encoding/issues", "source": "https://github.com/paragonie/constant_time_encoding" }, - "time": "2024-05-08T12:36:18+00:00" + "time": "2025-09-24T15:06:41+00:00" }, { "name": "paragonie/random_compat", @@ -3868,16 +3882,16 @@ }, { "name": "phpseclib/phpseclib", - "version": "3.0.46", + "version": "3.0.47", "source": { "type": "git", "url": "https://github.com/phpseclib/phpseclib.git", - "reference": "56483a7de62a6c2a6635e42e93b8a9e25d4f0ec6" + "reference": "9d6ca36a6c2dd434765b1071b2644a1c683b385d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpseclib/phpseclib/zipball/56483a7de62a6c2a6635e42e93b8a9e25d4f0ec6", - "reference": "56483a7de62a6c2a6635e42e93b8a9e25d4f0ec6", + "url": "https://api.github.com/repos/phpseclib/phpseclib/zipball/9d6ca36a6c2dd434765b1071b2644a1c683b385d", + "reference": "9d6ca36a6c2dd434765b1071b2644a1c683b385d", "shasum": "" }, "require": { @@ -3958,7 +3972,7 @@ ], "support": { "issues": "https://github.com/phpseclib/phpseclib/issues", - "source": "https://github.com/phpseclib/phpseclib/tree/3.0.46" + "source": "https://github.com/phpseclib/phpseclib/tree/3.0.47" }, "funding": [ { @@ -3974,7 +3988,7 @@ "type": "tidelift" } ], - "time": "2025-06-26T16:29:55+00:00" + "time": "2025-10-06T01:07:24+00:00" }, { "name": "promphp/prometheus_client_php", @@ -4692,28 +4706,28 @@ }, { "name": "webmozart/assert", - "version": "1.11.0", + "version": "1.12.1", "source": { "type": "git", "url": "https://github.com/webmozarts/assert.git", - "reference": "11cb2199493b2f8a3b53e7f19068fc6aac760991" + "reference": "9be6926d8b485f55b9229203f962b51ed377ba68" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/webmozarts/assert/zipball/11cb2199493b2f8a3b53e7f19068fc6aac760991", - "reference": "11cb2199493b2f8a3b53e7f19068fc6aac760991", + "url": "https://api.github.com/repos/webmozarts/assert/zipball/9be6926d8b485f55b9229203f962b51ed377ba68", + "reference": "9be6926d8b485f55b9229203f962b51ed377ba68", "shasum": "" }, "require": { "ext-ctype": "*", + "ext-date": "*", + "ext-filter": "*", "php": "^7.2 || ^8.0" }, - "conflict": { - "phpstan/phpstan": "<0.12.20", - "vimeo/psalm": "<4.6.1 || 4.6.2" - }, - "require-dev": { - "phpunit/phpunit": "^8.5.13" + "suggest": { + "ext-intl": "", + "ext-simplexml": "", + "ext-spl": "" }, "type": "library", "extra": { @@ -4744,9 +4758,9 @@ ], "support": { "issues": "https://github.com/webmozarts/assert/issues", - "source": "https://github.com/webmozarts/assert/tree/1.11.0" + "source": "https://github.com/webmozarts/assert/tree/1.12.1" }, - "time": "2022-06-03T18:03:27+00:00" + "time": "2025-10-29T15:56:20+00:00" } ], "packages-dev": [ @@ -5200,16 +5214,16 @@ }, { "name": "friendsofphp/php-cs-fixer", - "version": "v3.86.0", + "version": "v3.89.2", "source": { "type": "git", "url": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer.git", - "reference": "4a952bd19dc97879b0620f495552ef09b55f7d36" + "reference": "7569658f91e475ec93b99bd5964b059ad1336dcf" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/PHP-CS-Fixer/PHP-CS-Fixer/zipball/4a952bd19dc97879b0620f495552ef09b55f7d36", - "reference": "4a952bd19dc97879b0620f495552ef09b55f7d36", + "url": "https://api.github.com/repos/PHP-CS-Fixer/PHP-CS-Fixer/zipball/7569658f91e475ec93b99bd5964b059ad1336dcf", + "reference": "7569658f91e475ec93b99bd5964b059ad1336dcf", "shasum": "" }, "require": { @@ -5220,39 +5234,37 @@ "ext-hash": "*", "ext-json": "*", "ext-tokenizer": "*", - "fidry/cpu-core-counter": "^1.2", + "fidry/cpu-core-counter": "^1.3", "php": "^7.4 || ^8.0", "react/child-process": "^0.6.6", "react/event-loop": "^1.5", - "react/promise": "^3.2", "react/socket": "^1.16", "react/stream": "^1.4", "sebastian/diff": "^4.0.6 || ^5.1.1 || ^6.0.2 || ^7.0", - "symfony/console": "^5.4.47 || ^6.4.13 || ^7.0", - "symfony/event-dispatcher": "^5.4.45 || ^6.4.13 || ^7.0", - "symfony/filesystem": "^5.4.45 || ^6.4.13 || ^7.0", - "symfony/finder": "^5.4.45 || ^6.4.17 || ^7.0", - "symfony/options-resolver": "^5.4.45 || ^6.4.16 || ^7.0", - "symfony/polyfill-mbstring": "^1.32", - "symfony/polyfill-php80": "^1.32", - "symfony/polyfill-php81": "^1.32", - "symfony/process": "^5.4.47 || ^6.4.20 || ^7.2", - "symfony/stopwatch": "^5.4.45 || ^6.4.19 || ^7.0" + "symfony/console": "^5.4.47 || ^6.4.24 || ^7.0", + "symfony/event-dispatcher": "^5.4.45 || ^6.4.24 || ^7.0", + "symfony/filesystem": "^5.4.45 || ^6.4.24 || ^7.0", + "symfony/finder": "^5.4.45 || ^6.4.24 || ^7.0", + "symfony/options-resolver": "^5.4.45 || ^6.4.24 || ^7.0", + "symfony/polyfill-mbstring": "^1.33", + "symfony/polyfill-php80": "^1.33", + "symfony/polyfill-php81": "^1.33", + "symfony/polyfill-php84": "^1.33", + "symfony/process": "^5.4.47 || ^6.4.24 || ^7.2", + "symfony/stopwatch": "^5.4.45 || ^6.4.24 || ^7.0" }, "require-dev": { - "facile-it/paraunit": "^1.3.1 || ^2.6", - "infection/infection": "^0.29.14", - "justinrainbow/json-schema": "^5.3 || ^6.4", + "facile-it/paraunit": "^1.3.1 || ^2.7", + "infection/infection": "^0.31.0", + "justinrainbow/json-schema": "^6.5", "keradus/cli-executor": "^2.2", "mikey179/vfsstream": "^1.6.12", - "php-coveralls/php-coveralls": "^2.8", - "php-cs-fixer/accessible-object": "^1.1", + "php-coveralls/php-coveralls": "^2.9", "php-cs-fixer/phpunit-constraint-isidenticalstring": "^1.6", "php-cs-fixer/phpunit-constraint-xmlmatchesxsd": "^1.6", - "phpunit/phpunit": "^9.6.23 || ^10.5.47 || ^11.5.25", - "symfony/polyfill-php84": "^1.32", - "symfony/var-dumper": "^5.4.48 || ^6.4.23 || ^7.3.1", - "symfony/yaml": "^5.4.45 || ^6.4.23 || ^7.3.1" + "phpunit/phpunit": "^9.6.25 || ^10.5.53 || ^11.5.34", + "symfony/var-dumper": "^5.4.48 || ^6.4.24 || ^7.3.2", + "symfony/yaml": "^5.4.45 || ^6.4.24 || ^7.3.2" }, "suggest": { "ext-dom": "For handling output formats in XML", @@ -5293,7 +5305,7 @@ ], "support": { "issues": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/issues", - "source": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/tree/v3.86.0" + "source": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/tree/v3.89.2" }, "funding": [ { @@ -5301,7 +5313,7 @@ "type": "github" } ], - "time": "2025-08-13T22:36:21+00:00" + "time": "2025-11-06T21:12:50+00:00" }, { "name": "psr/container", @@ -5555,16 +5567,16 @@ }, { "name": "react/dns", - "version": "v1.13.0", + "version": "v1.14.0", "source": { "type": "git", "url": "https://github.com/reactphp/dns.git", - "reference": "eb8ae001b5a455665c89c1df97f6fb682f8fb0f5" + "reference": "7562c05391f42701c1fccf189c8225fece1cd7c3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/reactphp/dns/zipball/eb8ae001b5a455665c89c1df97f6fb682f8fb0f5", - "reference": "eb8ae001b5a455665c89c1df97f6fb682f8fb0f5", + "url": "https://api.github.com/repos/reactphp/dns/zipball/7562c05391f42701c1fccf189c8225fece1cd7c3", + "reference": "7562c05391f42701c1fccf189c8225fece1cd7c3", "shasum": "" }, "require": { @@ -5619,7 +5631,7 @@ ], "support": { "issues": "https://github.com/reactphp/dns/issues", - "source": "https://github.com/reactphp/dns/tree/v1.13.0" + "source": "https://github.com/reactphp/dns/tree/v1.14.0" }, "funding": [ { @@ -5627,20 +5639,20 @@ "type": "open_collective" } ], - "time": "2024-06-13T14:18:03+00:00" + "time": "2025-11-18T19:34:28+00:00" }, { "name": "react/event-loop", - "version": "v1.5.0", + "version": "v1.6.0", "source": { "type": "git", "url": "https://github.com/reactphp/event-loop.git", - "reference": "bbe0bd8c51ffc05ee43f1729087ed3bdf7d53354" + "reference": "ba276bda6083df7e0050fd9b33f66ad7a4ac747a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/reactphp/event-loop/zipball/bbe0bd8c51ffc05ee43f1729087ed3bdf7d53354", - "reference": "bbe0bd8c51ffc05ee43f1729087ed3bdf7d53354", + "url": "https://api.github.com/repos/reactphp/event-loop/zipball/ba276bda6083df7e0050fd9b33f66ad7a4ac747a", + "reference": "ba276bda6083df7e0050fd9b33f66ad7a4ac747a", "shasum": "" }, "require": { @@ -5691,7 +5703,7 @@ ], "support": { "issues": "https://github.com/reactphp/event-loop/issues", - "source": "https://github.com/reactphp/event-loop/tree/v1.5.0" + "source": "https://github.com/reactphp/event-loop/tree/v1.6.0" }, "funding": [ { @@ -5699,7 +5711,7 @@ "type": "open_collective" } ], - "time": "2023-11-13T13:48:05+00:00" + "time": "2025-11-17T20:46:25+00:00" }, { "name": "react/promise", @@ -5776,16 +5788,16 @@ }, { "name": "react/socket", - "version": "v1.16.0", + "version": "v1.17.0", "source": { "type": "git", "url": "https://github.com/reactphp/socket.git", - "reference": "23e4ff33ea3e160d2d1f59a0e6050e4b0fb0eac1" + "reference": "ef5b17b81f6f60504c539313f94f2d826c5faa08" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/reactphp/socket/zipball/23e4ff33ea3e160d2d1f59a0e6050e4b0fb0eac1", - "reference": "23e4ff33ea3e160d2d1f59a0e6050e4b0fb0eac1", + "url": "https://api.github.com/repos/reactphp/socket/zipball/ef5b17b81f6f60504c539313f94f2d826c5faa08", + "reference": "ef5b17b81f6f60504c539313f94f2d826c5faa08", "shasum": "" }, "require": { @@ -5844,7 +5856,7 @@ ], "support": { "issues": "https://github.com/reactphp/socket/issues", - "source": "https://github.com/reactphp/socket/tree/v1.16.0" + "source": "https://github.com/reactphp/socket/tree/v1.17.0" }, "funding": [ { @@ -5852,7 +5864,7 @@ "type": "open_collective" } ], - "time": "2024-07-26T10:38:09+00:00" + "time": "2025-11-19T20:47:34+00:00" }, { "name": "react/stream", @@ -6001,16 +6013,16 @@ }, { "name": "symfony/console", - "version": "v7.3.2", + "version": "v7.3.6", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "5f360ebc65c55265a74d23d7fe27f957870158a1" + "reference": "c28ad91448f86c5f6d9d2c70f0cf68bf135f252a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/5f360ebc65c55265a74d23d7fe27f957870158a1", - "reference": "5f360ebc65c55265a74d23d7fe27f957870158a1", + "url": "https://api.github.com/repos/symfony/console/zipball/c28ad91448f86c5f6d9d2c70f0cf68bf135f252a", + "reference": "c28ad91448f86c5f6d9d2c70f0cf68bf135f252a", "shasum": "" }, "require": { @@ -6075,7 +6087,7 @@ "terminal" ], "support": { - "source": "https://github.com/symfony/console/tree/v7.3.2" + "source": "https://github.com/symfony/console/tree/v7.3.6" }, "funding": [ { @@ -6095,7 +6107,7 @@ "type": "tidelift" } ], - "time": "2025-07-30T17:13:41+00:00" + "time": "2025-11-04T01:21:42+00:00" }, { "name": "symfony/deprecation-contracts", @@ -6166,16 +6178,16 @@ }, { "name": "symfony/event-dispatcher", - "version": "v7.3.0", + "version": "v7.3.3", "source": { "type": "git", "url": "https://github.com/symfony/event-dispatcher.git", - "reference": "497f73ac996a598c92409b44ac43b6690c4f666d" + "reference": "b7dc69e71de420ac04bc9ab830cf3ffebba48191" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/497f73ac996a598c92409b44ac43b6690c4f666d", - "reference": "497f73ac996a598c92409b44ac43b6690c4f666d", + "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/b7dc69e71de420ac04bc9ab830cf3ffebba48191", + "reference": "b7dc69e71de420ac04bc9ab830cf3ffebba48191", "shasum": "" }, "require": { @@ -6226,7 +6238,7 @@ "description": "Provides tools that allow your application components to communicate with each other by dispatching events and listening to them", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/event-dispatcher/tree/v7.3.0" + "source": "https://github.com/symfony/event-dispatcher/tree/v7.3.3" }, "funding": [ { @@ -6237,12 +6249,16 @@ "url": "https://github.com/fabpot", "type": "github" }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, { "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", "type": "tidelift" } ], - "time": "2025-04-22T09:11:45+00:00" + "time": "2025-08-13T11:49:31+00:00" }, { "name": "symfony/event-dispatcher-contracts", @@ -6322,16 +6338,16 @@ }, { "name": "symfony/filesystem", - "version": "v7.3.2", + "version": "v7.3.6", "source": { "type": "git", "url": "https://github.com/symfony/filesystem.git", - "reference": "edcbb768a186b5c3f25d0643159a787d3e63b7fd" + "reference": "e9bcfd7837928ab656276fe00464092cc9e1826a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/filesystem/zipball/edcbb768a186b5c3f25d0643159a787d3e63b7fd", - "reference": "edcbb768a186b5c3f25d0643159a787d3e63b7fd", + "url": "https://api.github.com/repos/symfony/filesystem/zipball/e9bcfd7837928ab656276fe00464092cc9e1826a", + "reference": "e9bcfd7837928ab656276fe00464092cc9e1826a", "shasum": "" }, "require": { @@ -6368,7 +6384,7 @@ "description": "Provides basic utilities for the filesystem", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/filesystem/tree/v7.3.2" + "source": "https://github.com/symfony/filesystem/tree/v7.3.6" }, "funding": [ { @@ -6388,20 +6404,20 @@ "type": "tidelift" } ], - "time": "2025-07-07T08:17:47+00:00" + "time": "2025-11-05T09:52:27+00:00" }, { "name": "symfony/finder", - "version": "v7.3.2", + "version": "v7.3.5", "source": { "type": "git", "url": "https://github.com/symfony/finder.git", - "reference": "2a6614966ba1074fa93dae0bc804227422df4dfe" + "reference": "9f696d2f1e340484b4683f7853b273abff94421f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/finder/zipball/2a6614966ba1074fa93dae0bc804227422df4dfe", - "reference": "2a6614966ba1074fa93dae0bc804227422df4dfe", + "url": "https://api.github.com/repos/symfony/finder/zipball/9f696d2f1e340484b4683f7853b273abff94421f", + "reference": "9f696d2f1e340484b4683f7853b273abff94421f", "shasum": "" }, "require": { @@ -6436,7 +6452,7 @@ "description": "Finds files and directories via an intuitive fluent interface", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/finder/tree/v7.3.2" + "source": "https://github.com/symfony/finder/tree/v7.3.5" }, "funding": [ { @@ -6456,20 +6472,20 @@ "type": "tidelift" } ], - "time": "2025-07-15T13:41:35+00:00" + "time": "2025-10-15T18:45:57+00:00" }, { "name": "symfony/options-resolver", - "version": "v7.3.2", + "version": "v7.3.3", "source": { "type": "git", "url": "https://github.com/symfony/options-resolver.git", - "reference": "119bcf13e67dbd188e5dbc74228b1686f66acd37" + "reference": "0ff2f5c3df08a395232bbc3c2eb7e84912df911d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/options-resolver/zipball/119bcf13e67dbd188e5dbc74228b1686f66acd37", - "reference": "119bcf13e67dbd188e5dbc74228b1686f66acd37", + "url": "https://api.github.com/repos/symfony/options-resolver/zipball/0ff2f5c3df08a395232bbc3c2eb7e84912df911d", + "reference": "0ff2f5c3df08a395232bbc3c2eb7e84912df911d", "shasum": "" }, "require": { @@ -6507,7 +6523,7 @@ "options" ], "support": { - "source": "https://github.com/symfony/options-resolver/tree/v7.3.2" + "source": "https://github.com/symfony/options-resolver/tree/v7.3.3" }, "funding": [ { @@ -6527,7 +6543,7 @@ "type": "tidelift" } ], - "time": "2025-07-15T11:36:08+00:00" + "time": "2025-08-05T10:16:07+00:00" }, { "name": "symfony/polyfill-intl-grapheme", @@ -6776,18 +6792,98 @@ ], "time": "2024-09-09T11:45:10+00:00" }, + { + "name": "symfony/polyfill-php84", + "version": "v1.33.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-php84.git", + "reference": "d8ced4d875142b6a7426000426b8abc631d6b191" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-php84/zipball/d8ced4d875142b6a7426000426b8abc631d6b191", + "reference": "d8ced4d875142b6a7426000426b8abc631d6b191", + "shasum": "" + }, + "require": { + "php": ">=7.2" + }, + "type": "library", + "extra": { + "thanks": { + "url": "https://github.com/symfony/polyfill", + "name": "symfony/polyfill" + } + }, + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Php84\\": "" + }, + "classmap": [ + "Resources/stubs" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill backporting some PHP 8.4+ features to lower PHP versions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-php84/tree/v1.33.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2025-06-24T13:30:11+00:00" + }, { "name": "symfony/process", - "version": "v7.3.0", + "version": "v7.3.4", "source": { "type": "git", "url": "https://github.com/symfony/process.git", - "reference": "40c295f2deb408d5e9d2d32b8ba1dd61e36f05af" + "reference": "f24f8f316367b30810810d4eb30c543d7003ff3b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/40c295f2deb408d5e9d2d32b8ba1dd61e36f05af", - "reference": "40c295f2deb408d5e9d2d32b8ba1dd61e36f05af", + "url": "https://api.github.com/repos/symfony/process/zipball/f24f8f316367b30810810d4eb30c543d7003ff3b", + "reference": "f24f8f316367b30810810d4eb30c543d7003ff3b", "shasum": "" }, "require": { @@ -6819,7 +6915,7 @@ "description": "Executes commands in sub-processes", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/process/tree/v7.3.0" + "source": "https://github.com/symfony/process/tree/v7.3.4" }, "funding": [ { @@ -6830,25 +6926,29 @@ "url": "https://github.com/fabpot", "type": "github" }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, { "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", "type": "tidelift" } ], - "time": "2025-04-17T09:11:12+00:00" + "time": "2025-09-11T10:12:26+00:00" }, { "name": "symfony/service-contracts", - "version": "v3.6.0", + "version": "v3.6.1", "source": { "type": "git", "url": "https://github.com/symfony/service-contracts.git", - "reference": "f021b05a130d35510bd6b25fe9053c2a8a15d5d4" + "reference": "45112560a3ba2d715666a509a0bc9521d10b6c43" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/service-contracts/zipball/f021b05a130d35510bd6b25fe9053c2a8a15d5d4", - "reference": "f021b05a130d35510bd6b25fe9053c2a8a15d5d4", + "url": "https://api.github.com/repos/symfony/service-contracts/zipball/45112560a3ba2d715666a509a0bc9521d10b6c43", + "reference": "45112560a3ba2d715666a509a0bc9521d10b6c43", "shasum": "" }, "require": { @@ -6902,7 +7002,7 @@ "standards" ], "support": { - "source": "https://github.com/symfony/service-contracts/tree/v3.6.0" + "source": "https://github.com/symfony/service-contracts/tree/v3.6.1" }, "funding": [ { @@ -6913,12 +7013,16 @@ "url": "https://github.com/fabpot", "type": "github" }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, { "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", "type": "tidelift" } ], - "time": "2025-04-25T09:37:31+00:00" + "time": "2025-07-15T11:30:57+00:00" }, { "name": "symfony/stopwatch", @@ -6984,16 +7088,16 @@ }, { "name": "symfony/string", - "version": "v7.3.2", + "version": "v7.3.4", "source": { "type": "git", "url": "https://github.com/symfony/string.git", - "reference": "42f505aff654e62ac7ac2ce21033818297ca89ca" + "reference": "f96476035142921000338bad71e5247fbc138872" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/string/zipball/42f505aff654e62ac7ac2ce21033818297ca89ca", - "reference": "42f505aff654e62ac7ac2ce21033818297ca89ca", + "url": "https://api.github.com/repos/symfony/string/zipball/f96476035142921000338bad71e5247fbc138872", + "reference": "f96476035142921000338bad71e5247fbc138872", "shasum": "" }, "require": { @@ -7008,7 +7112,6 @@ }, "require-dev": { "symfony/emoji": "^7.1", - "symfony/error-handler": "^6.4|^7.0", "symfony/http-client": "^6.4|^7.0", "symfony/intl": "^6.4|^7.0", "symfony/translation-contracts": "^2.5|^3.0", @@ -7051,7 +7154,7 @@ "utf8" ], "support": { - "source": "https://github.com/symfony/string/tree/v7.3.2" + "source": "https://github.com/symfony/string/tree/v7.3.4" }, "funding": [ { @@ -7071,7 +7174,7 @@ "type": "tidelift" } ], - "time": "2025-07-10T08:47:49+00:00" + "time": "2025-09-11T14:36:48+00:00" } ], "aliases": [], From 5b4ac227738b7eb1088f025d9dbaaf6c091ad9de Mon Sep 17 00:00:00 2001 From: Faiziev <107097209+FTursunboy@users.noreply.github.com> Date: Thu, 20 Nov 2025 10:45:27 +0500 Subject: [PATCH 247/270] Change API endpoint in curl examples Updated API endpoint in README for basic auth requests. --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index b30ca0e..7643275 100644 --- a/README.md +++ b/README.md @@ -84,8 +84,8 @@ Default settings allow to access API only from localhost/127.0.0.1. If you specify password, then `IP_WHITELIST` is ignored How to make requests with basic auth: ```shell - curl --user username:password "http://127.0.0.1:9503/getSelf" - curl "http://username:password@127.0.0.1:9503/getSelf" + curl --user username:password "http://127.0.0.1:9503/api/getSelf" + curl "http://username:password@127.0.0.1:9503/api/getSelf" ``` docker-compose.yml: From 88838c4f93b90eca1181f33945feefffa89e6fe1 Mon Sep 17 00:00:00 2001 From: Alexander Pankratov Date: Tue, 9 Dec 2025 21:34:01 +0100 Subject: [PATCH 248/270] Update madelineProto to TL 220 --- composer.lock | 299 +++++++++++++++++++++++++------------------------- 1 file changed, 148 insertions(+), 151 deletions(-) diff --git a/composer.lock b/composer.lock index db1ae82..b42649a 100644 --- a/composer.lock +++ b/composer.lock @@ -1120,16 +1120,16 @@ }, { "name": "amphp/parallel", - "version": "v2.3.2", + "version": "v2.3.3", "source": { "type": "git", "url": "https://github.com/amphp/parallel.git", - "reference": "321b45ae771d9c33a068186b24117e3cd1c48dce" + "reference": "296b521137a54d3a02425b464e5aee4c93db2c60" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/amphp/parallel/zipball/321b45ae771d9c33a068186b24117e3cd1c48dce", - "reference": "321b45ae771d9c33a068186b24117e3cd1c48dce", + "url": "https://api.github.com/repos/amphp/parallel/zipball/296b521137a54d3a02425b464e5aee4c93db2c60", + "reference": "296b521137a54d3a02425b464e5aee4c93db2c60", "shasum": "" }, "require": { @@ -1192,7 +1192,7 @@ ], "support": { "issues": "https://github.com/amphp/parallel/issues", - "source": "https://github.com/amphp/parallel/tree/v2.3.2" + "source": "https://github.com/amphp/parallel/tree/v2.3.3" }, "funding": [ { @@ -1200,7 +1200,7 @@ "type": "github" } ], - "time": "2025-08-27T21:55:40+00:00" + "time": "2025-11-15T06:23:42+00:00" }, { "name": "amphp/parser", @@ -2588,12 +2588,12 @@ "source": { "type": "git", "url": "https://github.com/xtrime-ru/MadelineProto.git", - "reference": "7d6b8857a8b8f8360b19861eb72034ca8e19fe81" + "reference": "509d607c8cdfa56df28380e85462afbf87259d79" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/xtrime-ru/MadelineProto/zipball/7d6b8857a8b8f8360b19861eb72034ca8e19fe81", - "reference": "7d6b8857a8b8f8360b19861eb72034ca8e19fe81", + "url": "https://api.github.com/repos/xtrime-ru/MadelineProto/zipball/509d607c8cdfa56df28380e85462afbf87259d79", + "reference": "509d607c8cdfa56df28380e85462afbf87259d79", "shasum": "" }, "require": { @@ -2768,7 +2768,7 @@ "url": "https://github.com/danog" } ], - "time": "2025-11-20T09:01:55+00:00" + "time": "2025-12-08T16:46:27+00:00" }, { "name": "danog/primemodule", @@ -3210,20 +3210,20 @@ }, { "name": "league/uri", - "version": "7.6.0", + "version": "7.7.0", "source": { "type": "git", "url": "https://github.com/thephpleague/uri.git", - "reference": "f625804987a0a9112d954f9209d91fec52182344" + "reference": "8d587cddee53490f9b82bf203d3a9aa7ea4f9807" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thephpleague/uri/zipball/f625804987a0a9112d954f9209d91fec52182344", - "reference": "f625804987a0a9112d954f9209d91fec52182344", + "url": "https://api.github.com/repos/thephpleague/uri/zipball/8d587cddee53490f9b82bf203d3a9aa7ea4f9807", + "reference": "8d587cddee53490f9b82bf203d3a9aa7ea4f9807", "shasum": "" }, "require": { - "league/uri-interfaces": "^7.6", + "league/uri-interfaces": "^7.7", "php": "^8.1", "psr/http-factory": "^1" }, @@ -3296,7 +3296,7 @@ "docs": "https://uri.thephpleague.com", "forum": "https://thephpleague.slack.com", "issues": "https://github.com/thephpleague/uri-src/issues", - "source": "https://github.com/thephpleague/uri/tree/7.6.0" + "source": "https://github.com/thephpleague/uri/tree/7.7.0" }, "funding": [ { @@ -3304,24 +3304,24 @@ "type": "github" } ], - "time": "2025-11-18T12:17:23+00:00" + "time": "2025-12-07T16:02:06+00:00" }, { "name": "league/uri-components", - "version": "7.6.0", + "version": "7.7.0", "source": { "type": "git", "url": "https://github.com/thephpleague/uri-components.git", - "reference": "ffa1215dbee72ee4b7bc08d983d25293812456c2" + "reference": "005f8693ce8c1f16f80e88a05cbf08da04c1c374" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thephpleague/uri-components/zipball/ffa1215dbee72ee4b7bc08d983d25293812456c2", - "reference": "ffa1215dbee72ee4b7bc08d983d25293812456c2", + "url": "https://api.github.com/repos/thephpleague/uri-components/zipball/005f8693ce8c1f16f80e88a05cbf08da04c1c374", + "reference": "005f8693ce8c1f16f80e88a05cbf08da04c1c374", "shasum": "" }, "require": { - "league/uri": "^7.6", + "league/uri": "^7.7", "php": "^8.1" }, "suggest": { @@ -3381,7 +3381,7 @@ "docs": "https://uri.thephpleague.com", "forum": "https://thephpleague.slack.com", "issues": "https://github.com/thephpleague/uri-src/issues", - "source": "https://github.com/thephpleague/uri-components/tree/7.6.0" + "source": "https://github.com/thephpleague/uri-components/tree/7.7.0" }, "funding": [ { @@ -3389,20 +3389,20 @@ "type": "github" } ], - "time": "2025-11-18T12:17:23+00:00" + "time": "2025-12-07T16:02:56+00:00" }, { "name": "league/uri-interfaces", - "version": "7.6.0", + "version": "7.7.0", "source": { "type": "git", "url": "https://github.com/thephpleague/uri-interfaces.git", - "reference": "ccbfb51c0445298e7e0b7f4481b942f589665368" + "reference": "62ccc1a0435e1c54e10ee6022df28d6c04c2946c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thephpleague/uri-interfaces/zipball/ccbfb51c0445298e7e0b7f4481b942f589665368", - "reference": "ccbfb51c0445298e7e0b7f4481b942f589665368", + "url": "https://api.github.com/repos/thephpleague/uri-interfaces/zipball/62ccc1a0435e1c54e10ee6022df28d6c04c2946c", + "reference": "62ccc1a0435e1c54e10ee6022df28d6c04c2946c", "shasum": "" }, "require": { @@ -3465,7 +3465,7 @@ "docs": "https://uri.thephpleague.com", "forum": "https://thephpleague.slack.com", "issues": "https://github.com/thephpleague/uri-src/issues", - "source": "https://github.com/thephpleague/uri-interfaces/tree/7.6.0" + "source": "https://github.com/thephpleague/uri-interfaces/tree/7.7.0" }, "funding": [ { @@ -3473,7 +3473,7 @@ "type": "github" } ], - "time": "2025-11-18T12:17:23+00:00" + "time": "2025-12-07T16:03:21+00:00" }, { "name": "monolog/monolog", @@ -3630,16 +3630,16 @@ }, { "name": "nikic/php-parser", - "version": "v5.6.2", + "version": "v5.7.0", "source": { "type": "git", "url": "https://github.com/nikic/PHP-Parser.git", - "reference": "3a454ca033b9e06b63282ce19562e892747449bb" + "reference": "dca41cd15c2ac9d055ad70dbfd011130757d1f82" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/3a454ca033b9e06b63282ce19562e892747449bb", - "reference": "3a454ca033b9e06b63282ce19562e892747449bb", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/dca41cd15c2ac9d055ad70dbfd011130757d1f82", + "reference": "dca41cd15c2ac9d055ad70dbfd011130757d1f82", "shasum": "" }, "require": { @@ -3682,9 +3682,9 @@ ], "support": { "issues": "https://github.com/nikic/PHP-Parser/issues", - "source": "https://github.com/nikic/PHP-Parser/tree/v5.6.2" + "source": "https://github.com/nikic/PHP-Parser/tree/v5.7.0" }, - "time": "2025-10-21T19:32:17+00:00" + "time": "2025-12-06T11:56:16+00:00" }, { "name": "paragonie/constant_time_encoding", @@ -4218,16 +4218,16 @@ }, { "name": "revolt/event-loop", - "version": "v1.0.7", + "version": "v1.0.8", "source": { "type": "git", "url": "https://github.com/revoltphp/event-loop.git", - "reference": "09bf1bf7f7f574453efe43044b06fafe12216eb3" + "reference": "b6fc06dce8e9b523c9946138fa5e62181934f91c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/revoltphp/event-loop/zipball/09bf1bf7f7f574453efe43044b06fafe12216eb3", - "reference": "09bf1bf7f7f574453efe43044b06fafe12216eb3", + "url": "https://api.github.com/repos/revoltphp/event-loop/zipball/b6fc06dce8e9b523c9946138fa5e62181934f91c", + "reference": "b6fc06dce8e9b523c9946138fa5e62181934f91c", "shasum": "" }, "require": { @@ -4284,9 +4284,9 @@ ], "support": { "issues": "https://github.com/revoltphp/event-loop/issues", - "source": "https://github.com/revoltphp/event-loop/tree/v1.0.7" + "source": "https://github.com/revoltphp/event-loop/tree/v1.0.8" }, - "time": "2025-01-25T19:27:39+00:00" + "time": "2025-08-27T21:33:23+00:00" }, { "name": "symfony/polyfill-ctype", @@ -5214,16 +5214,16 @@ }, { "name": "friendsofphp/php-cs-fixer", - "version": "v3.89.2", + "version": "v3.91.3", "source": { "type": "git", "url": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer.git", - "reference": "7569658f91e475ec93b99bd5964b059ad1336dcf" + "reference": "9f10aa6390cea91da175ea608880e942d7c0226e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/PHP-CS-Fixer/PHP-CS-Fixer/zipball/7569658f91e475ec93b99bd5964b059ad1336dcf", - "reference": "7569658f91e475ec93b99bd5964b059ad1336dcf", + "url": "https://api.github.com/repos/PHP-CS-Fixer/PHP-CS-Fixer/zipball/9f10aa6390cea91da175ea608880e942d7c0226e", + "reference": "9f10aa6390cea91da175ea608880e942d7c0226e", "shasum": "" }, "require": { @@ -5241,17 +5241,17 @@ "react/socket": "^1.16", "react/stream": "^1.4", "sebastian/diff": "^4.0.6 || ^5.1.1 || ^6.0.2 || ^7.0", - "symfony/console": "^5.4.47 || ^6.4.24 || ^7.0", - "symfony/event-dispatcher": "^5.4.45 || ^6.4.24 || ^7.0", - "symfony/filesystem": "^5.4.45 || ^6.4.24 || ^7.0", - "symfony/finder": "^5.4.45 || ^6.4.24 || ^7.0", - "symfony/options-resolver": "^5.4.45 || ^6.4.24 || ^7.0", + "symfony/console": "^5.4.47 || ^6.4.24 || ^7.0 || ^8.0", + "symfony/event-dispatcher": "^5.4.45 || ^6.4.24 || ^7.0 || ^8.0", + "symfony/filesystem": "^5.4.45 || ^6.4.24 || ^7.0 || ^8.0", + "symfony/finder": "^5.4.45 || ^6.4.24 || ^7.0 || ^8.0", + "symfony/options-resolver": "^5.4.45 || ^6.4.24 || ^7.0 || ^8.0", "symfony/polyfill-mbstring": "^1.33", "symfony/polyfill-php80": "^1.33", "symfony/polyfill-php81": "^1.33", "symfony/polyfill-php84": "^1.33", - "symfony/process": "^5.4.47 || ^6.4.24 || ^7.2", - "symfony/stopwatch": "^5.4.45 || ^6.4.24 || ^7.0" + "symfony/process": "^5.4.47 || ^6.4.24 || ^7.2 || ^8.0", + "symfony/stopwatch": "^5.4.45 || ^6.4.24 || ^7.0 || ^8.0" }, "require-dev": { "facile-it/paraunit": "^1.3.1 || ^2.7", @@ -5263,8 +5263,8 @@ "php-cs-fixer/phpunit-constraint-isidenticalstring": "^1.6", "php-cs-fixer/phpunit-constraint-xmlmatchesxsd": "^1.6", "phpunit/phpunit": "^9.6.25 || ^10.5.53 || ^11.5.34", - "symfony/var-dumper": "^5.4.48 || ^6.4.24 || ^7.3.2", - "symfony/yaml": "^5.4.45 || ^6.4.24 || ^7.3.2" + "symfony/var-dumper": "^5.4.48 || ^6.4.24 || ^7.3.2 || ^8.0", + "symfony/yaml": "^5.4.45 || ^6.4.24 || ^7.3.2 || ^8.0" }, "suggest": { "ext-dom": "For handling output formats in XML", @@ -5279,7 +5279,7 @@ "PhpCsFixer\\": "src/" }, "exclude-from-classmap": [ - "src/Fixer/Internal/*" + "src/**/Internal/" ] }, "notification-url": "https://packagist.org/downloads/", @@ -5305,7 +5305,7 @@ ], "support": { "issues": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/issues", - "source": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/tree/v3.89.2" + "source": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/tree/v3.91.3" }, "funding": [ { @@ -5313,7 +5313,7 @@ "type": "github" } ], - "time": "2025-11-06T21:12:50+00:00" + "time": "2025-12-05T19:45:37+00:00" }, { "name": "psr/container", @@ -6013,47 +6013,39 @@ }, { "name": "symfony/console", - "version": "v7.3.6", + "version": "v8.0.1", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "c28ad91448f86c5f6d9d2c70f0cf68bf135f252a" + "reference": "fcb73f69d655b48fcb894a262f074218df08bd58" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/c28ad91448f86c5f6d9d2c70f0cf68bf135f252a", - "reference": "c28ad91448f86c5f6d9d2c70f0cf68bf135f252a", + "url": "https://api.github.com/repos/symfony/console/zipball/fcb73f69d655b48fcb894a262f074218df08bd58", + "reference": "fcb73f69d655b48fcb894a262f074218df08bd58", "shasum": "" }, "require": { - "php": ">=8.2", - "symfony/deprecation-contracts": "^2.5|^3", - "symfony/polyfill-mbstring": "~1.0", + "php": ">=8.4", + "symfony/polyfill-mbstring": "^1.0", "symfony/service-contracts": "^2.5|^3", - "symfony/string": "^7.2" - }, - "conflict": { - "symfony/dependency-injection": "<6.4", - "symfony/dotenv": "<6.4", - "symfony/event-dispatcher": "<6.4", - "symfony/lock": "<6.4", - "symfony/process": "<6.4" + "symfony/string": "^7.4|^8.0" }, "provide": { "psr/log-implementation": "1.0|2.0|3.0" }, "require-dev": { "psr/log": "^1|^2|^3", - "symfony/config": "^6.4|^7.0", - "symfony/dependency-injection": "^6.4|^7.0", - "symfony/event-dispatcher": "^6.4|^7.0", - "symfony/http-foundation": "^6.4|^7.0", - "symfony/http-kernel": "^6.4|^7.0", - "symfony/lock": "^6.4|^7.0", - "symfony/messenger": "^6.4|^7.0", - "symfony/process": "^6.4|^7.0", - "symfony/stopwatch": "^6.4|^7.0", - "symfony/var-dumper": "^6.4|^7.0" + "symfony/config": "^7.4|^8.0", + "symfony/dependency-injection": "^7.4|^8.0", + "symfony/event-dispatcher": "^7.4|^8.0", + "symfony/http-foundation": "^7.4|^8.0", + "symfony/http-kernel": "^7.4|^8.0", + "symfony/lock": "^7.4|^8.0", + "symfony/messenger": "^7.4|^8.0", + "symfony/process": "^7.4|^8.0", + "symfony/stopwatch": "^7.4|^8.0", + "symfony/var-dumper": "^7.4|^8.0" }, "type": "library", "autoload": { @@ -6087,7 +6079,7 @@ "terminal" ], "support": { - "source": "https://github.com/symfony/console/tree/v7.3.6" + "source": "https://github.com/symfony/console/tree/v8.0.1" }, "funding": [ { @@ -6107,7 +6099,7 @@ "type": "tidelift" } ], - "time": "2025-11-04T01:21:42+00:00" + "time": "2025-12-05T15:25:33+00:00" }, { "name": "symfony/deprecation-contracts", @@ -6178,24 +6170,24 @@ }, { "name": "symfony/event-dispatcher", - "version": "v7.3.3", + "version": "v8.0.0", "source": { "type": "git", "url": "https://github.com/symfony/event-dispatcher.git", - "reference": "b7dc69e71de420ac04bc9ab830cf3ffebba48191" + "reference": "573f95783a2ec6e38752979db139f09fec033f03" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/b7dc69e71de420ac04bc9ab830cf3ffebba48191", - "reference": "b7dc69e71de420ac04bc9ab830cf3ffebba48191", + "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/573f95783a2ec6e38752979db139f09fec033f03", + "reference": "573f95783a2ec6e38752979db139f09fec033f03", "shasum": "" }, "require": { - "php": ">=8.2", + "php": ">=8.4", "symfony/event-dispatcher-contracts": "^2.5|^3" }, "conflict": { - "symfony/dependency-injection": "<6.4", + "symfony/security-http": "<7.4", "symfony/service-contracts": "<2.5" }, "provide": { @@ -6204,13 +6196,14 @@ }, "require-dev": { "psr/log": "^1|^2|^3", - "symfony/config": "^6.4|^7.0", - "symfony/dependency-injection": "^6.4|^7.0", - "symfony/error-handler": "^6.4|^7.0", - "symfony/expression-language": "^6.4|^7.0", - "symfony/http-foundation": "^6.4|^7.0", + "symfony/config": "^7.4|^8.0", + "symfony/dependency-injection": "^7.4|^8.0", + "symfony/error-handler": "^7.4|^8.0", + "symfony/expression-language": "^7.4|^8.0", + "symfony/framework-bundle": "^7.4|^8.0", + "symfony/http-foundation": "^7.4|^8.0", "symfony/service-contracts": "^2.5|^3", - "symfony/stopwatch": "^6.4|^7.0" + "symfony/stopwatch": "^7.4|^8.0" }, "type": "library", "autoload": { @@ -6238,7 +6231,7 @@ "description": "Provides tools that allow your application components to communicate with each other by dispatching events and listening to them", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/event-dispatcher/tree/v7.3.3" + "source": "https://github.com/symfony/event-dispatcher/tree/v8.0.0" }, "funding": [ { @@ -6258,7 +6251,7 @@ "type": "tidelift" } ], - "time": "2025-08-13T11:49:31+00:00" + "time": "2025-10-30T14:17:19+00:00" }, { "name": "symfony/event-dispatcher-contracts", @@ -6338,25 +6331,25 @@ }, { "name": "symfony/filesystem", - "version": "v7.3.6", + "version": "v8.0.1", "source": { "type": "git", "url": "https://github.com/symfony/filesystem.git", - "reference": "e9bcfd7837928ab656276fe00464092cc9e1826a" + "reference": "d937d400b980523dc9ee946bb69972b5e619058d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/filesystem/zipball/e9bcfd7837928ab656276fe00464092cc9e1826a", - "reference": "e9bcfd7837928ab656276fe00464092cc9e1826a", + "url": "https://api.github.com/repos/symfony/filesystem/zipball/d937d400b980523dc9ee946bb69972b5e619058d", + "reference": "d937d400b980523dc9ee946bb69972b5e619058d", "shasum": "" }, "require": { - "php": ">=8.2", + "php": ">=8.4", "symfony/polyfill-ctype": "~1.8", "symfony/polyfill-mbstring": "~1.8" }, "require-dev": { - "symfony/process": "^6.4|^7.0" + "symfony/process": "^7.4|^8.0" }, "type": "library", "autoload": { @@ -6384,7 +6377,7 @@ "description": "Provides basic utilities for the filesystem", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/filesystem/tree/v7.3.6" + "source": "https://github.com/symfony/filesystem/tree/v8.0.1" }, "funding": [ { @@ -6404,27 +6397,27 @@ "type": "tidelift" } ], - "time": "2025-11-05T09:52:27+00:00" + "time": "2025-12-01T09:13:36+00:00" }, { "name": "symfony/finder", - "version": "v7.3.5", + "version": "v8.0.0", "source": { "type": "git", "url": "https://github.com/symfony/finder.git", - "reference": "9f696d2f1e340484b4683f7853b273abff94421f" + "reference": "7598dd5770580fa3517ec83e8da0c9b9e01f4291" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/finder/zipball/9f696d2f1e340484b4683f7853b273abff94421f", - "reference": "9f696d2f1e340484b4683f7853b273abff94421f", + "url": "https://api.github.com/repos/symfony/finder/zipball/7598dd5770580fa3517ec83e8da0c9b9e01f4291", + "reference": "7598dd5770580fa3517ec83e8da0c9b9e01f4291", "shasum": "" }, "require": { - "php": ">=8.2" + "php": ">=8.4" }, "require-dev": { - "symfony/filesystem": "^6.4|^7.0" + "symfony/filesystem": "^7.4|^8.0" }, "type": "library", "autoload": { @@ -6452,7 +6445,7 @@ "description": "Finds files and directories via an intuitive fluent interface", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/finder/tree/v7.3.5" + "source": "https://github.com/symfony/finder/tree/v8.0.0" }, "funding": [ { @@ -6472,24 +6465,24 @@ "type": "tidelift" } ], - "time": "2025-10-15T18:45:57+00:00" + "time": "2025-11-05T14:36:47+00:00" }, { "name": "symfony/options-resolver", - "version": "v7.3.3", + "version": "v8.0.0", "source": { "type": "git", "url": "https://github.com/symfony/options-resolver.git", - "reference": "0ff2f5c3df08a395232bbc3c2eb7e84912df911d" + "reference": "d2b592535ffa6600c265a3893a7f7fd2bad82dd7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/options-resolver/zipball/0ff2f5c3df08a395232bbc3c2eb7e84912df911d", - "reference": "0ff2f5c3df08a395232bbc3c2eb7e84912df911d", + "url": "https://api.github.com/repos/symfony/options-resolver/zipball/d2b592535ffa6600c265a3893a7f7fd2bad82dd7", + "reference": "d2b592535ffa6600c265a3893a7f7fd2bad82dd7", "shasum": "" }, "require": { - "php": ">=8.2", + "php": ">=8.4", "symfony/deprecation-contracts": "^2.5|^3" }, "type": "library", @@ -6523,7 +6516,7 @@ "options" ], "support": { - "source": "https://github.com/symfony/options-resolver/tree/v7.3.3" + "source": "https://github.com/symfony/options-resolver/tree/v8.0.0" }, "funding": [ { @@ -6543,7 +6536,7 @@ "type": "tidelift" } ], - "time": "2025-08-05T10:16:07+00:00" + "time": "2025-11-12T15:55:31+00:00" }, { "name": "symfony/polyfill-intl-grapheme", @@ -6874,20 +6867,20 @@ }, { "name": "symfony/process", - "version": "v7.3.4", + "version": "v8.0.0", "source": { "type": "git", "url": "https://github.com/symfony/process.git", - "reference": "f24f8f316367b30810810d4eb30c543d7003ff3b" + "reference": "a0a750500c4ce900d69ba4e9faf16f82c10ee149" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/f24f8f316367b30810810d4eb30c543d7003ff3b", - "reference": "f24f8f316367b30810810d4eb30c543d7003ff3b", + "url": "https://api.github.com/repos/symfony/process/zipball/a0a750500c4ce900d69ba4e9faf16f82c10ee149", + "reference": "a0a750500c4ce900d69ba4e9faf16f82c10ee149", "shasum": "" }, "require": { - "php": ">=8.2" + "php": ">=8.4" }, "type": "library", "autoload": { @@ -6915,7 +6908,7 @@ "description": "Executes commands in sub-processes", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/process/tree/v7.3.4" + "source": "https://github.com/symfony/process/tree/v8.0.0" }, "funding": [ { @@ -6935,7 +6928,7 @@ "type": "tidelift" } ], - "time": "2025-09-11T10:12:26+00:00" + "time": "2025-10-16T16:25:44+00:00" }, { "name": "symfony/service-contracts", @@ -7026,20 +7019,20 @@ }, { "name": "symfony/stopwatch", - "version": "v7.3.0", + "version": "v8.0.0", "source": { "type": "git", "url": "https://github.com/symfony/stopwatch.git", - "reference": "5a49289e2b308214c8b9c2fda4ea454d8b8ad7cd" + "reference": "67df1914c6ccd2d7b52f70d40cf2aea02159d942" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/stopwatch/zipball/5a49289e2b308214c8b9c2fda4ea454d8b8ad7cd", - "reference": "5a49289e2b308214c8b9c2fda4ea454d8b8ad7cd", + "url": "https://api.github.com/repos/symfony/stopwatch/zipball/67df1914c6ccd2d7b52f70d40cf2aea02159d942", + "reference": "67df1914c6ccd2d7b52f70d40cf2aea02159d942", "shasum": "" }, "require": { - "php": ">=8.2", + "php": ">=8.4", "symfony/service-contracts": "^2.5|^3" }, "type": "library", @@ -7068,7 +7061,7 @@ "description": "Provides a way to profile code", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/stopwatch/tree/v7.3.0" + "source": "https://github.com/symfony/stopwatch/tree/v8.0.0" }, "funding": [ { @@ -7079,43 +7072,47 @@ "url": "https://github.com/fabpot", "type": "github" }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, { "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", "type": "tidelift" } ], - "time": "2025-02-24T10:49:57+00:00" + "time": "2025-08-04T07:36:47+00:00" }, { "name": "symfony/string", - "version": "v7.3.4", + "version": "v8.0.1", "source": { "type": "git", "url": "https://github.com/symfony/string.git", - "reference": "f96476035142921000338bad71e5247fbc138872" + "reference": "ba65a969ac918ce0cc3edfac6cdde847eba231dc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/string/zipball/f96476035142921000338bad71e5247fbc138872", - "reference": "f96476035142921000338bad71e5247fbc138872", + "url": "https://api.github.com/repos/symfony/string/zipball/ba65a969ac918ce0cc3edfac6cdde847eba231dc", + "reference": "ba65a969ac918ce0cc3edfac6cdde847eba231dc", "shasum": "" }, "require": { - "php": ">=8.2", - "symfony/polyfill-ctype": "~1.8", - "symfony/polyfill-intl-grapheme": "~1.0", - "symfony/polyfill-intl-normalizer": "~1.0", - "symfony/polyfill-mbstring": "~1.0" + "php": ">=8.4", + "symfony/polyfill-ctype": "^1.8", + "symfony/polyfill-intl-grapheme": "^1.33", + "symfony/polyfill-intl-normalizer": "^1.0", + "symfony/polyfill-mbstring": "^1.0" }, "conflict": { "symfony/translation-contracts": "<2.5" }, "require-dev": { - "symfony/emoji": "^7.1", - "symfony/http-client": "^6.4|^7.0", - "symfony/intl": "^6.4|^7.0", + "symfony/emoji": "^7.4|^8.0", + "symfony/http-client": "^7.4|^8.0", + "symfony/intl": "^7.4|^8.0", "symfony/translation-contracts": "^2.5|^3.0", - "symfony/var-exporter": "^6.4|^7.0" + "symfony/var-exporter": "^7.4|^8.0" }, "type": "library", "autoload": { @@ -7154,7 +7151,7 @@ "utf8" ], "support": { - "source": "https://github.com/symfony/string/tree/v7.3.4" + "source": "https://github.com/symfony/string/tree/v8.0.1" }, "funding": [ { @@ -7174,7 +7171,7 @@ "type": "tidelift" } ], - "time": "2025-09-11T14:36:48+00:00" + "time": "2025-12-01T09:13:36+00:00" } ], "aliases": [], From 7d81943e9490a1bf3e37b62cc60fb7160d8e76ad Mon Sep 17 00:00:00 2001 From: Alexander Pankratov Date: Mon, 26 Jan 2026 13:14:24 +0100 Subject: [PATCH 249/270] Bump dependencies --- composer.lock | 242 +++++++++++++++++++++++++------------------------- 1 file changed, 121 insertions(+), 121 deletions(-) diff --git a/composer.lock b/composer.lock index b42649a..1ed6a0d 100644 --- a/composer.lock +++ b/composer.lock @@ -1750,16 +1750,16 @@ }, { "name": "amphp/sql-common", - "version": "v2.0.3", + "version": "v2.0.4", "source": { "type": "git", "url": "https://github.com/amphp/sql-common.git", - "reference": "0c926e0348c238c61bead25af5c2fa0d5afaed8d" + "reference": "735da17ef0a66e7139c9f7584af5c3f9827f83c0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/amphp/sql-common/zipball/0c926e0348c238c61bead25af5c2fa0d5afaed8d", - "reference": "0c926e0348c238c61bead25af5c2fa0d5afaed8d", + "url": "https://api.github.com/repos/amphp/sql-common/zipball/735da17ef0a66e7139c9f7584af5c3f9827f83c0", + "reference": "735da17ef0a66e7139c9f7584af5c3f9827f83c0", "shasum": "" }, "require": { @@ -1794,7 +1794,7 @@ ], "support": { "issues": "https://github.com/amphp/sql-common/issues", - "source": "https://github.com/amphp/sql-common/tree/v2.0.3" + "source": "https://github.com/amphp/sql-common/tree/v2.0.4" }, "funding": [ { @@ -1802,7 +1802,7 @@ "type": "github" } ], - "time": "2025-06-07T15:35:29+00:00" + "time": "2025-12-11T20:05:29+00:00" }, { "name": "amphp/sync", @@ -3090,24 +3090,24 @@ }, { "name": "graham-campbell/result-type", - "version": "v1.1.3", + "version": "v1.1.4", "source": { "type": "git", "url": "https://github.com/GrahamCampbell/Result-Type.git", - "reference": "3ba905c11371512af9d9bdd27d99b782216b6945" + "reference": "e01f4a821471308ba86aa202fed6698b6b695e3b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/GrahamCampbell/Result-Type/zipball/3ba905c11371512af9d9bdd27d99b782216b6945", - "reference": "3ba905c11371512af9d9bdd27d99b782216b6945", + "url": "https://api.github.com/repos/GrahamCampbell/Result-Type/zipball/e01f4a821471308ba86aa202fed6698b6b695e3b", + "reference": "e01f4a821471308ba86aa202fed6698b6b695e3b", "shasum": "" }, "require": { "php": "^7.2.5 || ^8.0", - "phpoption/phpoption": "^1.9.3" + "phpoption/phpoption": "^1.9.5" }, "require-dev": { - "phpunit/phpunit": "^8.5.39 || ^9.6.20 || ^10.5.28" + "phpunit/phpunit": "^8.5.41 || ^9.6.22 || ^10.5.45 || ^11.5.7" }, "type": "library", "autoload": { @@ -3136,7 +3136,7 @@ ], "support": { "issues": "https://github.com/GrahamCampbell/Result-Type/issues", - "source": "https://github.com/GrahamCampbell/Result-Type/tree/v1.1.3" + "source": "https://github.com/GrahamCampbell/Result-Type/tree/v1.1.4" }, "funding": [ { @@ -3148,7 +3148,7 @@ "type": "tidelift" } ], - "time": "2024-07-20T21:45:45+00:00" + "time": "2025-12-27T19:43:20+00:00" }, { "name": "kelunik/certificate", @@ -3210,20 +3210,20 @@ }, { "name": "league/uri", - "version": "7.7.0", + "version": "7.8.0", "source": { "type": "git", "url": "https://github.com/thephpleague/uri.git", - "reference": "8d587cddee53490f9b82bf203d3a9aa7ea4f9807" + "reference": "4436c6ec8d458e4244448b069cc572d088230b76" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thephpleague/uri/zipball/8d587cddee53490f9b82bf203d3a9aa7ea4f9807", - "reference": "8d587cddee53490f9b82bf203d3a9aa7ea4f9807", + "url": "https://api.github.com/repos/thephpleague/uri/zipball/4436c6ec8d458e4244448b069cc572d088230b76", + "reference": "4436c6ec8d458e4244448b069cc572d088230b76", "shasum": "" }, "require": { - "league/uri-interfaces": "^7.7", + "league/uri-interfaces": "^7.8", "php": "^8.1", "psr/http-factory": "^1" }, @@ -3237,11 +3237,11 @@ "ext-gmp": "to improve IPV4 host parsing", "ext-intl": "to handle IDN host with the best performance", "ext-uri": "to use the PHP native URI class", - "jeremykendall/php-domain-parser": "to resolve Public Suffix and Top Level Domain", - "league/uri-components": "Needed to easily manipulate URI objects components", - "league/uri-polyfill": "Needed to backport the PHP URI extension for older versions of PHP", + "jeremykendall/php-domain-parser": "to further parse the URI host and resolve its Public Suffix and Top Level Domain", + "league/uri-components": "to provide additional tools to manipulate URI objects components", + "league/uri-polyfill": "to backport the PHP URI extension for older versions of PHP", "php-64bit": "to improve IPV4 host parsing", - "rowbot/url": "to handle WHATWG URL", + "rowbot/url": "to handle URLs using the WHATWG URL Living Standard specification", "symfony/polyfill-intl-idn": "to handle IDN host via the Symfony polyfill if ext-intl is not present" }, "type": "library", @@ -3296,7 +3296,7 @@ "docs": "https://uri.thephpleague.com", "forum": "https://thephpleague.slack.com", "issues": "https://github.com/thephpleague/uri-src/issues", - "source": "https://github.com/thephpleague/uri/tree/7.7.0" + "source": "https://github.com/thephpleague/uri/tree/7.8.0" }, "funding": [ { @@ -3304,37 +3304,36 @@ "type": "github" } ], - "time": "2025-12-07T16:02:06+00:00" + "time": "2026-01-14T17:24:56+00:00" }, { "name": "league/uri-components", - "version": "7.7.0", + "version": "7.8.0", "source": { "type": "git", "url": "https://github.com/thephpleague/uri-components.git", - "reference": "005f8693ce8c1f16f80e88a05cbf08da04c1c374" + "reference": "8b5ffcebcc0842b76eb80964795bd56a8333b2ba" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thephpleague/uri-components/zipball/005f8693ce8c1f16f80e88a05cbf08da04c1c374", - "reference": "005f8693ce8c1f16f80e88a05cbf08da04c1c374", + "url": "https://api.github.com/repos/thephpleague/uri-components/zipball/8b5ffcebcc0842b76eb80964795bd56a8333b2ba", + "reference": "8b5ffcebcc0842b76eb80964795bd56a8333b2ba", "shasum": "" }, "require": { - "league/uri": "^7.7", + "league/uri": "^7.8", "php": "^8.1" }, "suggest": { - "bakame/aide-uri": "A polyfill for PHP8.1 until PHP8.4 to add support to PHP Native URI parser", "ext-bcmath": "to improve IPV4 host parsing", "ext-fileinfo": "to create Data URI from file contennts", "ext-gmp": "to improve IPV4 host parsing", "ext-intl": "to handle IDN host with the best performance", "ext-mbstring": "to use the sorting algorithm of URLSearchParams", - "jeremykendall/php-domain-parser": "to resolve Public Suffix and Top Level Domain", - "league/uri-polyfill": "Needed to backport the PHP URI extension for older versions of PHP", + "jeremykendall/php-domain-parser": "to further parse the URI host and resolve its Public Suffix and Top Level Domain", + "league/uri-polyfill": "to backport the PHP URI extension for older versions of PHP", "php-64bit": "to improve IPV4 host parsing", - "rowbot/url": "to handle WHATWG URL", + "rowbot/url": "to handle URLs using the WHATWG URL Living Standard specification", "symfony/polyfill-intl-idn": "to handle IDN host via the Symfony polyfill if ext-intl is not present" }, "type": "library", @@ -3381,7 +3380,7 @@ "docs": "https://uri.thephpleague.com", "forum": "https://thephpleague.slack.com", "issues": "https://github.com/thephpleague/uri-src/issues", - "source": "https://github.com/thephpleague/uri-components/tree/7.7.0" + "source": "https://github.com/thephpleague/uri-components/tree/7.8.0" }, "funding": [ { @@ -3389,20 +3388,20 @@ "type": "github" } ], - "time": "2025-12-07T16:02:56+00:00" + "time": "2026-01-14T17:24:56+00:00" }, { "name": "league/uri-interfaces", - "version": "7.7.0", + "version": "7.8.0", "source": { "type": "git", "url": "https://github.com/thephpleague/uri-interfaces.git", - "reference": "62ccc1a0435e1c54e10ee6022df28d6c04c2946c" + "reference": "c5c5cd056110fc8afaba29fa6b72a43ced42acd4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thephpleague/uri-interfaces/zipball/62ccc1a0435e1c54e10ee6022df28d6c04c2946c", - "reference": "62ccc1a0435e1c54e10ee6022df28d6c04c2946c", + "url": "https://api.github.com/repos/thephpleague/uri-interfaces/zipball/c5c5cd056110fc8afaba29fa6b72a43ced42acd4", + "reference": "c5c5cd056110fc8afaba29fa6b72a43ced42acd4", "shasum": "" }, "require": { @@ -3415,7 +3414,7 @@ "ext-gmp": "to improve IPV4 host parsing", "ext-intl": "to handle IDN host with the best performance", "php-64bit": "to improve IPV4 host parsing", - "rowbot/url": "to handle WHATWG URL", + "rowbot/url": "to handle URLs using the WHATWG URL Living Standard specification", "symfony/polyfill-intl-idn": "to handle IDN host via the Symfony polyfill if ext-intl is not present" }, "type": "library", @@ -3465,7 +3464,7 @@ "docs": "https://uri.thephpleague.com", "forum": "https://thephpleague.slack.com", "issues": "https://github.com/thephpleague/uri-src/issues", - "source": "https://github.com/thephpleague/uri-interfaces/tree/7.7.0" + "source": "https://github.com/thephpleague/uri-interfaces/tree/7.8.0" }, "funding": [ { @@ -3473,20 +3472,20 @@ "type": "github" } ], - "time": "2025-12-07T16:03:21+00:00" + "time": "2026-01-15T06:54:53+00:00" }, { "name": "monolog/monolog", - "version": "3.9.0", + "version": "3.10.0", "source": { "type": "git", "url": "https://github.com/Seldaek/monolog.git", - "reference": "10d85740180ecba7896c87e06a166e0c95a0e3b6" + "reference": "b321dd6749f0bf7189444158a3ce785cc16d69b0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Seldaek/monolog/zipball/10d85740180ecba7896c87e06a166e0c95a0e3b6", - "reference": "10d85740180ecba7896c87e06a166e0c95a0e3b6", + "url": "https://api.github.com/repos/Seldaek/monolog/zipball/b321dd6749f0bf7189444158a3ce785cc16d69b0", + "reference": "b321dd6749f0bf7189444158a3ce785cc16d69b0", "shasum": "" }, "require": { @@ -3504,7 +3503,7 @@ "graylog2/gelf-php": "^1.4.2 || ^2.0", "guzzlehttp/guzzle": "^7.4.5", "guzzlehttp/psr7": "^2.2", - "mongodb/mongodb": "^1.8", + "mongodb/mongodb": "^1.8 || ^2.0", "php-amqplib/php-amqplib": "~2.4 || ^3", "php-console/php-console": "^3.1.8", "phpstan/phpstan": "^2", @@ -3564,7 +3563,7 @@ ], "support": { "issues": "https://github.com/Seldaek/monolog/issues", - "source": "https://github.com/Seldaek/monolog/tree/3.9.0" + "source": "https://github.com/Seldaek/monolog/tree/3.10.0" }, "funding": [ { @@ -3576,7 +3575,7 @@ "type": "tidelift" } ], - "time": "2025-03-24T10:02:05+00:00" + "time": "2026-01-02T08:56:05+00:00" }, { "name": "nikic/fast-route", @@ -3807,16 +3806,16 @@ }, { "name": "phpoption/phpoption", - "version": "1.9.4", + "version": "1.9.5", "source": { "type": "git", "url": "https://github.com/schmittjoh/php-option.git", - "reference": "638a154f8d4ee6a5cfa96d6a34dfbe0cffa9566d" + "reference": "75365b91986c2405cf5e1e012c5595cd487a98be" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/schmittjoh/php-option/zipball/638a154f8d4ee6a5cfa96d6a34dfbe0cffa9566d", - "reference": "638a154f8d4ee6a5cfa96d6a34dfbe0cffa9566d", + "url": "https://api.github.com/repos/schmittjoh/php-option/zipball/75365b91986c2405cf5e1e012c5595cd487a98be", + "reference": "75365b91986c2405cf5e1e012c5595cd487a98be", "shasum": "" }, "require": { @@ -3866,7 +3865,7 @@ ], "support": { "issues": "https://github.com/schmittjoh/php-option/issues", - "source": "https://github.com/schmittjoh/php-option/tree/1.9.4" + "source": "https://github.com/schmittjoh/php-option/tree/1.9.5" }, "funding": [ { @@ -3878,20 +3877,20 @@ "type": "tidelift" } ], - "time": "2025-08-21T11:53:16+00:00" + "time": "2025-12-27T19:41:33+00:00" }, { "name": "phpseclib/phpseclib", - "version": "3.0.47", + "version": "3.0.48", "source": { "type": "git", "url": "https://github.com/phpseclib/phpseclib.git", - "reference": "9d6ca36a6c2dd434765b1071b2644a1c683b385d" + "reference": "64065a5679c50acb886e82c07aa139b0f757bb89" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpseclib/phpseclib/zipball/9d6ca36a6c2dd434765b1071b2644a1c683b385d", - "reference": "9d6ca36a6c2dd434765b1071b2644a1c683b385d", + "url": "https://api.github.com/repos/phpseclib/phpseclib/zipball/64065a5679c50acb886e82c07aa139b0f757bb89", + "reference": "64065a5679c50acb886e82c07aa139b0f757bb89", "shasum": "" }, "require": { @@ -3972,7 +3971,7 @@ ], "support": { "issues": "https://github.com/phpseclib/phpseclib/issues", - "source": "https://github.com/phpseclib/phpseclib/tree/3.0.47" + "source": "https://github.com/phpseclib/phpseclib/tree/3.0.48" }, "funding": [ { @@ -3988,7 +3987,7 @@ "type": "tidelift" } ], - "time": "2025-10-06T01:07:24+00:00" + "time": "2025-12-15T11:51:42+00:00" }, { "name": "promphp/prometheus_client_php", @@ -4622,26 +4621,26 @@ }, { "name": "vlucas/phpdotenv", - "version": "v5.6.2", + "version": "v5.6.3", "source": { "type": "git", "url": "https://github.com/vlucas/phpdotenv.git", - "reference": "24ac4c74f91ee2c193fa1aaa5c249cb0822809af" + "reference": "955e7815d677a3eaa7075231212f2110983adecc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/vlucas/phpdotenv/zipball/24ac4c74f91ee2c193fa1aaa5c249cb0822809af", - "reference": "24ac4c74f91ee2c193fa1aaa5c249cb0822809af", + "url": "https://api.github.com/repos/vlucas/phpdotenv/zipball/955e7815d677a3eaa7075231212f2110983adecc", + "reference": "955e7815d677a3eaa7075231212f2110983adecc", "shasum": "" }, "require": { "ext-pcre": "*", - "graham-campbell/result-type": "^1.1.3", + "graham-campbell/result-type": "^1.1.4", "php": "^7.2.5 || ^8.0", - "phpoption/phpoption": "^1.9.3", - "symfony/polyfill-ctype": "^1.24", - "symfony/polyfill-mbstring": "^1.24", - "symfony/polyfill-php80": "^1.24" + "phpoption/phpoption": "^1.9.5", + "symfony/polyfill-ctype": "^1.26", + "symfony/polyfill-mbstring": "^1.26", + "symfony/polyfill-php80": "^1.26" }, "require-dev": { "bamarni/composer-bin-plugin": "^1.8.2", @@ -4690,7 +4689,7 @@ ], "support": { "issues": "https://github.com/vlucas/phpdotenv/issues", - "source": "https://github.com/vlucas/phpdotenv/tree/v5.6.2" + "source": "https://github.com/vlucas/phpdotenv/tree/v5.6.3" }, "funding": [ { @@ -4702,7 +4701,7 @@ "type": "tidelift" } ], - "time": "2025-04-30T23:37:27+00:00" + "time": "2025-12-27T19:49:13+00:00" }, { "name": "webmozart/assert", @@ -5214,16 +5213,16 @@ }, { "name": "friendsofphp/php-cs-fixer", - "version": "v3.91.3", + "version": "v3.93.0", "source": { "type": "git", "url": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer.git", - "reference": "9f10aa6390cea91da175ea608880e942d7c0226e" + "reference": "50895a07cface1385082e4caa6a6786c4e033468" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/PHP-CS-Fixer/PHP-CS-Fixer/zipball/9f10aa6390cea91da175ea608880e942d7c0226e", - "reference": "9f10aa6390cea91da175ea608880e942d7c0226e", + "url": "https://api.github.com/repos/PHP-CS-Fixer/PHP-CS-Fixer/zipball/50895a07cface1385082e4caa6a6786c4e033468", + "reference": "50895a07cface1385082e4caa6a6786c4e033468", "shasum": "" }, "require": { @@ -5255,16 +5254,17 @@ }, "require-dev": { "facile-it/paraunit": "^1.3.1 || ^2.7", - "infection/infection": "^0.31.0", - "justinrainbow/json-schema": "^6.5", - "keradus/cli-executor": "^2.2", + "infection/infection": "^0.32", + "justinrainbow/json-schema": "^6.6", + "keradus/cli-executor": "^2.3", "mikey179/vfsstream": "^1.6.12", "php-coveralls/php-coveralls": "^2.9", "php-cs-fixer/phpunit-constraint-isidenticalstring": "^1.6", "php-cs-fixer/phpunit-constraint-xmlmatchesxsd": "^1.6", - "phpunit/phpunit": "^9.6.25 || ^10.5.53 || ^11.5.34", - "symfony/var-dumper": "^5.4.48 || ^6.4.24 || ^7.3.2 || ^8.0", - "symfony/yaml": "^5.4.45 || ^6.4.24 || ^7.3.2 || ^8.0" + "phpunit/phpunit": "^9.6.31 || ^10.5.60 || ^11.5.48", + "symfony/polyfill-php85": "^1.33", + "symfony/var-dumper": "^5.4.48 || ^6.4.26 || ^7.4.0 || ^8.0", + "symfony/yaml": "^5.4.45 || ^6.4.30 || ^7.4.1 || ^8.0" }, "suggest": { "ext-dom": "For handling output formats in XML", @@ -5305,7 +5305,7 @@ ], "support": { "issues": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/issues", - "source": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/tree/v3.91.3" + "source": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/tree/v3.93.0" }, "funding": [ { @@ -5313,7 +5313,7 @@ "type": "github" } ], - "time": "2025-12-05T19:45:37+00:00" + "time": "2026-01-23T17:33:21+00:00" }, { "name": "psr/container", @@ -5492,16 +5492,16 @@ }, { "name": "react/child-process", - "version": "v0.6.6", + "version": "v0.6.7", "source": { "type": "git", "url": "https://github.com/reactphp/child-process.git", - "reference": "1721e2b93d89b745664353b9cfc8f155ba8a6159" + "reference": "970f0e71945556422ee4570ccbabaedc3cf04ad3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/reactphp/child-process/zipball/1721e2b93d89b745664353b9cfc8f155ba8a6159", - "reference": "1721e2b93d89b745664353b9cfc8f155ba8a6159", + "url": "https://api.github.com/repos/reactphp/child-process/zipball/970f0e71945556422ee4570ccbabaedc3cf04ad3", + "reference": "970f0e71945556422ee4570ccbabaedc3cf04ad3", "shasum": "" }, "require": { @@ -5555,7 +5555,7 @@ ], "support": { "issues": "https://github.com/reactphp/child-process/issues", - "source": "https://github.com/reactphp/child-process/tree/v0.6.6" + "source": "https://github.com/reactphp/child-process/tree/v0.6.7" }, "funding": [ { @@ -5563,7 +5563,7 @@ "type": "open_collective" } ], - "time": "2025-01-01T16:37:48+00:00" + "time": "2025-12-23T15:25:20+00:00" }, { "name": "react/dns", @@ -6013,16 +6013,16 @@ }, { "name": "symfony/console", - "version": "v8.0.1", + "version": "v8.0.4", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "fcb73f69d655b48fcb894a262f074218df08bd58" + "reference": "ace03c4cf9805080ff40cbeec69fca180c339a3b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/fcb73f69d655b48fcb894a262f074218df08bd58", - "reference": "fcb73f69d655b48fcb894a262f074218df08bd58", + "url": "https://api.github.com/repos/symfony/console/zipball/ace03c4cf9805080ff40cbeec69fca180c339a3b", + "reference": "ace03c4cf9805080ff40cbeec69fca180c339a3b", "shasum": "" }, "require": { @@ -6079,7 +6079,7 @@ "terminal" ], "support": { - "source": "https://github.com/symfony/console/tree/v8.0.1" + "source": "https://github.com/symfony/console/tree/v8.0.4" }, "funding": [ { @@ -6099,7 +6099,7 @@ "type": "tidelift" } ], - "time": "2025-12-05T15:25:33+00:00" + "time": "2026-01-13T13:06:50+00:00" }, { "name": "symfony/deprecation-contracts", @@ -6170,16 +6170,16 @@ }, { "name": "symfony/event-dispatcher", - "version": "v8.0.0", + "version": "v8.0.4", "source": { "type": "git", "url": "https://github.com/symfony/event-dispatcher.git", - "reference": "573f95783a2ec6e38752979db139f09fec033f03" + "reference": "99301401da182b6cfaa4700dbe9987bb75474b47" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/573f95783a2ec6e38752979db139f09fec033f03", - "reference": "573f95783a2ec6e38752979db139f09fec033f03", + "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/99301401da182b6cfaa4700dbe9987bb75474b47", + "reference": "99301401da182b6cfaa4700dbe9987bb75474b47", "shasum": "" }, "require": { @@ -6231,7 +6231,7 @@ "description": "Provides tools that allow your application components to communicate with each other by dispatching events and listening to them", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/event-dispatcher/tree/v8.0.0" + "source": "https://github.com/symfony/event-dispatcher/tree/v8.0.4" }, "funding": [ { @@ -6251,7 +6251,7 @@ "type": "tidelift" } ], - "time": "2025-10-30T14:17:19+00:00" + "time": "2026-01-05T11:45:55+00:00" }, { "name": "symfony/event-dispatcher-contracts", @@ -6401,16 +6401,16 @@ }, { "name": "symfony/finder", - "version": "v8.0.0", + "version": "v8.0.4", "source": { "type": "git", "url": "https://github.com/symfony/finder.git", - "reference": "7598dd5770580fa3517ec83e8da0c9b9e01f4291" + "reference": "42e48eb02e07d5f3771d194d67da117eb824c8c1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/finder/zipball/7598dd5770580fa3517ec83e8da0c9b9e01f4291", - "reference": "7598dd5770580fa3517ec83e8da0c9b9e01f4291", + "url": "https://api.github.com/repos/symfony/finder/zipball/42e48eb02e07d5f3771d194d67da117eb824c8c1", + "reference": "42e48eb02e07d5f3771d194d67da117eb824c8c1", "shasum": "" }, "require": { @@ -6445,7 +6445,7 @@ "description": "Finds files and directories via an intuitive fluent interface", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/finder/tree/v8.0.0" + "source": "https://github.com/symfony/finder/tree/v8.0.4" }, "funding": [ { @@ -6465,7 +6465,7 @@ "type": "tidelift" } ], - "time": "2025-11-05T14:36:47+00:00" + "time": "2026-01-12T12:37:40+00:00" }, { "name": "symfony/options-resolver", @@ -6867,16 +6867,16 @@ }, { "name": "symfony/process", - "version": "v8.0.0", + "version": "v8.0.4", "source": { "type": "git", "url": "https://github.com/symfony/process.git", - "reference": "a0a750500c4ce900d69ba4e9faf16f82c10ee149" + "reference": "10df72602d88c0a3fa685b822976a052611dd607" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/a0a750500c4ce900d69ba4e9faf16f82c10ee149", - "reference": "a0a750500c4ce900d69ba4e9faf16f82c10ee149", + "url": "https://api.github.com/repos/symfony/process/zipball/10df72602d88c0a3fa685b822976a052611dd607", + "reference": "10df72602d88c0a3fa685b822976a052611dd607", "shasum": "" }, "require": { @@ -6908,7 +6908,7 @@ "description": "Executes commands in sub-processes", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/process/tree/v8.0.0" + "source": "https://github.com/symfony/process/tree/v8.0.4" }, "funding": [ { @@ -6928,7 +6928,7 @@ "type": "tidelift" } ], - "time": "2025-10-16T16:25:44+00:00" + "time": "2026-01-23T11:07:10+00:00" }, { "name": "symfony/service-contracts", @@ -7085,16 +7085,16 @@ }, { "name": "symfony/string", - "version": "v8.0.1", + "version": "v8.0.4", "source": { "type": "git", "url": "https://github.com/symfony/string.git", - "reference": "ba65a969ac918ce0cc3edfac6cdde847eba231dc" + "reference": "758b372d6882506821ed666032e43020c4f57194" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/string/zipball/ba65a969ac918ce0cc3edfac6cdde847eba231dc", - "reference": "ba65a969ac918ce0cc3edfac6cdde847eba231dc", + "url": "https://api.github.com/repos/symfony/string/zipball/758b372d6882506821ed666032e43020c4f57194", + "reference": "758b372d6882506821ed666032e43020c4f57194", "shasum": "" }, "require": { @@ -7151,7 +7151,7 @@ "utf8" ], "support": { - "source": "https://github.com/symfony/string/tree/v8.0.1" + "source": "https://github.com/symfony/string/tree/v8.0.4" }, "funding": [ { @@ -7171,7 +7171,7 @@ "type": "tidelift" } ], - "time": "2025-12-01T09:13:36+00:00" + "time": "2026-01-12T12:37:40+00:00" } ], "aliases": [], From bc7fec09e01d90cec8c2dbb2c9087f9e59383fd6 Mon Sep 17 00:00:00 2001 From: Alexander Pankratov Date: Tue, 10 Feb 2026 13:43:34 +0100 Subject: [PATCH 250/270] Fix: cve in amp/http-server and symfony/process dependencies --- composer.lock | 60 +++++++++++++++++++++++++-------------------------- 1 file changed, 30 insertions(+), 30 deletions(-) diff --git a/composer.lock b/composer.lock index 1ed6a0d..b00e6f5 100644 --- a/composer.lock +++ b/composer.lock @@ -717,16 +717,16 @@ }, { "name": "amphp/http-server", - "version": "v3.4.3", + "version": "v3.4.4", "source": { "type": "git", "url": "https://github.com/amphp/http-server.git", - "reference": "7aa962b0569f664af3ba23bc819f2a69884329cd" + "reference": "8dc32cc6a65c12a3543276305796b993c56b76ef" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/amphp/http-server/zipball/7aa962b0569f664af3ba23bc819f2a69884329cd", - "reference": "7aa962b0569f664af3ba23bc819f2a69884329cd", + "url": "https://api.github.com/repos/amphp/http-server/zipball/8dc32cc6a65c12a3543276305796b993c56b76ef", + "reference": "8dc32cc6a65c12a3543276305796b993c56b76ef", "shasum": "" }, "require": { @@ -802,7 +802,7 @@ ], "support": { "issues": "https://github.com/amphp/http-server/issues", - "source": "https://github.com/amphp/http-server/tree/v3.4.3" + "source": "https://github.com/amphp/http-server/tree/v3.4.4" }, "funding": [ { @@ -810,7 +810,7 @@ "type": "github" } ], - "time": "2025-05-18T15:43:42+00:00" + "time": "2026-02-08T18:16:29+00:00" }, { "name": "amphp/http-server-form-parser", @@ -3881,16 +3881,16 @@ }, { "name": "phpseclib/phpseclib", - "version": "3.0.48", + "version": "3.0.49", "source": { "type": "git", "url": "https://github.com/phpseclib/phpseclib.git", - "reference": "64065a5679c50acb886e82c07aa139b0f757bb89" + "reference": "6233a1e12584754e6b5daa69fe1289b47775c1b9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpseclib/phpseclib/zipball/64065a5679c50acb886e82c07aa139b0f757bb89", - "reference": "64065a5679c50acb886e82c07aa139b0f757bb89", + "url": "https://api.github.com/repos/phpseclib/phpseclib/zipball/6233a1e12584754e6b5daa69fe1289b47775c1b9", + "reference": "6233a1e12584754e6b5daa69fe1289b47775c1b9", "shasum": "" }, "require": { @@ -3971,7 +3971,7 @@ ], "support": { "issues": "https://github.com/phpseclib/phpseclib/issues", - "source": "https://github.com/phpseclib/phpseclib/tree/3.0.48" + "source": "https://github.com/phpseclib/phpseclib/tree/3.0.49" }, "funding": [ { @@ -3987,7 +3987,7 @@ "type": "tidelift" } ], - "time": "2025-12-15T11:51:42+00:00" + "time": "2026-01-27T09:17:28+00:00" }, { "name": "promphp/prometheus_client_php", @@ -5213,16 +5213,16 @@ }, { "name": "friendsofphp/php-cs-fixer", - "version": "v3.93.0", + "version": "v3.93.1", "source": { "type": "git", "url": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer.git", - "reference": "50895a07cface1385082e4caa6a6786c4e033468" + "reference": "b3546ab487c0762c39f308dc1ec0ea2c461fc21a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/PHP-CS-Fixer/PHP-CS-Fixer/zipball/50895a07cface1385082e4caa6a6786c4e033468", - "reference": "50895a07cface1385082e4caa6a6786c4e033468", + "url": "https://api.github.com/repos/PHP-CS-Fixer/PHP-CS-Fixer/zipball/b3546ab487c0762c39f308dc1ec0ea2c461fc21a", + "reference": "b3546ab487c0762c39f308dc1ec0ea2c461fc21a", "shasum": "" }, "require": { @@ -5305,7 +5305,7 @@ ], "support": { "issues": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/issues", - "source": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/tree/v3.93.0" + "source": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/tree/v3.93.1" }, "funding": [ { @@ -5313,7 +5313,7 @@ "type": "github" } ], - "time": "2026-01-23T17:33:21+00:00" + "time": "2026-01-28T23:50:50+00:00" }, { "name": "psr/container", @@ -6401,16 +6401,16 @@ }, { "name": "symfony/finder", - "version": "v8.0.4", + "version": "v8.0.5", "source": { "type": "git", "url": "https://github.com/symfony/finder.git", - "reference": "42e48eb02e07d5f3771d194d67da117eb824c8c1" + "reference": "8bd576e97c67d45941365bf824e18dc8538e6eb0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/finder/zipball/42e48eb02e07d5f3771d194d67da117eb824c8c1", - "reference": "42e48eb02e07d5f3771d194d67da117eb824c8c1", + "url": "https://api.github.com/repos/symfony/finder/zipball/8bd576e97c67d45941365bf824e18dc8538e6eb0", + "reference": "8bd576e97c67d45941365bf824e18dc8538e6eb0", "shasum": "" }, "require": { @@ -6445,7 +6445,7 @@ "description": "Finds files and directories via an intuitive fluent interface", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/finder/tree/v8.0.4" + "source": "https://github.com/symfony/finder/tree/v8.0.5" }, "funding": [ { @@ -6465,7 +6465,7 @@ "type": "tidelift" } ], - "time": "2026-01-12T12:37:40+00:00" + "time": "2026-01-26T15:08:38+00:00" }, { "name": "symfony/options-resolver", @@ -6867,16 +6867,16 @@ }, { "name": "symfony/process", - "version": "v8.0.4", + "version": "v8.0.5", "source": { "type": "git", "url": "https://github.com/symfony/process.git", - "reference": "10df72602d88c0a3fa685b822976a052611dd607" + "reference": "b5f3aa6762e33fd95efbaa2ec4f4bc9fdd16d674" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/10df72602d88c0a3fa685b822976a052611dd607", - "reference": "10df72602d88c0a3fa685b822976a052611dd607", + "url": "https://api.github.com/repos/symfony/process/zipball/b5f3aa6762e33fd95efbaa2ec4f4bc9fdd16d674", + "reference": "b5f3aa6762e33fd95efbaa2ec4f4bc9fdd16d674", "shasum": "" }, "require": { @@ -6908,7 +6908,7 @@ "description": "Executes commands in sub-processes", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/process/tree/v8.0.4" + "source": "https://github.com/symfony/process/tree/v8.0.5" }, "funding": [ { @@ -6928,7 +6928,7 @@ "type": "tidelift" } ], - "time": "2026-01-23T11:07:10+00:00" + "time": "2026-01-26T15:08:38+00:00" }, { "name": "symfony/service-contracts", From ad4c79d9ae7473a5feb182c772e075440202a54e Mon Sep 17 00:00:00 2001 From: Alexander Pankratov Date: Sun, 22 Feb 2026 22:30:57 +0100 Subject: [PATCH 251/270] Fix: No info for DC -1 --- composer.lock | 110 ++++++++++++++++++++++++++++---------------------- 1 file changed, 61 insertions(+), 49 deletions(-) diff --git a/composer.lock b/composer.lock index b00e6f5..a7d515c 100644 --- a/composer.lock +++ b/composer.lock @@ -1050,16 +1050,16 @@ }, { "name": "amphp/mysql", - "version": "v3.0.0", + "version": "v3.0.1", "source": { "type": "git", "url": "https://github.com/amphp/mysql.git", - "reference": "0eb9d1df67c206c043b1a1c6ad7ba1bc2aa836bf" + "reference": "bef63fda61eefca601be54aa1d983a6a31b4a50f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/amphp/mysql/zipball/0eb9d1df67c206c043b1a1c6ad7ba1bc2aa836bf", - "reference": "0eb9d1df67c206c043b1a1c6ad7ba1bc2aa836bf", + "url": "https://api.github.com/repos/amphp/mysql/zipball/bef63fda61eefca601be54aa1d983a6a31b4a50f", + "reference": "bef63fda61eefca601be54aa1d983a6a31b4a50f", "shasum": "" }, "require": { @@ -1108,7 +1108,7 @@ "description": "Asynchronous MySQL client for PHP based on Amp.", "support": { "issues": "https://github.com/amphp/mysql/issues", - "source": "https://github.com/amphp/mysql/tree/v3.0.0" + "source": "https://github.com/amphp/mysql/tree/v3.0.1" }, "funding": [ { @@ -1116,7 +1116,7 @@ "type": "github" } ], - "time": "2024-03-10T17:33:58+00:00" + "time": "2025-11-08T22:59:09+00:00" }, { "name": "amphp/parallel", @@ -1333,16 +1333,16 @@ }, { "name": "amphp/postgres", - "version": "v2.1.1", + "version": "v2.2.0", "source": { "type": "git", "url": "https://github.com/amphp/postgres.git", - "reference": "c62555c6497782399a166f15c8da8e64be456141" + "reference": "fd7c2661966aeb3a9cc067a7ba507f22c370e1ce" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/amphp/postgres/zipball/c62555c6497782399a166f15c8da8e64be456141", - "reference": "c62555c6497782399a166f15c8da8e64be456141", + "url": "https://api.github.com/repos/amphp/postgres/zipball/fd7c2661966aeb3a9cc067a7ba507f22c370e1ce", + "reference": "fd7c2661966aeb3a9cc067a7ba507f22c370e1ce", "shasum": "" }, "require": { @@ -1358,7 +1358,7 @@ "ext-pgsql": "*", "ext-pq": "*", "phpunit/phpunit": "^9", - "psalm/phar": "5.23" + "psalm/phar": "6.15.1" }, "type": "library", "autoload": { @@ -1393,7 +1393,7 @@ ], "support": { "issues": "https://github.com/amphp/postgres/issues", - "source": "https://github.com/amphp/postgres/tree/v2.1.1" + "source": "https://github.com/amphp/postgres/tree/v2.2.0" }, "funding": [ { @@ -1401,7 +1401,7 @@ "type": "github" } ], - "time": "2024-11-21T04:45:08+00:00" + "time": "2026-02-22T18:50:10+00:00" }, { "name": "amphp/process", @@ -1696,16 +1696,16 @@ }, { "name": "amphp/sql", - "version": "v2.0.1", + "version": "v2.1.0", "source": { "type": "git", "url": "https://github.com/amphp/sql.git", - "reference": "2a7962dba23bf017bbdd3c3a0af0eb212481627b" + "reference": "e7ab2f47ba930b7a5ff99d04e67750f1513f1622" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/amphp/sql/zipball/2a7962dba23bf017bbdd3c3a0af0eb212481627b", - "reference": "2a7962dba23bf017bbdd3c3a0af0eb212481627b", + "url": "https://api.github.com/repos/amphp/sql/zipball/e7ab2f47ba930b7a5ff99d04e67750f1513f1622", + "reference": "e7ab2f47ba930b7a5ff99d04e67750f1513f1622", "shasum": "" }, "require": { @@ -1715,7 +1715,7 @@ "require-dev": { "amphp/php-cs-fixer-config": "^2", "phpunit/phpunit": "^9", - "psalm/phar": "5.23" + "psalm/phar": "6.15.1" }, "type": "library", "autoload": { @@ -1738,7 +1738,7 @@ ], "support": { "issues": "https://github.com/amphp/sql/issues", - "source": "https://github.com/amphp/sql/tree/v2.0.1" + "source": "https://github.com/amphp/sql/tree/v2.1.0" }, "funding": [ { @@ -1746,7 +1746,7 @@ "type": "github" } ], - "time": "2024-11-23T16:16:34+00:00" + "time": "2026-02-22T17:29:27+00:00" }, { "name": "amphp/sql-common", @@ -2588,12 +2588,12 @@ "source": { "type": "git", "url": "https://github.com/xtrime-ru/MadelineProto.git", - "reference": "509d607c8cdfa56df28380e85462afbf87259d79" + "reference": "38b2435fe28032e8994e2af5d5e3cbbfa86c63ad" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/xtrime-ru/MadelineProto/zipball/509d607c8cdfa56df28380e85462afbf87259d79", - "reference": "509d607c8cdfa56df28380e85462afbf87259d79", + "url": "https://api.github.com/repos/xtrime-ru/MadelineProto/zipball/38b2435fe28032e8994e2af5d5e3cbbfa86c63ad", + "reference": "38b2435fe28032e8994e2af5d5e3cbbfa86c63ad", "shasum": "" }, "require": { @@ -2768,7 +2768,7 @@ "url": "https://github.com/danog" } ], - "time": "2025-12-08T16:46:27+00:00" + "time": "2026-02-22T21:28:52+00:00" }, { "name": "danog/primemodule", @@ -5213,16 +5213,16 @@ }, { "name": "friendsofphp/php-cs-fixer", - "version": "v3.93.1", + "version": "v3.94.2", "source": { "type": "git", "url": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer.git", - "reference": "b3546ab487c0762c39f308dc1ec0ea2c461fc21a" + "reference": "7787ceff91365ba7d623ec410b8f429cdebb4f63" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/PHP-CS-Fixer/PHP-CS-Fixer/zipball/b3546ab487c0762c39f308dc1ec0ea2c461fc21a", - "reference": "b3546ab487c0762c39f308dc1ec0ea2c461fc21a", + "url": "https://api.github.com/repos/PHP-CS-Fixer/PHP-CS-Fixer/zipball/7787ceff91365ba7d623ec410b8f429cdebb4f63", + "reference": "7787ceff91365ba7d623ec410b8f429cdebb4f63", "shasum": "" }, "require": { @@ -5239,7 +5239,7 @@ "react/event-loop": "^1.5", "react/socket": "^1.16", "react/stream": "^1.4", - "sebastian/diff": "^4.0.6 || ^5.1.1 || ^6.0.2 || ^7.0", + "sebastian/diff": "^4.0.6 || ^5.1.1 || ^6.0.2 || ^7.0 || ^8.0", "symfony/console": "^5.4.47 || ^6.4.24 || ^7.0 || ^8.0", "symfony/event-dispatcher": "^5.4.45 || ^6.4.24 || ^7.0 || ^8.0", "symfony/filesystem": "^5.4.45 || ^6.4.24 || ^7.0 || ^8.0", @@ -5253,18 +5253,18 @@ "symfony/stopwatch": "^5.4.45 || ^6.4.24 || ^7.0 || ^8.0" }, "require-dev": { - "facile-it/paraunit": "^1.3.1 || ^2.7", - "infection/infection": "^0.32", - "justinrainbow/json-schema": "^6.6", + "facile-it/paraunit": "^1.3.1 || ^2.7.1", + "infection/infection": "^0.32.3", + "justinrainbow/json-schema": "^6.6.4", "keradus/cli-executor": "^2.3", "mikey179/vfsstream": "^1.6.12", - "php-coveralls/php-coveralls": "^2.9", - "php-cs-fixer/phpunit-constraint-isidenticalstring": "^1.6", - "php-cs-fixer/phpunit-constraint-xmlmatchesxsd": "^1.6", - "phpunit/phpunit": "^9.6.31 || ^10.5.60 || ^11.5.48", + "php-coveralls/php-coveralls": "^2.9.1", + "php-cs-fixer/phpunit-constraint-isidenticalstring": "^1.7", + "php-cs-fixer/phpunit-constraint-xmlmatchesxsd": "^1.7", + "phpunit/phpunit": "^9.6.34 || ^10.5.63 || ^11.5.51", "symfony/polyfill-php85": "^1.33", - "symfony/var-dumper": "^5.4.48 || ^6.4.26 || ^7.4.0 || ^8.0", - "symfony/yaml": "^5.4.45 || ^6.4.30 || ^7.4.1 || ^8.0" + "symfony/var-dumper": "^5.4.48 || ^6.4.32 || ^7.4.4 || ^8.0.4", + "symfony/yaml": "^5.4.45 || ^6.4.30 || ^7.4.1 || ^8.0.1" }, "suggest": { "ext-dom": "For handling output formats in XML", @@ -5305,7 +5305,7 @@ ], "support": { "issues": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/issues", - "source": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/tree/v3.93.1" + "source": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/tree/v3.94.2" }, "funding": [ { @@ -5313,7 +5313,7 @@ "type": "github" } ], - "time": "2026-01-28T23:50:50+00:00" + "time": "2026-02-20T16:13:53+00:00" }, { "name": "psr/container", @@ -5946,29 +5946,29 @@ }, { "name": "sebastian/diff", - "version": "7.0.0", + "version": "8.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/diff.git", - "reference": "7ab1ea946c012266ca32390913653d844ecd085f" + "reference": "a2b6d09d7729ee87d605a439469f9dcc39be5ea3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/7ab1ea946c012266ca32390913653d844ecd085f", - "reference": "7ab1ea946c012266ca32390913653d844ecd085f", + "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/a2b6d09d7729ee87d605a439469f9dcc39be5ea3", + "reference": "a2b6d09d7729ee87d605a439469f9dcc39be5ea3", "shasum": "" }, "require": { - "php": ">=8.3" + "php": ">=8.4" }, "require-dev": { - "phpunit/phpunit": "^12.0", + "phpunit/phpunit": "^13.0", "symfony/process": "^7.2" }, "type": "library", "extra": { "branch-alias": { - "dev-main": "7.0-dev" + "dev-main": "8.0-dev" } }, "autoload": { @@ -6001,15 +6001,27 @@ "support": { "issues": "https://github.com/sebastianbergmann/diff/issues", "security": "https://github.com/sebastianbergmann/diff/security/policy", - "source": "https://github.com/sebastianbergmann/diff/tree/7.0.0" + "source": "https://github.com/sebastianbergmann/diff/tree/8.0.0" }, "funding": [ { "url": "https://github.com/sebastianbergmann", "type": "github" + }, + { + "url": "https://liberapay.com/sebastianbergmann", + "type": "liberapay" + }, + { + "url": "https://thanks.dev/u/gh/sebastianbergmann", + "type": "thanks_dev" + }, + { + "url": "https://tidelift.com/funding/github/packagist/sebastian/diff", + "type": "tidelift" } ], - "time": "2025-02-07T04:55:46+00:00" + "time": "2026-02-06T04:42:27+00:00" }, { "name": "symfony/console", From 06a17811766253d46f7b13e4ac1dedbca08e093c Mon Sep 17 00:00:00 2001 From: Alexander Pankratov Date: Fri, 27 Feb 2026 23:47:50 +0100 Subject: [PATCH 252/270] Feat: TL 222 --- composer.lock | 83 ++++++++++++++++++++++++++------------------------- 1 file changed, 42 insertions(+), 41 deletions(-) diff --git a/composer.lock b/composer.lock index a7d515c..01e32cf 100644 --- a/composer.lock +++ b/composer.lock @@ -1333,16 +1333,16 @@ }, { "name": "amphp/postgres", - "version": "v2.2.0", + "version": "v2.2.1", "source": { "type": "git", "url": "https://github.com/amphp/postgres.git", - "reference": "fd7c2661966aeb3a9cc067a7ba507f22c370e1ce" + "reference": "b68c4d5929d0ec1701781dbbb0bb81dd8d0a42d7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/amphp/postgres/zipball/fd7c2661966aeb3a9cc067a7ba507f22c370e1ce", - "reference": "fd7c2661966aeb3a9cc067a7ba507f22c370e1ce", + "url": "https://api.github.com/repos/amphp/postgres/zipball/b68c4d5929d0ec1701781dbbb0bb81dd8d0a42d7", + "reference": "b68c4d5929d0ec1701781dbbb0bb81dd8d0a42d7", "shasum": "" }, "require": { @@ -1393,7 +1393,7 @@ ], "support": { "issues": "https://github.com/amphp/postgres/issues", - "source": "https://github.com/amphp/postgres/tree/v2.2.0" + "source": "https://github.com/amphp/postgres/tree/v2.2.1" }, "funding": [ { @@ -1401,7 +1401,7 @@ "type": "github" } ], - "time": "2026-02-22T18:50:10+00:00" + "time": "2026-02-25T04:47:18+00:00" }, { "name": "amphp/process", @@ -1696,16 +1696,16 @@ }, { "name": "amphp/sql", - "version": "v2.1.0", + "version": "v2.1.1", "source": { "type": "git", "url": "https://github.com/amphp/sql.git", - "reference": "e7ab2f47ba930b7a5ff99d04e67750f1513f1622" + "reference": "258bafe5ecf8a0491d86681f2a2af1dee2933a69" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/amphp/sql/zipball/e7ab2f47ba930b7a5ff99d04e67750f1513f1622", - "reference": "e7ab2f47ba930b7a5ff99d04e67750f1513f1622", + "url": "https://api.github.com/repos/amphp/sql/zipball/258bafe5ecf8a0491d86681f2a2af1dee2933a69", + "reference": "258bafe5ecf8a0491d86681f2a2af1dee2933a69", "shasum": "" }, "require": { @@ -1738,7 +1738,7 @@ ], "support": { "issues": "https://github.com/amphp/sql/issues", - "source": "https://github.com/amphp/sql/tree/v2.1.0" + "source": "https://github.com/amphp/sql/tree/v2.1.1" }, "funding": [ { @@ -1746,7 +1746,7 @@ "type": "github" } ], - "time": "2026-02-22T17:29:27+00:00" + "time": "2026-02-25T04:44:15+00:00" }, { "name": "amphp/sql-common", @@ -2588,12 +2588,12 @@ "source": { "type": "git", "url": "https://github.com/xtrime-ru/MadelineProto.git", - "reference": "38b2435fe28032e8994e2af5d5e3cbbfa86c63ad" + "reference": "d3d57a878df13bb8bc5e065aecf668763a7f06d9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/xtrime-ru/MadelineProto/zipball/38b2435fe28032e8994e2af5d5e3cbbfa86c63ad", - "reference": "38b2435fe28032e8994e2af5d5e3cbbfa86c63ad", + "url": "https://api.github.com/repos/xtrime-ru/MadelineProto/zipball/d3d57a878df13bb8bc5e065aecf668763a7f06d9", + "reference": "d3d57a878df13bb8bc5e065aecf668763a7f06d9", "shasum": "" }, "require": { @@ -2651,9 +2651,10 @@ "dg/bypass-finals": "dev-master", "ext-ctype": "*", "phpunit/phpunit": "^9.6.29", + "quasarstream/webrtc": "^1.0", "revolt/event-loop-adapter-react": "^1.1.1", "symfony/yaml": "^6.4.26", - "vimeo/psalm": "dev-master" + "vimeo/psalm": "7.0.0-beta14" }, "suggest": { "ext-bcmath": "Install the bcmath extension to speed up authorization", @@ -2768,7 +2769,7 @@ "url": "https://github.com/danog" } ], - "time": "2026-02-22T21:28:52+00:00" + "time": "2026-02-27T22:46:45+00:00" }, { "name": "danog/primemodule", @@ -6025,16 +6026,16 @@ }, { "name": "symfony/console", - "version": "v8.0.4", + "version": "v8.0.6", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "ace03c4cf9805080ff40cbeec69fca180c339a3b" + "reference": "488285876e807a4777f074041d8bb508623419fa" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/ace03c4cf9805080ff40cbeec69fca180c339a3b", - "reference": "ace03c4cf9805080ff40cbeec69fca180c339a3b", + "url": "https://api.github.com/repos/symfony/console/zipball/488285876e807a4777f074041d8bb508623419fa", + "reference": "488285876e807a4777f074041d8bb508623419fa", "shasum": "" }, "require": { @@ -6091,7 +6092,7 @@ "terminal" ], "support": { - "source": "https://github.com/symfony/console/tree/v8.0.4" + "source": "https://github.com/symfony/console/tree/v8.0.6" }, "funding": [ { @@ -6111,7 +6112,7 @@ "type": "tidelift" } ], - "time": "2026-01-13T13:06:50+00:00" + "time": "2026-02-25T16:59:43+00:00" }, { "name": "symfony/deprecation-contracts", @@ -6343,16 +6344,16 @@ }, { "name": "symfony/filesystem", - "version": "v8.0.1", + "version": "v8.0.6", "source": { "type": "git", "url": "https://github.com/symfony/filesystem.git", - "reference": "d937d400b980523dc9ee946bb69972b5e619058d" + "reference": "7bf9162d7a0dff98d079b72948508fa48018a770" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/filesystem/zipball/d937d400b980523dc9ee946bb69972b5e619058d", - "reference": "d937d400b980523dc9ee946bb69972b5e619058d", + "url": "https://api.github.com/repos/symfony/filesystem/zipball/7bf9162d7a0dff98d079b72948508fa48018a770", + "reference": "7bf9162d7a0dff98d079b72948508fa48018a770", "shasum": "" }, "require": { @@ -6389,7 +6390,7 @@ "description": "Provides basic utilities for the filesystem", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/filesystem/tree/v8.0.1" + "source": "https://github.com/symfony/filesystem/tree/v8.0.6" }, "funding": [ { @@ -6409,20 +6410,20 @@ "type": "tidelift" } ], - "time": "2025-12-01T09:13:36+00:00" + "time": "2026-02-25T16:59:43+00:00" }, { "name": "symfony/finder", - "version": "v8.0.5", + "version": "v8.0.6", "source": { "type": "git", "url": "https://github.com/symfony/finder.git", - "reference": "8bd576e97c67d45941365bf824e18dc8538e6eb0" + "reference": "441404f09a54de6d1bd6ad219e088cdf4c91f97c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/finder/zipball/8bd576e97c67d45941365bf824e18dc8538e6eb0", - "reference": "8bd576e97c67d45941365bf824e18dc8538e6eb0", + "url": "https://api.github.com/repos/symfony/finder/zipball/441404f09a54de6d1bd6ad219e088cdf4c91f97c", + "reference": "441404f09a54de6d1bd6ad219e088cdf4c91f97c", "shasum": "" }, "require": { @@ -6457,7 +6458,7 @@ "description": "Finds files and directories via an intuitive fluent interface", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/finder/tree/v8.0.5" + "source": "https://github.com/symfony/finder/tree/v8.0.6" }, "funding": [ { @@ -6477,7 +6478,7 @@ "type": "tidelift" } ], - "time": "2026-01-26T15:08:38+00:00" + "time": "2026-01-29T09:41:02+00:00" }, { "name": "symfony/options-resolver", @@ -7097,16 +7098,16 @@ }, { "name": "symfony/string", - "version": "v8.0.4", + "version": "v8.0.6", "source": { "type": "git", "url": "https://github.com/symfony/string.git", - "reference": "758b372d6882506821ed666032e43020c4f57194" + "reference": "6c9e1108041b5dce21a9a4984b531c4923aa9ec4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/string/zipball/758b372d6882506821ed666032e43020c4f57194", - "reference": "758b372d6882506821ed666032e43020c4f57194", + "url": "https://api.github.com/repos/symfony/string/zipball/6c9e1108041b5dce21a9a4984b531c4923aa9ec4", + "reference": "6c9e1108041b5dce21a9a4984b531c4923aa9ec4", "shasum": "" }, "require": { @@ -7163,7 +7164,7 @@ "utf8" ], "support": { - "source": "https://github.com/symfony/string/tree/v8.0.4" + "source": "https://github.com/symfony/string/tree/v8.0.6" }, "funding": [ { @@ -7183,7 +7184,7 @@ "type": "tidelift" } ], - "time": "2026-01-12T12:37:40+00:00" + "time": "2026-02-09T10:14:57+00:00" } ], "aliases": [], From fd2344e673236238633cd4c0c409691f8ece6086 Mon Sep 17 00:00:00 2001 From: Alexander Pankratov Date: Wed, 4 Mar 2026 23:00:26 +0100 Subject: [PATCH 253/270] Feat: TL 223 --- composer.lock | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/composer.lock b/composer.lock index 01e32cf..0361c36 100644 --- a/composer.lock +++ b/composer.lock @@ -1473,16 +1473,16 @@ }, { "name": "amphp/redis", - "version": "v2.0.3", + "version": "v2.0.4", "source": { "type": "git", "url": "https://github.com/amphp/redis.git", - "reference": "1572c2fec2849d272570919e998f9a3c1a5b1703" + "reference": "964bcf6c2574645058371925a3668240a622bdab" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/amphp/redis/zipball/1572c2fec2849d272570919e998f9a3c1a5b1703", - "reference": "1572c2fec2849d272570919e998f9a3c1a5b1703", + "url": "https://api.github.com/repos/amphp/redis/zipball/964bcf6c2574645058371925a3668240a622bdab", + "reference": "964bcf6c2574645058371925a3668240a622bdab", "shasum": "" }, "require": { @@ -1542,7 +1542,7 @@ ], "support": { "issues": "https://github.com/amphp/redis/issues", - "source": "https://github.com/amphp/redis/tree/v2.0.3" + "source": "https://github.com/amphp/redis/tree/v2.0.4" }, "funding": [ { @@ -1550,7 +1550,7 @@ "type": "github" } ], - "time": "2025-01-15T04:14:11+00:00" + "time": "2026-03-03T20:52:26+00:00" }, { "name": "amphp/serialization", @@ -2588,12 +2588,12 @@ "source": { "type": "git", "url": "https://github.com/xtrime-ru/MadelineProto.git", - "reference": "d3d57a878df13bb8bc5e065aecf668763a7f06d9" + "reference": "544b01220b09ea144dec5d0e8871fdda3b3891e1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/xtrime-ru/MadelineProto/zipball/d3d57a878df13bb8bc5e065aecf668763a7f06d9", - "reference": "d3d57a878df13bb8bc5e065aecf668763a7f06d9", + "url": "https://api.github.com/repos/xtrime-ru/MadelineProto/zipball/544b01220b09ea144dec5d0e8871fdda3b3891e1", + "reference": "544b01220b09ea144dec5d0e8871fdda3b3891e1", "shasum": "" }, "require": { @@ -2654,7 +2654,7 @@ "quasarstream/webrtc": "^1.0", "revolt/event-loop-adapter-react": "^1.1.1", "symfony/yaml": "^6.4.26", - "vimeo/psalm": "7.0.0-beta14" + "vimeo/psalm": "dev-master" }, "suggest": { "ext-bcmath": "Install the bcmath extension to speed up authorization", @@ -2769,7 +2769,7 @@ "url": "https://github.com/danog" } ], - "time": "2026-02-27T22:46:45+00:00" + "time": "2026-03-04T21:59:49+00:00" }, { "name": "danog/primemodule", @@ -7202,5 +7202,5 @@ "ext-curl": "*" }, "platform-dev": {}, - "plugin-api-version": "2.6.0" + "plugin-api-version": "2.9.0" } From 2608b69234a7e9641b7cfef0f7bf2a7a64a32e36 Mon Sep 17 00:00:00 2001 From: Alexander Pankratov Date: Fri, 20 Mar 2026 15:17:51 +0100 Subject: [PATCH 254/270] Update dependencies --- composer.lock | 85 ++++++++++++++++++++++++++------------------------- 1 file changed, 43 insertions(+), 42 deletions(-) diff --git a/composer.lock b/composer.lock index 0361c36..ba924cd 100644 --- a/composer.lock +++ b/composer.lock @@ -2133,16 +2133,16 @@ }, { "name": "bacon/bacon-qr-code", - "version": "v3.0.3", + "version": "v3.0.4", "source": { "type": "git", "url": "https://github.com/Bacon/BaconQrCode.git", - "reference": "36a1cb2b81493fa5b82e50bf8068bf84d1542563" + "reference": "3feed0e212b8412cc5d2612706744789b0615824" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Bacon/BaconQrCode/zipball/36a1cb2b81493fa5b82e50bf8068bf84d1542563", - "reference": "36a1cb2b81493fa5b82e50bf8068bf84d1542563", + "url": "https://api.github.com/repos/Bacon/BaconQrCode/zipball/3feed0e212b8412cc5d2612706744789b0615824", + "reference": "3feed0e212b8412cc5d2612706744789b0615824", "shasum": "" }, "require": { @@ -2182,9 +2182,9 @@ "homepage": "https://github.com/Bacon/BaconQrCode", "support": { "issues": "https://github.com/Bacon/BaconQrCode/issues", - "source": "https://github.com/Bacon/BaconQrCode/tree/v3.0.3" + "source": "https://github.com/Bacon/BaconQrCode/tree/v3.0.4" }, - "time": "2025-11-19T17:15:36+00:00" + "time": "2026-03-16T01:01:30+00:00" }, { "name": "danog/async-orm", @@ -2588,12 +2588,12 @@ "source": { "type": "git", "url": "https://github.com/xtrime-ru/MadelineProto.git", - "reference": "544b01220b09ea144dec5d0e8871fdda3b3891e1" + "reference": "07875dd1a21bf7bfec577c893ac8346b0c4bd415" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/xtrime-ru/MadelineProto/zipball/544b01220b09ea144dec5d0e8871fdda3b3891e1", - "reference": "544b01220b09ea144dec5d0e8871fdda3b3891e1", + "url": "https://api.github.com/repos/xtrime-ru/MadelineProto/zipball/07875dd1a21bf7bfec577c893ac8346b0c4bd415", + "reference": "07875dd1a21bf7bfec577c893ac8346b0c4bd415", "shasum": "" }, "require": { @@ -2653,6 +2653,7 @@ "phpunit/phpunit": "^9.6.29", "quasarstream/webrtc": "^1.0", "revolt/event-loop-adapter-react": "^1.1.1", + "sebastian/diff": "^4.0", "symfony/yaml": "^6.4.26", "vimeo/psalm": "dev-master" }, @@ -2769,7 +2770,7 @@ "url": "https://github.com/danog" } ], - "time": "2026-03-04T21:59:49+00:00" + "time": "2026-03-20T14:17:10+00:00" }, { "name": "danog/primemodule", @@ -3211,20 +3212,20 @@ }, { "name": "league/uri", - "version": "7.8.0", + "version": "7.8.1", "source": { "type": "git", "url": "https://github.com/thephpleague/uri.git", - "reference": "4436c6ec8d458e4244448b069cc572d088230b76" + "reference": "08cf38e3924d4f56238125547b5720496fac8fd4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thephpleague/uri/zipball/4436c6ec8d458e4244448b069cc572d088230b76", - "reference": "4436c6ec8d458e4244448b069cc572d088230b76", + "url": "https://api.github.com/repos/thephpleague/uri/zipball/08cf38e3924d4f56238125547b5720496fac8fd4", + "reference": "08cf38e3924d4f56238125547b5720496fac8fd4", "shasum": "" }, "require": { - "league/uri-interfaces": "^7.8", + "league/uri-interfaces": "^7.8.1", "php": "^8.1", "psr/http-factory": "^1" }, @@ -3297,7 +3298,7 @@ "docs": "https://uri.thephpleague.com", "forum": "https://thephpleague.slack.com", "issues": "https://github.com/thephpleague/uri-src/issues", - "source": "https://github.com/thephpleague/uri/tree/7.8.0" + "source": "https://github.com/thephpleague/uri/tree/7.8.1" }, "funding": [ { @@ -3305,24 +3306,24 @@ "type": "github" } ], - "time": "2026-01-14T17:24:56+00:00" + "time": "2026-03-15T20:22:25+00:00" }, { "name": "league/uri-components", - "version": "7.8.0", + "version": "7.8.1", "source": { "type": "git", "url": "https://github.com/thephpleague/uri-components.git", - "reference": "8b5ffcebcc0842b76eb80964795bd56a8333b2ba" + "reference": "848ff9db2f0be06229d6034b7c2e33d41b4fd675" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thephpleague/uri-components/zipball/8b5ffcebcc0842b76eb80964795bd56a8333b2ba", - "reference": "8b5ffcebcc0842b76eb80964795bd56a8333b2ba", + "url": "https://api.github.com/repos/thephpleague/uri-components/zipball/848ff9db2f0be06229d6034b7c2e33d41b4fd675", + "reference": "848ff9db2f0be06229d6034b7c2e33d41b4fd675", "shasum": "" }, "require": { - "league/uri": "^7.8", + "league/uri": "^7.8.1", "php": "^8.1" }, "suggest": { @@ -3381,7 +3382,7 @@ "docs": "https://uri.thephpleague.com", "forum": "https://thephpleague.slack.com", "issues": "https://github.com/thephpleague/uri-src/issues", - "source": "https://github.com/thephpleague/uri-components/tree/7.8.0" + "source": "https://github.com/thephpleague/uri-components/tree/7.8.1" }, "funding": [ { @@ -3389,20 +3390,20 @@ "type": "github" } ], - "time": "2026-01-14T17:24:56+00:00" + "time": "2026-03-15T20:22:25+00:00" }, { "name": "league/uri-interfaces", - "version": "7.8.0", + "version": "7.8.1", "source": { "type": "git", "url": "https://github.com/thephpleague/uri-interfaces.git", - "reference": "c5c5cd056110fc8afaba29fa6b72a43ced42acd4" + "reference": "85d5c77c5d6d3af6c54db4a78246364908f3c928" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thephpleague/uri-interfaces/zipball/c5c5cd056110fc8afaba29fa6b72a43ced42acd4", - "reference": "c5c5cd056110fc8afaba29fa6b72a43ced42acd4", + "url": "https://api.github.com/repos/thephpleague/uri-interfaces/zipball/85d5c77c5d6d3af6c54db4a78246364908f3c928", + "reference": "85d5c77c5d6d3af6c54db4a78246364908f3c928", "shasum": "" }, "require": { @@ -3465,7 +3466,7 @@ "docs": "https://uri.thephpleague.com", "forum": "https://thephpleague.slack.com", "issues": "https://github.com/thephpleague/uri-src/issues", - "source": "https://github.com/thephpleague/uri-interfaces/tree/7.8.0" + "source": "https://github.com/thephpleague/uri-interfaces/tree/7.8.1" }, "funding": [ { @@ -3473,7 +3474,7 @@ "type": "github" } ], - "time": "2026-01-15T06:54:53+00:00" + "time": "2026-03-08T20:05:35+00:00" }, { "name": "monolog/monolog", @@ -3882,16 +3883,16 @@ }, { "name": "phpseclib/phpseclib", - "version": "3.0.49", + "version": "3.0.50", "source": { "type": "git", "url": "https://github.com/phpseclib/phpseclib.git", - "reference": "6233a1e12584754e6b5daa69fe1289b47775c1b9" + "reference": "aa6ad8321ed103dc3624fb600a25b66ebf78ec7b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpseclib/phpseclib/zipball/6233a1e12584754e6b5daa69fe1289b47775c1b9", - "reference": "6233a1e12584754e6b5daa69fe1289b47775c1b9", + "url": "https://api.github.com/repos/phpseclib/phpseclib/zipball/aa6ad8321ed103dc3624fb600a25b66ebf78ec7b", + "reference": "aa6ad8321ed103dc3624fb600a25b66ebf78ec7b", "shasum": "" }, "require": { @@ -3972,7 +3973,7 @@ ], "support": { "issues": "https://github.com/phpseclib/phpseclib/issues", - "source": "https://github.com/phpseclib/phpseclib/tree/3.0.49" + "source": "https://github.com/phpseclib/phpseclib/tree/3.0.50" }, "funding": [ { @@ -3988,7 +3989,7 @@ "type": "tidelift" } ], - "time": "2026-01-27T09:17:28+00:00" + "time": "2026-03-19T02:57:58+00:00" }, { "name": "promphp/prometheus_client_php", @@ -6026,16 +6027,16 @@ }, { "name": "symfony/console", - "version": "v8.0.6", + "version": "v8.0.7", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "488285876e807a4777f074041d8bb508623419fa" + "reference": "15ed9008a4ebe2d6a78e4937f74e0c13ef2e618a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/488285876e807a4777f074041d8bb508623419fa", - "reference": "488285876e807a4777f074041d8bb508623419fa", + "url": "https://api.github.com/repos/symfony/console/zipball/15ed9008a4ebe2d6a78e4937f74e0c13ef2e618a", + "reference": "15ed9008a4ebe2d6a78e4937f74e0c13ef2e618a", "shasum": "" }, "require": { @@ -6092,7 +6093,7 @@ "terminal" ], "support": { - "source": "https://github.com/symfony/console/tree/v8.0.6" + "source": "https://github.com/symfony/console/tree/v8.0.7" }, "funding": [ { @@ -6112,7 +6113,7 @@ "type": "tidelift" } ], - "time": "2026-02-25T16:59:43+00:00" + "time": "2026-03-06T14:06:22+00:00" }, { "name": "symfony/deprecation-contracts", From 2a9d13a874d8c4724b8faec7807873293100d4e1 Mon Sep 17 00:00:00 2001 From: Alexander Pankratov Date: Fri, 20 Mar 2026 15:28:27 +0100 Subject: [PATCH 255/270] Fix log error --- composer.lock | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/composer.lock b/composer.lock index ba924cd..02a19fa 100644 --- a/composer.lock +++ b/composer.lock @@ -2588,12 +2588,12 @@ "source": { "type": "git", "url": "https://github.com/xtrime-ru/MadelineProto.git", - "reference": "07875dd1a21bf7bfec577c893ac8346b0c4bd415" + "reference": "a3a97e3f89ec9a9f82f7c29538dcb19971496c51" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/xtrime-ru/MadelineProto/zipball/07875dd1a21bf7bfec577c893ac8346b0c4bd415", - "reference": "07875dd1a21bf7bfec577c893ac8346b0c4bd415", + "url": "https://api.github.com/repos/xtrime-ru/MadelineProto/zipball/a3a97e3f89ec9a9f82f7c29538dcb19971496c51", + "reference": "a3a97e3f89ec9a9f82f7c29538dcb19971496c51", "shasum": "" }, "require": { @@ -2770,7 +2770,7 @@ "url": "https://github.com/danog" } ], - "time": "2026-03-20T14:17:10+00:00" + "time": "2026-03-20T14:24:28+00:00" }, { "name": "danog/primemodule", From 2feabb037dba540bfbda37bab3cb285ff441c6ab Mon Sep 17 00:00:00 2001 From: Alexander Pankratov Date: Fri, 10 Apr 2026 18:35:17 +0200 Subject: [PATCH 256/270] Fix missing messageEntityFormattedDate --- composer.lock | 187 ++++++++++++++++++++++++++------------------------ 1 file changed, 99 insertions(+), 88 deletions(-) diff --git a/composer.lock b/composer.lock index 02a19fa..caa8a7a 100644 --- a/composer.lock +++ b/composer.lock @@ -1554,24 +1554,27 @@ }, { "name": "amphp/serialization", - "version": "v1.0.0", + "version": "v1.1.0", "source": { "type": "git", "url": "https://github.com/amphp/serialization.git", - "reference": "693e77b2fb0b266c3c7d622317f881de44ae94a1" + "reference": "fdf2834d78cebb0205fb2672676c1b1eb84371f0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/amphp/serialization/zipball/693e77b2fb0b266c3c7d622317f881de44ae94a1", - "reference": "693e77b2fb0b266c3c7d622317f881de44ae94a1", + "url": "https://api.github.com/repos/amphp/serialization/zipball/fdf2834d78cebb0205fb2672676c1b1eb84371f0", + "reference": "fdf2834d78cebb0205fb2672676c1b1eb84371f0", "shasum": "" }, "require": { - "php": ">=7.1" + "php": ">=7.4" }, "require-dev": { - "amphp/php-cs-fixer-config": "dev-master", - "phpunit/phpunit": "^9 || ^8 || ^7" + "amphp/php-cs-fixer-config": "^2", + "ext-json": "*", + "ext-zlib": "*", + "phpunit/phpunit": "^9", + "psalm/phar": "6.16.1" }, "type": "library", "autoload": { @@ -1606,9 +1609,15 @@ ], "support": { "issues": "https://github.com/amphp/serialization/issues", - "source": "https://github.com/amphp/serialization/tree/master" + "source": "https://github.com/amphp/serialization/tree/v1.1.0" }, - "time": "2020-03-25T21:39:07+00:00" + "funding": [ + { + "url": "https://github.com/amphp", + "type": "github" + } + ], + "time": "2026-04-05T15:59:53+00:00" }, { "name": "amphp/socket", @@ -2133,16 +2142,16 @@ }, { "name": "bacon/bacon-qr-code", - "version": "v3.0.4", + "version": "v3.1.1", "source": { "type": "git", "url": "https://github.com/Bacon/BaconQrCode.git", - "reference": "3feed0e212b8412cc5d2612706744789b0615824" + "reference": "4da2233e72eeecd9be3b62e0dc2cc9ed8e2e31c2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Bacon/BaconQrCode/zipball/3feed0e212b8412cc5d2612706744789b0615824", - "reference": "3feed0e212b8412cc5d2612706744789b0615824", + "url": "https://api.github.com/repos/Bacon/BaconQrCode/zipball/4da2233e72eeecd9be3b62e0dc2cc9ed8e2e31c2", + "reference": "4da2233e72eeecd9be3b62e0dc2cc9ed8e2e31c2", "shasum": "" }, "require": { @@ -2182,9 +2191,9 @@ "homepage": "https://github.com/Bacon/BaconQrCode", "support": { "issues": "https://github.com/Bacon/BaconQrCode/issues", - "source": "https://github.com/Bacon/BaconQrCode/tree/v3.0.4" + "source": "https://github.com/Bacon/BaconQrCode/tree/v3.1.1" }, - "time": "2026-03-16T01:01:30+00:00" + "time": "2026-04-05T21:06:35+00:00" }, { "name": "danog/async-orm", @@ -2588,12 +2597,12 @@ "source": { "type": "git", "url": "https://github.com/xtrime-ru/MadelineProto.git", - "reference": "a3a97e3f89ec9a9f82f7c29538dcb19971496c51" + "reference": "7b8f0260b20baf21f8edeb195889e34fd6344c31" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/xtrime-ru/MadelineProto/zipball/a3a97e3f89ec9a9f82f7c29538dcb19971496c51", - "reference": "a3a97e3f89ec9a9f82f7c29538dcb19971496c51", + "url": "https://api.github.com/repos/xtrime-ru/MadelineProto/zipball/7b8f0260b20baf21f8edeb195889e34fd6344c31", + "reference": "7b8f0260b20baf21f8edeb195889e34fd6344c31", "shasum": "" }, "require": { @@ -2770,7 +2779,7 @@ "url": "https://github.com/danog" } ], - "time": "2026-03-20T14:24:28+00:00" + "time": "2026-04-10T16:32:25+00:00" }, { "name": "danog/primemodule", @@ -3883,16 +3892,16 @@ }, { "name": "phpseclib/phpseclib", - "version": "3.0.50", + "version": "3.0.51", "source": { "type": "git", "url": "https://github.com/phpseclib/phpseclib.git", - "reference": "aa6ad8321ed103dc3624fb600a25b66ebf78ec7b" + "reference": "d59c94077f9c9915abb51ddb52ce85188ece1748" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpseclib/phpseclib/zipball/aa6ad8321ed103dc3624fb600a25b66ebf78ec7b", - "reference": "aa6ad8321ed103dc3624fb600a25b66ebf78ec7b", + "url": "https://api.github.com/repos/phpseclib/phpseclib/zipball/d59c94077f9c9915abb51ddb52ce85188ece1748", + "reference": "d59c94077f9c9915abb51ddb52ce85188ece1748", "shasum": "" }, "require": { @@ -3973,7 +3982,7 @@ ], "support": { "issues": "https://github.com/phpseclib/phpseclib/issues", - "source": "https://github.com/phpseclib/phpseclib/tree/3.0.50" + "source": "https://github.com/phpseclib/phpseclib/tree/3.0.51" }, "funding": [ { @@ -3989,25 +3998,25 @@ "type": "tidelift" } ], - "time": "2026-03-19T02:57:58+00:00" + "time": "2026-04-10T01:33:53+00:00" }, { "name": "promphp/prometheus_client_php", - "version": "v2.14.1", + "version": "v2.15.0", "source": { "type": "git", "url": "https://github.com/PromPHP/prometheus_client_php.git", - "reference": "a283aea8269287dc35313a0055480d950c59ac1f" + "reference": "da86f1507b04dc44dc37ffb766d7d3a1d42c3050" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/PromPHP/prometheus_client_php/zipball/a283aea8269287dc35313a0055480d950c59ac1f", - "reference": "a283aea8269287dc35313a0055480d950c59ac1f", + "url": "https://api.github.com/repos/PromPHP/prometheus_client_php/zipball/da86f1507b04dc44dc37ffb766d7d3a1d42c3050", + "reference": "da86f1507b04dc44dc37ffb766d7d3a1d42c3050", "shasum": "" }, "require": { "ext-json": "*", - "php": "^7.4|^8.0" + "php": "^8.2" }, "replace": { "endclothing/prometheus_client_php": "*", @@ -4021,6 +4030,7 @@ "phpstan/phpstan-phpunit": "^1.1.0", "phpstan/phpstan-strict-rules": "^1.1.0", "phpunit/phpunit": "^9.4", + "predis/predis": "^2.3", "squizlabs/php_codesniffer": "^3.6", "symfony/polyfill-apcu": "^1.6" }, @@ -4028,8 +4038,9 @@ "ext-apc": "Required if using APCu.", "ext-pdo": "Required if using PDO.", "ext-redis": "Required if using Redis.", + "predis/predis": "Required if using Predis.", "promphp/prometheus_push_gateway_php": "An easy client for using Prometheus PushGateway.", - "symfony/polyfill-apcu": "Required if you use APCu on PHP8.0+" + "symfony/polyfill-apcu": "Required if you use APCu." }, "type": "library", "extra": { @@ -4055,9 +4066,9 @@ "description": "Prometheus instrumentation library for PHP applications.", "support": { "issues": "https://github.com/PromPHP/prometheus_client_php/issues", - "source": "https://github.com/PromPHP/prometheus_client_php/tree/v2.14.1" + "source": "https://github.com/PromPHP/prometheus_client_php/tree/v2.15.0" }, - "time": "2025-04-14T07:59:43+00:00" + "time": "2026-03-24T22:44:50+00:00" }, { "name": "psr/http-factory", @@ -5948,16 +5959,16 @@ }, { "name": "sebastian/diff", - "version": "8.0.0", + "version": "8.1.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/diff.git", - "reference": "a2b6d09d7729ee87d605a439469f9dcc39be5ea3" + "reference": "9c957d730257f49c873f3761674559bd90098a7d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/a2b6d09d7729ee87d605a439469f9dcc39be5ea3", - "reference": "a2b6d09d7729ee87d605a439469f9dcc39be5ea3", + "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/9c957d730257f49c873f3761674559bd90098a7d", + "reference": "9c957d730257f49c873f3761674559bd90098a7d", "shasum": "" }, "require": { @@ -5970,7 +5981,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "8.0-dev" + "dev-main": "8.1-dev" } }, "autoload": { @@ -6003,7 +6014,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/diff/issues", "security": "https://github.com/sebastianbergmann/diff/security/policy", - "source": "https://github.com/sebastianbergmann/diff/tree/8.0.0" + "source": "https://github.com/sebastianbergmann/diff/tree/8.1.0" }, "funding": [ { @@ -6023,20 +6034,20 @@ "type": "tidelift" } ], - "time": "2026-02-06T04:42:27+00:00" + "time": "2026-04-05T12:02:33+00:00" }, { "name": "symfony/console", - "version": "v8.0.7", + "version": "v8.0.8", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "15ed9008a4ebe2d6a78e4937f74e0c13ef2e618a" + "reference": "5b66d385dc58f69652e56f78a4184615e3f2b7f7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/15ed9008a4ebe2d6a78e4937f74e0c13ef2e618a", - "reference": "15ed9008a4ebe2d6a78e4937f74e0c13ef2e618a", + "url": "https://api.github.com/repos/symfony/console/zipball/5b66d385dc58f69652e56f78a4184615e3f2b7f7", + "reference": "5b66d385dc58f69652e56f78a4184615e3f2b7f7", "shasum": "" }, "require": { @@ -6093,7 +6104,7 @@ "terminal" ], "support": { - "source": "https://github.com/symfony/console/tree/v8.0.7" + "source": "https://github.com/symfony/console/tree/v8.0.8" }, "funding": [ { @@ -6113,7 +6124,7 @@ "type": "tidelift" } ], - "time": "2026-03-06T14:06:22+00:00" + "time": "2026-03-30T15:14:47+00:00" }, { "name": "symfony/deprecation-contracts", @@ -6184,16 +6195,16 @@ }, { "name": "symfony/event-dispatcher", - "version": "v8.0.4", + "version": "v8.0.8", "source": { "type": "git", "url": "https://github.com/symfony/event-dispatcher.git", - "reference": "99301401da182b6cfaa4700dbe9987bb75474b47" + "reference": "f662acc6ab22a3d6d716dcb44c381c6002940df6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/99301401da182b6cfaa4700dbe9987bb75474b47", - "reference": "99301401da182b6cfaa4700dbe9987bb75474b47", + "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/f662acc6ab22a3d6d716dcb44c381c6002940df6", + "reference": "f662acc6ab22a3d6d716dcb44c381c6002940df6", "shasum": "" }, "require": { @@ -6245,7 +6256,7 @@ "description": "Provides tools that allow your application components to communicate with each other by dispatching events and listening to them", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/event-dispatcher/tree/v8.0.4" + "source": "https://github.com/symfony/event-dispatcher/tree/v8.0.8" }, "funding": [ { @@ -6265,7 +6276,7 @@ "type": "tidelift" } ], - "time": "2026-01-05T11:45:55+00:00" + "time": "2026-03-30T15:14:47+00:00" }, { "name": "symfony/event-dispatcher-contracts", @@ -6345,16 +6356,16 @@ }, { "name": "symfony/filesystem", - "version": "v8.0.6", + "version": "v8.0.8", "source": { "type": "git", "url": "https://github.com/symfony/filesystem.git", - "reference": "7bf9162d7a0dff98d079b72948508fa48018a770" + "reference": "66b769ae743ce2d13e435528fbef4af03d623e5a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/filesystem/zipball/7bf9162d7a0dff98d079b72948508fa48018a770", - "reference": "7bf9162d7a0dff98d079b72948508fa48018a770", + "url": "https://api.github.com/repos/symfony/filesystem/zipball/66b769ae743ce2d13e435528fbef4af03d623e5a", + "reference": "66b769ae743ce2d13e435528fbef4af03d623e5a", "shasum": "" }, "require": { @@ -6391,7 +6402,7 @@ "description": "Provides basic utilities for the filesystem", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/filesystem/tree/v8.0.6" + "source": "https://github.com/symfony/filesystem/tree/v8.0.8" }, "funding": [ { @@ -6411,20 +6422,20 @@ "type": "tidelift" } ], - "time": "2026-02-25T16:59:43+00:00" + "time": "2026-03-30T15:14:47+00:00" }, { "name": "symfony/finder", - "version": "v8.0.6", + "version": "v8.0.8", "source": { "type": "git", "url": "https://github.com/symfony/finder.git", - "reference": "441404f09a54de6d1bd6ad219e088cdf4c91f97c" + "reference": "8da41214757b87d97f181e3d14a4179286151007" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/finder/zipball/441404f09a54de6d1bd6ad219e088cdf4c91f97c", - "reference": "441404f09a54de6d1bd6ad219e088cdf4c91f97c", + "url": "https://api.github.com/repos/symfony/finder/zipball/8da41214757b87d97f181e3d14a4179286151007", + "reference": "8da41214757b87d97f181e3d14a4179286151007", "shasum": "" }, "require": { @@ -6459,7 +6470,7 @@ "description": "Finds files and directories via an intuitive fluent interface", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/finder/tree/v8.0.6" + "source": "https://github.com/symfony/finder/tree/v8.0.8" }, "funding": [ { @@ -6479,20 +6490,20 @@ "type": "tidelift" } ], - "time": "2026-01-29T09:41:02+00:00" + "time": "2026-03-30T15:14:47+00:00" }, { "name": "symfony/options-resolver", - "version": "v8.0.0", + "version": "v8.0.8", "source": { "type": "git", "url": "https://github.com/symfony/options-resolver.git", - "reference": "d2b592535ffa6600c265a3893a7f7fd2bad82dd7" + "reference": "b48bce0a70b914f6953dafbd10474df232ed4de8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/options-resolver/zipball/d2b592535ffa6600c265a3893a7f7fd2bad82dd7", - "reference": "d2b592535ffa6600c265a3893a7f7fd2bad82dd7", + "url": "https://api.github.com/repos/symfony/options-resolver/zipball/b48bce0a70b914f6953dafbd10474df232ed4de8", + "reference": "b48bce0a70b914f6953dafbd10474df232ed4de8", "shasum": "" }, "require": { @@ -6530,7 +6541,7 @@ "options" ], "support": { - "source": "https://github.com/symfony/options-resolver/tree/v8.0.0" + "source": "https://github.com/symfony/options-resolver/tree/v8.0.8" }, "funding": [ { @@ -6550,7 +6561,7 @@ "type": "tidelift" } ], - "time": "2025-11-12T15:55:31+00:00" + "time": "2026-03-30T15:14:47+00:00" }, { "name": "symfony/polyfill-intl-grapheme", @@ -6881,16 +6892,16 @@ }, { "name": "symfony/process", - "version": "v8.0.5", + "version": "v8.0.8", "source": { "type": "git", "url": "https://github.com/symfony/process.git", - "reference": "b5f3aa6762e33fd95efbaa2ec4f4bc9fdd16d674" + "reference": "cb8939aff03470d1a9d1d1b66d08c6fa71b3bbdc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/b5f3aa6762e33fd95efbaa2ec4f4bc9fdd16d674", - "reference": "b5f3aa6762e33fd95efbaa2ec4f4bc9fdd16d674", + "url": "https://api.github.com/repos/symfony/process/zipball/cb8939aff03470d1a9d1d1b66d08c6fa71b3bbdc", + "reference": "cb8939aff03470d1a9d1d1b66d08c6fa71b3bbdc", "shasum": "" }, "require": { @@ -6922,7 +6933,7 @@ "description": "Executes commands in sub-processes", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/process/tree/v8.0.5" + "source": "https://github.com/symfony/process/tree/v8.0.8" }, "funding": [ { @@ -6942,7 +6953,7 @@ "type": "tidelift" } ], - "time": "2026-01-26T15:08:38+00:00" + "time": "2026-03-30T15:14:47+00:00" }, { "name": "symfony/service-contracts", @@ -7033,16 +7044,16 @@ }, { "name": "symfony/stopwatch", - "version": "v8.0.0", + "version": "v8.0.8", "source": { "type": "git", "url": "https://github.com/symfony/stopwatch.git", - "reference": "67df1914c6ccd2d7b52f70d40cf2aea02159d942" + "reference": "85954ed72d5440ea4dc9a10b7e49e01df766ffa3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/stopwatch/zipball/67df1914c6ccd2d7b52f70d40cf2aea02159d942", - "reference": "67df1914c6ccd2d7b52f70d40cf2aea02159d942", + "url": "https://api.github.com/repos/symfony/stopwatch/zipball/85954ed72d5440ea4dc9a10b7e49e01df766ffa3", + "reference": "85954ed72d5440ea4dc9a10b7e49e01df766ffa3", "shasum": "" }, "require": { @@ -7075,7 +7086,7 @@ "description": "Provides a way to profile code", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/stopwatch/tree/v8.0.0" + "source": "https://github.com/symfony/stopwatch/tree/v8.0.8" }, "funding": [ { @@ -7095,20 +7106,20 @@ "type": "tidelift" } ], - "time": "2025-08-04T07:36:47+00:00" + "time": "2026-03-30T15:14:47+00:00" }, { "name": "symfony/string", - "version": "v8.0.6", + "version": "v8.0.8", "source": { "type": "git", "url": "https://github.com/symfony/string.git", - "reference": "6c9e1108041b5dce21a9a4984b531c4923aa9ec4" + "reference": "ae9488f874d7603f9d2dfbf120203882b645d963" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/string/zipball/6c9e1108041b5dce21a9a4984b531c4923aa9ec4", - "reference": "6c9e1108041b5dce21a9a4984b531c4923aa9ec4", + "url": "https://api.github.com/repos/symfony/string/zipball/ae9488f874d7603f9d2dfbf120203882b645d963", + "reference": "ae9488f874d7603f9d2dfbf120203882b645d963", "shasum": "" }, "require": { @@ -7165,7 +7176,7 @@ "utf8" ], "support": { - "source": "https://github.com/symfony/string/tree/v8.0.6" + "source": "https://github.com/symfony/string/tree/v8.0.8" }, "funding": [ { @@ -7185,7 +7196,7 @@ "type": "tidelift" } ], - "time": "2026-02-09T10:14:57+00:00" + "time": "2026-03-30T15:14:47+00:00" } ], "aliases": [], From 8a5542c18355a48d2aa73eca5e67b04c37215cc1 Mon Sep 17 00:00:00 2001 From: Alexander Pankratov Date: Fri, 10 Apr 2026 19:06:02 +0200 Subject: [PATCH 257/270] Fix missing messageEntityFormattedDate --- composer.json | 7 ++++++- composer.lock | 53 ++++++++++++++++++++++++++++++++++----------------- 2 files changed, 41 insertions(+), 19 deletions(-) diff --git a/composer.json b/composer.json index 7e5b6fa..6f21e1a 100644 --- a/composer.json +++ b/composer.json @@ -21,6 +21,10 @@ { "type": "github", "url": "https://github.com/xtrime-ru/MadelineProto.git" + }, + { + "type": "github", + "url": "https://github.com/xtrime-ru/telegram-entities.git" } ], "require": { @@ -37,7 +41,8 @@ "vlucas/phpdotenv": "^5", "danog/madelineproto": "dev-v8-tas", "amphp/dns": "2.x-dev", - "danog/async-orm": "^1.1.1" + "danog/async-orm": "^1.1.1", + "danog/telegram-entities": "dev-master as 1.0.x-dev" }, "require-dev": { "amphp/php-cs-fixer-config": "^2.0.1" diff --git a/composer.lock b/composer.lock index caa8a7a..2324c07 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "943b7f6849887142f37e17d5c228f2ce", + "content-hash": "f6209a2cde5e973ebb9af2544a5c7dca", "packages": [ { "name": "amphp/amp", @@ -2597,12 +2597,12 @@ "source": { "type": "git", "url": "https://github.com/xtrime-ru/MadelineProto.git", - "reference": "7b8f0260b20baf21f8edeb195889e34fd6344c31" + "reference": "e44341acc8fba33ad9a094d56dcf4e6a16849ea0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/xtrime-ru/MadelineProto/zipball/7b8f0260b20baf21f8edeb195889e34fd6344c31", - "reference": "7b8f0260b20baf21f8edeb195889e34fd6344c31", + "url": "https://api.github.com/repos/xtrime-ru/MadelineProto/zipball/e44341acc8fba33ad9a094d56dcf4e6a16849ea0", + "reference": "e44341acc8fba33ad9a094d56dcf4e6a16849ea0", "shasum": "" }, "require": { @@ -2779,7 +2779,7 @@ "url": "https://github.com/danog" } ], - "time": "2026-04-10T16:32:25+00:00" + "time": "2026-04-10T16:36:34+00:00" }, { "name": "danog/primemodule", @@ -2834,16 +2834,16 @@ }, { "name": "danog/telegram-entities", - "version": "1.0.5", + "version": "dev-master", "source": { "type": "git", - "url": "https://github.com/danog/telegram-entities.git", - "reference": "19ab8a48bc4b9519c4493e2c62eb171fba8b58b4" + "url": "https://github.com/xtrime-ru/telegram-entities.git", + "reference": "c4cc4714e4350a3d81da21f758076c61f66d60f6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/danog/telegram-entities/zipball/19ab8a48bc4b9519c4493e2c62eb171fba8b58b4", - "reference": "19ab8a48bc4b9519c4493e2c62eb171fba8b58b4", + "url": "https://api.github.com/repos/xtrime-ru/telegram-entities/zipball/c4cc4714e4350a3d81da21f758076c61f66d60f6", + "reference": "c4cc4714e4350a3d81da21f758076c61f66d60f6", "shasum": "" }, "require": { @@ -2860,13 +2860,23 @@ "phpunit/phpunit": "^11.0.9", "vimeo/psalm": "dev-master" }, + "default-branch": true, "type": "library", "autoload": { "psr-4": { "danog\\TelegramEntities\\": "src/" } }, - "notification-url": "https://packagist.org/downloads/", + "autoload-dev": { + "psr-4": { + "danog\\TestTelegramEntities\\": "tests/" + } + }, + "scripts": { + "cs-fix": [ + "PHP_CS_FIXER_IGNORE_ENV=1 php -d pcre.jit=0 vendor/bin/php-cs-fixer fix -v" + ] + }, "license": [ "Apache-2.0" ], @@ -2878,16 +2888,15 @@ ], "description": "A library to work with Telegram UTF-16 styled text entities.", "support": { - "issues": "https://github.com/danog/telegram-entities/issues", - "source": "https://github.com/danog/telegram-entities/tree/1.0.5" + "source": "https://github.com/xtrime-ru/telegram-entities/tree/master" }, "funding": [ { - "url": "https://github.com/danog", - "type": "github" + "type": "github", + "url": "https://github.com/danog" } ], - "time": "2025-06-22T12:27:39+00:00" + "time": "2026-04-10T16:55:58+00:00" }, { "name": "danog/tg-dialog-id", @@ -7199,11 +7208,19 @@ "time": "2026-03-30T15:14:47+00:00" } ], - "aliases": [], + "aliases": [ + { + "package": "danog/telegram-entities", + "version": "9999999-dev", + "alias": "1.0.x-dev", + "alias_normalized": "1.0.9999999.9999999-dev" + } + ], "minimum-stability": "dev", "stability-flags": { "amphp/dns": 20, - "danog/madelineproto": 20 + "danog/madelineproto": 20, + "danog/telegram-entities": 20 }, "prefer-stable": true, "prefer-lowest": false, From 0e7a82a6461ba8fa2e84a86bdf6e15af43978089 Mon Sep 17 00:00:00 2001 From: Alexander Pankratov Date: Mon, 13 Apr 2026 16:12:07 +0200 Subject: [PATCH 258/270] Fix: error notifications with configured socks5 proxy --- config.php | 8 +++++++- src/Client.php | 19 +++++++++++++++++-- 2 files changed, 24 insertions(+), 3 deletions(-) diff --git a/config.php b/config.php index 64dc56c..6124d37 100644 --- a/config.php +++ b/config.php @@ -23,7 +23,13 @@ static function (string $peer): string|int { ), ), 'prefix' => (string)getenv('ERROR_NOTIFICATION_PREFIX'), - 'resume_on_error' => ((bool)getenv('RESUME_ON_ERROR')) + 'resume_on_error' => ((bool)getenv('RESUME_ON_ERROR')), + 'proxy' => [ + "address" => (string)getenv('TELEGRAM_PROXY_ADDRESS'), + "port" => (int)getenv('TELEGRAM_PROXY_PORT'), + "username" => (string)getenv('TELEGRAM_PROXY_USERNAME'), + "password" => (string)getenv('TELEGRAM_PROXY_PASSWORD'), + ] ], 'telegram' => [ 'app_info' => [ // obtained in https://my.telegram.org diff --git a/src/Client.php b/src/Client.php index 99d6c80..32aa0c1 100644 --- a/src/Client.php +++ b/src/Client.php @@ -210,11 +210,18 @@ private function setFatalErrorHandler(): void $prefix = Config::getInstance()->get('error.prefix'); $resume = Config::getInstance()->get('error.resume_on_error'); + $proxy = [ + 'address' => Config::getInstance()->get('error.proxy.address'), + 'port' => Config::getInstance()->get('error.proxy.port'), + 'username' => Config::getInstance()->get('error.proxy.username'), + 'password' => Config::getInstance()->get('error.proxy.password'), + ]; + $currentHandler = EventLoop::getErrorHandler(); - EventLoop::setErrorHandler(static fn (\Throwable $e) => self::errorHandler($e, $currentHandler, $token, $peers, $prefix, $resume)); + EventLoop::setErrorHandler(static fn (\Throwable $e) => self::errorHandler($e, $currentHandler, $token, $peers, $prefix, $resume, $proxy)); } - private static function errorHandler(\Throwable $e, ?callable $currentHandler, string $token, array $peers, string $prefix, bool $resume): void + private static function errorHandler(\Throwable $e, ?callable $currentHandler, string $token, array $peers, string $prefix, bool $resume, array $proxy): void { if ($e instanceof UnhandledFutureError) { $e = $e->getPrevious(); @@ -236,6 +243,14 @@ private static function errorHandler(\Throwable $e, ?callable $currentHandler, s \curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 1); \curl_setopt($ch, CURLOPT_TIMEOUT, 5); + if ($proxy['address'] && $proxy['port']) { + \curl_setopt($ch, CURLOPT_PROXYTYPE, CURLPROXY_SOCKS5); + \curl_setopt($ch, CURLOPT_PROXY, "{$proxy['address']}:{$proxy['port']}"); + if ($proxy['username'] || $proxy['password']) { + curl_setopt($ch, CURLOPT_PROXYUSERPWD, "{$proxy['username']}:{$proxy['password']}"); + } + } + $encoded = function (string $input): string { return str_replace(['<', '>', '&'], ['<', '>', '&'], $input); }; From f731b128a06461f1dea0146afe1b114e5a6083d8 Mon Sep 17 00:00:00 2001 From: Alexander Pankratov Date: Mon, 20 Apr 2026 11:23:14 +0200 Subject: [PATCH 259/270] Update madelineProto to TL225 --- composer.lock | 218 +++++++++++++++++++++++++++++++++----------------- 1 file changed, 144 insertions(+), 74 deletions(-) diff --git a/composer.lock b/composer.lock index 2324c07..b2973b6 100644 --- a/composer.lock +++ b/composer.lock @@ -233,12 +233,12 @@ "source": { "type": "git", "url": "https://github.com/amphp/dns.git", - "reference": "78eb3db5fc69bf2fc0cb503c4fcba667bc223c71" + "reference": "2a3afc856b1e8c1b0c7012f41e6dfc367365d8b0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/amphp/dns/zipball/78eb3db5fc69bf2fc0cb503c4fcba667bc223c71", - "reference": "78eb3db5fc69bf2fc0cb503c4fcba667bc223c71", + "url": "https://api.github.com/repos/amphp/dns/zipball/2a3afc856b1e8c1b0c7012f41e6dfc367365d8b0", + "reference": "2a3afc856b1e8c1b0c7012f41e6dfc367365d8b0", "shasum": "" }, "require": { @@ -257,7 +257,7 @@ "amphp/php-cs-fixer-config": "^2", "amphp/phpunit-util": "^3", "phpunit/phpunit": "^9", - "psalm/phar": "5.20" + "psalm/phar": "6.16.1" }, "default-branch": true, "type": "library", @@ -307,7 +307,7 @@ ], "support": { "issues": "https://github.com/amphp/dns/issues", - "source": "https://github.com/amphp/dns/tree/v2.4.0" + "source": "https://github.com/amphp/dns/tree/2.x" }, "funding": [ { @@ -315,7 +315,7 @@ "type": "github" } ], - "time": "2025-01-19T15:43:40+00:00" + "time": "2026-04-18T14:43:30+00:00" }, { "name": "amphp/file", @@ -1621,16 +1621,16 @@ }, { "name": "amphp/socket", - "version": "v2.3.1", + "version": "v2.4.0", "source": { "type": "git", "url": "https://github.com/amphp/socket.git", - "reference": "58e0422221825b79681b72c50c47a930be7bf1e1" + "reference": "dadb63c5d3179fd83803e29dfeac27350e619314" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/amphp/socket/zipball/58e0422221825b79681b72c50c47a930be7bf1e1", - "reference": "58e0422221825b79681b72c50c47a930be7bf1e1", + "url": "https://api.github.com/repos/amphp/socket/zipball/dadb63c5d3179fd83803e29dfeac27350e619314", + "reference": "dadb63c5d3179fd83803e29dfeac27350e619314", "shasum": "" }, "require": { @@ -1639,17 +1639,17 @@ "amphp/dns": "^2", "ext-openssl": "*", "kelunik/certificate": "^1.1", - "league/uri": "^6.5 | ^7", - "league/uri-interfaces": "^2.3 | ^7", + "league/uri": "^7", + "league/uri-interfaces": "^7", "php": ">=8.1", - "revolt/event-loop": "^1 || ^0.2" + "revolt/event-loop": "^1" }, "require-dev": { "amphp/php-cs-fixer-config": "^2", "amphp/phpunit-util": "^3", "amphp/process": "^2", "phpunit/phpunit": "^9", - "psalm/phar": "5.20" + "psalm/phar": "6.16.1" }, "type": "library", "autoload": { @@ -1693,7 +1693,7 @@ ], "support": { "issues": "https://github.com/amphp/socket/issues", - "source": "https://github.com/amphp/socket/tree/v2.3.1" + "source": "https://github.com/amphp/socket/tree/v2.4.0" }, "funding": [ { @@ -1701,7 +1701,7 @@ "type": "github" } ], - "time": "2024-04-21T14:33:03+00:00" + "time": "2026-04-19T15:09:56+00:00" }, { "name": "amphp/sql", @@ -2597,12 +2597,12 @@ "source": { "type": "git", "url": "https://github.com/xtrime-ru/MadelineProto.git", - "reference": "e44341acc8fba33ad9a094d56dcf4e6a16849ea0" + "reference": "d73e6d8a5d472ed6ccfaf9fdc16128dbede3e5d3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/xtrime-ru/MadelineProto/zipball/e44341acc8fba33ad9a094d56dcf4e6a16849ea0", - "reference": "e44341acc8fba33ad9a094d56dcf4e6a16849ea0", + "url": "https://api.github.com/repos/xtrime-ru/MadelineProto/zipball/d73e6d8a5d472ed6ccfaf9fdc16128dbede3e5d3", + "reference": "d73e6d8a5d472ed6ccfaf9fdc16128dbede3e5d3", "shasum": "" }, "require": { @@ -2779,7 +2779,7 @@ "url": "https://github.com/danog" } ], - "time": "2026-04-10T16:36:34+00:00" + "time": "2026-04-20T09:21:48+00:00" }, { "name": "danog/primemodule", @@ -4311,16 +4311,16 @@ }, { "name": "symfony/polyfill-ctype", - "version": "v1.33.0", + "version": "v1.36.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-ctype.git", - "reference": "a3cc8b044a6ea513310cbd48ef7333b384945638" + "reference": "141046a8f9477948ff284fa65be2095baafb94f2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/a3cc8b044a6ea513310cbd48ef7333b384945638", - "reference": "a3cc8b044a6ea513310cbd48ef7333b384945638", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/141046a8f9477948ff284fa65be2095baafb94f2", + "reference": "141046a8f9477948ff284fa65be2095baafb94f2", "shasum": "" }, "require": { @@ -4370,7 +4370,7 @@ "portable" ], "support": { - "source": "https://github.com/symfony/polyfill-ctype/tree/v1.33.0" + "source": "https://github.com/symfony/polyfill-ctype/tree/v1.36.0" }, "funding": [ { @@ -4390,20 +4390,20 @@ "type": "tidelift" } ], - "time": "2024-09-09T11:45:10+00:00" + "time": "2026-04-10T16:19:22+00:00" }, { "name": "symfony/polyfill-mbstring", - "version": "v1.33.0", + "version": "v1.36.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "6d857f4d76bd4b343eac26d6b539585d2bc56493" + "reference": "6a21eb99c6973357967f6ce3708cd55a6bec6315" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/6d857f4d76bd4b343eac26d6b539585d2bc56493", - "reference": "6d857f4d76bd4b343eac26d6b539585d2bc56493", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/6a21eb99c6973357967f6ce3708cd55a6bec6315", + "reference": "6a21eb99c6973357967f6ce3708cd55a6bec6315", "shasum": "" }, "require": { @@ -4455,7 +4455,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.33.0" + "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.36.0" }, "funding": [ { @@ -4475,20 +4475,20 @@ "type": "tidelift" } ], - "time": "2024-12-23T08:48:59+00:00" + "time": "2026-04-10T17:25:58+00:00" }, { "name": "symfony/polyfill-php80", - "version": "v1.33.0", + "version": "v1.36.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php80.git", - "reference": "0cc9dd0f17f61d8131e7df6b84bd344899fe2608" + "reference": "dfb55726c3a76ea3b6459fcfda1ec2d80a682411" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/0cc9dd0f17f61d8131e7df6b84bd344899fe2608", - "reference": "0cc9dd0f17f61d8131e7df6b84bd344899fe2608", + "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/dfb55726c3a76ea3b6459fcfda1ec2d80a682411", + "reference": "dfb55726c3a76ea3b6459fcfda1ec2d80a682411", "shasum": "" }, "require": { @@ -4539,7 +4539,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php80/tree/v1.33.0" + "source": "https://github.com/symfony/polyfill-php80/tree/v1.36.0" }, "funding": [ { @@ -4559,20 +4559,20 @@ "type": "tidelift" } ], - "time": "2025-01-02T08:10:11+00:00" + "time": "2026-04-10T16:19:22+00:00" }, { "name": "symfony/polyfill-php83", - "version": "v1.33.0", + "version": "v1.36.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php83.git", - "reference": "17f6f9a6b1735c0f163024d959f700cfbc5155e5" + "reference": "3600c2cb22399e25bb226e4a135ce91eeb2a6149" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php83/zipball/17f6f9a6b1735c0f163024d959f700cfbc5155e5", - "reference": "17f6f9a6b1735c0f163024d959f700cfbc5155e5", + "url": "https://api.github.com/repos/symfony/polyfill-php83/zipball/3600c2cb22399e25bb226e4a135ce91eeb2a6149", + "reference": "3600c2cb22399e25bb226e4a135ce91eeb2a6149", "shasum": "" }, "require": { @@ -4619,7 +4619,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php83/tree/v1.33.0" + "source": "https://github.com/symfony/polyfill-php83/tree/v1.36.0" }, "funding": [ { @@ -4639,7 +4639,7 @@ "type": "tidelift" } ], - "time": "2025-07-08T02:45:35+00:00" + "time": "2026-04-10T17:25:58+00:00" }, { "name": "vlucas/phpdotenv", @@ -5125,6 +5125,75 @@ ], "time": "2024-05-06T16:37:16+00:00" }, + { + "name": "ergebnis/agent-detector", + "version": "1.1.1", + "source": { + "type": "git", + "url": "https://github.com/ergebnis/agent-detector.git", + "reference": "5b654a9f1ff8a5d2ce6a57568df5ae8801c87f64" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/ergebnis/agent-detector/zipball/5b654a9f1ff8a5d2ce6a57568df5ae8801c87f64", + "reference": "5b654a9f1ff8a5d2ce6a57568df5ae8801c87f64", + "shasum": "" + }, + "require": { + "php": "~7.4.0 || ~8.0.0 || ~8.1.0 || ~8.2.0 || ~8.3.0 || ~8.4.0 || ~8.5.0 || ~8.6.0" + }, + "require-dev": { + "ergebnis/composer-normalize": "^2.50.0", + "ergebnis/license": "^2.7.0", + "ergebnis/php-cs-fixer-config": "^6.60.2", + "ergebnis/phpstan-rules": "^2.13.1", + "ergebnis/phpunit-slow-test-detector": "^2.24.0", + "ergebnis/rector-rules": "^1.16.0", + "fakerphp/faker": "^1.24.1", + "infection/infection": "^0.26.6", + "phpstan/extension-installer": "^1.4.3", + "phpstan/phpstan": "^2.1.46", + "phpstan/phpstan-deprecation-rules": "^2.0.4", + "phpstan/phpstan-phpunit": "^2.0.16", + "phpstan/phpstan-strict-rules": "^2.0.10", + "phpunit/phpunit": "^9.6.34", + "rector/rector": "^2.4.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.0-dev" + }, + "composer-normalize": { + "indent-size": 2, + "indent-style": "space" + } + }, + "autoload": { + "psr-4": { + "Ergebnis\\AgentDetector\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Andreas Möller", + "email": "am@localheinz.com", + "homepage": "https://localheinz.com" + } + ], + "description": "Provides a detector for detecting the presence of an agent.", + "homepage": "https://github.com/ergebnis/agent-detector", + "support": { + "issues": "https://github.com/ergebnis/agent-detector/issues", + "security": "https://github.com/ergebnis/agent-detector/blob/main/.github/SECURITY.md", + "source": "https://github.com/ergebnis/agent-detector" + }, + "time": "2026-04-10T13:45:13+00:00" + }, { "name": "evenement/evenement", "version": "v3.0.2", @@ -5235,22 +5304,23 @@ }, { "name": "friendsofphp/php-cs-fixer", - "version": "v3.94.2", + "version": "v3.95.1", "source": { "type": "git", "url": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer.git", - "reference": "7787ceff91365ba7d623ec410b8f429cdebb4f63" + "reference": "a9727678fbd12997f1d9de8f4a37824ed9df1065" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/PHP-CS-Fixer/PHP-CS-Fixer/zipball/7787ceff91365ba7d623ec410b8f429cdebb4f63", - "reference": "7787ceff91365ba7d623ec410b8f429cdebb4f63", + "url": "https://api.github.com/repos/PHP-CS-Fixer/PHP-CS-Fixer/zipball/a9727678fbd12997f1d9de8f4a37824ed9df1065", + "reference": "a9727678fbd12997f1d9de8f4a37824ed9df1065", "shasum": "" }, "require": { "clue/ndjson-react": "^1.3", "composer/semver": "^3.4", "composer/xdebug-handler": "^3.0.5", + "ergebnis/agent-detector": "^1.1.1", "ext-filter": "*", "ext-hash": "*", "ext-json": "*", @@ -5275,18 +5345,18 @@ "symfony/stopwatch": "^5.4.45 || ^6.4.24 || ^7.0 || ^8.0" }, "require-dev": { - "facile-it/paraunit": "^1.3.1 || ^2.7.1", - "infection/infection": "^0.32.3", - "justinrainbow/json-schema": "^6.6.4", + "facile-it/paraunit": "^1.3.1 || ^2.8.0", + "infection/infection": "^0.32.6", + "justinrainbow/json-schema": "^6.8.0", "keradus/cli-executor": "^2.3", "mikey179/vfsstream": "^1.6.12", "php-coveralls/php-coveralls": "^2.9.1", - "php-cs-fixer/phpunit-constraint-isidenticalstring": "^1.7", - "php-cs-fixer/phpunit-constraint-xmlmatchesxsd": "^1.7", - "phpunit/phpunit": "^9.6.34 || ^10.5.63 || ^11.5.51", + "php-cs-fixer/phpunit-constraint-isidenticalstring": "^1.8", + "php-cs-fixer/phpunit-constraint-xmlmatchesxsd": "^1.8", + "phpunit/phpunit": "^9.6.34 || ^10.5.63 || ^11.5.55", "symfony/polyfill-php85": "^1.33", - "symfony/var-dumper": "^5.4.48 || ^6.4.32 || ^7.4.4 || ^8.0.4", - "symfony/yaml": "^5.4.45 || ^6.4.30 || ^7.4.1 || ^8.0.1" + "symfony/var-dumper": "^5.4.48 || ^6.4.32 || ^7.4.4 || ^8.0.8", + "symfony/yaml": "^5.4.45 || ^6.4.30 || ^7.4.1 || ^8.0.8" }, "suggest": { "ext-dom": "For handling output formats in XML", @@ -5327,7 +5397,7 @@ ], "support": { "issues": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/issues", - "source": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/tree/v3.94.2" + "source": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/tree/v3.95.1" }, "funding": [ { @@ -5335,7 +5405,7 @@ "type": "github" } ], - "time": "2026-02-20T16:13:53+00:00" + "time": "2026-04-12T17:00:09+00:00" }, { "name": "psr/container", @@ -6574,16 +6644,16 @@ }, { "name": "symfony/polyfill-intl-grapheme", - "version": "v1.33.0", + "version": "v1.36.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-grapheme.git", - "reference": "380872130d3a5dd3ace2f4010d95125fde5d5c70" + "reference": "ad1b7b9092976d6c948b8a187cec9faaea9ec1df" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/380872130d3a5dd3ace2f4010d95125fde5d5c70", - "reference": "380872130d3a5dd3ace2f4010d95125fde5d5c70", + "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/ad1b7b9092976d6c948b8a187cec9faaea9ec1df", + "reference": "ad1b7b9092976d6c948b8a187cec9faaea9ec1df", "shasum": "" }, "require": { @@ -6632,7 +6702,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.33.0" + "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.36.0" }, "funding": [ { @@ -6652,11 +6722,11 @@ "type": "tidelift" } ], - "time": "2025-06-27T09:58:17+00:00" + "time": "2026-04-10T16:19:22+00:00" }, { "name": "symfony/polyfill-intl-normalizer", - "version": "v1.33.0", + "version": "v1.36.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-normalizer.git", @@ -6717,7 +6787,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.33.0" + "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.36.0" }, "funding": [ { @@ -6741,7 +6811,7 @@ }, { "name": "symfony/polyfill-php81", - "version": "v1.33.0", + "version": "v1.36.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php81.git", @@ -6797,7 +6867,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php81/tree/v1.33.0" + "source": "https://github.com/symfony/polyfill-php81/tree/v1.36.0" }, "funding": [ { @@ -6821,16 +6891,16 @@ }, { "name": "symfony/polyfill-php84", - "version": "v1.33.0", + "version": "v1.36.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php84.git", - "reference": "d8ced4d875142b6a7426000426b8abc631d6b191" + "reference": "88486db2c389b290bf87ff1de7ebc1e13e42bb06" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php84/zipball/d8ced4d875142b6a7426000426b8abc631d6b191", - "reference": "d8ced4d875142b6a7426000426b8abc631d6b191", + "url": "https://api.github.com/repos/symfony/polyfill-php84/zipball/88486db2c389b290bf87ff1de7ebc1e13e42bb06", + "reference": "88486db2c389b290bf87ff1de7ebc1e13e42bb06", "shasum": "" }, "require": { @@ -6877,7 +6947,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php84/tree/v1.33.0" + "source": "https://github.com/symfony/polyfill-php84/tree/v1.36.0" }, "funding": [ { @@ -6897,7 +6967,7 @@ "type": "tidelift" } ], - "time": "2025-06-24T13:30:11+00:00" + "time": "2026-04-10T18:47:49+00:00" }, { "name": "symfony/process", From 39debee6345f6cd4bb714d40159163b9f5148bb7 Mon Sep 17 00:00:00 2001 From: Alexander Pankratov Date: Tue, 28 Apr 2026 11:58:58 +0200 Subject: [PATCH 260/270] Fix: error handling --- composer.lock | 60 +++++++++++++++++++++++++------------------------- src/Client.php | 4 ++-- 2 files changed, 32 insertions(+), 32 deletions(-) diff --git a/composer.lock b/composer.lock index b2973b6..d7720ad 100644 --- a/composer.lock +++ b/composer.lock @@ -2597,12 +2597,12 @@ "source": { "type": "git", "url": "https://github.com/xtrime-ru/MadelineProto.git", - "reference": "d73e6d8a5d472ed6ccfaf9fdc16128dbede3e5d3" + "reference": "8c23d5e7aa5c216bcad59b6babb0025decc6d3ea" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/xtrime-ru/MadelineProto/zipball/d73e6d8a5d472ed6ccfaf9fdc16128dbede3e5d3", - "reference": "d73e6d8a5d472ed6ccfaf9fdc16128dbede3e5d3", + "url": "https://api.github.com/repos/xtrime-ru/MadelineProto/zipball/8c23d5e7aa5c216bcad59b6babb0025decc6d3ea", + "reference": "8c23d5e7aa5c216bcad59b6babb0025decc6d3ea", "shasum": "" }, "require": { @@ -2779,7 +2779,7 @@ "url": "https://github.com/danog" } ], - "time": "2026-04-20T09:21:48+00:00" + "time": "2026-04-28T09:58:22+00:00" }, { "name": "danog/primemodule", @@ -3901,16 +3901,16 @@ }, { "name": "phpseclib/phpseclib", - "version": "3.0.51", + "version": "3.0.52", "source": { "type": "git", "url": "https://github.com/phpseclib/phpseclib.git", - "reference": "d59c94077f9c9915abb51ddb52ce85188ece1748" + "reference": "2adaefc83df2ec548558307690f376dd7d4f4fce" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpseclib/phpseclib/zipball/d59c94077f9c9915abb51ddb52ce85188ece1748", - "reference": "d59c94077f9c9915abb51ddb52ce85188ece1748", + "url": "https://api.github.com/repos/phpseclib/phpseclib/zipball/2adaefc83df2ec548558307690f376dd7d4f4fce", + "reference": "2adaefc83df2ec548558307690f376dd7d4f4fce", "shasum": "" }, "require": { @@ -3991,7 +3991,7 @@ ], "support": { "issues": "https://github.com/phpseclib/phpseclib/issues", - "source": "https://github.com/phpseclib/phpseclib/tree/3.0.51" + "source": "https://github.com/phpseclib/phpseclib/tree/3.0.52" }, "funding": [ { @@ -4007,7 +4007,7 @@ "type": "tidelift" } ], - "time": "2026-04-10T01:33:53+00:00" + "time": "2026-04-27T07:02:15+00:00" }, { "name": "promphp/prometheus_client_php", @@ -4311,7 +4311,7 @@ }, { "name": "symfony/polyfill-ctype", - "version": "v1.36.0", + "version": "v1.37.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-ctype.git", @@ -4370,7 +4370,7 @@ "portable" ], "support": { - "source": "https://github.com/symfony/polyfill-ctype/tree/v1.36.0" + "source": "https://github.com/symfony/polyfill-ctype/tree/v1.37.0" }, "funding": [ { @@ -4394,7 +4394,7 @@ }, { "name": "symfony/polyfill-mbstring", - "version": "v1.36.0", + "version": "v1.37.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-mbstring.git", @@ -4455,7 +4455,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.36.0" + "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.37.0" }, "funding": [ { @@ -4479,7 +4479,7 @@ }, { "name": "symfony/polyfill-php80", - "version": "v1.36.0", + "version": "v1.37.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php80.git", @@ -4539,7 +4539,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php80/tree/v1.36.0" + "source": "https://github.com/symfony/polyfill-php80/tree/v1.37.0" }, "funding": [ { @@ -4563,7 +4563,7 @@ }, { "name": "symfony/polyfill-php83", - "version": "v1.36.0", + "version": "v1.37.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php83.git", @@ -4619,7 +4619,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php83/tree/v1.36.0" + "source": "https://github.com/symfony/polyfill-php83/tree/v1.37.0" }, "funding": [ { @@ -6644,16 +6644,16 @@ }, { "name": "symfony/polyfill-intl-grapheme", - "version": "v1.36.0", + "version": "v1.37.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-grapheme.git", - "reference": "ad1b7b9092976d6c948b8a187cec9faaea9ec1df" + "reference": "4864388bfbd3001ce88e234fab652acd91fdc57e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/ad1b7b9092976d6c948b8a187cec9faaea9ec1df", - "reference": "ad1b7b9092976d6c948b8a187cec9faaea9ec1df", + "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/4864388bfbd3001ce88e234fab652acd91fdc57e", + "reference": "4864388bfbd3001ce88e234fab652acd91fdc57e", "shasum": "" }, "require": { @@ -6702,7 +6702,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.36.0" + "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.37.0" }, "funding": [ { @@ -6722,11 +6722,11 @@ "type": "tidelift" } ], - "time": "2026-04-10T16:19:22+00:00" + "time": "2026-04-26T13:13:48+00:00" }, { "name": "symfony/polyfill-intl-normalizer", - "version": "v1.36.0", + "version": "v1.37.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-normalizer.git", @@ -6787,7 +6787,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.36.0" + "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.37.0" }, "funding": [ { @@ -6811,7 +6811,7 @@ }, { "name": "symfony/polyfill-php81", - "version": "v1.36.0", + "version": "v1.37.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php81.git", @@ -6867,7 +6867,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php81/tree/v1.36.0" + "source": "https://github.com/symfony/polyfill-php81/tree/v1.37.0" }, "funding": [ { @@ -6891,7 +6891,7 @@ }, { "name": "symfony/polyfill-php84", - "version": "v1.36.0", + "version": "v1.37.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php84.git", @@ -6947,7 +6947,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php84/tree/v1.36.0" + "source": "https://github.com/symfony/polyfill-php84/tree/v1.37.0" }, "funding": [ { diff --git a/src/Client.php b/src/Client.php index 32aa0c1..44a7cda 100644 --- a/src/Client.php +++ b/src/Client.php @@ -231,7 +231,7 @@ private static function errorHandler(\Throwable $e, ?callable $currentHandler, s $currentHandler($e); } if ($e->getPrevious()) { - self::errorHandler($e->getPrevious(), $currentHandler, $token, $peers, $prefix, true); + self::errorHandler($e->getPrevious(), $currentHandler, $token, $peers, $prefix, true, $proxy); } if ($peers && $token) { try { @@ -244,7 +244,7 @@ private static function errorHandler(\Throwable $e, ?callable $currentHandler, s \curl_setopt($ch, CURLOPT_TIMEOUT, 5); if ($proxy['address'] && $proxy['port']) { - \curl_setopt($ch, CURLOPT_PROXYTYPE, CURLPROXY_SOCKS5); + \curl_setopt($ch, CURLOPT_PROXYTYPE, CURLPROXY_SOCKS5_HOSTNAME); \curl_setopt($ch, CURLOPT_PROXY, "{$proxy['address']}:{$proxy['port']}"); if ($proxy['username'] || $proxy['password']) { curl_setopt($ch, CURLOPT_PROXYUSERPWD, "{$proxy['username']}:{$proxy['password']}"); From 67d2d846264880729778935acdcb4cf08eac4dfb Mon Sep 17 00:00:00 2001 From: Alexander Pankratov Date: Tue, 28 Apr 2026 12:16:11 +0200 Subject: [PATCH 261/270] Always connect via proxy only --- config.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/config.php b/config.php index 6124d37..00c2a86 100644 --- a/config.php +++ b/config.php @@ -57,7 +57,8 @@ static function (string $peer): string|int { "password" => (string)getenv('TELEGRAM_PROXY_PASSWORD'), ], ] - ] + ], + 'retry' => false, ], 'serialization' => [ 'interval' => 600, From 8252677ae1b6d0b3f0a182b70b300b8787b1eb17 Mon Sep 17 00:00:00 2001 From: Alexander Pankratov Date: Tue, 28 Apr 2026 12:30:57 +0200 Subject: [PATCH 262/270] Show settings --- src/Client.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/Client.php b/src/Client.php index 44a7cda..48a7ec3 100644 --- a/src/Client.php +++ b/src/Client.php @@ -196,6 +196,12 @@ private static function getSettingsFromArray(string $session, array $settings, S $value = SerializerType::from($value); } $method = 'set' . \ucfirst(\str_replace('_', '', \ucwords($key, '_'))); + Logger::getInstance()->info( + sprintf("Set setting %s::%s(%s)", + get_class($settingsObject), + $method, + json_encode($value, JSON_UNESCAPED_UNICODE) + )); $settingsObject->$method($value); } } From ce0e023b2cd9c04b75bc06960d4c8e7e2db31f03 Mon Sep 17 00:00:00 2001 From: Alexander Pankratov Date: Fri, 1 May 2026 12:20:23 +0200 Subject: [PATCH 263/270] Fix: negative dc numbers --- composer.lock | 44 ++++++++++++++++++++++---------------------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/composer.lock b/composer.lock index d7720ad..acf2fe9 100644 --- a/composer.lock +++ b/composer.lock @@ -2597,12 +2597,12 @@ "source": { "type": "git", "url": "https://github.com/xtrime-ru/MadelineProto.git", - "reference": "8c23d5e7aa5c216bcad59b6babb0025decc6d3ea" + "reference": "064b0e0c8cd7f3b338773970c5d132d0caacf27a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/xtrime-ru/MadelineProto/zipball/8c23d5e7aa5c216bcad59b6babb0025decc6d3ea", - "reference": "8c23d5e7aa5c216bcad59b6babb0025decc6d3ea", + "url": "https://api.github.com/repos/xtrime-ru/MadelineProto/zipball/064b0e0c8cd7f3b338773970c5d132d0caacf27a", + "reference": "064b0e0c8cd7f3b338773970c5d132d0caacf27a", "shasum": "" }, "require": { @@ -2779,7 +2779,7 @@ "url": "https://github.com/danog" } ], - "time": "2026-04-28T09:58:22+00:00" + "time": "2026-05-01T10:17:02+00:00" }, { "name": "danog/primemodule", @@ -6117,16 +6117,16 @@ }, { "name": "symfony/console", - "version": "v8.0.8", + "version": "v8.0.9", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "5b66d385dc58f69652e56f78a4184615e3f2b7f7" + "reference": "7113778e2e91f4709cb3194a75dfa9c0d028d94d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/5b66d385dc58f69652e56f78a4184615e3f2b7f7", - "reference": "5b66d385dc58f69652e56f78a4184615e3f2b7f7", + "url": "https://api.github.com/repos/symfony/console/zipball/7113778e2e91f4709cb3194a75dfa9c0d028d94d", + "reference": "7113778e2e91f4709cb3194a75dfa9c0d028d94d", "shasum": "" }, "require": { @@ -6183,7 +6183,7 @@ "terminal" ], "support": { - "source": "https://github.com/symfony/console/tree/v8.0.8" + "source": "https://github.com/symfony/console/tree/v8.0.9" }, "funding": [ { @@ -6203,7 +6203,7 @@ "type": "tidelift" } ], - "time": "2026-03-30T15:14:47+00:00" + "time": "2026-04-29T15:02:55+00:00" }, { "name": "symfony/deprecation-contracts", @@ -6274,16 +6274,16 @@ }, { "name": "symfony/event-dispatcher", - "version": "v8.0.8", + "version": "v8.0.9", "source": { "type": "git", "url": "https://github.com/symfony/event-dispatcher.git", - "reference": "f662acc6ab22a3d6d716dcb44c381c6002940df6" + "reference": "0c3c1a17604c4dbbec4b93fe162c538482096e1f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/f662acc6ab22a3d6d716dcb44c381c6002940df6", - "reference": "f662acc6ab22a3d6d716dcb44c381c6002940df6", + "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/0c3c1a17604c4dbbec4b93fe162c538482096e1f", + "reference": "0c3c1a17604c4dbbec4b93fe162c538482096e1f", "shasum": "" }, "require": { @@ -6335,7 +6335,7 @@ "description": "Provides tools that allow your application components to communicate with each other by dispatching events and listening to them", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/event-dispatcher/tree/v8.0.8" + "source": "https://github.com/symfony/event-dispatcher/tree/v8.0.9" }, "funding": [ { @@ -6355,7 +6355,7 @@ "type": "tidelift" } ], - "time": "2026-03-30T15:14:47+00:00" + "time": "2026-04-18T13:51:42+00:00" }, { "name": "symfony/event-dispatcher-contracts", @@ -6435,16 +6435,16 @@ }, { "name": "symfony/filesystem", - "version": "v8.0.8", + "version": "v8.0.9", "source": { "type": "git", "url": "https://github.com/symfony/filesystem.git", - "reference": "66b769ae743ce2d13e435528fbef4af03d623e5a" + "reference": "d1ec4543d5c6c2dac78503c2fae5ea0b3608ce40" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/filesystem/zipball/66b769ae743ce2d13e435528fbef4af03d623e5a", - "reference": "66b769ae743ce2d13e435528fbef4af03d623e5a", + "url": "https://api.github.com/repos/symfony/filesystem/zipball/d1ec4543d5c6c2dac78503c2fae5ea0b3608ce40", + "reference": "d1ec4543d5c6c2dac78503c2fae5ea0b3608ce40", "shasum": "" }, "require": { @@ -6481,7 +6481,7 @@ "description": "Provides basic utilities for the filesystem", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/filesystem/tree/v8.0.8" + "source": "https://github.com/symfony/filesystem/tree/v8.0.9" }, "funding": [ { @@ -6501,7 +6501,7 @@ "type": "tidelift" } ], - "time": "2026-03-30T15:14:47+00:00" + "time": "2026-04-18T13:51:42+00:00" }, { "name": "symfony/finder", From 57ef21f80255da572731b8ee6fc22d60303d732c Mon Sep 17 00:00:00 2001 From: Alexander Pankratov Date: Fri, 1 May 2026 14:43:47 +0200 Subject: [PATCH 264/270] Fix: negative dc numbers --- composer.lock | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/composer.lock b/composer.lock index acf2fe9..91fcebd 100644 --- a/composer.lock +++ b/composer.lock @@ -2597,12 +2597,12 @@ "source": { "type": "git", "url": "https://github.com/xtrime-ru/MadelineProto.git", - "reference": "064b0e0c8cd7f3b338773970c5d132d0caacf27a" + "reference": "5cbe733d90557cf3219fdac3d00ec31ec7bce2bc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/xtrime-ru/MadelineProto/zipball/064b0e0c8cd7f3b338773970c5d132d0caacf27a", - "reference": "064b0e0c8cd7f3b338773970c5d132d0caacf27a", + "url": "https://api.github.com/repos/xtrime-ru/MadelineProto/zipball/5cbe733d90557cf3219fdac3d00ec31ec7bce2bc", + "reference": "5cbe733d90557cf3219fdac3d00ec31ec7bce2bc", "shasum": "" }, "require": { @@ -2779,7 +2779,7 @@ "url": "https://github.com/danog" } ], - "time": "2026-05-01T10:17:02+00:00" + "time": "2026-05-01T12:43:14+00:00" }, { "name": "danog/primemodule", From 3cc40c4be6e14023da726e00adadfb5f49bcc4b1 Mon Sep 17 00:00:00 2001 From: Alexander Pankratov Date: Fri, 8 May 2026 19:11:07 +0200 Subject: [PATCH 265/270] Fix: error in log --- composer.lock | 120 +++++++++++++++++++++++++++----------------------- 1 file changed, 64 insertions(+), 56 deletions(-) diff --git a/composer.lock b/composer.lock index 91fcebd..3def110 100644 --- a/composer.lock +++ b/composer.lock @@ -404,16 +404,16 @@ }, { "name": "amphp/hpack", - "version": "v3.2.1", + "version": "v3.2.2", "source": { "type": "git", "url": "https://github.com/amphp/hpack.git", - "reference": "4f293064b15682a2b178b1367ddf0b8b5feb0239" + "reference": "291da27078e7e149a9bad4d08ff05bf7d81c89f4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/amphp/hpack/zipball/4f293064b15682a2b178b1367ddf0b8b5feb0239", - "reference": "4f293064b15682a2b178b1367ddf0b8b5feb0239", + "url": "https://api.github.com/repos/amphp/hpack/zipball/291da27078e7e149a9bad4d08ff05bf7d81c89f4", + "reference": "291da27078e7e149a9bad4d08ff05bf7d81c89f4", "shasum": "" }, "require": { @@ -422,7 +422,7 @@ "require-dev": { "amphp/php-cs-fixer-config": "^2", "http2jp/hpack-test-case": "^1", - "nikic/php-fuzzer": "^0.0.10", + "nikic/php-fuzzer": "^0.0.11", "phpunit/phpunit": "^7 | ^8 | ^9" }, "type": "library", @@ -466,7 +466,7 @@ ], "support": { "issues": "https://github.com/amphp/hpack/issues", - "source": "https://github.com/amphp/hpack/tree/v3.2.1" + "source": "https://github.com/amphp/hpack/tree/v3.2.2" }, "funding": [ { @@ -474,7 +474,7 @@ "type": "github" } ], - "time": "2024-03-21T19:00:16+00:00" + "time": "2026-05-03T19:28:59+00:00" }, { "name": "amphp/http", @@ -717,16 +717,16 @@ }, { "name": "amphp/http-server", - "version": "v3.4.4", + "version": "v3.4.5", "source": { "type": "git", "url": "https://github.com/amphp/http-server.git", - "reference": "8dc32cc6a65c12a3543276305796b993c56b76ef" + "reference": "ae0fd01e16aba336247852df0c3f8c649a31896d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/amphp/http-server/zipball/8dc32cc6a65c12a3543276305796b993c56b76ef", - "reference": "8dc32cc6a65c12a3543276305796b993c56b76ef", + "url": "https://api.github.com/repos/amphp/http-server/zipball/ae0fd01e16aba336247852df0c3f8c649a31896d", + "reference": "ae0fd01e16aba336247852df0c3f8c649a31896d", "shasum": "" }, "require": { @@ -753,7 +753,7 @@ "league/uri-components": "^7.1", "monolog/monolog": "^3", "phpunit/phpunit": "^9", - "psalm/phar": "~5.23" + "psalm/phar": "6.16.1" }, "suggest": { "ext-zlib": "Allows GZip compression of response bodies" @@ -802,7 +802,7 @@ ], "support": { "issues": "https://github.com/amphp/http-server/issues", - "source": "https://github.com/amphp/http-server/tree/v3.4.4" + "source": "https://github.com/amphp/http-server/tree/v3.4.5" }, "funding": [ { @@ -810,7 +810,7 @@ "type": "github" } ], - "time": "2026-02-08T18:16:29+00:00" + "time": "2026-05-01T03:55:07+00:00" }, { "name": "amphp/http-server-form-parser", @@ -1120,16 +1120,16 @@ }, { "name": "amphp/parallel", - "version": "v2.3.3", + "version": "v2.3.4", "source": { "type": "git", "url": "https://github.com/amphp/parallel.git", - "reference": "296b521137a54d3a02425b464e5aee4c93db2c60" + "reference": "3ad45d1cff1bfbfe832c79671e6a4a1017dd9921" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/amphp/parallel/zipball/296b521137a54d3a02425b464e5aee4c93db2c60", - "reference": "296b521137a54d3a02425b464e5aee4c93db2c60", + "url": "https://api.github.com/repos/amphp/parallel/zipball/3ad45d1cff1bfbfe832c79671e6a4a1017dd9921", + "reference": "3ad45d1cff1bfbfe832c79671e6a4a1017dd9921", "shasum": "" }, "require": { @@ -1149,7 +1149,7 @@ "amphp/php-cs-fixer-config": "^2", "amphp/phpunit-util": "^3", "phpunit/phpunit": "^9", - "psalm/phar": "^5.18" + "psalm/phar": "6.16.1" }, "type": "library", "autoload": { @@ -1192,7 +1192,7 @@ ], "support": { "issues": "https://github.com/amphp/parallel/issues", - "source": "https://github.com/amphp/parallel/tree/v2.3.3" + "source": "https://github.com/amphp/parallel/tree/v2.3.4" }, "funding": [ { @@ -1200,7 +1200,7 @@ "type": "github" } ], - "time": "2025-11-15T06:23:42+00:00" + "time": "2026-05-06T19:26:51+00:00" }, { "name": "amphp/parser", @@ -2597,12 +2597,12 @@ "source": { "type": "git", "url": "https://github.com/xtrime-ru/MadelineProto.git", - "reference": "5cbe733d90557cf3219fdac3d00ec31ec7bce2bc" + "reference": "e8e05379de329758926f90764b6cd8fc8414437d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/xtrime-ru/MadelineProto/zipball/5cbe733d90557cf3219fdac3d00ec31ec7bce2bc", - "reference": "5cbe733d90557cf3219fdac3d00ec31ec7bce2bc", + "url": "https://api.github.com/repos/xtrime-ru/MadelineProto/zipball/e8e05379de329758926f90764b6cd8fc8414437d", + "reference": "e8e05379de329758926f90764b6cd8fc8414437d", "shasum": "" }, "require": { @@ -2779,7 +2779,7 @@ "url": "https://github.com/danog" } ], - "time": "2026-05-01T12:43:14+00:00" + "time": "2026-05-08T17:10:18+00:00" }, { "name": "danog/primemodule", @@ -5127,42 +5127,42 @@ }, { "name": "ergebnis/agent-detector", - "version": "1.1.1", + "version": "1.2.0", "source": { "type": "git", "url": "https://github.com/ergebnis/agent-detector.git", - "reference": "5b654a9f1ff8a5d2ce6a57568df5ae8801c87f64" + "reference": "e211f17928c8b95a51e06040792d57f5462fb271" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/ergebnis/agent-detector/zipball/5b654a9f1ff8a5d2ce6a57568df5ae8801c87f64", - "reference": "5b654a9f1ff8a5d2ce6a57568df5ae8801c87f64", + "url": "https://api.github.com/repos/ergebnis/agent-detector/zipball/e211f17928c8b95a51e06040792d57f5462fb271", + "reference": "e211f17928c8b95a51e06040792d57f5462fb271", "shasum": "" }, "require": { "php": "~7.4.0 || ~8.0.0 || ~8.1.0 || ~8.2.0 || ~8.3.0 || ~8.4.0 || ~8.5.0 || ~8.6.0" }, "require-dev": { - "ergebnis/composer-normalize": "^2.50.0", + "ergebnis/composer-normalize": "^2.51.0", "ergebnis/license": "^2.7.0", "ergebnis/php-cs-fixer-config": "^6.60.2", "ergebnis/phpstan-rules": "^2.13.1", "ergebnis/phpunit-slow-test-detector": "^2.24.0", - "ergebnis/rector-rules": "^1.16.0", + "ergebnis/rector-rules": "^1.18.1", "fakerphp/faker": "^1.24.1", "infection/infection": "^0.26.6", "phpstan/extension-installer": "^1.4.3", - "phpstan/phpstan": "^2.1.46", + "phpstan/phpstan": "^2.1.54", "phpstan/phpstan-deprecation-rules": "^2.0.4", "phpstan/phpstan-phpunit": "^2.0.16", "phpstan/phpstan-strict-rules": "^2.0.10", "phpunit/phpunit": "^9.6.34", - "rector/rector": "^2.4.1" + "rector/rector": "^2.4.2" }, "type": "library", "extra": { "branch-alias": { - "dev-main": "1.0-dev" + "dev-main": "1.2-dev" }, "composer-normalize": { "indent-size": 2, @@ -5192,7 +5192,7 @@ "security": "https://github.com/ergebnis/agent-detector/blob/main/.github/SECURITY.md", "source": "https://github.com/ergebnis/agent-detector" }, - "time": "2026-04-10T13:45:13+00:00" + "time": "2026-05-07T08:19:07+00:00" }, { "name": "evenement/evenement", @@ -6207,16 +6207,16 @@ }, { "name": "symfony/deprecation-contracts", - "version": "v3.6.0", + "version": "v3.7.0", "source": { "type": "git", "url": "https://github.com/symfony/deprecation-contracts.git", - "reference": "63afe740e99a13ba87ec199bb07bbdee937a5b62" + "reference": "50f59d1f3ca46d41ac911f97a78626b6756af35b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/63afe740e99a13ba87ec199bb07bbdee937a5b62", - "reference": "63afe740e99a13ba87ec199bb07bbdee937a5b62", + "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/50f59d1f3ca46d41ac911f97a78626b6756af35b", + "reference": "50f59d1f3ca46d41ac911f97a78626b6756af35b", "shasum": "" }, "require": { @@ -6229,7 +6229,7 @@ "name": "symfony/contracts" }, "branch-alias": { - "dev-main": "3.6-dev" + "dev-main": "3.7-dev" } }, "autoload": { @@ -6254,7 +6254,7 @@ "description": "A generic function and convention to trigger deprecation notices", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/deprecation-contracts/tree/v3.6.0" + "source": "https://github.com/symfony/deprecation-contracts/tree/v3.7.0" }, "funding": [ { @@ -6265,12 +6265,16 @@ "url": "https://github.com/fabpot", "type": "github" }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, { "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", "type": "tidelift" } ], - "time": "2024-09-25T14:21:43+00:00" + "time": "2026-04-13T15:52:40+00:00" }, { "name": "symfony/event-dispatcher", @@ -6359,16 +6363,16 @@ }, { "name": "symfony/event-dispatcher-contracts", - "version": "v3.6.0", + "version": "v3.7.0", "source": { "type": "git", "url": "https://github.com/symfony/event-dispatcher-contracts.git", - "reference": "59eb412e93815df44f05f342958efa9f46b1e586" + "reference": "ccba7060602b7fed0b03c85bf025257f76d9ef32" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher-contracts/zipball/59eb412e93815df44f05f342958efa9f46b1e586", - "reference": "59eb412e93815df44f05f342958efa9f46b1e586", + "url": "https://api.github.com/repos/symfony/event-dispatcher-contracts/zipball/ccba7060602b7fed0b03c85bf025257f76d9ef32", + "reference": "ccba7060602b7fed0b03c85bf025257f76d9ef32", "shasum": "" }, "require": { @@ -6382,7 +6386,7 @@ "name": "symfony/contracts" }, "branch-alias": { - "dev-main": "3.6-dev" + "dev-main": "3.7-dev" } }, "autoload": { @@ -6415,7 +6419,7 @@ "standards" ], "support": { - "source": "https://github.com/symfony/event-dispatcher-contracts/tree/v3.6.0" + "source": "https://github.com/symfony/event-dispatcher-contracts/tree/v3.7.0" }, "funding": [ { @@ -6426,12 +6430,16 @@ "url": "https://github.com/fabpot", "type": "github" }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, { "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", "type": "tidelift" } ], - "time": "2024-09-25T14:21:43+00:00" + "time": "2026-01-05T13:30:16+00:00" }, { "name": "symfony/filesystem", @@ -7036,16 +7044,16 @@ }, { "name": "symfony/service-contracts", - "version": "v3.6.1", + "version": "v3.7.0", "source": { "type": "git", "url": "https://github.com/symfony/service-contracts.git", - "reference": "45112560a3ba2d715666a509a0bc9521d10b6c43" + "reference": "d25d82433a80eba6aa0e6c24b61d7370d99e444a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/service-contracts/zipball/45112560a3ba2d715666a509a0bc9521d10b6c43", - "reference": "45112560a3ba2d715666a509a0bc9521d10b6c43", + "url": "https://api.github.com/repos/symfony/service-contracts/zipball/d25d82433a80eba6aa0e6c24b61d7370d99e444a", + "reference": "d25d82433a80eba6aa0e6c24b61d7370d99e444a", "shasum": "" }, "require": { @@ -7063,7 +7071,7 @@ "name": "symfony/contracts" }, "branch-alias": { - "dev-main": "3.6-dev" + "dev-main": "3.7-dev" } }, "autoload": { @@ -7099,7 +7107,7 @@ "standards" ], "support": { - "source": "https://github.com/symfony/service-contracts/tree/v3.6.1" + "source": "https://github.com/symfony/service-contracts/tree/v3.7.0" }, "funding": [ { @@ -7119,7 +7127,7 @@ "type": "tidelift" } ], - "time": "2025-07-15T11:30:57+00:00" + "time": "2026-03-28T09:44:51+00:00" }, { "name": "symfony/stopwatch", From e72bfb577ab8d8c26fb5ad1d227027cfb3670f32 Mon Sep 17 00:00:00 2001 From: eav93 Date: Wed, 13 May 2026 12:13:55 +0300 Subject: [PATCH 266/270] fix: accept full TCP port range when stripping port from remote address The port range check in getClientIp() used 65353 instead of 65535, causing the port to not be stripped from the remote address whenever the source ephemeral port fell into the 65354-65535 range. The full 'ip:port' literal then leaked into the IP_WHITELIST comparison, which failed even when the IP was correctly whitelisted. Result: requests intermittently rejected with 'Your host is not allowed' depending on the source port chosen by the kernel/docker-proxy. --- src/Server/Server.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Server/Server.php b/src/Server/Server.php index 142baae..5f1c641 100644 --- a/src/Server/Server.php +++ b/src/Server/Server.php @@ -102,7 +102,7 @@ public static function getClientIp(Request $request): string $hostArray = \explode(':', $remote); if (\count($hostArray) >= 2) { $port = (int) \array_pop($hostArray); - if ($port > 0 && $port <= 65353) { + if ($port > 0 && $port <= 65535) { $remote = \implode(':', $hostArray); } } From 9c937a97e5d26849c872128707881ec7ebc3266b Mon Sep 17 00:00:00 2001 From: Daniil Gentili Date: Sat, 30 May 2026 12:17:12 +0200 Subject: [PATCH 267/270] Fix BotApiFileId downloads and add docs --- README.md | 18 ++++++++++++++++++ src/Controllers/AbstractApiController.php | 2 +- 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 7643275..73712f2 100644 --- a/README.md +++ b/README.md @@ -180,6 +180,24 @@ There are few options to upload and send media files: ### Downloading files +By bot API file ID (the session needs to be the same session that generated the file ID, no filesize limit): + +```shell script +curl --location --request POST '127.0.0.1:9503/api/yourBot/downloadToResponse' \ +--header 'Content-Type: application/json' \ +--data-raw '{ + "media": { + "_": "BotApiFileId", + "fileId": "nalsfknalskfsnakfl", + "size": 123, + "fileName": "name", + "protected": false, + } +}' +``` + +By MessageMedia: + ```shell script curl --location --request POST '127.0.0.1:9503/api/downloadToResponse' \ --header 'Content-Type: application/json' \ diff --git a/src/Controllers/AbstractApiController.php b/src/Controllers/AbstractApiController.php index 19d2ade..5b9bd6d 100644 --- a/src/Controllers/AbstractApiController.php +++ b/src/Controllers/AbstractApiController.php @@ -151,7 +151,7 @@ private static function getMadelineMediaObject(string |array | StreamedField | n return match ($input['_']) { 'LocalFile' => new LocalFile(...$input), 'RemoteUrl' => new RemoteUrl(...$input), - 'BotApiFieldId' => new BotApiFileId(...$input), + 'BotApiFieldId', 'BotApiFileId' => new BotApiFileId(...$input), default => throw new InvalidArgumentException("Unknown type: {$input['_']}"), }; } From 5d5aa57c4d9e89ba05234c62f38ac4ad1325cd04 Mon Sep 17 00:00:00 2001 From: Alexander Pankratov Date: Sat, 30 May 2026 13:35:56 +0200 Subject: [PATCH 268/270] Upgrade dependencies --- composer.lock | 411 ++++++++++++++++++++++++++++++-------------------- 1 file changed, 251 insertions(+), 160 deletions(-) diff --git a/composer.lock b/composer.lock index 3def110..a33fa9a 100644 --- a/composer.lock +++ b/composer.lock @@ -542,16 +542,16 @@ }, { "name": "amphp/http-client", - "version": "v5.3.4", + "version": "v5.3.6", "source": { "type": "git", "url": "https://github.com/amphp/http-client.git", - "reference": "75ad21574fd632594a2dd914496647816d5106bc" + "reference": "ca155026acafa74a612d776a97202d53077fee86" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/amphp/http-client/zipball/75ad21574fd632594a2dd914496647816d5106bc", - "reference": "75ad21574fd632594a2dd914496647816d5106bc", + "url": "https://api.github.com/repos/amphp/http-client/zipball/ca155026acafa74a612d776a97202d53077fee86", + "reference": "ca155026acafa74a612d776a97202d53077fee86", "shasum": "" }, "require": { @@ -579,9 +579,8 @@ "amphp/phpunit-util": "^3", "ext-json": "*", "kelunik/link-header-rfc5988": "^1", - "laminas/laminas-diactoros": "^2.3", "phpunit/phpunit": "^9", - "psalm/phar": "~5.23" + "psalm/phar": "6.16.1" }, "suggest": { "amphp/file": "Required for file request bodies and HTTP archive logging", @@ -628,7 +627,7 @@ ], "support": { "issues": "https://github.com/amphp/http-client/issues", - "source": "https://github.com/amphp/http-client/tree/v5.3.4" + "source": "https://github.com/amphp/http-client/tree/v5.3.6" }, "funding": [ { @@ -636,7 +635,7 @@ "type": "github" } ], - "time": "2025-08-16T20:41:23+00:00" + "time": "2026-05-15T23:29:38+00:00" }, { "name": "amphp/http-client-cookies", @@ -1050,16 +1049,16 @@ }, { "name": "amphp/mysql", - "version": "v3.0.1", + "version": "v3.1.1", "source": { "type": "git", "url": "https://github.com/amphp/mysql.git", - "reference": "bef63fda61eefca601be54aa1d983a6a31b4a50f" + "reference": "ea3a5e07dc3dddc267669337ded2a98f02d86223" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/amphp/mysql/zipball/bef63fda61eefca601be54aa1d983a6a31b4a50f", - "reference": "bef63fda61eefca601be54aa1d983a6a31b4a50f", + "url": "https://api.github.com/repos/amphp/mysql/zipball/ea3a5e07dc3dddc267669337ded2a98f02d86223", + "reference": "ea3a5e07dc3dddc267669337ded2a98f02d86223", "shasum": "" }, "require": { @@ -1072,7 +1071,7 @@ "php": ">=8.1" }, "require-dev": { - "amphp/file": "^3", + "amphp/file": "^3 | ^4", "amphp/php-cs-fixer-config": "^2", "amphp/phpunit-util": "^3", "amphp/process": "^2", @@ -1080,7 +1079,7 @@ "ext-openssl": "*", "phpbench/phpbench": "^1.2.6", "phpunit/phpunit": "^9", - "psalm/phar": "5.23" + "psalm/phar": "6.16.1" }, "type": "library", "autoload": { @@ -1108,7 +1107,7 @@ "description": "Asynchronous MySQL client for PHP based on Amp.", "support": { "issues": "https://github.com/amphp/mysql/issues", - "source": "https://github.com/amphp/mysql/tree/v3.0.1" + "source": "https://github.com/amphp/mysql/tree/v3.1.1" }, "funding": [ { @@ -1116,20 +1115,20 @@ "type": "github" } ], - "time": "2025-11-08T22:59:09+00:00" + "time": "2026-05-16T19:09:29+00:00" }, { "name": "amphp/parallel", - "version": "v2.3.4", + "version": "v2.4.0", "source": { "type": "git", "url": "https://github.com/amphp/parallel.git", - "reference": "3ad45d1cff1bfbfe832c79671e6a4a1017dd9921" + "reference": "37f5b2754fadc229c00f9416bd68fb8d04529a81" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/amphp/parallel/zipball/3ad45d1cff1bfbfe832c79671e6a4a1017dd9921", - "reference": "3ad45d1cff1bfbfe832c79671e6a4a1017dd9921", + "url": "https://api.github.com/repos/amphp/parallel/zipball/37f5b2754fadc229c00f9416bd68fb8d04529a81", + "reference": "37f5b2754fadc229c00f9416bd68fb8d04529a81", "shasum": "" }, "require": { @@ -1192,7 +1191,7 @@ ], "support": { "issues": "https://github.com/amphp/parallel/issues", - "source": "https://github.com/amphp/parallel/tree/v2.3.4" + "source": "https://github.com/amphp/parallel/tree/v2.4.0" }, "funding": [ { @@ -1200,7 +1199,7 @@ "type": "github" } ], - "time": "2026-05-06T19:26:51+00:00" + "time": "2026-05-16T16:54:01+00:00" }, { "name": "amphp/parser", @@ -1266,16 +1265,16 @@ }, { "name": "amphp/pipeline", - "version": "v1.2.3", + "version": "v1.2.4", "source": { "type": "git", "url": "https://github.com/amphp/pipeline.git", - "reference": "7b52598c2e9105ebcddf247fc523161581930367" + "reference": "a044733e080940d1483f56caff0c412ad6982776" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/amphp/pipeline/zipball/7b52598c2e9105ebcddf247fc523161581930367", - "reference": "7b52598c2e9105ebcddf247fc523161581930367", + "url": "https://api.github.com/repos/amphp/pipeline/zipball/a044733e080940d1483f56caff0c412ad6982776", + "reference": "a044733e080940d1483f56caff0c412ad6982776", "shasum": "" }, "require": { @@ -1287,7 +1286,7 @@ "amphp/php-cs-fixer-config": "^2", "amphp/phpunit-util": "^3", "phpunit/phpunit": "^9", - "psalm/phar": "^5.18" + "psalm/phar": "6.16.1" }, "type": "library", "autoload": { @@ -1321,7 +1320,7 @@ ], "support": { "issues": "https://github.com/amphp/pipeline/issues", - "source": "https://github.com/amphp/pipeline/tree/v1.2.3" + "source": "https://github.com/amphp/pipeline/tree/v1.2.4" }, "funding": [ { @@ -1329,7 +1328,7 @@ "type": "github" } ], - "time": "2025-03-16T16:33:53+00:00" + "time": "2026-05-06T05:37:57+00:00" }, { "name": "amphp/postgres", @@ -4011,16 +4010,16 @@ }, { "name": "promphp/prometheus_client_php", - "version": "v2.15.0", + "version": "v2.15.1", "source": { "type": "git", "url": "https://github.com/PromPHP/prometheus_client_php.git", - "reference": "da86f1507b04dc44dc37ffb766d7d3a1d42c3050" + "reference": "e153786bda5ca1d07335a2b5f477742c37195c40" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/PromPHP/prometheus_client_php/zipball/da86f1507b04dc44dc37ffb766d7d3a1d42c3050", - "reference": "da86f1507b04dc44dc37ffb766d7d3a1d42c3050", + "url": "https://api.github.com/repos/PromPHP/prometheus_client_php/zipball/e153786bda5ca1d07335a2b5f477742c37195c40", + "reference": "e153786bda5ca1d07335a2b5f477742c37195c40", "shasum": "" }, "require": { @@ -4040,7 +4039,7 @@ "phpstan/phpstan-strict-rules": "^1.1.0", "phpunit/phpunit": "^9.4", "predis/predis": "^2.3", - "squizlabs/php_codesniffer": "^3.6", + "squizlabs/php_codesniffer": "^3.6 || ^4.0", "symfony/polyfill-apcu": "^1.6" }, "suggest": { @@ -4075,9 +4074,9 @@ "description": "Prometheus instrumentation library for PHP applications.", "support": { "issues": "https://github.com/PromPHP/prometheus_client_php/issues", - "source": "https://github.com/PromPHP/prometheus_client_php/tree/v2.15.0" + "source": "https://github.com/PromPHP/prometheus_client_php/tree/v2.15.1" }, - "time": "2026-03-24T22:44:50+00:00" + "time": "2026-05-28T07:51:04+00:00" }, { "name": "psr/http-factory", @@ -4239,16 +4238,16 @@ }, { "name": "revolt/event-loop", - "version": "v1.0.8", + "version": "v1.0.9", "source": { "type": "git", "url": "https://github.com/revoltphp/event-loop.git", - "reference": "b6fc06dce8e9b523c9946138fa5e62181934f91c" + "reference": "44061cf513e53c6200372fc935ac42271566295d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/revoltphp/event-loop/zipball/b6fc06dce8e9b523c9946138fa5e62181934f91c", - "reference": "b6fc06dce8e9b523c9946138fa5e62181934f91c", + "url": "https://api.github.com/repos/revoltphp/event-loop/zipball/44061cf513e53c6200372fc935ac42271566295d", + "reference": "44061cf513e53c6200372fc935ac42271566295d", "shasum": "" }, "require": { @@ -4258,7 +4257,7 @@ "ext-json": "*", "jetbrains/phpstorm-stubs": "^2019.3", "phpunit/phpunit": "^9", - "psalm/phar": "^5.15" + "psalm/phar": "6.16.*" }, "type": "library", "extra": { @@ -4305,9 +4304,9 @@ ], "support": { "issues": "https://github.com/revoltphp/event-loop/issues", - "source": "https://github.com/revoltphp/event-loop/tree/v1.0.8" + "source": "https://github.com/revoltphp/event-loop/tree/v1.0.9" }, - "time": "2025-08-27T21:33:23+00:00" + "time": "2026-05-16T17:55:38+00:00" }, { "name": "symfony/polyfill-ctype", @@ -4394,16 +4393,16 @@ }, { "name": "symfony/polyfill-mbstring", - "version": "v1.37.0", + "version": "v1.38.1", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "6a21eb99c6973357967f6ce3708cd55a6bec6315" + "reference": "14c5439eec4ccff081ac14eca2dc57feb2a66d92" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/6a21eb99c6973357967f6ce3708cd55a6bec6315", - "reference": "6a21eb99c6973357967f6ce3708cd55a6bec6315", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/14c5439eec4ccff081ac14eca2dc57feb2a66d92", + "reference": "14c5439eec4ccff081ac14eca2dc57feb2a66d92", "shasum": "" }, "require": { @@ -4455,7 +4454,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.37.0" + "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.38.1" }, "funding": [ { @@ -4475,7 +4474,7 @@ "type": "tidelift" } ], - "time": "2026-04-10T17:25:58+00:00" + "time": "2026-05-26T12:51:13+00:00" }, { "name": "symfony/polyfill-php80", @@ -4563,16 +4562,16 @@ }, { "name": "symfony/polyfill-php83", - "version": "v1.37.0", + "version": "v1.38.1", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php83.git", - "reference": "3600c2cb22399e25bb226e4a135ce91eeb2a6149" + "reference": "8339098cae28673c15cce00d80734af0453054e2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php83/zipball/3600c2cb22399e25bb226e4a135ce91eeb2a6149", - "reference": "3600c2cb22399e25bb226e4a135ce91eeb2a6149", + "url": "https://api.github.com/repos/symfony/polyfill-php83/zipball/8339098cae28673c15cce00d80734af0453054e2", + "reference": "8339098cae28673c15cce00d80734af0453054e2", "shasum": "" }, "require": { @@ -4619,7 +4618,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php83/tree/v1.37.0" + "source": "https://github.com/symfony/polyfill-php83/tree/v1.38.1" }, "funding": [ { @@ -4639,7 +4638,7 @@ "type": "tidelift" } ], - "time": "2026-04-10T17:25:58+00:00" + "time": "2026-05-26T12:51:13+00:00" }, { "name": "vlucas/phpdotenv", @@ -5304,23 +5303,23 @@ }, { "name": "friendsofphp/php-cs-fixer", - "version": "v3.95.1", + "version": "v3.95.3", "source": { "type": "git", "url": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer.git", - "reference": "a9727678fbd12997f1d9de8f4a37824ed9df1065" + "reference": "3d681493acc0e93283481b1c63c263737df78687" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/PHP-CS-Fixer/PHP-CS-Fixer/zipball/a9727678fbd12997f1d9de8f4a37824ed9df1065", - "reference": "a9727678fbd12997f1d9de8f4a37824ed9df1065", + "url": "https://api.github.com/repos/PHP-CS-Fixer/PHP-CS-Fixer/zipball/3d681493acc0e93283481b1c63c263737df78687", + "reference": "3d681493acc0e93283481b1c63c263737df78687", "shasum": "" }, "require": { "clue/ndjson-react": "^1.3", "composer/semver": "^3.4", "composer/xdebug-handler": "^3.0.5", - "ergebnis/agent-detector": "^1.1.1", + "ergebnis/agent-detector": "^1.2", "ext-filter": "*", "ext-hash": "*", "ext-json": "*", @@ -5337,16 +5336,16 @@ "symfony/filesystem": "^5.4.45 || ^6.4.24 || ^7.0 || ^8.0", "symfony/finder": "^5.4.45 || ^6.4.24 || ^7.0 || ^8.0", "symfony/options-resolver": "^5.4.45 || ^6.4.24 || ^7.0 || ^8.0", - "symfony/polyfill-mbstring": "^1.33", - "symfony/polyfill-php80": "^1.33", - "symfony/polyfill-php81": "^1.33", - "symfony/polyfill-php84": "^1.33", + "symfony/polyfill-mbstring": "^1.37", + "symfony/polyfill-php80": "^1.37", + "symfony/polyfill-php81": "^1.37", + "symfony/polyfill-php84": "^1.37", "symfony/process": "^5.4.47 || ^6.4.24 || ^7.2 || ^8.0", "symfony/stopwatch": "^5.4.45 || ^6.4.24 || ^7.0 || ^8.0" }, "require-dev": { - "facile-it/paraunit": "^1.3.1 || ^2.8.0", - "infection/infection": "^0.32.6", + "facile-it/paraunit": "^1.3.1 || ^2.11.0", + "infection/infection": "^0.32.7", "justinrainbow/json-schema": "^6.8.0", "keradus/cli-executor": "^2.3", "mikey179/vfsstream": "^1.6.12", @@ -5354,9 +5353,9 @@ "php-cs-fixer/phpunit-constraint-isidenticalstring": "^1.8", "php-cs-fixer/phpunit-constraint-xmlmatchesxsd": "^1.8", "phpunit/phpunit": "^9.6.34 || ^10.5.63 || ^11.5.55", - "symfony/polyfill-php85": "^1.33", + "symfony/polyfill-php85": "^1.37", "symfony/var-dumper": "^5.4.48 || ^6.4.32 || ^7.4.4 || ^8.0.8", - "symfony/yaml": "^5.4.45 || ^6.4.30 || ^7.4.1 || ^8.0.8" + "symfony/yaml": "^5.4.45 || ^6.4.30 || ^7.4.1 || ^8.0.11" }, "suggest": { "ext-dom": "For handling output formats in XML", @@ -5397,7 +5396,7 @@ ], "support": { "issues": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/issues", - "source": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/tree/v3.95.1" + "source": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/tree/v3.95.3" }, "funding": [ { @@ -5405,7 +5404,7 @@ "type": "github" } ], - "time": "2026-04-12T17:00:09+00:00" + "time": "2026-05-29T20:35:26+00:00" }, { "name": "psr/container", @@ -6038,16 +6037,16 @@ }, { "name": "sebastian/diff", - "version": "8.1.0", + "version": "8.3.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/diff.git", - "reference": "9c957d730257f49c873f3761674559bd90098a7d" + "reference": "b36d33b6e796513de7cb7df053afb3f55eefcd47" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/9c957d730257f49c873f3761674559bd90098a7d", - "reference": "9c957d730257f49c873f3761674559bd90098a7d", + "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/b36d33b6e796513de7cb7df053afb3f55eefcd47", + "reference": "b36d33b6e796513de7cb7df053afb3f55eefcd47", "shasum": "" }, "require": { @@ -6060,7 +6059,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "8.1-dev" + "dev-main": "8.3-dev" } }, "autoload": { @@ -6093,7 +6092,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/diff/issues", "security": "https://github.com/sebastianbergmann/diff/security/policy", - "source": "https://github.com/sebastianbergmann/diff/tree/8.1.0" + "source": "https://github.com/sebastianbergmann/diff/tree/8.3.0" }, "funding": [ { @@ -6113,27 +6112,33 @@ "type": "tidelift" } ], - "time": "2026-04-05T12:02:33+00:00" + "time": "2026-05-15T04:58:09+00:00" }, { "name": "symfony/console", - "version": "v8.0.9", + "version": "v8.1.0", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "7113778e2e91f4709cb3194a75dfa9c0d028d94d" + "reference": "f5a856c6ecb56b3c21ed94a5b7bf940d857d110a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/7113778e2e91f4709cb3194a75dfa9c0d028d94d", - "reference": "7113778e2e91f4709cb3194a75dfa9c0d028d94d", + "url": "https://api.github.com/repos/symfony/console/zipball/f5a856c6ecb56b3c21ed94a5b7bf940d857d110a", + "reference": "f5a856c6ecb56b3c21ed94a5b7bf940d857d110a", "shasum": "" }, "require": { - "php": ">=8.4", + "php": ">=8.4.1", + "symfony/deprecation-contracts": "^2.5|^3", "symfony/polyfill-mbstring": "^1.0", + "symfony/polyfill-php85": "^1.32", "symfony/service-contracts": "^2.5|^3", - "symfony/string": "^7.4|^8.0" + "symfony/string": "^7.4.6|^8.0.6" + }, + "conflict": { + "symfony/dependency-injection": "<8.1", + "symfony/event-dispatcher": "<8.1" }, "provide": { "psr/log-implementation": "1.0|2.0|3.0" @@ -6141,14 +6146,18 @@ "require-dev": { "psr/log": "^1|^2|^3", "symfony/config": "^7.4|^8.0", - "symfony/dependency-injection": "^7.4|^8.0", - "symfony/event-dispatcher": "^7.4|^8.0", + "symfony/dependency-injection": "^8.1", + "symfony/event-dispatcher": "^8.1", + "symfony/filesystem": "^7.4|^8.0", "symfony/http-foundation": "^7.4|^8.0", "symfony/http-kernel": "^7.4|^8.0", "symfony/lock": "^7.4|^8.0", "symfony/messenger": "^7.4|^8.0", + "symfony/mime": "^7.4|^8.0", "symfony/process": "^7.4|^8.0", "symfony/stopwatch": "^7.4|^8.0", + "symfony/uid": "^7.4|^8.0", + "symfony/validator": "^7.4|^8.0", "symfony/var-dumper": "^7.4|^8.0" }, "type": "library", @@ -6183,7 +6192,7 @@ "terminal" ], "support": { - "source": "https://github.com/symfony/console/tree/v8.0.9" + "source": "https://github.com/symfony/console/tree/v8.1.0" }, "funding": [ { @@ -6203,7 +6212,7 @@ "type": "tidelift" } ], - "time": "2026-04-29T15:02:55+00:00" + "time": "2026-05-29T05:06:50+00:00" }, { "name": "symfony/deprecation-contracts", @@ -6278,20 +6287,21 @@ }, { "name": "symfony/event-dispatcher", - "version": "v8.0.9", + "version": "v8.1.0", "source": { "type": "git", "url": "https://github.com/symfony/event-dispatcher.git", - "reference": "0c3c1a17604c4dbbec4b93fe162c538482096e1f" + "reference": "f249ae3f680958b6f1f9dd76e5747cf0695b4102" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/0c3c1a17604c4dbbec4b93fe162c538482096e1f", - "reference": "0c3c1a17604c4dbbec4b93fe162c538482096e1f", + "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/f249ae3f680958b6f1f9dd76e5747cf0695b4102", + "reference": "f249ae3f680958b6f1f9dd76e5747cf0695b4102", "shasum": "" }, "require": { - "php": ">=8.4", + "php": ">=8.4.1", + "symfony/deprecation-contracts": "^2.5|^3", "symfony/event-dispatcher-contracts": "^2.5|^3" }, "conflict": { @@ -6339,7 +6349,7 @@ "description": "Provides tools that allow your application components to communicate with each other by dispatching events and listening to them", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/event-dispatcher/tree/v8.0.9" + "source": "https://github.com/symfony/event-dispatcher/tree/v8.1.0" }, "funding": [ { @@ -6359,7 +6369,7 @@ "type": "tidelift" } ], - "time": "2026-04-18T13:51:42+00:00" + "time": "2026-05-29T05:06:50+00:00" }, { "name": "symfony/event-dispatcher-contracts", @@ -6443,20 +6453,21 @@ }, { "name": "symfony/filesystem", - "version": "v8.0.9", + "version": "v8.1.0", "source": { "type": "git", "url": "https://github.com/symfony/filesystem.git", - "reference": "d1ec4543d5c6c2dac78503c2fae5ea0b3608ce40" + "reference": "99aec13b82b4967ec5088222c4a3ecca955949c2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/filesystem/zipball/d1ec4543d5c6c2dac78503c2fae5ea0b3608ce40", - "reference": "d1ec4543d5c6c2dac78503c2fae5ea0b3608ce40", + "url": "https://api.github.com/repos/symfony/filesystem/zipball/99aec13b82b4967ec5088222c4a3ecca955949c2", + "reference": "99aec13b82b4967ec5088222c4a3ecca955949c2", "shasum": "" }, "require": { - "php": ">=8.4", + "php": ">=8.4.1", + "symfony/deprecation-contracts": "^2.5|^3", "symfony/polyfill-ctype": "~1.8", "symfony/polyfill-mbstring": "~1.8" }, @@ -6489,7 +6500,7 @@ "description": "Provides basic utilities for the filesystem", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/filesystem/tree/v8.0.9" + "source": "https://github.com/symfony/filesystem/tree/v8.1.0" }, "funding": [ { @@ -6509,24 +6520,24 @@ "type": "tidelift" } ], - "time": "2026-04-18T13:51:42+00:00" + "time": "2026-05-29T05:06:50+00:00" }, { "name": "symfony/finder", - "version": "v8.0.8", + "version": "v8.1.0", "source": { "type": "git", "url": "https://github.com/symfony/finder.git", - "reference": "8da41214757b87d97f181e3d14a4179286151007" + "reference": "58d2e767a66052c1487356f953445634a8194c64" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/finder/zipball/8da41214757b87d97f181e3d14a4179286151007", - "reference": "8da41214757b87d97f181e3d14a4179286151007", + "url": "https://api.github.com/repos/symfony/finder/zipball/58d2e767a66052c1487356f953445634a8194c64", + "reference": "58d2e767a66052c1487356f953445634a8194c64", "shasum": "" }, "require": { - "php": ">=8.4" + "php": ">=8.4.1" }, "require-dev": { "symfony/filesystem": "^7.4|^8.0" @@ -6557,7 +6568,7 @@ "description": "Finds files and directories via an intuitive fluent interface", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/finder/tree/v8.0.8" + "source": "https://github.com/symfony/finder/tree/v8.1.0" }, "funding": [ { @@ -6577,24 +6588,24 @@ "type": "tidelift" } ], - "time": "2026-03-30T15:14:47+00:00" + "time": "2026-05-29T05:06:50+00:00" }, { "name": "symfony/options-resolver", - "version": "v8.0.8", + "version": "v8.1.0", "source": { "type": "git", "url": "https://github.com/symfony/options-resolver.git", - "reference": "b48bce0a70b914f6953dafbd10474df232ed4de8" + "reference": "88f9c561f678a02d54b897014049fa839e33ff82" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/options-resolver/zipball/b48bce0a70b914f6953dafbd10474df232ed4de8", - "reference": "b48bce0a70b914f6953dafbd10474df232ed4de8", + "url": "https://api.github.com/repos/symfony/options-resolver/zipball/88f9c561f678a02d54b897014049fa839e33ff82", + "reference": "88f9c561f678a02d54b897014049fa839e33ff82", "shasum": "" }, "require": { - "php": ">=8.4", + "php": ">=8.4.1", "symfony/deprecation-contracts": "^2.5|^3" }, "type": "library", @@ -6628,7 +6639,7 @@ "options" ], "support": { - "source": "https://github.com/symfony/options-resolver/tree/v8.0.8" + "source": "https://github.com/symfony/options-resolver/tree/v8.1.0" }, "funding": [ { @@ -6648,20 +6659,20 @@ "type": "tidelift" } ], - "time": "2026-03-30T15:14:47+00:00" + "time": "2026-05-29T05:06:50+00:00" }, { "name": "symfony/polyfill-intl-grapheme", - "version": "v1.37.0", + "version": "v1.38.1", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-grapheme.git", - "reference": "4864388bfbd3001ce88e234fab652acd91fdc57e" + "reference": "e9247d281d694a5120554d9afaf54e070e88a603" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/4864388bfbd3001ce88e234fab652acd91fdc57e", - "reference": "4864388bfbd3001ce88e234fab652acd91fdc57e", + "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/e9247d281d694a5120554d9afaf54e070e88a603", + "reference": "e9247d281d694a5120554d9afaf54e070e88a603", "shasum": "" }, "require": { @@ -6710,7 +6721,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.37.0" + "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.38.1" }, "funding": [ { @@ -6730,20 +6741,20 @@ "type": "tidelift" } ], - "time": "2026-04-26T13:13:48+00:00" + "time": "2026-05-26T05:58:03+00:00" }, { "name": "symfony/polyfill-intl-normalizer", - "version": "v1.37.0", + "version": "v1.38.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-normalizer.git", - "reference": "3833d7255cc303546435cb650316bff708a1c75c" + "reference": "2d446c214bdbe5b71bde5011b060a05fece3ae6b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/3833d7255cc303546435cb650316bff708a1c75c", - "reference": "3833d7255cc303546435cb650316bff708a1c75c", + "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/2d446c214bdbe5b71bde5011b060a05fece3ae6b", + "reference": "2d446c214bdbe5b71bde5011b060a05fece3ae6b", "shasum": "" }, "require": { @@ -6795,7 +6806,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.37.0" + "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.38.0" }, "funding": [ { @@ -6815,20 +6826,20 @@ "type": "tidelift" } ], - "time": "2024-09-09T11:45:10+00:00" + "time": "2026-05-25T13:48:31+00:00" }, { "name": "symfony/polyfill-php81", - "version": "v1.37.0", + "version": "v1.38.1", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php81.git", - "reference": "4a4cfc2d253c21a5ad0e53071df248ed48c6ce5c" + "reference": "6bfb9c766cacffbc8e118cb87217d08ed84e5cd7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php81/zipball/4a4cfc2d253c21a5ad0e53071df248ed48c6ce5c", - "reference": "4a4cfc2d253c21a5ad0e53071df248ed48c6ce5c", + "url": "https://api.github.com/repos/symfony/polyfill-php81/zipball/6bfb9c766cacffbc8e118cb87217d08ed84e5cd7", + "reference": "6bfb9c766cacffbc8e118cb87217d08ed84e5cd7", "shasum": "" }, "require": { @@ -6875,7 +6886,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php81/tree/v1.37.0" + "source": "https://github.com/symfony/polyfill-php81/tree/v1.38.1" }, "funding": [ { @@ -6895,20 +6906,20 @@ "type": "tidelift" } ], - "time": "2024-09-09T11:45:10+00:00" + "time": "2026-05-26T12:45:58+00:00" }, { "name": "symfony/polyfill-php84", - "version": "v1.37.0", + "version": "v1.38.1", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php84.git", - "reference": "88486db2c389b290bf87ff1de7ebc1e13e42bb06" + "reference": "f4e1dfaee5b74aba5964fe1fd4dfc7ba5e3085fa" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php84/zipball/88486db2c389b290bf87ff1de7ebc1e13e42bb06", - "reference": "88486db2c389b290bf87ff1de7ebc1e13e42bb06", + "url": "https://api.github.com/repos/symfony/polyfill-php84/zipball/f4e1dfaee5b74aba5964fe1fd4dfc7ba5e3085fa", + "reference": "f4e1dfaee5b74aba5964fe1fd4dfc7ba5e3085fa", "shasum": "" }, "require": { @@ -6955,7 +6966,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php84/tree/v1.37.0" + "source": "https://github.com/symfony/polyfill-php84/tree/v1.38.1" }, "funding": [ { @@ -6975,24 +6986,104 @@ "type": "tidelift" } ], - "time": "2026-04-10T18:47:49+00:00" + "time": "2026-05-26T12:51:13+00:00" + }, + { + "name": "symfony/polyfill-php85", + "version": "v1.38.1", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-php85.git", + "reference": "ba2ba04f3352cfa2dcbbcb90aee13ed967f505b1" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-php85/zipball/ba2ba04f3352cfa2dcbbcb90aee13ed967f505b1", + "reference": "ba2ba04f3352cfa2dcbbcb90aee13ed967f505b1", + "shasum": "" + }, + "require": { + "php": ">=7.2" + }, + "type": "library", + "extra": { + "thanks": { + "url": "https://github.com/symfony/polyfill", + "name": "symfony/polyfill" + } + }, + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Php85\\": "" + }, + "classmap": [ + "Resources/stubs" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill backporting some PHP 8.5+ features to lower PHP versions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-php85/tree/v1.38.1" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2026-05-26T02:25:22+00:00" }, { "name": "symfony/process", - "version": "v8.0.8", + "version": "v8.1.0", "source": { "type": "git", "url": "https://github.com/symfony/process.git", - "reference": "cb8939aff03470d1a9d1d1b66d08c6fa71b3bbdc" + "reference": "c4a9e58f235a6bf7f97ffbfedae2687353ac79e5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/cb8939aff03470d1a9d1d1b66d08c6fa71b3bbdc", - "reference": "cb8939aff03470d1a9d1d1b66d08c6fa71b3bbdc", + "url": "https://api.github.com/repos/symfony/process/zipball/c4a9e58f235a6bf7f97ffbfedae2687353ac79e5", + "reference": "c4a9e58f235a6bf7f97ffbfedae2687353ac79e5", "shasum": "" }, "require": { - "php": ">=8.4" + "php": ">=8.4.1" }, "type": "library", "autoload": { @@ -7020,7 +7111,7 @@ "description": "Executes commands in sub-processes", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/process/tree/v8.0.8" + "source": "https://github.com/symfony/process/tree/v8.1.0" }, "funding": [ { @@ -7040,7 +7131,7 @@ "type": "tidelift" } ], - "time": "2026-03-30T15:14:47+00:00" + "time": "2026-05-29T05:06:50+00:00" }, { "name": "symfony/service-contracts", @@ -7131,20 +7222,20 @@ }, { "name": "symfony/stopwatch", - "version": "v8.0.8", + "version": "v8.1.0", "source": { "type": "git", "url": "https://github.com/symfony/stopwatch.git", - "reference": "85954ed72d5440ea4dc9a10b7e49e01df766ffa3" + "reference": "21c07b026905d596e8379caeb115d87aa479499d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/stopwatch/zipball/85954ed72d5440ea4dc9a10b7e49e01df766ffa3", - "reference": "85954ed72d5440ea4dc9a10b7e49e01df766ffa3", + "url": "https://api.github.com/repos/symfony/stopwatch/zipball/21c07b026905d596e8379caeb115d87aa479499d", + "reference": "21c07b026905d596e8379caeb115d87aa479499d", "shasum": "" }, "require": { - "php": ">=8.4", + "php": ">=8.4.1", "symfony/service-contracts": "^2.5|^3" }, "type": "library", @@ -7173,7 +7264,7 @@ "description": "Provides a way to profile code", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/stopwatch/tree/v8.0.8" + "source": "https://github.com/symfony/stopwatch/tree/v8.1.0" }, "funding": [ { @@ -7193,24 +7284,24 @@ "type": "tidelift" } ], - "time": "2026-03-30T15:14:47+00:00" + "time": "2026-05-29T05:06:50+00:00" }, { "name": "symfony/string", - "version": "v8.0.8", + "version": "v8.1.0", "source": { "type": "git", "url": "https://github.com/symfony/string.git", - "reference": "ae9488f874d7603f9d2dfbf120203882b645d963" + "reference": "afd5944f4005862d961efb85c8bbd5c523c4e3c9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/string/zipball/ae9488f874d7603f9d2dfbf120203882b645d963", - "reference": "ae9488f874d7603f9d2dfbf120203882b645d963", + "url": "https://api.github.com/repos/symfony/string/zipball/afd5944f4005862d961efb85c8bbd5c523c4e3c9", + "reference": "afd5944f4005862d961efb85c8bbd5c523c4e3c9", "shasum": "" }, "require": { - "php": ">=8.4", + "php": ">=8.4.1", "symfony/polyfill-ctype": "^1.8", "symfony/polyfill-intl-grapheme": "^1.33", "symfony/polyfill-intl-normalizer": "^1.0", @@ -7263,7 +7354,7 @@ "utf8" ], "support": { - "source": "https://github.com/symfony/string/tree/v8.0.8" + "source": "https://github.com/symfony/string/tree/v8.1.0" }, "funding": [ { @@ -7283,7 +7374,7 @@ "type": "tidelift" } ], - "time": "2026-03-30T15:14:47+00:00" + "time": "2026-05-29T05:06:50+00:00" } ], "aliases": [ From afd486c6b5d53177776a1f1a0920c2ccca9e4966 Mon Sep 17 00:00:00 2001 From: Alexander Pankratov Date: Sat, 6 Jun 2026 22:54:52 +0200 Subject: [PATCH 269/270] Upgrade dependencies --- composer.lock | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/composer.lock b/composer.lock index a33fa9a..ab18b84 100644 --- a/composer.lock +++ b/composer.lock @@ -1404,16 +1404,16 @@ }, { "name": "amphp/process", - "version": "v2.0.3", + "version": "v2.1.0", "source": { "type": "git", "url": "https://github.com/amphp/process.git", - "reference": "52e08c09dec7511d5fbc1fb00d3e4e79fc77d58d" + "reference": "583959df17d00304ad7b0b32285373f985935643" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/amphp/process/zipball/52e08c09dec7511d5fbc1fb00d3e4e79fc77d58d", - "reference": "52e08c09dec7511d5fbc1fb00d3e4e79fc77d58d", + "url": "https://api.github.com/repos/amphp/process/zipball/583959df17d00304ad7b0b32285373f985935643", + "reference": "583959df17d00304ad7b0b32285373f985935643", "shasum": "" }, "require": { @@ -1427,7 +1427,7 @@ "amphp/php-cs-fixer-config": "^2", "amphp/phpunit-util": "^3", "phpunit/phpunit": "^9", - "psalm/phar": "^5.4" + "psalm/phar": "6.16.1" }, "type": "library", "autoload": { @@ -1460,7 +1460,7 @@ "homepage": "https://amphp.org/process", "support": { "issues": "https://github.com/amphp/process/issues", - "source": "https://github.com/amphp/process/tree/v2.0.3" + "source": "https://github.com/amphp/process/tree/v2.1.0" }, "funding": [ { @@ -1468,7 +1468,7 @@ "type": "github" } ], - "time": "2024-04-19T03:13:44+00:00" + "time": "2026-05-31T15:11:55+00:00" }, { "name": "amphp/redis", @@ -2596,12 +2596,12 @@ "source": { "type": "git", "url": "https://github.com/xtrime-ru/MadelineProto.git", - "reference": "e8e05379de329758926f90764b6cd8fc8414437d" + "reference": "5adbb059c583c79012d9a9643e7ad899b41c0407" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/xtrime-ru/MadelineProto/zipball/e8e05379de329758926f90764b6cd8fc8414437d", - "reference": "e8e05379de329758926f90764b6cd8fc8414437d", + "url": "https://api.github.com/repos/xtrime-ru/MadelineProto/zipball/5adbb059c583c79012d9a9643e7ad899b41c0407", + "reference": "5adbb059c583c79012d9a9643e7ad899b41c0407", "shasum": "" }, "require": { @@ -2778,7 +2778,7 @@ "url": "https://github.com/danog" } ], - "time": "2026-05-08T17:10:18+00:00" + "time": "2026-06-06T20:50:48+00:00" }, { "name": "danog/primemodule", @@ -5303,16 +5303,16 @@ }, { "name": "friendsofphp/php-cs-fixer", - "version": "v3.95.3", + "version": "v3.95.4", "source": { "type": "git", "url": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer.git", - "reference": "3d681493acc0e93283481b1c63c263737df78687" + "reference": "3f8f68856837a77e1f1d870354eca3c8747f2f72" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/PHP-CS-Fixer/PHP-CS-Fixer/zipball/3d681493acc0e93283481b1c63c263737df78687", - "reference": "3d681493acc0e93283481b1c63c263737df78687", + "url": "https://api.github.com/repos/PHP-CS-Fixer/PHP-CS-Fixer/zipball/3f8f68856837a77e1f1d870354eca3c8747f2f72", + "reference": "3f8f68856837a77e1f1d870354eca3c8747f2f72", "shasum": "" }, "require": { @@ -5396,7 +5396,7 @@ ], "support": { "issues": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/issues", - "source": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/tree/v3.95.3" + "source": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/tree/v3.95.4" }, "funding": [ { @@ -5404,7 +5404,7 @@ "type": "github" } ], - "time": "2026-05-29T20:35:26+00:00" + "time": "2026-06-03T18:02:44+00:00" }, { "name": "psr/container", From 97905fe455bd59db9b0ddf01a39f129f56b30aed Mon Sep 17 00:00:00 2001 From: Alexander Pankratov Date: Sun, 7 Jun 2026 00:32:49 +0200 Subject: [PATCH 270/270] Upgrade mysql --- docker-compose.base.yml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/docker-compose.base.yml b/docker-compose.base.yml index 0c91d99..f0a9236 100644 --- a/docker-compose.base.yml +++ b/docker-compose.base.yml @@ -24,7 +24,7 @@ services: timeout: 30s retries: 1 mysql: - image: mariadb:11.4 + image: mariadb:12.3 restart: unless-stopped volumes: - ./.mysql:/var/lib/mysql @@ -32,7 +32,13 @@ services: MARIADB_ALLOW_EMPTY_ROOT_PASSWORD: 'yes' MARIADB_AUTO_UPGRADE: 'yes' command: - - --skip-grant-tables + - --skip-log-bin + - --general-log=0 + - --slow-query-log=0 + - --log-warnings=0 + - --performance-schema=OFF + - --skip-name-resolve + - --host-cache-size=0 - --innodb-buffer-pool-size=128M - --innodb-compression-default=1 - --innodb-compression-algorithm=zlib \ No newline at end of file