improve plugin checkMainApplicationVersion

This commit is contained in:
xiaomlove
2025-05-18 15:05:37 +07:00
parent 40fcc85e55
commit 702d37c12f
4 changed files with 48 additions and 37 deletions

View File

@@ -65,6 +65,7 @@ class Plugin
if (class_exists($className)) {
$constantName = "$className::COMPATIBLE_NP_VERSION";
if (defined($constantName) && version_compare(VERSION_NUMBER, constant($constantName), '<')) {
do_log(sprintf("class: %s require NP_VERSION: %s > current: %s", $className, constant($constantName), VERSION_NUMBER), "error");
continue;
}
/**