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)17.6k↓11.1%18MITPHP

Since Aug 5Pushed 6mo 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 1mo ago

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.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3NzIxNjMxMzQsIm5iZiI6MTc3MjE2MjgzNCwicGF0aCI6Ii8yNjYwNDI0Mi8zNzUxNzczMzEtM2E1MGQ4NDgtNDI5MC00YTQ2LThhYjEtYmMwYTE0OGRhMzc1LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNjAyMjclMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjYwMjI3VDAzMjcxNFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWM3ZDdjNWE5M2M5ZmRkMDQ4NzNlNzRhZjIxNWJmMGViNTlkMjk0ODVhNDc2NzAxYTQxMzNhZjUxOWExM2VmMWEmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.MlCUUIkJNCFiwu0gEmi63oWI-z2uoTkjWcBLzPCvZnA)](https://private-user-images.githubusercontent.com/26604242/375177331-3a50d848-4290-4a46-8ab1-bc0a148da375.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3NzIxNjMxMzQsIm5iZiI6MTc3MjE2MjgzNCwicGF0aCI6Ii8yNjYwNDI0Mi8zNzUxNzczMzEtM2E1MGQ4NDgtNDI5MC00YTQ2LThhYjEtYmMwYTE0OGRhMzc1LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNjAyMjclMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjYwMjI3VDAzMjcxNFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWM3ZDdjNWE5M2M5ZmRkMDQ4NzNlNzRhZjIxNWJmMGViNTlkMjk0ODVhNDc2NzAxYTQxMzNhZjUxOWExM2VmMWEmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.MlCUUIkJNCFiwu0gEmi63oWI-z2uoTkjWcBLzPCvZnA)

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

41

—

FairBetter than 89% of packages

Maintenance58

Moderate activity, may be stable

Popularity25

Limited adoption so far

Community18

Small or concentrated contributor base

Maturity54

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

200d 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

[behat/behat

Scenario-oriented BDD framework for PHP

4.0k96.8M2.0k](/packages/behat-behat)[orchestra/testbench

Laravel Testing Helper for Packages Development

2.2k39.1M32.1k](/packages/orchestra-testbench)[magento/magento2-functional-testing-framework

Magento2 Functional Testing Framework

15511.5M30](/packages/magento-magento2-functional-testing-framework)[playwright-php/playwright

Modern PHP library for Playwright automation: browsing, scraping, screenshots, testing, and more.

7613.0k5](/packages/playwright-php-playwright)[orchestra/workbench

Workbench Companion for Laravel Packages Development

8217.0M43](/packages/orchestra-workbench)[moodlehq/moodle-plugin-ci

Helps running Moodle plugins analysis checks and tests under various CI environments.

612.6M](/packages/moodlehq-moodle-plugin-ci)

PHPackages © 2026

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