mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-16 05:50:55 +08:00
plugin compatible judgement
This commit is contained in:
@@ -35,6 +35,10 @@ class Plugin
|
||||
if ($parts[0] == 'NexusPlugin') {
|
||||
$className = str_replace('ServiceProvider', 'Repository', $provider);
|
||||
if (class_exists($className)) {
|
||||
$constantName = "$className::COMPATIBLE_VERSION";
|
||||
if (defined($constantName) && version_compare(VERSION_NUMBER, constant($constantName), '<')) {
|
||||
continue;
|
||||
}
|
||||
call_user_func([new $className, 'boot']);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user