PHPackages                             lukaszzychal/php-compatibility-tester - 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. lukaszzychal/php-compatibility-tester

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

lukaszzychal/php-compatibility-tester
=====================================

Universal, reusable Composer package for testing PHP library compatibility with various frameworks and PHP versions

v1.1.0(8mo ago)14.3k[2 issues](https://github.com/lukaszzychal/php-compatibility-tester/issues)1MITPHPPHP ^8.1CI passing

Since Dec 7Pushed 8mo agoCompare

[ Source](https://github.com/lukaszzychal/php-compatibility-tester)[ Packagist](https://packagist.org/packages/lukaszzychal/php-compatibility-tester)[ RSS](/packages/lukaszzychal-php-compatibility-tester/feed)WikiDiscussions main Synced 4w ago

READMEChangelog (1)Dependencies (7)Versions (4)Used By (1)

PHP Compatibility Tester
========================

[](#php-compatibility-tester)

[![CI](https://github.com/lukaszzychal/php-compatibility-tester/actions/workflows/ci.yml/badge.svg)](https://github.com/lukaszzychal/php-compatibility-tester/actions/workflows/ci.yml/badge.svg)[![Docker Tests](https://github.com/lukaszzychal/php-compatibility-tester/actions/workflows/docker-test.yml/badge.svg)](https://github.com/lukaszzychal/php-compatibility-tester/actions/workflows/docker-test.yml/badge.svg)[![Self-Test](https://github.com/lukaszzychal/php-compatibility-tester/actions/workflows/self-test.yml/badge.svg)](https://github.com/lukaszzychal/php-compatibility-tester/actions/workflows/self-test.yml/badge.svg)[![License](https://camo.githubusercontent.com/347b2a17721dd0c2a49c508e50d24af525617463eda65bd753d04dbf0e432031/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f6c756b61737a7a796368616c2f7068702d636f6d7061746962696c6974792d746573746572)](https://camo.githubusercontent.com/347b2a17721dd0c2a49c508e50d24af525617463eda65bd753d04dbf0e432031/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f6c756b61737a7a796368616c2f7068702d636f6d7061746962696c6974792d746573746572)[![PHP Version](https://camo.githubusercontent.com/7535257ca228724c93658bd52583d4e47a9bab02c356abf6e54c1d575f2151e6/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d382e312532422d626c75652e737667)](https://camo.githubusercontent.com/7535257ca228724c93658bd52583d4e47a9bab02c356abf6e54c1d575f2151e6/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d382e312532422d626c75652e737667)[![Latest Release](https://camo.githubusercontent.com/50e10fda0cc5aee29c33e83c0e5349d7b9a6c70040b53d63860df4adeb36885a/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f762f72656c656173652f6c756b61737a7a796368616c2f7068702d636f6d7061746962696c6974792d7465737465723f696e636c7564655f70726572656c6561736573)](https://camo.githubusercontent.com/50e10fda0cc5aee29c33e83c0e5349d7b9a6c70040b53d63860df4adeb36885a/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f762f72656c656173652f6c756b61737a7a796368616c2f7068702d636f6d7061746962696c6974792d7465737465723f696e636c7564655f70726572656c6561736573)[![Packagist Version](https://camo.githubusercontent.com/d774a91adaec0b1d66d7f06c5fb338bfa9c591cac2141981e965042f67212625/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6c756b61737a7a796368616c2f7068702d636f6d7061746962696c6974792d746573746572)](https://camo.githubusercontent.com/d774a91adaec0b1d66d7f06c5fb338bfa9c591cac2141981e965042f67212625/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6c756b61737a7a796368616c2f7068702d636f6d7061746962696c6974792d746573746572)[![Packagist Downloads](https://camo.githubusercontent.com/2dd0447955c4f3b40efea851e80d6467cb9b3e726e722a34871be874fb57e5fb/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6c756b61737a7a796368616c2f7068702d636f6d7061746962696c6974792d746573746572)](https://camo.githubusercontent.com/2dd0447955c4f3b40efea851e80d6467cb9b3e726e722a34871be874fb57e5fb/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6c756b61737a7a796368616c2f7068702d636f6d7061746962696c6974792d746573746572)[![GitHub Issues](https://camo.githubusercontent.com/b333138df123da0dcf632615a7c574c77d4cdcc0337b0a817befbe4791c6783a/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6973737565732f6c756b61737a7a796368616c2f7068702d636f6d7061746962696c6974792d746573746572)](https://camo.githubusercontent.com/b333138df123da0dcf632615a7c574c77d4cdcc0337b0a817befbe4791c6783a/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6973737565732f6c756b61737a7a796368616c2f7068702d636f6d7061746962696c6974792d746573746572)[![GitHub Pull Requests](https://camo.githubusercontent.com/b2adc2da54125b50814c8d4db8501bdca9920d4c36a4ee23613c94985431dd8d/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6973737565732d70722f6c756b61737a7a796368616c2f7068702d636f6d7061746962696c6974792d746573746572)](https://camo.githubusercontent.com/b2adc2da54125b50814c8d4db8501bdca9920d4c36a4ee23613c94985431dd8d/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6973737565732d70722f6c756b61737a7a796368616c2f7068702d636f6d7061746962696c6974792d746573746572)[![GitHub Contributors](https://camo.githubusercontent.com/3e6d05d81ac27baa1835da58a675807afae9b235ec6aa421980673664d287b7e/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f636f6e7472696275746f72732f6c756b61737a7a796368616c2f7068702d636f6d7061746962696c6974792d746573746572)](https://camo.githubusercontent.com/3e6d05d81ac27baa1835da58a675807afae9b235ec6aa421980673664d287b7e/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f636f6e7472696275746f72732f6c756b61737a7a796368616c2f7068702d636f6d7061746962696c6974792d746573746572)[![GitHub Stars](https://camo.githubusercontent.com/9d4688e72a0cb2ee0f225ddd34a54eae7f34f88aad6eeb9e0cad1d89e087711f/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f73746172732f6c756b61737a7a796368616c2f7068702d636f6d7061746962696c6974792d7465737465723f7374796c653d736f6369616c)](https://camo.githubusercontent.com/9d4688e72a0cb2ee0f225ddd34a54eae7f34f88aad6eeb9e0cad1d89e087711f/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f73746172732f6c756b61737a7a796368616c2f7068702d636f6d7061746962696c6974792d7465737465723f7374796c653d736f6369616c)

A universal, reusable Composer package for testing PHP library compatibility with various frameworks (Laravel, Symfony, CodeIgniter, etc.) and PHP versions.

What does this package do?
--------------------------

[](#what-does-this-package-do)

**In short**: This package automatically tests whether your PHP library works with different frameworks and PHP versions.

### The Problem It Solves

[](#the-problem-it-solves)

When you create a PHP library (e.g., `vendor/my-package`), you need to know:

- ✅ Does it work with Laravel 11 and 12?
- ✅ Does it work with Symfony 7 and 8?
- ✅ Does it work on PHP 8.1, 8.2, 8.3, 8.4?
- ✅ Are there any dependency conflicts?

Manually checking all these combinations is time-consuming and error-prone.

### How It Works (Step by Step)

[](#how-it-works-step-by-step)

1. **Creates temporary framework projects**

    - For each framework/version, it creates a fresh project (e.g., `composer create-project laravel/laravel`)
2. **Installs your library**

    - In each project, it installs your library via Composer
3. **Runs your tests**

    - Executes your custom test scripts (e.g., checks if classes can be autoloaded)
4. **Generates a report**

    - Creates a detailed report (Markdown/JSON/HTML) with all results

### Example Output

[](#example-output)

The report shows you:

- ✅ Laravel 11.\* + PHP 8.2 - **WORKS**
- ❌ Laravel 12.\* + PHP 8.1 - **FAILS** (requires PHP 8.2+)
- ✅ Symfony 7.4.\* + PHP 8.3 - **WORKS**
- And so on...

### Real-World Analogy

[](#real-world-analogy)

Think of it like unit tests, but for compatibility:

- **Unit tests** = Does my code work correctly?
- **Compatibility Tester** = Does my code work in different environments?

### Who Is This For?

[](#who-is-this-for)

- **Library creators** - Want to know what your library works with
- **Package maintainers** - Need to support multiple frameworks
- **Teams** - Want to automatically check compatibility in CI/CD

### In One Sentence

[](#in-one-sentence)

**Automatically tests if your PHP library works with different frameworks and PHP versions, without manually checking every combination.**

Features
--------

[](#features)

- Test compatibility across multiple PHP versions (8.1+)
- Support for major PHP frameworks (Laravel, Symfony, CodeIgniter, Laminas, Yii, CakePHP, Slim, Lumen, Phalcon)
- YAML-based configuration
- CLI commands for easy testing
- Multiple report formats (Markdown, JSON, HTML)
- GitHub Actions integration
- Custom test scripts support

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

[](#installation)

Install via Composer:

```
composer require --dev lukaszzychal/php-compatibility-tester
```

Quick Start
-----------

[](#quick-start)

1. Initialize the configuration in your project:

```
vendor/bin/compatibility-tester init
```

This will create a `.compatibility.yml` configuration file and copy necessary templates.

2. Edit `.compatibility.yml` to configure your tests:

```
package_name: "your-vendor/your-package"
php_versions: ['8.1', '8.2', '8.3', '8.4']
frameworks:
  laravel:
    versions: ['11.*', '12.*']
    install_command: 'composer create-project laravel/laravel'
    php_min_version: '8.1'
```

3. Run compatibility tests:

```
vendor/bin/compatibility-tester test
```

4. Generate a report:

```
vendor/bin/compatibility-tester report --format=markdown --output=report.md
```

Usage
-----

[](#usage)

### Initialize Configuration

[](#initialize-configuration)

```
vendor/bin/compatibility-tester init
```

Creates `.compatibility.yml` and copies template files to your project.

### Run Tests

[](#run-tests)

```
# Run all tests
vendor/bin/compatibility-tester test

# Filter by framework
vendor/bin/compatibility-tester test --framework=laravel

# Filter by framework version
vendor/bin/compatibility-tester test --framework=laravel --version=11.*

# Filter by PHP version
vendor/bin/compatibility-tester test --php=8.3
```

### Generate Reports

[](#generate-reports)

```
# Generate Markdown report (default)
vendor/bin/compatibility-tester report

# Generate JSON report
vendor/bin/compatibility-tester report --format=json --output=report.json

# Generate HTML report
vendor/bin/compatibility-tester report --format=html --output=report.html
```

Configuration
-------------

[](#configuration)

The `.compatibility.yml` file supports the following options:

- `package_name`: Your package name (e.g., "vendor/package")
- `php_versions`: Array of PHP versions to test
- `frameworks`: Framework configurations
    - `versions`: Framework versions to test
    - `install_command`: Command to create framework project
    - `php_min_version`: Minimum PHP version required
    - `php_min_version_X`: Version-specific PHP requirements
- `test_scripts`: Custom test scripts to run
- `github_actions`: GitHub Actions workflow settings

See [Configuration Documentation](docs/configuration.md) for detailed information.

Supported Frameworks
--------------------

[](#supported-frameworks)

- Laravel (11.x, 12.x)
- Symfony (7.4.x, 8.0.x)
- CodeIgniter (4.x, 5.x)
- Laminas (3.x)
- Yii (2.0.x)
- CakePHP (5.x)
- Slim (4.x, 5.x)
- Lumen (11.x)
- Phalcon (5.x)

Requirements
------------

[](#requirements)

- PHP 8.1 or higher
- Composer
- Symfony Console, Process, and YAML components (installed automatically)

Documentation
-------------

[](#documentation)

- [Installation Guide](docs/installation.md)
- [Configuration Reference](docs/configuration.md)
- [Usage Guide](docs/usage.md)
- [GitHub MCP Server Integration](docs/GITHUB_MCP_INTEGRATION.md) - Automatyczne raportowanie i integracja z GitHub
- [CI/CD Documentation](docs/ci-cd.md)
- [Examples](docs/examples/)

Links
-----

[](#links)

- **Packagist**: [lukaszzychal/php-compatibility-tester](https://packagist.org/packages/lukaszzychal/php-compatibility-tester)
- **GitHub**: [lukaszzychal/php-compatibility-tester](https://github.com/lukaszzychal/php-compatibility-tester)
- **Issues**: [Report a bug or request a feature](https://github.com/lukaszzychal/php-compatibility-tester/issues)
- **Discussions**: [Ask questions and share ideas](https://github.com/lukaszzychal/php-compatibility-tester/discussions)

Contributing
------------

[](#contributing)

Contributions are welcome! Please feel free to submit a Pull Request.

- [Open an Issue](https://github.com/lukaszzychal/php-compatibility-tester/issues) to report bugs or suggest features
- [Start a Discussion](https://github.com/lukaszzychal/php-compatibility-tester/discussions) to ask questions or share ideas
- Submit a Pull Request to contribute code

License
-------

[](#license)

This package is open-sourced software licensed under the [MIT license](LICENSE.md).

Author
------

[](#author)

Lukasz Zychal

###  Health Score

33

—

LowBetter than 72% of packages

Maintenance42

Moderate activity, may be stable

Popularity26

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity46

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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 ~0 days

Total

3

Last Release

242d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/ee8c63c432f2a2f711c623a12eb524149d97de33a0d5c63f0c48b1151c358e0b?d=identicon)[Lukasz Zychal](/maintainers/Lukasz%20Zychal)

---

Top Contributors

[![lukaszzychal](https://avatars.githubusercontent.com/u/9255872?v=4)](https://github.com/lukaszzychal "lukaszzychal (56 commits)")

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan, Psalm

Type Coverage Yes

### Embed Badge

![Health badge](/badges/lukaszzychal-php-compatibility-tester/health.svg)

```
[![Health](https://phpackages.com/badges/lukaszzychal-php-compatibility-tester/health.svg)](https://phpackages.com/packages/lukaszzychal-php-compatibility-tester)
```

###  Alternatives

[phpro/grumphp

A composer plugin that enables source code quality checks.

4.3k17.0M1.1k](/packages/phpro-grumphp)[matomo/matomo

Matomo is the leading Free/Libre open analytics platform

21.7k39.6k](/packages/matomo-matomo)[drupal/core

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

19467.3M1.9k](/packages/drupal-core)[kimai/kimai

Kimai - Time Tracking

4.8k9.4k1](/packages/kimai-kimai)[drupal/core-recommended

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

6943.5M443](/packages/drupal-core-recommended)[shopware/core

Shopware platform is the core for all Shopware ecommerce products.

595.8M650](/packages/shopware-core)

PHPackages © 2026

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