PHPackages                             kata/php - 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. kata/php

ActiveLibrary

kata/php
========

PHP Kata skeleton

6233727[1 PRs](https://github.com/carlosbuenosvinos/php-kata/pulls)PHPCI failing

Since Nov 4Pushed 3y ago2 watchersCompare

[ Source](https://github.com/carlosbuenosvinos/php-kata)[ Packagist](https://packagist.org/packages/kata/php)[ RSS](/packages/kata-php/feed)WikiDiscussions master Synced 3d ago

READMEChangelogDependenciesVersions (1)Used By (0)

kata/php
========

[](#kataphp)

PHP skeleton for doing coding katas
-----------------------------------

[](#php-skeleton-for-doing-coding-katas)

*Code Kata* is a term coined by Dave Thomas, co-author of the book The Pragmatic Programmer, in a bow to the Japanese concept of kata in the martial arts. A code kata is an exercise in programming which helps a programmer hone their skills through practice and repetition. As of October 2011, Dave Thomas has published 21 different katas.

You can find some to start practicing [here](http://codingdojo.org/cgi-bin/index.pl?KataCatalogue).

When you do programming katas, you use TDD. That's why I have included PHPUnit, Mockery, PHPSpec and Prophecy as composer dependencies. Choose the testing framework you feel more comfortable (or play with both).

Practicing a kata
=================

[](#practicing-a-kata)

Let's imagine you want to practice "Bowling game kata". Details about this kata can be found [here](http://codingdojo.org/cgi-bin/wiki.pl?KataBowling).

You will need composer.

```
curl -sS https://getcomposer.org/installer | php

```

Then, use "create-project" command to clone this project as a template and create a new one in your computer.

```
php composer.phar create-project kata/php bowling-kata dev-master

```

Then add your classes to 'src/Kata' and your test cases to 'src/Kata/Tests' and run 'php bin/phpunit' to run your tests.

```
php bin/phpunit

```

TestCase examples
=================

[](#testcase-examples)

If you run 'php bin/phpunit' you will see the following output.

```
PHPUnit 3.8-gc4f2bcd by Sebastian Bergmann.

Configuration read from /Users/carlosbuenosvinos/Documents/Web/bowling/phpunit.xml

...

Time: 91 ms, Memory: 1.75Mb
OK (3 tests, 3 assertions)

```

That's because you will find one class and its TestCase in the project in order to help you. You can delete them.

Adder is a class that adds two numbers and AdderTest tests that.

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity28

Limited adoption so far

Community16

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 50% 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.

### Community

Maintainers

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

---

Top Contributors

[![carlosbuenosvinos](https://avatars.githubusercontent.com/u/351553?v=4)](https://github.com/carlosbuenosvinos "carlosbuenosvinos (2 commits)")[![nachosalvador](https://avatars.githubusercontent.com/u/8913851?v=4)](https://github.com/nachosalvador "nachosalvador (1 commits)")[![quimcalpe](https://avatars.githubusercontent.com/u/1057151?v=4)](https://github.com/quimcalpe "quimcalpe (1 commits)")

### Embed Badge

![Health badge](/badges/kata-php/health.svg)

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

PHPackages © 2026

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