> For the complete documentation index, see [llms.txt](https://senselab.gitbook.io/senselab-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://senselab.gitbook.io/senselab-docs/vendor/infection/extension-installer.md).

# extension-installer

[![CI](https://github.com/infection/extension-installer/workflows/Tests/badge.svg)](https://github.com/infection/extension-installer/actions) [![Coverage Status](https://coveralls.io/repos/github/infection/extension-installer/badge.svg?branch=master)](https://coveralls.io/github/infection/extension-installer?branch=master)

## Infection - Extensions Installer

Composer plugin for automatic registering of [Infection extensions](https://packagist.org/explore/?type=infection-extension).

### How to install extension

Extension installer is bundled together with Infection core. All you need to register a custom extension is just to install a composer package.

Extension will be registered *automatically*.

Infection Extension Installer listens `post-install-cmd` and `post-update-cmd` events and as soon as it finds an Infection extension, it automatically registers it in Infection.

```bash
composer require --dev infection/codecetion-adapter

Using version 1.0.0 for infection/codeception-adapter
Package operations: 1 installs, 0 updates, 0 removals
  - Installing infection/codeception-adapter (1.0.0): Downloading 100%

infection/extension-installer: Extensions installed
> infection/codeception-adapter: installed
```

### How to write an extension for Infection

Infection extension is a composer-based package. Basically it is a composer package which conforms to the following requirements:

* its type field is set to `infection-extension`
* it has `extra.infection.class` subkey in its `composer.json` that references a class that will be invoked in the Infection runtime.

Example:

```json
{
    "name": "infection/codeception-adapter",
    "type": "infection-extension",
    "extra": {
        "infection": {
            "class": "Infection\\TestFramework\\Codeception\\CodeceptionAdapterFactory"
        }
    }
}
```

#### Supported extensions types

Currently, Infection supports only Test Framework extensions ([example](https://github.com/infection/codeception-adapter)).

#### Available extensions

All Infection extensions can be [discovered on Packagist](https://packagist.org/explore/?type=infection-extension).

### Infection - Mutation Testing Framework

Please read documentation here: [infection.github.io](http://infection.github.io)

Twitter: [@infection\_php](http://twitter.com/infection_php)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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://senselab.gitbook.io/senselab-docs/vendor/infection/extension-installer.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.
