PHPackages                             typisttech/codeception-composer-project-module - 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. typisttech/codeception-composer-project-module

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

typisttech/codeception-composer-project-module
==============================================

Create throw away composer projects for Codeception tests

0.1.2(5y ago)34.4k↓100%[3 PRs](https://github.com/typisttech/codeception-composer-project-module/pulls)1MITPHPPHP ^7.3 || ^8.0CI failing

Since Mar 22Pushed 3y ago2 watchersCompare

[ Source](https://github.com/typisttech/codeception-composer-project-module)[ Packagist](https://packagist.org/packages/typisttech/codeception-composer-project-module)[ Docs](https://github.com/TypistTech/codeception-composer-project-module)[ Fund](https://typist.tech/donation/)[ Fund](https://www.paypal.me/iAmTangRufus/30usd)[ RSS](/packages/typisttech-codeception-composer-project-module/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (6)Versions (11)Used By (1)

Codeception Composer Project Module
===================================

[](#codeception-composer-project-module)

[![Packagist Version](https://camo.githubusercontent.com/bcae5d72a302ca1ae9d0a2b008ead3fd0d5adbc6e71649e4ba4c9988e87b1256/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f747970697374746563682f636f646563657074696f6e2d636f6d706f7365722d70726f6a6563742d6d6f64756c652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/typisttech/codeception-composer-project-module)[![Packagist Downloads](https://camo.githubusercontent.com/4f7c6c46156465c51f3e07d55eb4799ce4821285acba0a2d092c8065503a5b92/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f747970697374746563682f636f646563657074696f6e2d636f6d706f7365722d70726f6a6563742d6d6f64756c652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/typisttech/codeception-composer-project-module)[![PHP from Packagist](https://camo.githubusercontent.com/f6f37d52522f74eedd974ba1442efd0d0342f32baa86338cc2eafe43792fa82b/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f547970697374546563682f636f646563657074696f6e2d636f6d706f7365722d70726f6a6563742d6d6f64756c653f7374796c653d666c61742d737175617265)](https://packagist.org/packages/typisttech/codeception-composer-project-module)[![CircleCI](https://camo.githubusercontent.com/41fe63a48ecec5649b5fc68ef7b2265bd2705673dcab0fa1232ccfc339afd66b/68747470733a2f2f696d672e736869656c64732e696f2f636972636c6563692f6275696c642f67682f547970697374546563682f636f646563657074696f6e2d636f6d706f7365722d70726f6a6563742d6d6f64756c653f7374796c653d666c61742d737175617265)](https://circleci.com/gh/TypistTech/codeception-composer-project-module)[![license](https://camo.githubusercontent.com/a609529c3f715533f47bb962e9e7afeb7ed63c08569e55cfeac5e49a10a31f02/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f547970697374546563682f636f646563657074696f6e2d636f6d706f7365722d70726f6a6563742d6d6f64756c652e7376673f7374796c653d666c61742d737175617265)](https://github.com/TypistTech/codeception-composer-project-module/blob/master/LICENSE)[![Twitter Follow @TangRufus](https://camo.githubusercontent.com/a4aa54a559719fc76a4677ca1d7ec33443d14423085acb58d268fe77f09c61ce/68747470733a2f2f696d672e736869656c64732e696f2f747769747465722f666f6c6c6f772f54616e6752756675733f7374796c653d666c61742d73717561726526636f6c6f723d316461316632266c6f676f3d74776974746572)](https://twitter.com/tangrufus)[![Hire Typist Tech](https://camo.githubusercontent.com/8dd68fe769812bdfb1c34fd397ff5e022170342b1d3a47c53055c566ffe8489d/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f486972652d547970697374253230546563682d6666363962342e7376673f7374796c653d666c61742d737175617265)](https://www.typist.tech/contact/)

 **Create throw away composer projects for Codeception tests.**

 Built with ♥ by [Typist Tech](https://www.typist.tech/)

---

**Codeception Composer Project Module** is an open source project and completely free to use.

However, the amount of effort needed to maintain and develop new features is not sustainable without proper financial backing. If you have the capability, please consider donating using the links below:

[![GitHub via Sponsor](https://camo.githubusercontent.com/9c923c0024fc20fbd1ea153035ab2b5bb25cf1423c5aa07c35fd3e16b227a307/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f53706f6e736f722d4769744875622d6561346161613f7374796c653d666c61742d737175617265266c6f676f3d676974687562)](https://github.com/sponsors/TangRufus)[![Sponsor via PayPal](https://camo.githubusercontent.com/117a21252fdae389ecc103138cd11218cd7587caf3901b042dfe9dbe3690294e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f53706f6e736f722d50617950616c2d626c75652e7376673f7374796c653d666c61742d737175617265266c6f676f3d70617970616c)](https://typist.tech/go/paypal-donate/)[![More Sponsorship Information](https://camo.githubusercontent.com/15df9b6725c174bae83d974b5cd09cc984d66ee62b3570785648de09de168736/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f53706f6e736f722d4d6f726525323044657461696c732d6666363962343f7374796c653d666c61742d737175617265)](https://typist.tech/donate/codeception-composer-project-module/)

---

Create throw away composer projects for Codeception tests.

Why?
----

[](#why)

Because it's good to test your composer plugins in a more realistic environment.

The Goals, or What This Module Does?
------------------------------------

[](#the-goals-or-what-this-module-does)

Create throw away composer projects for Codeception tests.

Before each test:

- Copy dummy composer project files to a temporary directory
- Config local packages paths
- Install package via composer
- Change directory into the temporary directory

After each test:

- Delete the temporary directory

Install
-------

[](#install)

```
composer require --dev typisttech/codeception-composer-project-module
```

Config
------

[](#config)

In your Codeception config file (e.g: `acceptance.suite.yml` or `acceptance.yml`):

*This is the minimal config:*

```
modules:
    enabled:
        - ComposerProject:
            projectRoot: 'path/to/composer/project'
            depends:
                - Cli
                - Filesystem
```

*This is the full config:*

```
modules:
    enabled:
        - ComposerProject:
            projectRoot: 'path/to/composer/project'
            composerInstallFlags: '--no-interaction --quiet'
            symlink: 'true'
            repositoryPaths:
                - 'tests/_data/dummy'
                - 'tests/_data/another-dummy'
            depends:
                - Cli
                - Filesystem
```

### projectRoot

[](#projectroot)

**Required** String

Example: `tests/_data/project`

Path to the composer project directory, relative to the root directory (where `codeception.yml` is located). This directory must contain a `composer.json` file.

### composerInstallFlags

[](#composerinstallflags)

*Optional* String

Example: `--no-interaction --verbose --no-ansi`

Default: `--no-interaction --quiet`

Extra flags to pass in during `composer install`.

See: [$ composer help install](https://getcomposer.org/doc/03-cli.md#install)

### symlink

[](#symlink)

*Optional* Boolean in **single quotes**

Example: `'false'`

Default: `'true'`

Should the local packages be symlink-ed or not.

See: [Composer document](https://getcomposer.org/doc/05-repositories.md#path)

### repositoryPaths

[](#repositorypaths)

*Optional* Array of strings

Example:

```
- 'tests/_data/dummy'
- 'tests/_data/another-dummy'
```

Default: The root directory (where `codeception.yml` is located).

Paths to local packages, relative to the root directory (where `codeception.yml` is located).

See: [Composer document](https://getcomposer.org/doc/05-repositories.md#path)

---

 **Typist Tech is ready to build your next awesome WordPress site. [Hire us!](https://typist.tech/contact/)**

---

API
---

[](#api)

### amInTmpProjectDir

[](#amintmpprojectdir)

Change directory to the temporary project directory

- @return void

Example:

```
$I->amInTmpProjectDir();
```

### runComposerCommand

[](#runcomposercommand)

Run a composer command

- @param string $command
- @param bool $failNonZero Optional. Default: true Fails If exit code is &gt; 0.
- @return void

Example:

```
// This is equivalent to running `$ composer update --verbose` in the console.
$I->runComposerCommand('update --verbose');
```

### runComposerInstall

[](#runcomposerinstall)

Run `composer install` with [`composerInstallFlags`](#composerinstallflags)

- @return void

Example:

```
$I->runComposerInstall();
```

### getTmpProjectDir()

[](#gettmpprojectdir)

Get the path to the temporary project directory

Note: Return value maybe a symbolic link.

- @return string

Example:

```
$I->getTmpProjectDir();

// To ensure real path:
$tmpProjectDir = $I->getTmpProjectDir();
$tmpProjectDir = realpath($tmpProjectDir);
```

Frequently Asked Questions
--------------------------

[](#frequently-asked-questions)

### Which composer versions are supported?

[](#which-composer-versions-are-supported)

Both v1 and v2.

### I want to see what Codeception Composer Project Module have done for me?

[](#i-want-to-see-what-codeception-composer-project-module-have-done-for-me)

Run the tests with the [`--debug` flag](http://codeception.com/docs/reference/Commands).

Codeception Composer Project Module will log debug message to the console.

### What to do when `composer install` fail or not install the latest version?

[](#what-to-do-when-composer-install-fail-or-not-install-the-latest-version)

> Your requirements could not be resolved to an installable set of packages.

Make sure you have package [version constraints](https://getcomposer.org/doc/articles/versions.md) and [minimum stability](https://getcomposer.org/doc/articles/versions.md#minimum-stability) set up correctly.

```
{
    "require": {
        "dummy/dummy": "*"
    },
    "minimum-stability": "dev"
}
```

### What to do when the tests are too slow?

[](#what-to-do-when-the-tests-are-too-slow)

- Enable [symlink](#symlink)
- Add `--prefer-dist` to [composerInstallFlags](#composerinstallflags)
- Add `"prefer-stable": true` to `composer.json`

Note: These methods are not suitable for every use case.

### Do you have real life examples that use this composer plugin?

[](#do-you-have-real-life-examples-that-use-this-composer-plugin)

Here you go:

- [Imposter Plugin](https://github.com/TypistTech/imposter-plugin)

*Add your own [here](https://github.com/TypistTech/codeception-composer-project-module/edit/master/README.md)*

### Will you add support for older PHP versions?

[](#will-you-add-support-for-older-php-versions)

Never! This plugin will only work on [actively supported PHP versions](https://secure.php.net/supported-versions.php).

Don't use it on **end of life** or **security fixes only** PHP versions.

### It looks awesome. Where can I find some more goodies like this

[](#it-looks-awesome-where-can-i-find-some-more-goodies-like-this)

- Articles on [Typist Tech's blog](https://typist.tech)
- [Tang Rufus' WordPress plugins](https://profiles.wordpress.org/tangrufus#content-plugins) on wp.org
- More projects on [Typist Tech's GitHub profile](https://github.com/TypistTech)
- Stay tuned on [Typist Tech's newsletter](https://typist.tech/go/newsletter)
- Follow [Tang Rufus' Twitter account](https://twitter.com/TangRufus)
- **Hire [Tang Rufus](https://typist.tech/contact) to build your next awesome site**

### Where can I give 5-star reviews?

[](#where-can-i-give-5-star-reviews)

Thanks! Glad you like it. It's important to let me knows somebody is using this project. Please consider:

- [tweet](https://twitter.com/intent/tweet?url=https%3A%2F%2Fgithub.com%2FTypistTech%2Fcodeception-composer-project-module&via=tangrufus&text=Create%20throw%20away%20%23composer%20projects%20for%20%23Codeception%20tests) something good with mentioning [@TangRufus](https://twitter.com/tangrufus)
- ★ star [the Github repo](https://github.com/TypistTech/codeception-composer-project-module)
- [👀 watch](https://github.com/TypistTech/codeception-composer-project-module/subscription) the Github repo
- write tutorials and blog posts
- **[hire](https://www.typist.tech/contact/) Typist Tech**

Testing
-------

[](#testing)

```
composer test
composer style:check
```

Feedback
--------

[](#feedback)

**Please provide feedback!** We want to make this project as useful as possible. Please [submit an issue](https://github.com/TypistTech/codeception-composer-project-module/issues/new) and point out what you do and don't like, or fork the project and [send pull requests](https://github.com/TypistTech/codeception-composer-project-module/pulls/). **No issue is too small.**

Security Vulnerabilities
------------------------

[](#security-vulnerabilities)

If you discover a security vulnerability within this project, please email us at . All security vulnerabilities will be promptly addressed.

Credits
-------

[](#credits)

[Codeception Composer Project Module](https://github.com/TypistTech/codeception-composer-project-module) is a [Typist Tech](https://typist.tech) project and maintained by [Tang Rufus](https://twitter.com/TangRufus), freelance developer for [hire](https://www.typist.tech/contact/).

Full list of contributors can be found [here](https://github.com/TypistTech/codeception-composer-project-module/graphs/contributors).

License
-------

[](#license)

[Codeception Composer Project Module](https://github.com/TypistTech/codeception-composer-project-module) is released under the [MIT License](https://opensource.org/licenses/MIT).

###  Health Score

33

—

LowBetter than 75% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity23

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity64

Established project with proven stability

 Bus Factor1

Top contributor holds 69.8% 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 ~677 days

Total

3

Last Release

1980d ago

PHP version history (2 changes)0.1.0PHP ^7.0

0.1.2PHP ^7.3 || ^8.0

### Community

Maintainers

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

---

Top Contributors

[![dependabot-preview[bot]](https://avatars.githubusercontent.com/in/2141?v=4)](https://github.com/dependabot-preview[bot] "dependabot-preview[bot] (111 commits)")[![tangrufus](https://avatars.githubusercontent.com/u/2259834?v=4)](https://github.com/tangrufus "tangrufus (48 commits)")

---

Tags

acceptance-testingcodeceptioncodeception-modulecomposercomposer-projecttddcomposertestingBDDTDDcodeception-module

###  Code Quality

TestsCodeception

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/typisttech-codeception-composer-project-module/health.svg)

```
[![Health](https://phpackages.com/badges/typisttech-codeception-composer-project-module/health.svg)](https://phpackages.com/packages/typisttech-codeception-composer-project-module)
```

###  Alternatives

[mockery/mockery

Mockery is a simple yet flexible PHP mock object framework

10.7k497.0M23.5k](/packages/mockery-mockery)[orchestra/testbench

Laravel Testing Helper for Packages Development

2.2k39.1M32.0k](/packages/orchestra-testbench)[phpspec/phpspec

Specification-oriented BDD framework for PHP 7.1+

1.9k36.7M3.1k](/packages/phpspec-phpspec)[codedungeon/phpunit-result-printer

PHPUnit Pretty Result Printer

1.2k8.8M397](/packages/codedungeon-phpunit-result-printer)[orchestra/testbench-core

Testing Helper for Laravel Development

27043.7M308](/packages/orchestra-testbench-core)[php-mock/php-mock

PHP-Mock can mock built-in PHP functions (e.g. time()). PHP-Mock relies on PHP's namespace fallback policy. No further extension is needed.

36918.1M98](/packages/php-mock-php-mock)

PHPackages © 2026

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