# 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](/1.0.0/dev/libraries-and-functions/pluginmanager/fetch-manifest.md).

```php
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:

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

Or this if it's not:

```json
['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.

```php
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.

```php
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.

```php
use Saturn\PluginManager\PluginCompatability;

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

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


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.saturncms.net/1.0.0/dev/libraries-and-functions/pluginmanager/plugin-compatability.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
