# laminas-coding-standard

> The Laminas Project's PHP_CodeSniffer coding standard ruleset, built on PSR-12

Source: https://talira.ai/catalog/laminas-coding-standard-wf2s5eqd
Every listing: https://talira.ai/catalog.md

- Kind: Open source
- Types: Plugin
- Categories: [developer tools / linting](https://talira.ai/categories/developer-tools/linting), [languages / php](https://talira.ai/categories/languages/php)
- Licence: BSD-3-Clause[^2]
- Pricing: Free and open source[^1]
- Free tier: yes[^1]
- Supports: [PSR-12](https://talira.ai/standards/psr-12.md)[^1]
- Backed by: [Laminas Project](https://talira.ai/orgs/laminas-project.md)

laminas-coding-standard is the coding standard ruleset the Laminas Project uses for its components, packaged for PHP_CodeSniffer. It extends and expands PSR-12 and requires PSR-1, adding rules for the things those minimal specifications leave open, such as whitespace around operators, aligning array keys and object operations, formatting multi-line conditionals and which functions to import, so code stays consistent within and between components. You install it as a Composer dev dependency and point a phpcs.xml at it, then check with phpcs and fix with phpcbf.

## Links

- GitHub: https://github.com/laminas/laminas-coding-standard
- Docs: https://docs.laminas.dev/laminas-coding-standard/

## Problems it solves

- enforce a consistent PHP coding style beyond PSR-12
- use the same coding standard as the Laminas components
- stop code review arguments about spacing and alignment in PHP

## Features

- a PHP_CodeSniffer ruleset extending PSR-12 and requiring PSR-1
- rules for operator whitespace, array and object alignment and multi-line conditionals
- rules for what to import and how
- fix violations automatically with phpcbf

## Trust

Overall: 0.39 out of 1.
Signals: maintenance 0.66, adoption 0.31, momentum 0.04, community 0.53, backing 0.30, extensibility 0.00.

- last commit 28 days ago
- 9 commits in the last 90 days
- latest release 3.1.0 18 months ago
- 33 GitHub stars
- 20 contributors
- accepts sponsorship (Custom)
- backed by Laminas Project

## Related

- Works with [PHP_CodeSniffer](https://talira.ai/catalog/php-codesniffer-zrnhrrbz.md)

## Alternatives

- [PHP_CodeSniffer](https://talira.ai/catalog/php-codesniffer-zrnhrrbz.md): Detect and fix coding standard violations in PHP
- [Slevomat Coding Standard](https://talira.ai/catalog/slevomat-coding-standard-dfdcdx7p.md): Extra PHP_CodeSniffer sniffs for safer, cleaner and consistently formatted PHP
- [Easy Coding Standard (ECS)](https://talira.ai/catalog/easy-coding-standard-ecs-1f178a34.md): Runs PHP_CodeSniffer and PHP-CS-Fixer rules together, fast
- [WordPress Coding Standards for PHP_CodeSniffer](https://talira.ai/catalog/wordpress-coding-standards-for-php-codesniffer-598761fd.md): PHP_CodeSniffer rules that enforce WordPress coding conventions
- [Credo](https://talira.ai/catalog/credo-163rrxe7.md): Static code analysis for Elixir, with a focus on teaching and code consistency

## Sources

[^1]: https://github.com/laminas/laminas-coding-standard/blob/3.2.x/README.md (checked 28 Nov 2026)
[^2]: https://github.com/laminas/laminas-coding-standard/blob/3.2.x/LICENSE.md (checked 28 Nov 2026)
