# laminas/laminas-code

Extensions to the PHP Reflection API, static code scanning, and code generation

Repository: https://github.com/laminas/laminas-code
Canonical: https://ross.abutalabs.com/products/laminas-code
Homepage: https://docs.laminas.dev/laminas-code/
Language: PHP
License: BSD-3-Clause
License Family: permissive
Topics: code-generation, code-scanning, reflection-api
Last push: 2026-08-26T19:10:11+00:00

## Health v2 (maintenance only)
Score: 83/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 99, release rhythm 54, longevity 100
- inputs: {"age_days": 2437, "days_push": 7, "days_rel": 305, "gap_med": 26, "n_releases_24m": 4}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1904, forks 87 (observed 2026-08-28T04:05:51.807030+00:00)

## What it is
A PHP library extending the Reflection API with static code scanning and object-oriented code generation. It can generate new PHP code or update existing code programmatically.

## Use cases
- generate PHP classes programmatically
- scan and analyze PHP source code statically
- extend the PHP Reflection API
- build code scaffolding tools
- modify existing PHP files via an object-oriented interface

## When to choose
- you need to generate or rewrite PHP code as part of a tool or framework
- you need richer reflection and static scanning than PHP's built-in Reflection API

## When to avoid
- you need code generation for languages other than PHP without custom extension
- you just need runtime reflection without code generation

## Facets
- artifact type: library
- maturity: active
- function: parser, developer-tools, plugin-system
- domain: developer-tools, programming-languages
- platform: php, cli
- tags: reflection-api, code-generation, static-analysis, php, automation

## Member repositories
- laminas/laminas-code (main) score 83

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:05:51.807030+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T03:11:51.417253+00:00, confidence not recorded.
  - readme: https://github.com/laminas/laminas-code (fetched 2026-08-28T04:05:51.807030+00:00, sha 6b0bc9a0ab62)
  - homepage: https://docs.laminas.dev/laminas-code/ (fetched 2026-08-29T10:50:47.528924+00:00, sha b3f11571498a)
  - site_page: https://docs.laminas.dev/ (fetched 2026-08-29T10:50:47.538149+00:00, sha e65b2de0cace)
- Data as of 2026-08-30T08:39:29.467469+00:00.
