PHPackages                             leafs/alchemy - 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. [Testing &amp; Quality](/categories/testing)
4. /
5. leafs/alchemy

ActiveLibrary[Testing &amp; Quality](/categories/testing)

leafs/alchemy
=============

Integrated testing/style fixing tool for your PHP apps

4.0(1y ago)18.1k↓65%18MITPHP

Since Aug 5Pushed 7mo agoCompare

[ Source](https://github.com/leafsphp/alchemy)[ Packagist](https://packagist.org/packages/leafs/alchemy)[ Docs](https://leafphp.dev/docs/tooling/testing)[ GitHub Sponsors](https://github.com/leafsphp)[ Fund](https://opencollective.com/leaf)[ RSS](/packages/leafs-alchemy/feed)WikiDiscussions v4.x Synced today

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

 [![](https://private-user-images.githubusercontent.com/26604242/375177331-3a50d848-4290-4a46-8ab1-bc0a148da375.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3ODI3NDQzMDYsIm5iZiI6MTc4Mjc0NDAwNiwicGF0aCI6Ii8yNjYwNDI0Mi8zNzUxNzczMzEtM2E1MGQ4NDgtNDI5MC00YTQ2LThhYjEtYmMwYTE0OGRhMzc1LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNjA2MjklMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjYwNjI5VDE0NDAwNlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTA1NjIxMDNjNTk1NDBkMTc4ZmEzN2UyMGEyNTE5NGJiM2Y3MmRkNmZmZGQxNzMyNzQyZWE4YWEwZTdjODE2YmMmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JnJlc3BvbnNlLWNvbnRlbnQtdHlwZT1pbWFnZSUyRnBuZyJ9.O3KcF9ESmmRNiu1Rde35Pwy6HVneD0GEkNB2GpwolPY)](https://private-user-images.githubusercontent.com/26604242/375177331-3a50d848-4290-4a46-8ab1-bc0a148da375.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3ODI3NDQzMDYsIm5iZiI6MTc4Mjc0NDAwNiwicGF0aCI6Ii8yNjYwNDI0Mi8zNzUxNzczMzEtM2E1MGQ4NDgtNDI5MC00YTQ2LThhYjEtYmMwYTE0OGRhMzc1LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNjA2MjklMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjYwNjI5VDE0NDAwNlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTA1NjIxMDNjNTk1NDBkMTc4ZmEzN2UyMGEyNTE5NGJiM2Y3MmRkNmZmZGQxNzMyNzQyZWE4YWEwZTdjODE2YmMmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JnJlc3BvbnNlLWNvbnRlbnQtdHlwZT1pbWFnZSUyRnBuZyJ9.O3KcF9ESmmRNiu1Rde35Pwy6HVneD0GEkNB2GpwolPY)

Alchemy
=======

[](#alchemy)

[![Latest Stable Version](https://camo.githubusercontent.com/3fcbad01bdefd1126bc2583034e1f0e411ee144b1ccffe7cf6187e614c87814c/68747470733a2f2f706f7365722e707567782e6f72672f6c656166732f616c6368656d792f762f737461626c65)](https://packagist.org/packages/leafs/alchemy)[![Total Downloads](https://camo.githubusercontent.com/fcd4748b6531ecbf0295f67620c5804d3e0a38713291a1cdf05922da51d4ec35/68747470733a2f2f706f7365722e707567782e6f72672f6c656166732f616c6368656d792f646f776e6c6f616473)](https://packagist.org/packages/leafs/alchemy)[![License](https://camo.githubusercontent.com/c3cb77d873df64a62cfe32a440a56391f3cca23269019f5c9d10a680240eccd9/68747470733a2f2f706f7365722e707567782e6f72672f6c656166732f616c6368656d792f6c6963656e7365)](https://packagist.org/packages/leafs/alchemy)

Alchemy is an integrated testing/style fixing tool for your PHP applications. Alchemy handles your test/linting setup and any other integration you might need to run your tests like CI/CD. Alchemy is not a testing framework or style fixer, it's a tool that manages all the nasty setup for you.

📦 Setting Up
------------

[](#-setting-up)

You can install alchemy with leaf CLI

```
leaf install alchemy
```

Or with composer

```
composer require leafs/alchemy
```

Once installed, Alchemy will automatically set up an `alchemy.yml` file in your project's root which you can use to configure your tests, linting and github actions.

🗂 Your Alchemy File
-------------------

[](#-your-alchemy-file)

The `alchemy.yml` file should look something like this:

```
app:
  - app
  - src

tests:
  engine: pest
  parallel: true
  paths:
    - tests
  files:
    - '*.test.php'
  coverage:
    processUncoveredFiles: true

lint:
  preset: 'PSR12'
  ignore_dot_files: true
  rules:
    array_syntax:
      syntax: 'short'
    no_unused_imports: true
    single_quote: true
    ordered_imports:
      imports_order: null
      case_sensitive: false
      sort_algorithm: 'alpha'

actions:
  run:
    - 'lint'
    - 'test'
  php:
    extensions: json, zip
    versions:
      - '8.3'
  event:
    - 'push'
    - 'pull_request'
```

You can make edits to this file to suit your needs. The `app` key is an array of directories to look for your app files in. The `tests` key is an array of configurations for your tests. The `lint` key is an array of configurations for your code styling checks. Once you're done setting up your `alchemy.yml` file, you can run the setup script.

```
leaf run alchemy # or composer run alchemy
```

This will install your test engine, PHP CS Fixer and any other dependencies you might need, and then generate dummy tests using the test engine you chose. It will then lint your code, run your tests and generate a coverage report (if you selected that option). It will also add a `test` and `lint` command to your `composer.json` file which you can use to run your tests and lint your code respectively. Finally, it will generate a `.github/workflows` directory with a `test.yml` file and a `lint.yml` file which you can use to run your tests and linting on github actions.

Based on your engine, you might see either of the outputs below

- PEST PHP

[![image](https://user-images.githubusercontent.com/26604242/182198978-1b8e2ba2-42e7-4345-82d0-3ae5be35d299.png)](https://user-images.githubusercontent.com/26604242/182198978-1b8e2ba2-42e7-4345-82d0-3ae5be35d299.png)

- PHPUnit

[![image](https://user-images.githubusercontent.com/26604242/182198446-47a4a581-3aa4-470c-b450-420604b9bb6c.png)](https://user-images.githubusercontent.com/26604242/182198446-47a4a581-3aa4-470c-b450-420604b9bb6c.png)

###  Health Score

40

—

FairBetter than 86% of packages

Maintenance53

Moderate activity, may be stable

Popularity25

Limited adoption so far

Community18

Small or concentrated contributor base

Maturity55

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 98.6% 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 ~118 days

Recently: every ~89 days

Total

11

Last Release

245d ago

Major Versions

v1.0.3 → 2.02024-11-06

2.2 → 4.02025-03-01

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/29547806?v=4)[Mychi](/maintainers/Mychi)[@mychi](https://github.com/mychi)

---

Top Contributors

[![mychidarko](https://avatars.githubusercontent.com/u/26604242?v=4)](https://github.com/mychidarko "mychidarko (73 commits)")[![crosa7](https://avatars.githubusercontent.com/u/32076460?v=4)](https://github.com/crosa7 "crosa7 (1 commits)")

---

Tags

phptestingtestactionsleaflinting

### Embed Badge

![Health badge](/badges/leafs-alchemy/health.svg)

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

###  Alternatives

[phpro/grumphp

A composer plugin that enables source code quality checks.

4.3k16.7M1.0k](/packages/phpro-grumphp)[matomo/matomo

Matomo is the leading Free/Libre open analytics platform

21.7k38.9k](/packages/matomo-matomo)[drupal/core

Drupal is an open source content management platform powering millions of websites and applications.

21866.0M1.7k](/packages/drupal-core)[drupal/core-recommended

Locked core dependencies; require this project INSTEAD OF drupal/core.

6942.5M421](/packages/drupal-core-recommended)[kimai/kimai

Kimai - Time Tracking

4.8k9.0k1](/packages/kimai-kimai)[shopware/core

Shopware platform is the core for all Shopware ecommerce products.

585.6M574](/packages/shopware-core)

PHPackages © 2026

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