PHPackages                             codeigniter4/devkit - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. codeigniter4/devkit

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

codeigniter4/devkit
===================

Development toolkit for CodeIgniter libraries and projects

v1.3.0(1y ago)68187.1k↓39.4%15[1 PRs](https://github.com/codeigniter4/devkit/pulls)20MITPHPPHP ^8.1CI passing

Since Nov 21Pushed 2mo ago9 watchersCompare

[ Source](https://github.com/codeigniter4/devkit)[ Packagist](https://packagist.org/packages/codeigniter4/devkit)[ Docs](https://github.com/codeigniter4/devkit)[ RSS](/packages/codeigniter4-devkit/feed)WikiDiscussions develop Synced 1mo ago

READMEChangelog (10)Dependencies (15)Versions (26)Used By (20)

CodeIgniter DevKit
==================

[](#codeigniter-devkit)

Development toolkit for CodeIgniter libraries and projects

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

[](#installation)

Install via Composer:

```
composer config minimum-stability dev
composer config prefer-stable true
composer require --dev codeigniter4/devkit
```

Included Dependencies
---------------------

[](#included-dependencies)

### Styles and Standards

[](#styles-and-standards)

- [CodeIgniter Coding Standard](https://github.com/CodeIgniter/coding-standard)
- [NexusPHP CS Config](https://github.com/NexusPHP/cs-config)

### Testing and Analysis

[](#testing-and-analysis)

- [NexusPHP Tachycardia](https://github.com/NexusPHP/tachycardia)
- [PHPStan](https://phpstan.org/user-guide/getting-started)
- [PHPUnit](https://phpunit.readthedocs.io)
- [Psalm](https://psalm.dev)

### Mocking

[](#mocking)

- [FakerPHP](https://fakerphp.github.io)
- [VFS Stream](https://github.com/bovigo/vfsStream/wiki)

### Security

[](#security)

- [Dependabot](https://docs.github.com/en/code-security/supply-chain-security/keeping-your-dependencies-updated-automatically/about-dependabot-version-updates)
- [Roave Security Advisories](https://github.com/Roave/SecurityAdvisories)

### Additional Tools

[](#additional-tools)

These are integrated into the workflows but not included via Composer. If you want to use them locally they will need to be installed. All of them (except Rector) are available via [Phive](https://phar.io/#Tools).

- [Composer Normalize](https://github.com/ergebnis/composer-normalize)
- [Composer Unused](https://github.com/composer-unused/composer-unused)
- [Deptrac](https://github.com/deptrac/deptrac)
- [Infection](https://infection.github.io/)
- [PHP Coveralls](https://php-coveralls.github.io/php-coveralls/)
- [PHP CS Fixer](https://cs.symfony.com/)
- [Rector](https://github.com/rectorphp/rector/)

Template Files
--------------

[](#template-files)

The provided source files (in **Template/**) should be considered guidelines for your own use, as they may need changing to fit your environment. These are based on the following assumptions:

1. Your default repository branch is set to `develop`
2. You use Composer to manage all necessary dependencies
3. Your source code is located in **app/** (for projects) or **src/** (for libraries)
4. Your unit tests are located in **tests/**
5. Your CodeIgniter dependency is `codeigniter4/framework` (some paths need to be changed for `dev-develop`)

### Workflows

[](#workflows)

This kit includes a number of workflow templates for integrating [GitHub Actions](https://docs.github.com/en/actions)into your library or project development process. To add these to your repo simply copy the workflows into a **Template/.github/workflows/** directory.

Tip

The [source files](src/.github) also include a configuration for Dependabot which will help keep your dependencies and workflows updated.

Below is a brief description of each workflow; see the links above for help with each tool.

#### Deptrac

[](#deptrac)

*Requires **depfile.yaml***

Deptrac is a "dependency tracing" tool that allows developers to define which components should be allowed to access each other. This helps keep your project architecture logical and concise by enforcing the rules you set. For example, you may want to impose an MVC-style architecture by allowing a `Controller` to use any `Model` but not vice-versa.

#### Infection

[](#infection)

*Requires **infection.json.dist***

Just because your tests reach a high level of code coverage does not mean they are comprehensive. Mutation Testing is a way of gauging the *quality* of your unit tests. A silly example: your code has an increment function with a single unit test for 100% coverage:

```
function increment(int $num1, int $num2): int
{
    return $num1 + $num2;
}

function testIncrementWithZero()
{
    $result = increment(42, 0);
    $this->assertSame(42, $result);
}
```

Infection will re-run your unit test against "mutated" versions of your code that *should*cause failures and report "escaped mutations" when they still pass. In this example, Infection mutates your `increment()` function to use `-` instead of `+`, but since your test case still asserts `42` as the result it is considered an "escape" and you should plan to add more tests.

#### PHPCPD

[](#phpcpd)

PHP Copy-Paste Detector analyzes your code and reports when there are blocks of duplicate code more than a certain number of lines long (default: 5). In most cases this is a sign of poor code structure and an opportunity to consolidate classes or functions.

#### PHP CS Fixer

[](#php-cs-fixer)

PHP CS Fixer is used to enforce coding standards. Once the rules are defined in the config file the workflow will check your code against the definitions and fail for any deviance.

#### PHPStan

[](#phpstan)

*Requires **phpstan.neon.dist***

Static analysis is a major factor in catching bugs and issues before they happen. PHPStan will analyze your code for mistakes based on the configuration supplied.

#### PHPUnit

[](#phpunit)

*Requires **phpunit.xml.dist***

Unit testing automates running your code through all the possible scenarios before putting it into use in production. PHPUnit is a highly-configurable framework and suite for writing and running unit tests. This workflow also configures PHPUnit to report on code coverage and upload the results to [Coveralls.io](https://coveralls.io) (you will need a free account, but it is also fine to use this workflow without Coveralls).

#### Rector

[](#rector)

*Requires **rector.php***

Rector provides automated refactoring of code, allowing you to make sweeping updates based on predefined rulesets. Rector can be highly opinionated based on its configuration file (**rector.php**) so be sure to read the documentation and figure out the best fit for you. This workflow performs a "dry run" to check for any changes that Rector would have made and fail if there are matches.

Note

Rector updates rules all the time, so you may want to lock your repo to the latest known working version of Rector to prevent unexpected failures. Using pinned version in `composer.json` and update it with dependabot is the best practice.

#### Unused

[](#unused)

Composer Unused does one thing: checks that your code actually uses the dependencies you have included via Composer. It can be easy to forget to update your **composer.json** when your code drops a dependency, so this workflow will help track those down.

### Hosting with Vagrant

[](#hosting-with-vagrant)

Note

The `Vagrantfile.dist` is unmaintained. It might not work now. Contributions are welcome.

Virtualization is an effective way to test your webapp in the environment you plan to deploy on, even if you develop on a different one. Even if you are using the same platform for both, virtualization provides an isolated environment for testing.

The codebase comes with a **src/Template/Vagrantfile.dist**, that can be copied to **Vagrantfile**and tailored for your system, for instance enabling access to specific database or caching engines.

#### Setting Up

[](#setting-up)

It assumes that you have installed [VirtualBox](https://www.virtualbox.org/wiki/Downloads) and [Vagrant](https://www.vagrantup.com/downloads.html)for your platform.

The Vagrant configuration file assumes you have set up a [ubuntu/bionic64 Vagrant box](https://app.vagrantup.com/ubuntu/boxes/bionic64) on your system:

```
> vagrant box add ubuntu/bionic64
```

#### Testing

[](#testing)

Once set up, you can then launch your webapp inside a VM, with the command:

```
> vagrant up
```

Your webapp will be accessible at , with the code coverage report for your build at  and the user guide for it at .

Example Files
-------------

[](#example-files)

Besides the template files, this repo includes some examples for integrating CodeIgniter with other third-party resources. These files (in **Examples/**) may change over time and should not be relied on for anything more than a reference for your own code.

###  Health Score

57

—

FairBetter than 98% of packages

Maintenance65

Regular maintenance activity

Popularity48

Moderate usage in the ecosystem

Community39

Small or concentrated contributor base

Maturity69

Established project with proven stability

 Bus Factor2

2 contributors hold 50%+ of commits

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 ~48 days

Recently: every ~94 days

Total

25

Last Release

470d ago

Major Versions

v0.1.0 → v1.0.0-beta.12022-01-12

PHP version history (3 changes)v0.1.0PHP ^7.3 || ^8.0

v1.0.0-beta.1PHP ^7.4 || ^8.0

v1.3.0PHP ^8.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/65f693f45781e767ed8557b776fd775309e7a262629892b99cf38462931e9b26?d=identicon)[lonnieezell](/maintainers/lonnieezell)

![](https://www.gravatar.com/avatar/5ebe908b4fe73807ecdd9f88733342199c9991b7de800329f5b2b787c8210d62?d=identicon)[MGatner](/maintainers/MGatner)

---

Top Contributors

[![kenjis](https://avatars.githubusercontent.com/u/87955?v=4)](https://github.com/kenjis "kenjis (87 commits)")[![MGatner](https://avatars.githubusercontent.com/u/17572847?v=4)](https://github.com/MGatner "MGatner (78 commits)")[![samsonasik](https://avatars.githubusercontent.com/u/459648?v=4)](https://github.com/samsonasik "samsonasik (69 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (41 commits)")[![michalsn](https://avatars.githubusercontent.com/u/459185?v=4)](https://github.com/michalsn "michalsn (19 commits)")[![paulbalandan](https://avatars.githubusercontent.com/u/51850998?v=4)](https://github.com/paulbalandan "paulbalandan (11 commits)")[![ddevsr](https://avatars.githubusercontent.com/u/97607754?v=4)](https://github.com/ddevsr "ddevsr (2 commits)")[![luizcmarin](https://avatars.githubusercontent.com/u/67489841?v=4)](https://github.com/luizcmarin "luizcmarin (1 commits)")[![datamweb](https://avatars.githubusercontent.com/u/9530214?v=4)](https://github.com/datamweb "datamweb (1 commits)")

---

Tags

static analysiscodeigniterdevelopmenttoolstoolkitcodeigniter4devkit

### Embed Badge

![Health badge](/badges/codeigniter4-devkit/health.svg)

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

###  Alternatives

[ramsey/devtools

A Composer plugin to aid PHP library and application development.

7134.7k26](/packages/ramsey-devtools)[drupal/core-dev

require-dev dependencies from drupal/drupal; use in addition to drupal/core-recommended to run tests from drupal/core.

2021.0M277](/packages/drupal-core-dev)[wp-cli/wp-cli-tests

WP-CLI testing framework

422.7M87](/packages/wp-cli-wp-cli-tests)[codeigniter4/settings

Settings library for CodeIgniter 4

93499.3k24](/packages/codeigniter4-settings)[codeigniter/phpstan-codeigniter

CodeIgniter extensions and rules for PHPStan

17457.2k30](/packages/codeigniter-phpstan-codeigniter)[tatter/alerts

Lightweight user alerts for CodeIgniter 4

4072.4k6](/packages/tatter-alerts)

PHPackages © 2026

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