PHPackages                             ortho-code/coding-standards - 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. ortho-code/coding-standards

ActiveLibrary

ortho-code/coding-standards
===========================

OrthoCode's coding standards, distributed with standards-sync

v0.1.0(today)04↑2900%MITPHPPHP ^8.5CI passing

Since Aug 28Pushed todayCompare

[ Source](https://github.com/ortho-code/coding-standards)[ Packagist](https://packagist.org/packages/ortho-code/coding-standards)[ RSS](/packages/ortho-code-coding-standards/feed)WikiDiscussions main Synced today

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

coding-standards
================

[](#coding-standards)

OrthoCode's coding standards, built on the [`ortho-code/standards-sync`](https://github.com/ortho-code/standards-sync) engine. This package declares *which* config files belong in an OrthoCode repository and *what* they contain; the engine understands the formats and writes them.

The standard splits by consumer kind, because a library and an application genuinely want different things — psalm's `findUnusedCode` is right for an application and noise for a library whose public API is uncalled by design.

- **`PackageStandard`** — for library packages.
- **`ProjectStandard`** — for applications. Not built yet.

A shared base is extracted once both tiers exist and the overlap is visible, rather than designed up front.

What `PackageStandard` ships
----------------------------

[](#what-packagestandard-ships)

**Managed blocks**, distributed under the label `ortho-code`: `.editorconfig`, `.gitignore`, a `standards.yml` workflow running the checks on every push and pull request, and a tag-driven `release.yml` whose notes are the `CHANGELOG.md` section for that tag. On a repository's first sync each block is appended, keeping whatever the file already held; afterwards only the inside of the block is rewritten, so everything outside it stays the repository's own. The changelog itself is never synced — the standard ships the release mechanism, each repository writes its own prose.

**Shared config, imported rather than copied**, so it rides `composer update`: the ECS fixer set (PER-CS 3.0 plus ECS's prepared sets, single quotes always), the Rector set, and the PHPStan ruleset. Each is registered as one entry in the consumer's own config, which the consumer otherwise owns.

**Values a project cannot loosen.** PHPStan has a level floor of 6 and `treatPhpDocTypesAsCertain: false` rewritten on every sync. Psalm is seeded at `errorLevel="2"` with `findUnusedCode="false"`, and a looser level is tightened. PHPUnit is seeded and thirteen strictness flags are pinned, including the two PHPUnit already defaults to true, so the config states the whole contract rather than half of it. A seeded config is one-shot: it is written only where none exists and never edits an existing one — the template bootstraps, the pins converge.

**Renovate** extends the shared preset in this repository (`renovate-package-preset.json`), reached as `local>ortho-code/coding-standards:renovate-package-preset`.

**And the enforcement that makes it real**, since synced config enforces nothing on its own: the PHP version and every tool the standard configures are required in the consumer's `composer.json`, an `app-checks` script runs them all plus `standards-sync sync --check`, and the managed workflow calls that script. A repository that drifts fails its own CI rather than drifting quietly.

Usage
-----

[](#usage)

Require the package as a dev dependency and keep a `standards-sync.php` at the repository root:

```
return SyncConfig::create()->withRuleSet(new PackageStandard());
```

Then `vendor/bin/standards-sync sync` applies the standard, and `sync --check` reports drift without writing. Both are available as `composer app-sync` and `composer app-sync-check` once the standard has been applied.

Development
-----------

[](#development)

Everything distributed lives under `templates/`, one subdirectory per tier; the configs this package lints *itself* with stay at its root, outside that directory. This package applies its own standard to itself — its `.editorconfig`, `.gitignore`, workflows and tool configs are all synced output, so `composer app-checks` here runs exactly what a consumer runs.

Tests: `composer app-run-tests`. They assert this package's contribution — the right content wired to the right file — not the engine's rendering, which the engine's own suite pins. Where the standard states the same thing twice, the suite pins the pair: a shipped template's values against the rule that enforces them, and the workflow's call against the script name the standard declares.

Authoring conventions are in [`docs/authoring.md`](docs/authoring.md); what the engine itself requires is in its own [authoring guide](https://github.com/ortho-code/standards-sync/blob/main/docs/authoring-org-packages.md).

License
-------

[](#license)

[MIT](LICENSE)

###  Health Score

39

—

LowBetter than 84% of packages

Maintenance100

Actively maintained with recent releases

Popularity5

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity40

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

Unknown

Total

1

Last Release

0d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/5603434?v=4)[Jille Behm](/maintainers/alleknalle)[@alleknalle](https://github.com/alleknalle)

---

Top Contributors

[![alleknalle](https://avatars.githubusercontent.com/u/5603434?v=4)](https://github.com/alleknalle "alleknalle (13 commits)")

---

Tags

standardscode qualitycoding-standardsconfig-sync

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan, Psalm, Rector

Code StyleECS

Type Coverage Yes

### Embed Badge

![Health badge](/badges/ortho-code-coding-standards/health.svg)

```
[![Health](https://phpackages.com/badges/ortho-code-coding-standards/health.svg)](https://phpackages.com/packages/ortho-code-coding-standards)
```

###  Alternatives

[symfony/event-dispatcher-contracts

Generic abstractions related to dispatching event

3.4k825.3M723](/packages/symfony-event-dispatcher-contracts)[symfony/service-contracts

Generic abstractions related to writing services

2.6k934.5M705](/packages/symfony-service-contracts)[symfony/translation-contracts

Generic abstractions related to translation

2.6k765.3M778](/packages/symfony-translation-contracts)[dealerdirect/phpcodesniffer-composer-installer

PHP\_CodeSniffer Standards Composer Installer Plugin

601180.6M2.7k](/packages/dealerdirect-phpcodesniffer-composer-installer)[symfony/http-client-contracts

Generic abstractions related to HTTP clients

2.0k437.3M511](/packages/symfony-http-client-contracts)[phpcsstandards/phpcsutils

A suite of utility functions for use with PHP\_CodeSniffer

6342.7M106](/packages/phpcsstandards-phpcsutils)

PHPackages © 2026

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