PHPackages                             coenjacobs/conductor - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. coenjacobs/conductor

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

coenjacobs/conductor
====================

Enforces your WordPress plugin requirements

0.1.0(7y ago)5271[2 issues](https://github.com/coenjacobs/conductor/issues)[1 PRs](https://github.com/coenjacobs/conductor/pulls)MITPHP

Since Feb 6Pushed 5y ago1 watchersCompare

[ Source](https://github.com/coenjacobs/conductor)[ Packagist](https://packagist.org/packages/coenjacobs/conductor)[ RSS](/packages/coenjacobs-conductor/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependencies (1)Versions (2)Used By (0)

Conductor [![Latest Stable Version](https://camo.githubusercontent.com/77bec541f907baff1b5834fa6ae40d88e7a51033685d49ba0bb8bca3a4743bb3/68747470733a2f2f706f7365722e707567782e6f72672f636f656e6a61636f62732f636f6e647563746f722f762f737461626c652e737667)](https://packagist.org/packages/coenjacobs/conductor) [![License](https://camo.githubusercontent.com/c1cca0b6413ecd57f4d439c00d263e2eca80b1c54788b305b5904adf54fde289/68747470733a2f2f706f7365722e707567782e6f72672f636f656e6a61636f62732f636f6e647563746f722f6c6963656e73652e737667)](https://packagist.org/packages/coenjacobs/conductor)
=====================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================

[](#conductor--)

Conductor allows you to check the requirements for your WordPress plugin, before you start your plugin. Say you require a certain PHP version, or a minimum version of another plugin to be active. Conductor has you covered with an easy to use set of checks.

This package requires PHP 5.3 or higher in order to run the tool.

**Warning:** This package is very experimental and breaking changes are very likely until version 1.0.0 is tagged. Use with caution, always wear a helmet when using this in production environments.

Installation
------------

[](#installation)

This package can be best installed inside your plugin, by using Composer:

`composer require coenjacobs/conductor`

Best results are achieved when installing this library in combination with the [Mozart package](https://github.com/coenjacobs/mozart), so Conductor will be installed in your own namespace to prevent conflicts.

Checks
------

[](#checks)

Conductor is based on simple Check classes that check a single conditional. This can be to check for the PHP version on the current server, or another plugin being active (and of a minimum version number itself).

These Check classes are registered with a central Handler and provided with the right details to check for through a single array of settings. A single call to the `check()` method on the Handler will then run through all those checks and will let you know whether those requirements are being satisfied. A simple example of how this works in code:

```
$handler = new CoenJacobs\Conductor\Handler();
$handler->setup([
    [
        'type' => 'php',
        'version' => '5.6.0',
    ],
    [
        'type' => 'plugin',
        'name' => 'WooCommerce',
        'slug' => 'woocommerce/woocommerce.php',
        'version' => '3.1.0',
    ],
]);

if ( $handler->check() === false ) {
    // if you end up here, something failed...
}
```

The provided arguments speak for itself, but to summarize the checks this will perform:

- The minimum PHP version has to be 5.6.0.
- The WooCommerce plugin has to be active, with a minimum version of 3.1.0.

If `$handler->check()` returns `false`, one or more of these requirements failed and you can stop the plugin from doing *anything*, if you like. The next step would be to report the fact that the requirements for you plugin haven't been satisfied.

Messages
--------

[](#messages)

Conductor also provides a simple interface to output messages to your end user about why your plugin couldn't run. You can output these messages by using the `Messages` class and provide it with the failed Checks:

```
if ( $handler->check() === false ) {
    $messages = new CoenJacobs\Conductor\Messages();
    $messages->setup($handler->getFailures());
}
```

Each Check is provided with a method that formats a line of text, using the details of your plugin requirements provided to the check. For example, if the WooCommerce plugin wasn't activated and you required it to be at least version 3.1.0, the message output would be:

> This plugin requires **WooCommerce 3.1.0** or higher to be installed and activated, in order to run.

You can also request the Checks that have failed from the Handler, but using the `getFailures()` method, to format and output your own messages based on the failed Checks.

What about PHP 5.2?
-------------------

[](#what-about-php-52)

You might have noticed that all classes in this package are using namespaces and WordPress is notorious for still supporting PHP 5.2 (although that is about to change) and you would be correct! If you *really* want to support PHP 5.2 in your plugin, or at least make your main plugin file compatible with PHP 5.2, you can use the `LegacyCondutor` class, which is a PHP 5.2 compatible class to check if the version of PHP being used is at least capable of parsing namespaces.

> But wait, Coen, you have this WPupdatePHP project already which does just this?!

Correct again! With the [Servehappy](https://make.wordpress.org/core/features/servehappy/) project gaining more traction and WordPress' intentions to [bump the minimum required version](https://make.wordpress.org/core/2018/12/08/updating-the-minimum-php-version/) to at least PHP 5.6 soon, I have decided to sunset the WPupdatePHP project. WordPress core can do a far better job at reaching more users of the WordPress software than I can and Servehappy is doing a great job already.

Conductor does *more* than just check for PHP versions already though. And there is more to come. :)

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance12

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity50

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

2654d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/d00204cdec246a03020dc6b99010a5d80e2557ba2fc3197c10c76589054fd45d?d=identicon)[coenjacobs](/maintainers/coenjacobs)

---

Top Contributors

[![coenjacobs](https://avatars.githubusercontent.com/u/245703?v=4)](https://github.com/coenjacobs "coenjacobs (3 commits)")

###  Code Quality

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/coenjacobs-conductor/health.svg)

```
[![Health](https://phpackages.com/badges/coenjacobs-conductor/health.svg)](https://phpackages.com/packages/coenjacobs-conductor)
```

###  Alternatives

[fmcorz/moodle-block_xp

Moodle plugin to gamify students' learning experience.

1611.5k](/packages/fmcorz-moodle-block-xp)[rdehnhardt/lumen-maintenance-mode

Define application maintenance mode.

2526.3k1](/packages/rdehnhardt-lumen-maintenance-mode)[timothyjensen/acf-field-group-values

Retrieve all post meta and option values for the specified ACF field group

486.4k](/packages/timothyjensen-acf-field-group-values)[mohamedsabil83/filament-hijri-picker

A Hijri date time picker component for Filament

224.4k](/packages/mohamedsabil83-filament-hijri-picker)[denpa/laravel-zeromq

ZeroMQ driver for Laravel

171.1k](/packages/denpa-laravel-zeromq)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
