PHPackages                             yoast/whip - 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. yoast/whip

ActiveLibrary

yoast/whip
==========

A WordPress package to nudge users to upgrade their software versions (starting with PHP)

2.0.0(2y ago)71993.7k—0%7[3 issues](https://github.com/Yoast/whip/issues)[2 PRs](https://github.com/Yoast/whip/pulls)GPL-3.0-or-laterPHPPHP &gt;=5.3CI passing

Since Feb 21Pushed 1mo ago11 watchersCompare

[ Source](https://github.com/Yoast/whip)[ Packagist](https://packagist.org/packages/yoast/whip)[ Docs](https://github.com/Yoast/whip)[ RSS](/packages/yoast-whip/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (10)Dependencies (5)Versions (15)Used By (0)

[![CS](https://github.com/Yoast/whip/actions/workflows/cs.yml/badge.svg)](https://github.com/Yoast/whip/actions/workflows/cs.yml)[![Test](https://github.com/Yoast/whip/actions/workflows/test.yml/badge.svg)](https://github.com/Yoast/whip/actions/workflows/test.yml)[![Coverage Status](https://camo.githubusercontent.com/ff92a8dfec524bb7819866bd0f27af2c09b72ea048f57f0d0aadcedb498f97aa/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6769746875622f596f6173742f776869702f62616467652e7376673f6272616e63683d6d61696e)](https://coveralls.io/github/Yoast/whip?branch=main)

whip
====

[](#whip)

A WordPress package to nudge users to upgrade their software versions (starting with PHP)

[![Screenshot of the WordPress notice](./images/wp-message.png)](./images/wp-message.png)

Requirements
------------

[](#requirements)

All the PHP versions from 5.3 up to the latest are supported.

WordPress is also required for certain functionality:

- The `WPMessagePresenter` requires WordPress or a function called `add_action`, to hook into WordPress.
- The `PHPVersionDetector` requires WordPress or a function called `__`, to translate strings.

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

[](#installation)

```
$ composer require yoast/whip
```

Usage
-----

[](#usage)

The easiest way to use Whip in WordPress is by using the included function to check the versions. In this case checking if PHP 5.6 or greater is installed:

```
whip_wp_check_versions( array(
	'php' => '>=5.6',
) );
```

This will show a message to all users of your plugin on PHP 5.3 to PHP 5.5. By default the message will be shown on every page of the admin and to every user. It is up to the implementing plugin to restrict this to certain users and/or pages.

### Adding a message as a host

[](#adding-a-message-as-a-host)

It is possible to add a custom message to the PHP version message by setting specific environment variables:

```
putenv( "WHIP_NAME_OF_HOST=Name of the host" );
putenv( "WHIP_MESSAGE_FROM_HOST_ABOUT_PHP=A message from the host" );
```

The `WHIP_NAME_OF_HOST` environment variable could be reused in the future for showing messages about different software packages.

Both the name and the message for PHP can also be changed using WordPress filters:

```
function my_host__name_for_whip() {
	return 'Name of the host';
}
add_filter( 'whip_name_of_host', 'my_host__name_for_whip' );

function my_host__php_message_for_whip( $message ) {
	return 'A message from the host';
}
add_filter( 'whip_message_from_host_about_php', 'my_host__php_message_for_whip' );
```

The WordPress filters can also read the value previously set by the environment variables.

As a general rule, the filter is the same as the environment variable, but lowercased.

### Linking to the WordPress.org hosting page

[](#linking-to-the-wordpressorg-hosting-page)

We have created a hosting overview page on yoast.com which only contains hosts that we've vetted. The PHP message links to this page by default. If you really prefer to link to the WordPress.org hosting page that is possible. Just use the `whip_hosting_page_url_wordpress` filter:

```
add_filter( 'whip_hosting_page_url_wordpress', '__return_true' );
```

Backwards compatibility policy
------------------------------

[](#backwards-compatibility-policy)

We follow [semantic versioning](http://semver.org/) with an extra strict rule for MAJOR versions. We will do a major version bump whenever we add new methods. We have to do this because of the shared namespace in PHP. When this package will be used in multiple plugins we cannot safely add and use a method without bumping a major version. This is because the version without the new method may be autoloaded and then a fatal error occurs.

This also means that any major version bump is accompanied by an update of every namespace in the package. So for version 3 of this package all the `Yoast\WHIPv2` namespaces will become `Yoast\WHIPv3`. This prevents fatal errors when two plugins include different versions of this package.

Changelog
---------

[](#changelog)

Security
--------

[](#security)

If you discover any security related issues, please email  instead of using the issue tracker.

Credits
-------

[](#credits)

- [Team Yoast](https://github.com/yoast)

###  Health Score

53

—

FairBetter than 97% of packages

Maintenance57

Moderate activity, may be stable

Popularity51

Moderate usage in the ecosystem

Community26

Small or concentrated contributor base

Maturity66

Established project with proven stability

 Bus Factor1

Top contributor holds 54.4% 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

Every ~277 days

Recently: every ~585 days

Total

10

Last Release

873d ago

Major Versions

1.2.0 → 2.0.02023-12-27

### Community

Maintainers

![](https://www.gravatar.com/avatar/6629c5cbca8a0a1133c6a3a9df23fe802036694d8d79b10b7606a4355e5cb6df?d=identicon)[YoastSystem](/maintainers/YoastSystem)

![](https://www.gravatar.com/avatar/802d833fa2bf883123eb3f8cb032848abf23ca6da4f0dbe867ebcd8448820679?d=identicon)[jdevalk](/maintainers/jdevalk)

---

Top Contributors

[![jrfnl](https://avatars.githubusercontent.com/u/663378?v=4)](https://github.com/jrfnl "jrfnl (262 commits)")[![atimmer](https://avatars.githubusercontent.com/u/584693?v=4)](https://github.com/atimmer "atimmer (92 commits)")[![jcomack](https://avatars.githubusercontent.com/u/4181340?v=4)](https://github.com/jcomack "jcomack (22 commits)")[![IreneStr](https://avatars.githubusercontent.com/u/17744553?v=4)](https://github.com/IreneStr "IreneStr (22 commits)")[![moorscode](https://avatars.githubusercontent.com/u/2005352?v=4)](https://github.com/moorscode "moorscode (18 commits)")[![enricobattocchi](https://avatars.githubusercontent.com/u/15989132?v=4)](https://github.com/enricobattocchi "enricobattocchi (17 commits)")[![schlessera](https://avatars.githubusercontent.com/u/83631?v=4)](https://github.com/schlessera "schlessera (16 commits)")[![vraja-pro](https://avatars.githubusercontent.com/u/65466507?v=4)](https://github.com/vraja-pro "vraja-pro (7 commits)")[![Dieterrr](https://avatars.githubusercontent.com/u/16388834?v=4)](https://github.com/Dieterrr "Dieterrr (5 commits)")[![karlijnbok](https://avatars.githubusercontent.com/u/43582255?v=4)](https://github.com/karlijnbok "karlijnbok (4 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (4 commits)")[![diedexx](https://avatars.githubusercontent.com/u/5352634?v=4)](https://github.com/diedexx "diedexx (2 commits)")[![omarreiss](https://avatars.githubusercontent.com/u/1488816?v=4)](https://github.com/omarreiss "omarreiss (2 commits)")[![igorschoester](https://avatars.githubusercontent.com/u/35524806?v=4)](https://github.com/igorschoester "igorschoester (1 commits)")[![andreasciamanna](https://avatars.githubusercontent.com/u/181780?v=4)](https://github.com/andreasciamanna "andreasciamanna (1 commits)")[![boblinthorst](https://avatars.githubusercontent.com/u/11849359?v=4)](https://github.com/boblinthorst "boblinthorst (1 commits)")[![DrewAPicture](https://avatars.githubusercontent.com/u/995399?v=4)](https://github.com/DrewAPicture "DrewAPicture (1 commits)")[![felixarntz](https://avatars.githubusercontent.com/u/3531426?v=4)](https://github.com/felixarntz "felixarntz (1 commits)")[![hwinne](https://avatars.githubusercontent.com/u/42736463?v=4)](https://github.com/hwinne "hwinne (1 commits)")[![afercia](https://avatars.githubusercontent.com/u/1682452?v=4)](https://github.com/afercia "afercia (1 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/yoast-whip/health.svg)

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

PHPackages © 2026

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