Plugin Compatability

You can check plugins for potential compatabilitity issues by using this library.

Check for unloading issues

These compatability issues will cause Saturn to unload the plugin, as it has a high chance to cause errors and crashes. This is done automatically when the plugin is loaded.

This function takes the plugin's manifest file. You can learn how to get this in Fetch Manifest.

use Saturn\PluginManager\PluginCompatability;

$Compatability = new PluginCompatability($Manifest);
$Compatability->Check();

The function returns an array, it will look like this if the plugin is compatible:

['Compatible' => true, 'Reason' => '']

Or this if it's not:

['Compatible' => false, 'Reason' => 'Not compatible with this version of Saturn.']

Check version compatibility

You can also check if the plugin is compatible with the website's version of Saturn. This is done automatically when the plugin is loaded.

use Saturn\PluginManager\PluginCompatability;

$Compatability = new PluginCompatability($Manifest);
$Compatability->CheckVersion();

This function returns true/false (true = compatible / version matches).

Check duplicate compatibility

You can also check if the plugin is unique, and doesn't have any duplicates. This is done automatically when the plugin is loaded.

use Saturn\PluginManager\PluginCompatability;

$Compatability = new PluginCompatability($Manifest);
$Compatability->CheckUnique();

This function returns true/false. (true = compatible / unique plugin)

Check conflicts compatibility

You can also check if the plugin could conflict with other plugins, and if the conflicts are installed.

use Saturn\PluginManager\PluginCompatability;

$Compatability = new PluginCompatability($Manifest);
$Compatability->CheckConflicts();

This function returns true/false. (true = compatible / no conflicts)

Last updated