PHPackages                             imponeer/extensions-setup-contracts - 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. [PSR &amp; Standards](/categories/psr-standards)
4. /
5. imponeer/extensions-setup-contracts

ActiveLibrary[PSR &amp; Standards](/categories/psr-standards)

imponeer/extensions-setup-contracts
===================================

Interfaces for writing setup logic when installing extensions

v0.2.2(5mo ago)09MITPHPPHP &gt;=8.3CI passing

Since Feb 10Pushed 3mo ago2 watchersCompare

[ Source](https://github.com/imponeer/extensions-setup-contracts)[ Packagist](https://packagist.org/packages/imponeer/extensions-setup-contracts)[ RSS](/packages/imponeer-extensions-setup-contracts/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (10)Dependencies (4)Versions (13)Used By (0)

[![License](https://camo.githubusercontent.com/17bbb73cbdd764d88451896eb883860b6117e8b2c225b1d057f87aa64afde274/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f696d706f6e6565722f657874656e73696f6e732d73657475702d636f6e7472616374732e737667)](LICENSE) [![GitHub release](https://camo.githubusercontent.com/c3e19e35c9331edfb7b020fb9e7d74b795d1ee02a13f2ab1e8da38629b7dfe10/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f72656c656173652f696d706f6e6565722f657874656e73696f6e732d73657475702d636f6e7472616374732e737667)](https://github.com/imponeer/extensions-setup-contracts/releases) [![PHP](https://camo.githubusercontent.com/af8a96d722c4961955e9e54cd47392b49a2e560c50f850502083444e2ce58c8a/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f696d706f6e6565722f657874656e73696f6e732d73657475702d636f6e7472616374732e737667)](http://php.net) [![Packagist](https://camo.githubusercontent.com/160571c1c3cf5f422b25cf9cc6a8d27894e88738def318d0021b716663003318/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f646d2f696d706f6e6565722f657874656e73696f6e732d73657475702d636f6e7472616374732e737667)](https://packagist.org/packages/imponeer/extensions-setup-contracts)

Extensions Setup Contracts
==========================

[](#extensions-setup-contracts)

Interfaces for writing setup logic when installing extensions. This package provides standardized contracts that define how extensions should be installed, updated, or removed in a consistent and predictable manner.

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

[](#installation)

To install and use this package, we recommend using [Composer](https://getcomposer.org):

```
composer require imponeer/extensions-setup-contracts
```

Alternatively, you can manually include files from the `src/` directory, though this approach is not recommended.

Example
-------

[](#example)

Here's a basic example of how to implement the contracts:

```
use Imponeer\Contracts\ExtensionsSetup\InstallableExtensionInterface;
use Imponeer\Contracts\ExtensionsSetup\SetupStepInterface;
use Imponeer\Contracts\ExtensionInfo\ExtensionInfoInterface;
use Imponeer\Decorators\LogDataOutput\OutputDecorator;

// Implement an installable extension
class MyExtension implements InstallableExtensionInterface
{
    public function getExtensionInfo(): ExtensionInfoInterface
    {
        // Return extension information
        return new MyExtensionInfo();
    }
}

// Implement a setup step
class DatabaseSetupStep implements SetupStepInterface
{
    public function __construct(?OutputDecorator $output)
    {
        // Initialize with optional output decorator for logging
    }

    public function execute(InstallableExtensionInterface $extension, array $params): bool
    {
        // Perform database setup logic
        return true;
    }
}
```

Development
-----------

[](#development)

This section describes the development-related Composer commands available for this project.

### Code Style Checking

[](#code-style-checking)

```
composer phpcs
```

### Code Style Fixing

[](#code-style-fixing)

```
composer phpcbf
```

### Static Analysis

[](#static-analysis)

```
composer phpstan
```

API Documentation
-----------------

[](#api-documentation)

Detailed API documentation is available in the [project wiki](https://github.com/imponeer/extensions-setup-contracts/wiki). This documentation is automatically updated whenever changes are made to the codebase.

How to contribute?
------------------

[](#how-to-contribute)

If you want to add functionality or fix bugs, you can fork the repository, make your changes, and create a pull request.

If you find any bugs or have questions, please use the [issues tab](https://github.com/imponeer/extensions-setup-contracts/issues) to report them.

###  Health Score

42

—

FairBetter than 90% of packages

Maintenance77

Regular maintenance activity

Popularity4

Limited adoption so far

Community15

Small or concentrated contributor base

Maturity65

Established project with proven stability

 Bus Factor1

Top contributor holds 54.1% 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 ~194 days

Recently: every ~228 days

Total

10

Last Release

161d ago

PHP version history (2 changes)v0.1PHP &gt;=7.1

v0.2.0PHP &gt;=8.3

### Community

Maintainers

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

![](https://www.gravatar.com/avatar/7255f306e0ca27292c50cdd9644c1c04e0d7b0f54bf35e0cdd79dc55c83b4923?d=identicon)[MekDrop](/maintainers/MekDrop)

![](https://www.gravatar.com/avatar/79009323fafcd4974bb1713b12eea0a610f01c4fb21cc5e85d446c4cb66453d4?d=identicon)[skenow](/maintainers/skenow)

---

Top Contributors

[![MekDrop](https://avatars.githubusercontent.com/u/342641?v=4)](https://github.com/MekDrop "MekDrop (40 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (29 commits)")[![Codex](https://avatars.githubusercontent.com/in/2248422?v=4)](https://github.com/Codex "Codex (2 commits)")[![fiammybe](https://avatars.githubusercontent.com/u/3736946?v=4)](https://github.com/fiammybe "fiammybe (2 commits)")[![mend-bolt-for-github[bot]](https://avatars.githubusercontent.com/in/16809?v=4)](https://github.com/mend-bolt-for-github[bot] "mend-bolt-for-github[bot] (1 commits)")

---

Tags

composer-librarycontractsdecouplingextensionshacktoberfestinterfacessetupinterfacescontractsabstractionsdecouplingextensionssetup

###  Code Quality

Static AnalysisPHPStan

Code StylePHP\_CodeSniffer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/imponeer-extensions-setup-contracts/health.svg)

```
[![Health](https://phpackages.com/badges/imponeer-extensions-setup-contracts/health.svg)](https://phpackages.com/packages/imponeer-extensions-setup-contracts)
```

###  Alternatives

[symfony/translation-contracts

Generic abstractions related to translation

2.6k698.7M432](/packages/symfony-translation-contracts)[symfony/contracts

A set of abstractions extracted out of the Symfony components

3.9k64.6M103](/packages/symfony-contracts)

PHPackages © 2026

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