From 11a7e8d9d3415d340b4e170acac6a36887e1bce6 Mon Sep 17 00:00:00 2001 From: Daniil Gentili Date: Mon, 8 Jan 2024 19:26:40 +0100 Subject: [PATCH] Bump minimum versions --- composer.json | 4 ++-- examples/bot.php | 2 +- examples/simpleBot.php | 2 +- src/Tools.php | 2 +- src/polyfill.php | 2 +- tools/makephar.php | 6 +++--- tools/phar.php | 10 +++++----- 7 files changed, 14 insertions(+), 14 deletions(-) diff --git a/composer.json b/composer.json index 7d3b44d8f..feffc16de 100644 --- a/composer.json +++ b/composer.json @@ -24,7 +24,7 @@ }, "minimum-stability": "beta", "require": { - "php-64bit": ">=8.1", + "php-64bit": ">=8.2.4", "danog/primemodule": "^1", "symfony/polyfill-mbstring": "*", "ext-mbstring": "*", @@ -57,7 +57,7 @@ "psr/log": "^3", "webmozart/assert": "^1.11", "bacon/bacon-qr-code": "^2.0", - "nikic/php-parser": "^4.16", + "nikic/php-parser": "^5", "revolt/event-loop": "^1.0.5" }, "require-dev": { diff --git a/examples/bot.php b/examples/bot.php index eac98b4bf..ea22cb369 100755 --- a/examples/bot.php +++ b/examples/bot.php @@ -2,7 +2,7 @@ /** * Example bot. * - * PHP 8.1.15+ or 8.2.4+ is required. + * PHP 8.2.4+ is required. * * Copyright 2016-2020 Daniil Gentili * (https://daniil.it) diff --git a/examples/simpleBot.php b/examples/simpleBot.php index ce79fc97c..79452b6d3 100644 --- a/examples/simpleBot.php +++ b/examples/simpleBot.php @@ -1,7 +1,7 @@ getFileName(); $code = read($file); - $code = (new ParserFactory)->create(ParserFactory::ONLY_PHP7)->parse($code); + $code = (new ParserFactory)->createForNewestSupportedVersion()->parse($code); Assert::notNull($code); $traverser = new NodeTraverser; $traverser->addVisitor(new NameResolver()); diff --git a/src/polyfill.php b/src/polyfill.php index ebc1d2f62..dcccfc971 100644 --- a/src/polyfill.php +++ b/src/polyfill.php @@ -16,6 +16,6 @@ class_alias(RedisArray::class, '\\danog\\MadelineProto\\Db\\NullCache\\RedisArra if ((PHP_MINOR_VERSION === 2 && PHP_VERSION_ID < 80204) || (PHP_MINOR_VERSION === 1 && PHP_VERSION_ID < 80117) ) { - echo('MadelineProto requires PHP 8.2.4+ (recommended) or 8.1.17+.'.PHP_EOL); + echo('MadelineProto requires PHP 8.3.1+ (recommended) or 8.2.14+.'.PHP_EOL); die(1); } diff --git a/tools/makephar.php b/tools/makephar.php index 72f8d8cca..3a22444b6 100755 --- a/tools/makephar.php +++ b/tools/makephar.php @@ -23,11 +23,11 @@ $p->buildFromDirectory(realpath($argv[1]), '/^((?!tests).)*(\.php|\.py|\.exe|\.t $p->setStub('