PHPackages                             joomla/compat - 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. [Framework](/categories/framework)
4. /
5. joomla/compat

ActiveJoomla-package[Framework](/categories/framework)

joomla/compat
=============

Joomla Compat Package

1.2.0(11y ago)1157.5k↓39.3%61GPL-2.0+PHPPHP &gt;=5.3.10

Since May 15Pushed 4y ago13 watchersCompare

[ Source](https://github.com/joomla-framework/compat)[ Packagist](https://packagist.org/packages/joomla/compat)[ Docs](https://github.com/joomla-framework/compat)[ RSS](/packages/joomla-compat/feed)WikiDiscussions 1.x-dev Synced 1mo ago

READMEChangelogDependenciesVersions (9)Used By (1)

The Compat Package [![Build Status](https://camo.githubusercontent.com/6d7bb408eaf80405f30dca09d4604b8d00e5c5b52502cb09c58a5bcdc61505d5/68747470733a2f2f63692e6a6f6f6d6c612e6f72672f6170692f6261646765732f6a6f6f6d6c612d6672616d65776f726b2f636f6d7061742f7374617475732e737667)](https://ci.joomla.org/joomla-framework/compat)
===============================================================================================================================================================================================================================================================================================================================

[](#the-compat-package-)

[![Latest Stable Version](https://camo.githubusercontent.com/3dcc073f0845be48226099818628d895e5b2c8db3aafdf0c493e33005ab20e74/68747470733a2f2f706f7365722e707567782e6f72672f6a6f6f6d6c612f636f6d7061742f762f737461626c65)](https://packagist.org/packages/joomla/compat) [![Total Downloads](https://camo.githubusercontent.com/6dee9dbcecddca369d1f3f0cb702e0cfa6be3fbab26208cd1fdb658db776eb17/68747470733a2f2f706f7365722e707567782e6f72672f6a6f6f6d6c612f636f6d7061742f646f776e6c6f616473)](https://packagist.org/packages/joomla/compat) [![Latest Unstable Version](https://camo.githubusercontent.com/693e2bbe6ff241160d4776023f48af0b00cda86874c1d87a415faa212e1f7a33/68747470733a2f2f706f7365722e707567782e6f72672f6a6f6f6d6c612f636f6d7061742f762f756e737461626c65)](https://packagist.org/packages/joomla/compat) [![License](https://camo.githubusercontent.com/e6dd00d80ff853667a4260fccff30ffa42a384b831036335a9bc4453649d53ca/68747470733a2f2f706f7365722e707567782e6f72672f6a6f6f6d6c612f636f6d7061742f6c6963656e7365)](https://packagist.org/packages/joomla/compat)

This is a simple package that contains forward compatibility classes and interfaces that are registered to the global namespace

Deprecated
----------

[](#deprecated)

The `joomla/compat` package has been deprecated. No further updates are planned.

JsonSerializable
----------------

[](#jsonserializable)

`JsonSerializable` is a PHP 5.4 interface that allows you to specify what data to serialize to JSON when you `json_encode` an object that implements the interface.

### Usage

[](#usage)

Since this is a PHP 5.4 interface, the `jsonSerialize()` method does not get called automatically when `json_encode`-ing an instance of the class when used in 5.3. To work around this, simply call the `jsonSerialize()` method directly when passing it to `json_encode`. This is forward-compatible with PHP 5.4.

Note in some instances of PHP 5.5 from Debian the interface is also missing (see ) which will also require this interface to be included.

```
class MyClass implements \JsonSerializable
{
	/**
	 * @var  array  Holds the data this class uses.
	 */
	protected $data;

	public function __construct(array $data)
	{
		$this->data = $data;
	}

	public function jsonSerialize()
	{
		return $this->data;
	}
}

$obj = new MyClass(array('sample', 'data', 'to', 'encode'));

$encoded = json_encode($obj->jsonSerialize());
```

Installation via Composer
-------------------------

[](#installation-via-composer)

Add `"joomla/compat": "~1.0"` to the require block in your composer.json and then run `composer install`.

```
{
	"require": {
		"joomla/compat": "~1.0"
	}
}
```

Alternatively, you can simply run the following from the command line:

```
composer require joomla/compat "~1.0"
```

###  Health Score

38

—

LowBetter than 85% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity35

Limited adoption so far

Community25

Small or concentrated contributor base

Maturity63

Established project with proven stability

 Bus Factor1

Top contributor holds 53.8% 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 ~93 days

Recently: every ~162 days

Total

8

Last Release

4098d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/305a2164440014dcef9ac681c139fe5e8a1ce1d7a8c3b3cfb828497729a4c70e?d=identicon)[wilsonge](/maintainers/wilsonge)

---

Top Contributors

[![mbabker](https://avatars.githubusercontent.com/u/368545?v=4)](https://github.com/mbabker "mbabker (21 commits)")[![asika32764](https://avatars.githubusercontent.com/u/1639206?v=4)](https://github.com/asika32764 "asika32764 (3 commits)")[![dongilbert](https://avatars.githubusercontent.com/u/718028?v=4)](https://github.com/dongilbert "dongilbert (3 commits)")[![photodude](https://avatars.githubusercontent.com/u/10253980?v=4)](https://github.com/photodude "photodude (3 commits)")[![wilsonge](https://avatars.githubusercontent.com/u/1986000?v=4)](https://github.com/wilsonge "wilsonge (2 commits)")[![nibra](https://avatars.githubusercontent.com/u/827605?v=4)](https://github.com/nibra "nibra (2 commits)")[![PhilETaylor](https://avatars.githubusercontent.com/u/400092?v=4)](https://github.com/PhilETaylor "PhilETaylor (1 commits)")[![Hackwar](https://avatars.githubusercontent.com/u/313866?v=4)](https://github.com/Hackwar "Hackwar (1 commits)")[![rdeutz](https://avatars.githubusercontent.com/u/467356?v=4)](https://github.com/rdeutz "rdeutz (1 commits)")[![realityking](https://avatars.githubusercontent.com/u/628508?v=4)](https://github.com/realityking "realityking (1 commits)")[![Achal-Aggarwal](https://avatars.githubusercontent.com/u/3330262?v=4)](https://github.com/Achal-Aggarwal "Achal-Aggarwal (1 commits)")

---

Tags

frameworkjoomlacompat

### Embed Badge

![Health badge](/badges/joomla-compat/health.svg)

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

###  Alternatives

[joomla/filter

Joomla Filter Package

151.4M8](/packages/joomla-filter)[joomla/application

Joomla Application Package

23404.8k11](/packages/joomla-application)[joomla/http

Joomla HTTP Package

17674.4k12](/packages/joomla-http)[joomla/registry

Joomla Registry Package

16468.6k20](/packages/joomla-registry)[joomla/di

Joomla DI Package

15391.2k11](/packages/joomla-di)[joomla/filesystem

Joomla Filesystem Package

12369.7k7](/packages/joomla-filesystem)

PHPackages © 2026

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