PHPackages                             neighborhoods/kojo-phinx-templates - 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. neighborhoods/kojo-phinx-templates

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

neighborhoods/kojo-phinx-templates
==================================

Phinx templates for Kōjō.

2.0.0(5y ago)03.2kMITPHP &gt;=7.2

Since Jan 21Pushed 5y ago2 watchersCompare

[ Source](https://github.com/neighborhoods/kojo-phinx-templates)[ Packagist](https://packagist.org/packages/neighborhoods/kojo-phinx-templates)[ RSS](/packages/neighborhoods-kojo-phinx-templates/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (4)Dependencies (2)Versions (6)Used By (0)

Phinx templates for Kōjō
========================

[](#phinx-templates-for-kōjō)

A developer utility to generate [Kōjō](https://github.com/neighborhoods/Kojo) related [Phinx](https://github.com/cakephp/phinx) migrations and seeds.

Install
-------

[](#install)

Via Composer as a development dependency

```
$ composer require --dev neighborhoods/kojo-phinx-templates
```

You should also have [Phinx](https://github.com/cakephp/phinx) and [Kōjō](https://github.com/neighborhoods/Kojo) as direct dependencies. Don't rely on this package pulling them in, especially since this is a dev dependency.

This package requires Phinx 0.12.5 or above. If you're having issues with running the command above, send the `composer.json` file to the code owner.

Use cases
---------

[](#use-cases)

Possible use cases are described below.

### Kōjō setup

[](#kōjō-setup)

Create migration for Kōjō setup. Every project using Kōjō should have it.

```
vendor/bin/phinx create InstallKojo --template=vendor/neighborhoods/kojo-phinx-templates/src/Migration/InstallKojoMigration.template.php.dist
```

If you open the file you'll see that the template assumes that Kōjō parameters are located in the `kojo-environment` folder inside the current working directly.
That's because the `kojo-environment` folder is usually located in the application root from where migrations are usually run using `vendor/bin/phinx migrate` command.
You might need to update the path to Kōjō parameters. If so, consider defining it relative to the migration file, using the `__DIR__` constant.

### Job Type Creation

[](#job-type-creation)

For each new worker generate a migration defining the job type. In these examples the worker name is Observer. Use something more descriptive, like the component name.

```
vendor/bin/phinx create CreateObserverJobType --template=vendor/neighborhoods/kojo-phinx-templates/src/Migration/CreateJobTypeMigration.template.php.dist
```

Open the generated migration, update the job type attributes. The values in the migration should not depend on other classes. Copy constant values, rather than referencing them.

Thanks to @jpmarcotte for insights on this one.

### Job Scheduling

[](#job-scheduling)

If it makes sense, create a seeder scheduling the job. This is useful for jobs rescheduling themselves, providing a way to start the initial job.

```
vendor/bin/phinx seed:create ObserverJobSeeder --template=vendor/neighborhoods/kojo-phinx-templates/src/Seed/JobSeeder.template.php.dist
```

Open the generated seeder and update the `JOB_TYPE_CODE` constant.

Run the generated seeder whenever you want to start the job.

```
vendor/bin/phinx seed:run -s ObserverJobSeeder
```

Jobs rescheduling themselves should be seeded after their job type creation. Integrating the seeding into migrations simplifies the deployment process and ensures the job is seeded only once.
Generate a seeding migration by running the command below.

```
vendor/bin/phinx create SeedObserverJob --template=vendor/neighborhoods/kojo-phinx-templates/src/Migration/SeedJobMigration.template.php.dist
```

Open the generated migration and update the Seed class name in the required seed file path, `up()` and `down()` methods.

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity18

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity52

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 85% 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 ~18 days

Total

4

Last Release

1880d ago

Major Versions

1.1.0 → 2.0.02021-03-19

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/8584765?v=4)[neighborhoods.com](/maintainers/neighborhoods)[@neighborhoods](https://github.com/neighborhoods)

---

Top Contributors

[![Firtzberg](https://avatars.githubusercontent.com/u/8490119?v=4)](https://github.com/Firtzberg "Firtzberg (17 commits)")[![arielallon](https://avatars.githubusercontent.com/u/1356396?v=4)](https://github.com/arielallon "arielallon (3 commits)")

### Embed Badge

![Health badge](/badges/neighborhoods-kojo-phinx-templates/health.svg)

```
[![Health](https://phpackages.com/badges/neighborhoods-kojo-phinx-templates/health.svg)](https://phpackages.com/packages/neighborhoods-kojo-phinx-templates)
```

###  Alternatives

[nzedb/nzedb

A Usenet Indexer

6415.4k](/packages/nzedb-nzedb)

PHPackages © 2026

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